@font-face {
  font-family: Geist;
  src: url('./fonts/geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('./fonts/geist-mono-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f2f1ec;
  --surface: #ffffff;
  --surface-soft: #e8e6de;
  --obsidian: #121211;
  --terminal: #171716;
  --terminal-2: #20201e;
  --ink: #121211;
  --ink-soft: #363530;
  --muted: #6a6961;
  --accent: #ff4b1f;
  --accent-hover: #e33b11;
  --accent-soft: rgba(255, 75, 31, 0.1);
  --live: #16a34a;
  --line: rgba(18, 18, 17, 0.11);
  --line-strong: rgba(18, 18, 17, 0.22);
  --line-dark: rgba(242, 241, 236, 0.14);
  --shadow-sm: 0 1px 2px rgba(18, 18, 17, 0.04), 0 6px 16px rgba(18, 18, 17, 0.035);
  --shadow-md: 0 6px 20px rgba(18, 18, 17, 0.07), 0 18px 42px rgba(18, 18, 17, 0.06);
  --shadow-lg: 0 16px 40px rgba(18, 18, 17, 0.16), 0 32px 68px rgba(18, 18, 17, 0.1);
  --sans: Geist, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.15rem, 4.5vw, 4rem);
  --header-height: 4.25rem;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background:
    radial-gradient(62rem 36rem at 82% -8%, rgba(255, 75, 31, 0.07), transparent 62%),
    radial-gradient(50rem 30rem at 8% 12%, rgba(18, 18, 17, 0.035), transparent 60%),
    var(--paper);
  color: var(--ink);
  font: 1rem/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; }
button { color: inherit; font: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap { width: min(100% - 2 * var(--gutter), 78rem); margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; }

.skip-link {
  position: fixed; inset: 0.75rem auto auto 0.75rem; z-index: 60;
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  background: var(--obsidian); color: var(--paper); font-size: 0.875rem;
  text-decoration: none; transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 2.5px; z-index: 50; pointer-events: none;
  background: transparent;
}
.scroll-progress-bar {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--accent), #ff7a59);
  transform-origin: left center;
  transform: scaleX(0);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(242, 241, 236, 0.72);
  backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.is-scrolled .site-header {
  background: rgba(242, 241, 236, 0.9);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(18, 18, 17, 0.04);
}
.header-content {
  min-height: var(--header-height);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.brand {
  width: fit-content; display: inline-flex; align-items: center; gap: 0.52rem;
  font-size: 1rem; font-weight: 700; letter-spacing: -0.025em; text-decoration: none;
}
.brand::before {
  content: ''; width: 0.56rem; height: 0.56rem; border-radius: 2px;
  background: var(--accent); flex: none;
  transition: transform 0.25s var(--ease-out);
}
.brand:hover::before { transform: rotate(45deg) scale(1.1); }
.brand-primary {
  font-size: 1.08rem; font-weight: 720; letter-spacing: -0.025em; line-height: 1;
}
.brand-sub {
  font: 520 0.74rem/1 var(--sans); color: var(--muted);
  padding: 0.22rem 0.48rem; border-radius: 6px;
  background: rgba(18, 18, 17, 0.055);
}
.brand-light .brand-sub {
  color: rgba(242, 241, 236, 0.72);
  background: rgba(242, 241, 236, 0.1);
}

.desktop-nav {
  display: flex; align-items: center; gap: 0.2rem;
  padding: 0.26rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(18, 18, 17, 0.03);
}
.nav-link {
  position: relative; padding: 0.36rem 0.82rem; border-radius: 999px;
  font-size: 0.84rem; font-weight: 500; color: var(--muted);
  text-decoration: none; white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover { color: var(--ink); background: rgba(18, 18, 17, 0.05); }
.nav-link.is-active {
  color: var(--paper); background: var(--obsidian);
}

.header-actions { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
.language-toggle,
.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 2.2rem; padding: 0.32rem 0.72rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem; font-weight: 550; color: var(--ink-soft);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--ease-out);
}
.language-toggle:hover,
.menu-toggle:hover { border-color: var(--ink); background: var(--surface); transform: translateY(-1px); }
.language-toggle { display: none; font-family: var(--mono); }
.has-js .language-toggle { display: inline-flex; }
.header-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.2rem; padding: 0.34rem 0.9rem; border-radius: 999px;
  background: var(--obsidian); color: var(--paper);
  font-size: 0.8rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s var(--ease-out);
}
.header-cta:hover { background: var(--accent); color: var(--ink); transform: translateY(-1px); }
.header-cta-photo {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
}
.header-cta-photo:hover { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.menu-toggle { display: none; }

/* Mobile Menu Dialog */
.mobile-menu {
  width: min(100% - 1.5rem, 26rem); padding: 1.35rem;
  border-radius: var(--radius-lg); border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
}
.mobile-menu::backdrop { background: rgba(18, 18, 17, 0.56); backdrop-filter: blur(6px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.dialog-header button {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 550; background: var(--surface);
}
.mobile-menu nav { display: grid; margin-top: 1.1rem; }
.mobile-menu nav a {
  border-top: 1px solid var(--line); padding-block: 0.82rem;
  text-decoration: none; font-weight: 550; font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu nav a::after { content: '→'; color: var(--muted); font-family: var(--mono); }
.mobile-menu-actions { display: grid; gap: 0.6rem; margin-top: 1.15rem; }
.mobile-github,
.mobile-photo { width: 100%; justify-content: center; }
body:has(.mobile-menu[open]),
body:has(.project-modal[open]) { overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.74rem 1.25rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform 0.24s var(--ease-out), background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}
.btn:active { transform: scale(0.98); }
.btn-arrow { display: inline-block; font-family: var(--mono); transition: transform 0.24s var(--ease-out); }
.btn:hover .btn-arrow { transform: translate(2px, -1px); }

.btn-accent {
  background: var(--accent); color: var(--ink);
  box-shadow: 0 4px 14px rgba(255, 75, 31, 0.24);
}
.btn-accent:hover { background: var(--obsidian); color: var(--paper); box-shadow: var(--shadow-md); }
.btn-outline {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
}
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-ghost {
  background: transparent; color: var(--ink-soft); padding-inline: 0.85rem;
}
.btn-ghost:hover { color: var(--ink); background: rgba(18, 18, 17, 0.06); }
.btn-dark-outline {
  background: rgba(242, 241, 236, 0.06); color: var(--paper); border: 1px solid var(--line-dark);
}
.btn-dark-outline:hover { border-color: var(--paper); background: rgba(242, 241, 236, 0.14); }
.btn-dark-ghost {
  background: rgba(255, 255, 255, 0.08); color: var(--paper); border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-dark-ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* Hero */
.hero {
  position: relative;
  padding-block: 1.5rem clamp(2.5rem, 5vw, 4rem);
}
.hero-ruler {
  display: flex; justify-content: space-between; align-items: flex-end;
  height: 16px; margin-bottom: clamp(1.6rem, 3.5vw, 2.75rem);
  opacity: 0.72;
}
.ruler-tick { width: 1px; background: var(--muted); }
.tick-minor { height: 5px; opacity: 0.45; }
.tick-mid { height: 10px; opacity: 0.7; }
.tick-major { height: 16px; background: var(--ink); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(1.8rem, 4vw, 3.75rem);
}

.hero-prompt {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem;
  font: 500 0.84rem/1.4 var(--mono); color: var(--muted);
}
.prompt-caret {
  width: 7px; height: 13px; background: var(--accent); border-radius: 1px;
  animation: blink 1.15s steps(2, start) infinite;
}
.prompt-identity { color: var(--ink); font-weight: 600; }

.hero-headline {
  margin-top: 0.85rem;
  font-size: clamp(1.82rem, 2.95vw, 2.56rem);
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-bio {
  margin-top: 1.15rem;
  max-width: 58ch;
  font-size: clamp(0.98rem, 1.25vw, 1.07rem);
  line-height: 1.72;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 1.55rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem;
}

/* Hero Terminal Card */
.hero-terminal {
  border-radius: var(--radius-lg);
  background: var(--terminal);
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.term-header {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.72rem 0.95rem;
  background: var(--terminal-2);
  border-bottom: 1px solid var(--line-dark);
}
.term-dots { display: flex; gap: 0.36rem; }
.term-dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(242, 241, 236, 0.22); }
.term-dots span:first-child { background: #ff5f57; opacity: 0.85; }
.term-dots span:nth-child(2) { background: #febc2e; opacity: 0.85; }
.term-dots span:nth-child(3) { background: #28c840; opacity: 0.85; }

.term-tabs { display: flex; gap: 0.25rem; }
.term-tab {
  padding: 0.26rem 0.62rem; border-radius: 6px;
  font: 500 0.74rem/1.2 var(--mono); color: rgba(242, 241, 236, 0.6);
  transition: color 0.18s ease, background-color 0.18s ease;
}
.term-tab:hover { color: var(--paper); }
.term-tab.is-active { color: var(--paper); background: rgba(255, 255, 255, 0.1); }

.term-copy {
  padding: 0.26rem 0.56rem; border-radius: 6px;
  border: 1px solid var(--line-dark);
  font: 500 0.72rem/1.2 var(--mono); color: rgba(242, 241, 236, 0.75);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.term-copy:hover { border-color: var(--accent); color: var(--paper); }
.term-copy.is-copied { border-color: #3fcf8e; color: #3fcf8e; }

.term-body {
  padding: 1.05rem 1.15rem;
  font: 400 0.8rem/1.7 var(--mono);
  overflow-x: auto;
}
.term-line { display: flex; gap: 0.9rem; white-space: pre; }
.term-num { user-select: none; color: rgba(242, 241, 236, 0.28); min-width: 1.3rem; }
.tok-kw { color: #ff7a59; font-weight: 600; }
.tok-id { color: #ffffff; font-weight: 600; }
.tok-key { color: #b6b4aa; }
.tok-str { color: #6ee7b7; }
.tok-op { color: rgba(242, 241, 236, 0.55); }

.term-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 1.15rem;
  border-top: 1px solid var(--line-dark);
  background: rgba(0, 0, 0, 0.2);
  font: 400 0.74rem/1.2 var(--mono); color: rgba(242, 241, 236, 0.65);
}
.term-cursor {
  width: 8px; height: 14px; background: var(--accent);
  animation: blink 1.15s steps(2, start) infinite;
}

/* Hero Stats */
.hero-stats {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.stat-card {
  padding: 1rem 1.15rem; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.stat-label { font: 500 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat-value { margin-top: 0.38rem; font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 680; letter-spacing: -0.03em; line-height: 1.15; }
.stat-detail { margin-top: 0.25rem; font-size: 0.78rem; color: var(--muted); }

/* Hero Ticker */
.hero-ticker {
  margin-top: 1.75rem;
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: 0.72rem;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.ticker-track {
  display: flex; width: max-content;
  animation: stack-scroll 34s linear infinite;
}
.hero-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; gap: 1.1rem; padding-right: 1.1rem; }
.ticker-group span { font: 500 0.78rem/1 var(--mono); color: var(--ink-soft); white-space: nowrap; }
.ticker-sep { font-style: normal; font-family: var(--mono); color: var(--accent); font-weight: 700; }

/* Sections */
.section { padding-block: clamp(3.5rem, 6.5vw, 5.75rem); }
.section:focus-visible { outline-offset: -4px; }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.25rem 2rem; margin-bottom: clamp(1.8rem, 3.5vw, 2.75rem);
}
.section-head-copy { max-width: 44rem; }
.section-eyebrow {
  font: 600 0.76rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.6rem;
}
.eyebrow-light { color: #ff7a59; }
.section h2 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 680; line-height: 1.18; letter-spacing: -0.028em;
  text-wrap: balance;
}
.section-subtitle {
  margin-top: 0.65rem; font-size: 0.98rem; line-height: 1.65; color: var(--muted);
}

/* Projects */
.project-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.85rem);
}
.project-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.32s var(--ease-out), border-color 0.28s ease, box-shadow 0.32s var(--ease-out);
}
.project-card[hidden] { display: none; }
.project-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 20%), rgba(255, 75, 31, 0.08), transparent 65%);
  opacity: 0; transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
  }
  .project-card:hover::before { opacity: 1; }
}

.project-stage { padding: 0.8rem 0.8rem 0; }
.project-cover-btn { display: block; width: 100%; text-align: left; border-radius: 11px; overflow: hidden; }
.project-cover {
  position: relative; overflow: hidden; aspect-ratio: 3 / 2;
  background: var(--obsidian); border-radius: 11px; isolation: isolate;
}
.project-cover-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.55s var(--ease-out);
}
@media (hover: hover) {
  .project-card:hover .project-cover-inner { transform: scale(1.035); }
}
.project-cover img { display: block; }
.project-scene { width: 100%; height: 100%; object-fit: cover; }
.project-screen {
  position: absolute;
  left: var(--screen-x); top: var(--screen-y);
  width: var(--screen-w); height: var(--screen-h);
  object-fit: contain; border-radius: var(--screen-radius); background: #101416;
}
.project-screen-touch {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 91% 100%, 84% 82%, 79% 63%, 77% 63%, 74% 70%, 72% 77%, 73% 87%, 78% 100%, 0 100%);
}
.project-screen-paper { background: #e0dedb; mix-blend-mode: multiply; }

.project-inspect-chip {
  position: absolute; right: 0.7rem; bottom: 0.7rem; z-index: 2;
  padding: 0.34rem 0.7rem; border-radius: 999px;
  background: rgba(18, 18, 17, 0.82); color: var(--paper);
  backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.16);
  font: 500 0.72rem/1.2 var(--mono);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
}
@media (hover: hover) {
  .project-card:hover .project-inspect-chip,
  .project-cover-btn:focus-visible .project-inspect-chip { opacity: 1; transform: translateY(0); }
}

.project-caption {
  display: flex; flex-direction: column; flex: 1;
  padding: 1.15rem 1.35rem 1.35rem;
}
.project-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.45rem 0.75rem;
  font: 500 0.76rem/1.3 var(--mono); color: var(--muted);
}
.project-card-links { display: inline-flex; align-items: center; gap: 0.45rem; }
.project-story-btn {
  padding: 0.24rem 0.62rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-soft);
  font: 500 0.74rem/1.3 var(--mono); color: var(--ink-soft);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.project-story-btn:hover { border-color: var(--ink); background: var(--obsidian); color: var(--paper); }
.project-source {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.24rem 0.62rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.project-source:hover { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.arrow-diag { display: inline-block; transition: transform 0.22s var(--ease-out); }
.project-source:hover .arrow-diag { transform: translate(2px, -2px); }
.projects-more {
  margin-top: 2.15rem;
  display: flex; justify-content: center;
}
.projects-more-btn { padding-inline: 1.45rem; }

.project-heading { margin-top: 0.65rem; }
.project-heading h3 {
  font-size: clamp(1.24rem, 1.9vw, 1.5rem);
  font-weight: 680; line-height: 1.25; letter-spacing: -0.025em;
}
.project-summary { margin-top: 0.45rem; font-size: 0.92rem; line-height: 1.62; color: var(--ink-soft); }
.project-highlight {
  margin-top: 0.8rem;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.48rem 0.72rem; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px solid var(--line);
  font: 500 0.76rem/1.4 var(--mono); color: var(--ink-soft);
}
.highlight-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  list-style: none; padding: 0; margin: auto 0 0; padding-top: 0.95rem;
}
.project-tags li {
  padding: 0.26rem 0.6rem; border-radius: 6px;
  background: var(--surface-soft);
  font: 500 0.74rem/1.3 var(--mono); color: var(--ink-soft);
}

/* Experience (Editorial engineering chapters) */
.exp-header-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.exp-span-pill {
  padding: 0.48rem 0.88rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font: 600 0.82rem/1.2 var(--mono); color: var(--ink);
}

.timeline-wrap { position: relative; padding-left: 1.85rem; }
.timeline-rail {
  position: absolute; left: 5px; top: 0.85rem; bottom: 0.85rem;
  width: 2px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.timeline-rail-fill {
  width: 100%; height: 100%; background: var(--accent);
  transform-origin: top center; transform: scaleY(0);
}
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.35rem; }
.chapter-entry { position: relative; list-style: none; }
.timeline-node {
  position: absolute; left: -1.85rem; top: 1.55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--muted);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.chapter-entry.is-current .timeline-node {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.chapter-card {
  padding: 1.45rem 1.65rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}
.chapter-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }

.chapter-top {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem 1.25rem;
}
.chapter-meta { display: grid; gap: 0.35rem; }
.timeline-date {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 500 0.78rem/1.3 var(--mono); color: var(--muted);
}
.timeline-live-badge {
  padding: 0.16rem 0.52rem; border-radius: 999px;
  background: rgba(22, 163, 74, 0.12); color: #15803d;
  font-size: 0.7rem; font-weight: 600;
}
.chapter-role { font-size: clamp(1.18rem, 1.8vw, 1.38rem); font-weight: 680; letter-spacing: -0.02em; }
.chapter-company { font-size: 0.88rem; font-weight: 560; color: var(--ink-soft); }
.timeline-loc { color: var(--muted); font-weight: 450; }

.chapter-prose {
  margin-top: 0.75rem; font-size: 0.95rem; line-height: 1.68; color: var(--ink-soft);
  max-width: 72ch;
}
.exp-mod-grid {
  list-style: none; margin: 1.05rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem;
}
.exp-mod-grid.is-single { grid-template-columns: 1fr; }
.exp-mod {
  padding: 0.78rem 0.92rem; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px solid var(--line);
}
.exp-mod-title {
  font: 600 0.82rem/1.3 var(--mono); color: var(--ink);
  display: flex; align-items: center; gap: 0.4rem;
}
.exp-mod-title::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none;
}
.exp-mod-desc { margin-top: 0.28rem; font-size: 0.85rem; line-height: 1.56; color: var(--ink-soft); }
.exp-mod-plain .exp-mod-desc { margin-top: 0; }

.timeline-tags {
  display: flex; flex-wrap: wrap; gap: 0.38rem;
  list-style: none; padding: 0; margin: 1rem 0 0;
}
.timeline-tags li {
  padding: 0.22rem 0.58rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-soft);
  font: 500 0.72rem/1.3 var(--mono); color: var(--ink-soft);
}

.early-chapters { margin-top: 1.4rem; }
.early-kicker {
  font: 600 0.76rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 0.7rem;
}
.early-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
}
.chapter-entry.is-compact .chapter-card { padding: 1.15rem 1.25rem; }

/* Stack */
.stack-list { display: grid; gap: 1.4rem; }
.stack-row { min-width: 0; }
.stack-row h3 {
  font: 600 0.82rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 0.7rem;
}
.stack-items { display: flex; flex-wrap: wrap; gap: 0.65rem; list-style: none; margin: 0; padding: 0; }
.stack-pill {
  flex: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.56rem 0.95rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font: 500 0.85rem/1.2 var(--mono); color: var(--ink);
  transition: border-color 0.22s ease, transform 0.22s var(--ease-out), box-shadow 0.22s ease;
}
.stack-pill:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stack-icon { width: 18px; height: 18px; display: inline-flex; color: var(--icon-color, var(--ink)); transition: transform 0.22s var(--ease-out); }
.stack-icon svg { width: 100%; height: 100%; }
.stack-pill:hover .stack-icon { transform: scale(1.12); }
.stack-duplicate { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .has-js .stack-window {
    overflow: hidden;
    padding-block: 0.3rem;
    mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  }
  .has-js .stack-track {
    display: flex; min-width: 200%; width: max-content;
    animation: stack-scroll 46s linear infinite;
  }
  .has-js .stack-row:nth-child(even) .stack-track {
    animation-direction: reverse;
  }
  .has-js .stack-items {
    display: flex; flex: 1 0 auto; flex-wrap: nowrap;
    justify-content: space-around; padding-inline: 0.35rem;
  }
}

@keyframes stack-scroll { to { transform: translateX(-50%); } }

.stack-matrix {
  margin-top: 2.25rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem;
  padding: 1.35rem 1.5rem; border-radius: var(--radius-lg);
  background: var(--terminal); color: var(--paper); box-shadow: var(--shadow-md);
}
.matrix-head { font: 600 0.78rem/1.3 var(--mono); color: #ff7a59; margin-bottom: 0.65rem; }
.matrix-col ul {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 0.32rem;
  font: 400 0.84rem/1.5 var(--mono); color: rgba(242, 241, 236, 0.82);
}

/* About */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch; gap: clamp(1.5rem, 3.5vw, 2.5rem);
}
.about-story {
  display: flex; flex-direction: column; gap: 1.15rem; min-height: 100%;
}
.about-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: stretch;
  gap: 1rem;
}
.about-secondary-grid.is-single { grid-template-columns: 1fr; }
.about-prose {
  flex: 1 1 auto; display: flex; align-items: center;
  padding: 1.5rem 1.65rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 1.01rem; line-height: 1.78; color: var(--ink-soft);
}
.about-edu-card {
  display: flex; flex-direction: column; justify-content: center; height: 100%;
  padding: 1.35rem 1.45rem; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.about-photo-card {
  margin: 0; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  background: var(--surface-soft); aspect-ratio: 3 / 2; height: 100%;
}
.about-photo-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  display: block; transition: transform 0.6s var(--ease-out);
}
.about-photo-card:hover img { transform: scale(1.03); }
.about-edu-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.edu-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.edu-label {
  font: 600 0.74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent);
}
.edu-period { font: 500 0.78rem/1.2 var(--mono); color: var(--muted); }
.about-edu-card h3 {
  margin-top: 0.55rem; font-size: 1.24rem; font-weight: 660; letter-spacing: -0.02em; color: var(--ink);
}
.edu-degree {
  margin-top: 0.28rem; font-size: 0.92rem; font-weight: 560; color: var(--ink-soft);
}
.edu-summary {
  margin-top: 0.65rem; font-size: 0.9rem; line-height: 1.65; color: var(--muted);
}
.edu-honors-block {
  margin-top: 1.05rem; padding-top: 0.95rem; border-top: 1px solid var(--line);
}
.edu-honors-label {
  font: 600 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 0.55rem;
}
.edu-honors {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0.45rem;
}
.edu-honors li {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.65rem;
  font-size: 0.87rem; line-height: 1.5; color: var(--ink-soft);
}
.edu-honor-year {
  padding: 0.16rem 0.45rem; border-radius: 5px;
  background: var(--surface-soft); border: 1px solid var(--line);
  font: 600 0.72rem/1.2 var(--mono); color: var(--accent);
}

/* Live Photography Site Preview */
.about-live-site {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transition: transform 0.28s var(--ease-out), border-color 0.28s ease, box-shadow 0.28s ease;
}
.about-live-site:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 24px 54px -26px rgba(255, 75, 31, 0.28), var(--shadow-lg);
}
.live-frame-stage {
  position: relative; flex: 1 1 auto; width: 100%; min-height: 0; aspect-ratio: 1120 / 920; overflow: hidden;
  background: #fafaf8;
}
.live-frame-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 500 0.85rem/1 var(--mono); color: var(--muted);
}
.live-frame-iframe {
  position: relative; z-index: 1;
  width: 1136px; height: var(--live-frame-h, 1000px); border: 0;
  transform-origin: 0 0;
  transform: scale(var(--live-scale, 0.46));
  pointer-events: none;
  display: block;
}
.live-frame-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: block; cursor: pointer;
}
.live-frame-overlay:focus-visible {
  outline: 2.5px solid var(--accent); outline-offset: -3px; border-radius: var(--radius-lg);
}

/* Dark Contact & Footer */
.section-dark {
  margin-top: 2rem;
  background: var(--obsidian);
  color: var(--paper);
  padding-block: clamp(4rem, 7vw, 6rem) 2.25rem;
}
.contact-hero h2 { max-width: 24ch; font-size: clamp(1.9rem, 3.8vw, 3.1rem); color: var(--paper); }
.contact-sub { margin-top: 0.85rem; max-width: 52ch; font-size: 1rem; color: rgba(242, 241, 236, 0.72); }
.contact-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.footer-grid {
  margin-top: clamp(3rem, 5vw, 4.5rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--line-dark);
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem;
}
.brand-light { color: var(--paper); }
.footer-col-brand p { margin-top: 0.55rem; font-size: 0.9rem; color: rgba(242, 241, 236, 0.64); }
.footer-heading {
  font: 600 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(242, 241, 236, 0.48); margin-bottom: 0.75rem;
}
.footer-col nav, .footer-links { display: grid; gap: 0.45rem; }
.footer-col a {
  width: fit-content; text-decoration: none; font-size: 0.9rem; color: rgba(242, 241, 236, 0.8);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.35rem;
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  font: 400 0.78rem/1.4 var(--mono); color: rgba(242, 241, 236, 0.52);
}
.back-to-top { text-decoration: none; color: rgba(242, 241, 236, 0.82); }
.back-to-top:hover { color: var(--accent); }

/* Project Lightbox Modal */
.project-modal {
  width: min(100% - 2rem, 50rem); max-height: 92dvh;
  padding: 0; border-radius: var(--radius-lg); border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(18, 18, 17, 0.25) transparent;
}
.project-modal::backdrop { background: rgba(18, 18, 17, 0.68); backdrop-filter: blur(8px); }
.modal-shell { display: grid; }
.modal-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--surface);
}
.modal-head-meta { display: flex; align-items: center; gap: 0.55rem; font: 500 0.8rem/1 var(--mono); }
.modal-index { color: var(--accent); font-weight: 700; }
.modal-category { color: var(--muted); }
.modal-head-actions { display: flex; align-items: center; gap: 0.6rem; }
.modal-view-switch {
  display: inline-flex; padding: 0.2rem; border-radius: 999px;
  background: var(--surface-soft); border: 1px solid var(--line);
}
.view-pill {
  padding: 0.3rem 0.72rem; border-radius: 999px; font-size: 0.78rem; font-weight: 560; color: var(--muted);
}
.view-pill.is-active { background: var(--obsidian); color: var(--paper); }
.modal-close {
  width: 2rem; height: 2rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--ink); }

.modal-stage { padding: 0.75rem 1.25rem 0; display: flex; justify-content: center; }
.modal-cover {
  width: min(100%, 30rem); border-radius: var(--radius-md);
  border: 1px solid var(--line);
}
.modal-cover.is-raw-screen { background: var(--terminal); }
.modal-cover.is-raw-screen .project-scene { opacity: 0; }
.modal-cover.is-raw-screen .project-screen {
  left: 0; top: 0; width: 100%; height: 100%; border-radius: 0; padding: 0.55rem;
  clip-path: none; mix-blend-mode: normal; background: var(--terminal);
}
.modal-body { padding: 1rem 1.35rem; }
.modal-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; }
.modal-title-row h3 { font-size: 1.4rem; font-weight: 680; letter-spacing: -0.025em; }
.modal-summary { margin-top: 0.45rem; font-size: 0.94rem; line-height: 1.62; color: var(--ink-soft); }
.modal-highlight {
  margin-top: 0.6rem; padding: 0.45rem 0.75rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  font: 500 0.76rem/1.4 var(--mono); color: var(--ink-soft);
}
.modal-story-grid {
  margin-top: 0.95rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem;
}
.modal-story-block {
  padding: 0.85rem 0.95rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
}
.modal-sub-label {
  font: 600 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent); margin-bottom: 0.45rem;
}
.modal-story-text { font-size: 0.86rem; line-height: 1.62; color: var(--ink-soft); }
.modal-detail-list {
  margin: 0; padding-inline-start: 1.05rem; display: grid; gap: 0.35rem;
  font-size: 0.84rem; line-height: 1.52; color: var(--ink-soft);
}
.modal-detail-list li::marker { color: var(--accent); }
.modal-tags { padding-top: 0.85rem; }
.modal-foot {
  display: flex; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1.35rem 1rem; border-top: 1px solid var(--line);
}

/* Motion Choreography */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.7; }
  80%, 100% { transform: scale(2.1); opacity: 0; }
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes hero-in {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .has-js .hero-anim {
    animation: hero-in 0.9s var(--ease-out) var(--delay, 0ms) both;
    will-change: opacity, transform, filter;
  }
  .has-js [data-reveal] {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(6px);
    transition:
      opacity 0.88s var(--ease-out),
      transform 0.88s var(--ease-out),
      filter 0.88s var(--ease-out);
    transition-delay: calc(var(--stagger, 0) * 90ms);
    will-change: opacity, transform, filter;
  }
  .has-js [data-reveal='right'] { transform: translateY(24px) scale(0.98); }
  .has-js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* Responsive */
@media (max-width: 64rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .about-story { min-height: 0; }
  .about-live-site { height: auto; }
}

@media (max-width: 54rem) {
  .header-content { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .has-js .menu-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 48rem) {
  .hero-stats { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .exp-mod-grid { grid-template-columns: 1fr; }
  .early-grid { grid-template-columns: 1fr; }
  .about-secondary-grid { grid-template-columns: 1fr; }
  .about-photo-card { height: auto; }
  .modal-story-grid { grid-template-columns: 1fr; }
}

@media (max-width: 36rem) {
  .hero-stats { grid-template-columns: 1fr; }
  .term-body { padding: 0.9rem 0.85rem; font-size: 0.67rem; line-height: 1.65; }
  .term-line { gap: 0.55rem; }
  .stack-matrix { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .timeline-wrap { padding-left: 1.35rem; }
  .timeline-node { left: -1.35rem; }
  .chapter-card { padding: 1.15rem 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
