.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 10, 0.55);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg1) url("../../assets/images/profile.jpeg") center/180% no-repeat;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rightActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.menuBtn,
.langBtn {
  padding: 8px 10px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 36px;
}

.menuBtn {
  font-size: 16px;
  line-height: 1;
  transition: background 0.16s, border-color 0.16s;
}

.menuBtn:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.langBtn {
  transition: transform 0.14s var(--ease), background 0.14s var(--ease), border-color 0.14s var(--ease);
  font-weight: 900;
  font-size: 13px;
}

.langBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--muted);
}

.navOverlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.navOverlay.open {
  opacity: 1;
  visibility: visible;
}

.navShell {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99;
  width: 220px;
  height: 100vh;
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-spring);
}

.navShell.open {
  transform: translateX(0);
}

.navShell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.navShell-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.navShell-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.16s;
}

.navShell-close:hover {
  color: var(--text);
}

.navShell .nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 0;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1px;
  text-transform: uppercase;
  text-align: left;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  user-select: none;
}

.nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--bg1);
}

.nav a[aria-current="page"] {
  color: var(--accent2);
  background: var(--bg1);
  border-color: var(--muted);
}

.wrap {
  max-width: none;
  margin: 0;
  padding: 20px 14px 70px;
}

.content {
  min-width: 0;
  position: relative;
  width: 100%;
}

.section {
  display: none;
  margin-top: 0;
}

.section.active {
  display: block;
  animation: tabEnter 0.25s both;
}

.content.is-section-switching {
  animation: contentSwitch 0.15s both;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.grid-span-3 {
  grid-column: span 12;
}

.grid-span-5 {
  grid-column: span 12;
}

.grid-span-7 {
  grid-column: span 12;
}

.grid-span-12 {
  grid-column: span 12;
}

.panel-soft {
  background: rgba(255, 255, 255, 0.015);
}

.toolbar-fixed {
  min-width: 280px;
}

.links-stack {
  flex-direction: column;
}

.spacer-sm {
  height: 12px;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg1);
  padding: 24px;
  min-height: 300px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.section > .panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: 0;
}

.section > .panel > .panel-inner {
  padding: 0;
}

.panel-inner {
  padding: 18px;
}

.panelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panelHead h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.panelHead p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13.5px;
  max-width: 80ch;
  word-wrap: break-word;
  display: block;
}

.card {
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  transition: transform 0.22s var(--ease-spring), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--bg1);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.section.active .card:not(.is-scrambled),
.section.active .article:not(.is-scrambled),
.section.active .linkbtn:not(.is-scrambled),
.section.active .comment-item:not(.is-scrambled) {
  animation: itemReveal 0.35s both;
  animation-delay: calc(var(--reveal-index, 0) * 30ms + 50ms);
}

.section.active .card:nth-child(1),
.section.active .article:nth-child(1),
.section.active .linkbtn:nth-child(1) {
  --reveal-index: 0;
}

.section.active .card:nth-child(2),
.section.active .article:nth-child(2),
.section.active .linkbtn:nth-child(2) {
  --reveal-index: 1;
}

.section.active .card:nth-child(3),
.section.active .article:nth-child(3),
.section.active .linkbtn:nth-child(3) {
  --reveal-index: 2;
}

.section.active .card:nth-child(4),
.section.active .article:nth-child(4),
.section.active .linkbtn:nth-child(4) {
  --reveal-index: 3;
}

.section.active .card:nth-child(5),
.section.active .article:nth-child(5),
.section.active .linkbtn:nth-child(5) {
  --reveal-index: 4;
}

.section.active .card:nth-child(6),
.section.active .article:nth-child(6),
.section.active .linkbtn:nth-child(6) {
  --reveal-index: 5;
}

.skillGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.skillTitle {
  margin: 0;
  font-weight: 950;
  letter-spacing: 0.2px;
}

.skillDesc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 13.5px;
}

.toolRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 0;
  background: var(--bg0);
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.search {
  flex: 1 1 240px;
  max-width: 440px;
  position: relative;
}

.search input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg0);
  color: var(--text);
  outline: none;
  transition: box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}

.search input:focus {
  border-color: var(--muted);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--text);
  border-radius: 0;
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 950;
  transition: transform 0.14s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.btn:active {
  transform: translateY(0);
}

.listGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.thumb {
  width: 100%;
  height: 120px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg1);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.2px;
  overflow: hidden;
  position: relative;
}

.itemTitle {
  margin: 10px 0 0;
  font-weight: 950;
  letter-spacing: 0.2px;
}

.itemMeta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.itemDesc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.article {
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  transition: transform 0.22s var(--ease-spring), background 0.22s var(--ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.article:hover {
  transform: translateY(-4px);
  background: var(--bg1);
}

.article h4 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.article p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.backdrop.open {
  display: flex;
}

.modal {
  width: min(980px, 96vw);
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg1);
  box-shadow: 0 55px 140px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  transform: translateY(18px) scale(0.975);
  opacity: 0;
  transition: transform 0.34s var(--ease-spring), opacity 0.24s var(--ease);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.backdrop.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.close {
  border: 1px solid var(--line);
  background: var(--bg0);
  color: var(--text);
  border-radius: 0;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 950;
  transition: transform 0.14s var(--ease), border-color 0.16s var(--ease);
  user-select: none;
  line-height: 1;
}

.close:hover {
  transform: translateY(-1px);
  border-color: var(--muted);
}

.modal-body {
  padding: 16px;
  overflow: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.modal-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}

.modal-card h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.modal-card .desc {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
  font-size: 14px;
}

.mediaBox {
  width: 100%;
  height: 180px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: var(--bg1);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px;
  color: var(--muted);
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.links-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.linkbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.14s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.linkbtn:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
  background: var(--bg1);
}

.linkbtn strong {
  font-size: 14px;
}

.linkbtn span {
  color: var(--muted);
  font-size: 12.5px;
}

#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg0);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashOut 3s forwards;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

#splash h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  color: var(--accent2);
  letter-spacing: 0.3em;
  margin: 0;
  animation: splashText 3s forwards;
}

.splash-bar {
  width: 200px;
  max-width: 70vw;
  height: 2px;
  background: var(--line);
  margin-top: 24px;
  overflow: hidden;
}

.splash-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent2);
  animation: splashBar 2.8s ease-in-out forwards;
}

.splash-wait {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 14px;
  animation: splashWait 3s forwards;
}

.story-teaser {
  text-align: center;
  margin-top: 28px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.story-teaser-line {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0;
  font-style: italic;
}

.story-btn {
  margin-top: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.2s var(--ease);
}

.story-btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.story-overlay.open {
  opacity: 1;
  visibility: visible;
}

.story-popup {
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  background: var(--bg1);
  border: 1px solid var(--line);
  padding: 0;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.35s var(--ease-spring), border-color 0.4s;
  display: flex;
  flex-direction: column;
}

.story-overlay.open .story-popup {
  transform: scale(1);
  border-color: var(--accent);
}

.story-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--line);
}

.story-popup-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.story-popup-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.16s;
}

.story-popup-close:hover {
  color: var(--text);
}

.story-popup-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.story-popup-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-line;
}


