/* ============ Theme tokens ============ */
:root {
  /* Editor (default) */
  --bg: #0e0f12;
  --bg-2: #16181d;
  --bg-3: #1d2027;
  --line: #262932;
  --line-2: #2f333d;
  --fg: #e8e9ec;
  --fg-2: #b6b8c0;
  --fg-3: #6a6d77;
  --accent: oklch(0.78 0.14 60);   /* warm amber */
  --accent-2: oklch(0.78 0.14 60 / 0.18);
  --accent-ink: #0e0f12;
  --good: oklch(0.78 0.14 150);
  --bad: oklch(0.7 0.18 25);
  --radius: 6px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.35);
  --pad-x: clamp(20px, 4vw, 56px);

  --font-sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-display: "Geist", "Inter", system-ui, sans-serif;
}

[data-theme="cinematic"] {
  --bg: #07090f;
  --bg-2: #0d1019;
  --bg-3: #141828;
  --line: #1d2236;
  --line-2: #2a3052;
  --fg: #eaf0ff;
  --fg-2: #aab2cc;
  --fg-3: #5d6580;
  --accent: oklch(0.82 0.16 220);   /* cyan */
  --accent-2: oklch(0.82 0.16 220 / 0.18);
  --accent-ink: #07090f;
}

[data-theme="aaa"] {
  --bg: #0a1020;
  --bg-2: #101729;
  --bg-3: #172037;
  --line: #1f2941;
  --line-2: #2a364f;
  --fg: #f1ecdf;
  --fg-2: #b9b3a3;
  --fg-3: #6e6a5e;
  --accent: oklch(0.82 0.13 85);   /* gold */
  --accent-2: oklch(0.82 0.13 85 / 0.18);
  --accent-ink: #0a1020;
}

[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-2: #ffffff;
  --bg-3: #ecebe5;
  --line: #e3e1d9;
  --line-2: #d6d3c8;
  --fg: #18191c;
  --fg-2: #4f5159;
  --fg-3: #8b8d96;
  --accent: oklch(0.62 0.16 35);   /* warm orange */
  --accent-2: oklch(0.62 0.16 35 / 0.14);
  --accent-ink: #ffffff;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 24px rgba(20,20,20,0.06);
}

/* Density */
[data-density="compact"] { --gap: 14px; --section-y: 80px; --card-pad: 18px; }
[data-density="cozy"]    { --gap: 22px; --section-y: 120px; --card-pad: 26px; }
[data-density="spacious"]{ --gap: 32px; --section-y: 180px; --card-pad: 36px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  text-wrap: pretty;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }
.dim { color: var(--fg-2); }
.dimmer { color: var(--fg-3); }

/* ============ Top nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad-x);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700; font-size: 14px;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 4px;
  border: 1px solid color-mix(in oklab, var(--accent-ink) 30%, transparent);
  border-radius: 3px;
}
.brand-name { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }
.brand-name .slash { color: var(--fg-3); margin: 0 6px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  border-radius: 4px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--fg); background: var(--bg-2); }
.nav-link.active { color: var(--accent); }
.nav-cta {
  padding: 8px 14px; border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg);
  font-family: var(--font-mono); font-size: 12px;
  cursor: pointer;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); margin-right: 8px;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 30%, transparent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: 64px var(--pad-x) 96px;
  min-height: min(800px, 90vh);
  align-items: center;
  position: relative;
  max-width: 1600px; margin: 0 auto;
}
.hero-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-meta .pill {
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--fg-2);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  font-weight: 600;
}
.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.hero-sub {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--fg-2);
  max-width: 520px;
  line-height: 1.5;
  margin: 0 0 36px;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(3, max-content); gap: 36px;
  margin-bottom: 40px;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.03em;
  display: flex; align-items: baseline; gap: 4px;
}
.hero-stat .num small { font-size: 16px; color: var(--accent); }
.hero-stat .lbl {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 4px;
}
.hero-cta { display: flex; gap: 12px; }

/* ============ Hero featured panel ============ */
.hero-feature {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  padding: 18px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.hero-feature::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 0%, color-mix(in oklab, var(--accent) 15%, transparent), transparent 60%);
  pointer-events: none;
}
.hf-bar {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); margin-bottom: 14px;
  position: relative;
}
.hf-bar .dots { display: flex; gap: 6px; }
.hf-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.hf-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg));
  overflow: hidden;
  border: 1px solid var(--line);
}
.hf-screen-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(1.2) contrast(1.1);
}
.hf-screen-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 8%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}
.hf-orb {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 180px; height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--accent) 80%, white), var(--accent) 40%, transparent 70%);
  filter: blur(0.5px);
  animation: orbFloat 6s ease-in-out infinite;
}
.hf-orb::after {
  content: ""; position: absolute; inset: -40px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%);
  animation: orbGlow 6s ease-in-out infinite;
}
@keyframes orbFloat {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -55%) scale(1.05); }
}
@keyframes orbGlow {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.hf-particles {
  position: absolute; inset: 0; pointer-events: none;
}
.hf-particle {
  position: absolute; width: 3px; height: 3px;
  background: var(--accent); border-radius: 50%;
  opacity: 0.6;
  animation: particleFloat 8s linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-200px) translateX(20px); opacity: 0; }
}
.hf-tag {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-2); padding: 4px 8px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.hf-foot {
  display: flex; justify-content: space-between; align-items: end;
  margin-top: 14px;
  position: relative;
}
.hf-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.hf-meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.hf-progress {
  display: flex; gap: 4px; align-items: center;
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
}
.hf-bars { display: flex; gap: 2px; }
.hf-bars span {
  display: block; width: 3px; height: 12px;
  background: var(--line-2);
}
.hf-bars span.on { background: var(--accent); }

/* Scrolling marquee with project names */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--bg-2);
}
.marquee-track {
  display: inline-flex; gap: 48px;
  animation: scrollX 40s linear infinite;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.02em;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; color: var(--fg-2); }
.marquee-track .sep { color: var(--accent); font-size: 20px; }
@keyframes scrollX {
  to { transform: translateX(-50%); }
}

/* ============ Sections ============ */
section { padding: var(--section-y) var(--pad-x); position: relative; max-width: 1600px; margin: 0 auto; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.section-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 600; letter-spacing: -0.03em;
  margin: 0;
}
.section-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-meta {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ Project Cards ============ */
.projects-grid { 
  display: grid; 
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.pcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.pcard:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.pcard-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  overflow: hidden;
}
.pcard.featured { grid-column: auto; }
.pcard.featured .pcard-media { aspect-ratio: 16 / 9; }

.pcard-media-inner {
  position: absolute; inset: 0;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.pcard:hover .pcard-media-inner { transform: scale(1.04); }
.pcard-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 9px;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--fg-2);
  backdrop-filter: blur(8px);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.pcard-tag.live { color: var(--good); border-color: color-mix(in oklab, var(--good) 50%, var(--line)); }
.pcard-tag.wip { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.pcard-body {
  padding: var(--card-pad);
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.pcard-meta {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em;
}
.pcard-meta .dot-sep { width: 3px; height: 3px; background: var(--fg-3); border-radius: 50%; }
.pcard h3 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.pcard.featured h3 { font-size: 26px; }
.pcard-desc { color: var(--fg-2); font-size: 14px; line-height: 1.5; margin: 0; }
.pcard-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pcard-stack { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: 10px;
  padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 100px; color: var(--fg-2);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pcard-arrow {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--fg-2);
  transition: background .2s, color .2s, border-color .2s, transform .3s;
}
.pcard:hover .pcard-arrow { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(-45deg); }

/* Variant: magazine */
[data-cardstyle="magazine"] .projects-grid {
  grid-template-columns: repeat(6, 1fr);
}
[data-cardstyle="magazine"] .pcard:nth-child(1) { grid-column: span 4; grid-row: span 2; }
[data-cardstyle="magazine"] .pcard:nth-child(2) { grid-column: span 2; }
[data-cardstyle="magazine"] .pcard:nth-child(3) { grid-column: span 2; }
[data-cardstyle="magazine"] .pcard:nth-child(n+4) { grid-column: span 3; }
[data-cardstyle="magazine"] .pcard:nth-child(1) .pcard-media { aspect-ratio: 16/10; }

/* Variant: compact (stat-forward) */
[data-cardstyle="compact"] .projects-grid {
  grid-template-columns: repeat(3, 1fr);
}
[data-cardstyle="compact"] .pcard-media { aspect-ratio: 4/3; }
[data-cardstyle="compact"] .pcard h3 { font-size: 20px; }
[data-cardstyle="compact"] .pcard.featured { grid-column: span 1; }
[data-cardstyle="compact"] .pcard.featured h3 { font-size: 20px; }
[data-cardstyle="compact"] .pcard.featured .pcard-media { aspect-ratio: 4/3; }

/* ============ Procedural project artwork ============ */
.pa {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  overflow: hidden;
}
.pa-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 6%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
.pa-noise::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 80%, color-mix(in oklab, var(--accent) 25%, transparent), transparent 50%),
                    radial-gradient(circle at 80% 20%, color-mix(in oklab, var(--accent) 15%, transparent), transparent 50%);
}
.pa-shape {
  position: relative; z-index: 2;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.pcard:hover .pa-shape { transform: scale(1.08) rotate(2deg); }

/* Bloom Sort — flowers/blocks stacking */
.pa-bloom {
  display: grid; grid-template-columns: repeat(5, 18px); gap: 4px;
}
.pa-bloom span {
  display: block; width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent);
}
.pa-bloom span:nth-child(3n) { background: color-mix(in oklab, var(--accent) 60%, white); opacity: 0.7; }
.pa-bloom span:nth-child(5n) { background: color-mix(in oklab, var(--accent) 40%, var(--bg)); }

/* FPS — crosshair */
.pa-crosshair {
  width: 200px; height: 200px;
  border: 2px dashed color-mix(in oklab, var(--accent) 80%, transparent);
  border-radius: 50%;
  position: relative;
  animation: rotate 30s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.pa-crosshair::before, .pa-crosshair::after {
  content: ""; position: absolute;
  background: var(--accent);
}
.pa-crosshair::before { left: 50%; top: 10%; bottom: 10%; width: 1px; transform: translateX(-50%); }
.pa-crosshair::after { top: 50%; left: 10%; right: 10%; height: 1px; transform: translateY(-50%); }
.pa-crosshair .core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 24px; height: 24px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 30px var(--accent);
}

/* Match Ball — concentric rings */
.pa-rings { width: 220px; height: 220px; position: relative; }
.pa-rings span {
  position: absolute; inset: 0; border: 1.5px solid color-mix(in oklab, var(--accent) 70%, transparent);
  border-radius: 50%;
}
.pa-rings span:nth-child(1) { inset: 30%; }
.pa-rings span:nth-child(2) { inset: 20%; opacity: 0.7; }
.pa-rings span:nth-child(3) { inset: 10%; opacity: 0.5; }
.pa-rings span:nth-child(4) { inset: 0%; opacity: 0.3; }
.pa-rings .ball {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, white, var(--accent) 60%);
  box-shadow: 0 0 40px color-mix(in oklab, var(--accent) 50%, transparent);
}

/* Reckless Rick — character glyph */
.pa-rick { display: flex; gap: 12px; align-items: end; }
.pa-rick span {
  display: block; background: var(--accent);
  width: 12px;
}
.pa-rick span:nth-child(1) { height: 60px; }
.pa-rick span:nth-child(2) { height: 100px; }
.pa-rick span:nth-child(3) { height: 140px; opacity: 0.8; }
.pa-rick span:nth-child(4) { height: 90px; opacity: 0.6; }
.pa-rick span:nth-child(5) { height: 50px; opacity: 0.4; }

/* Roll em all — ball trail */
.pa-roll {
  width: 240px; height: 80px; position: relative;
}
.pa-roll .track {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: color-mix(in oklab, var(--accent) 50%, transparent);
}
.pa-roll .ball {
  position: absolute; top: 50%; left: 50%;
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  box-shadow: 0 0 30px var(--accent);
  animation: roll 3s ease-in-out infinite;
}
@keyframes roll {
  0%,100% { left: 10%; }
  50% { left: 90%; }
}

/* Seek City — buildings */
.pa-city { display: flex; gap: 6px; align-items: end; height: 140px; }
.pa-city span {
  display: block; width: 24px; background: color-mix(in oklab, var(--accent) 70%, var(--bg-3));
  border-radius: 2px 2px 0 0;
  position: relative;
}
.pa-city span:nth-child(1) { height: 60%; }
.pa-city span:nth-child(2) { height: 90%; background: var(--accent); }
.pa-city span:nth-child(3) { height: 70%; }
.pa-city span:nth-child(4) { height: 100%; }
.pa-city span:nth-child(5) { height: 50%; background: var(--accent); }
.pa-city span:nth-child(6) { height: 80%; }
.pa-city span:nth-child(7) { height: 65%; }

/* ============ Tech Stack ============ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.stack-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-2);
  transition: border-color .2s, transform .2s;
}
.stack-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.stack-card h4 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); margin: 0 0 16px;
  text-transform: uppercase; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 8px;
}
.stack-card h4::before {
  content: ""; width: 4px; height: 4px; background: var(--accent);
  border-radius: 50%;
}
.stack-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.stack-list li {
  font-size: 14px; color: var(--fg);
  display: flex; align-items: baseline; gap: 8px;
}
.stack-list li::before {
  content: "—"; color: var(--fg-3); font-family: var(--font-mono);
}

/* ============ Experience timeline ============ */
.timeline {
  display: grid; gap: 24px;
  position: relative;
}
.tl-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  position: relative;
  cursor: default;
  transition: padding .2s;
}
.tl-item:hover { padding-left: 12px; }
.tl-item:hover::before {
  content: ""; position: absolute; left: 0; top: 24px; bottom: 24px;
  width: 2px; background: var(--accent);
}
.tl-date {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em;
  padding-top: 4px;
}
.tl-date .now { color: var(--accent); }
.tl-content h4 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 4px;
}
.tl-content .role { color: var(--accent); font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.tl-content p { color: var(--fg-2); font-size: 14px; line-height: 1.6; margin: 0 0 12px; max-width: 640px; }
.tl-content .achievements {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 640px;
}
.tl-content .achievements li {
  font-size: 12px; color: var(--fg-2);
  font-family: var(--font-mono);
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tl-content .achievements li strong {
  display: block; color: var(--accent); font-size: 18px;
  font-family: var(--font-display); font-weight: 600;
  margin-bottom: 2px;
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.about-portrait .stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, var(--bg-3) 0 8px, var(--bg-2) 8px 16px);
}
.about-portrait .label {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3);
  padding: 6px 10px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.about-portrait .glyph {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 140px; height: 140px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 90px;
  font-weight: 600; color: var(--accent);
  letter-spacing: -0.05em;
}
.about-text h3 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.2;
  margin: 0 0 24px;
  text-wrap: balance;
}
.about-text h3 em { color: var(--accent); font-style: italic; font-weight: 400; }
.about-text p { color: var(--fg-2); font-size: 15px; line-height: 1.7; margin: 0 0 18px; max-width: 520px; }
.about-meta {
  margin-top: 32px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.about-meta .label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 6px;
}
.about-meta .value { font-size: 14px; color: var(--fg); }

/* ============ Now playing ============ */
.now-playing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.np-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.np-card::before {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%);
}
.np-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.np-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent);
  animation: pulse 1.5s ease-in-out infinite;
}
.np-card h3 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 12px;
}
.np-card p { color: var(--fg-2); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }
.np-progress {
  margin-top: 24px;
}
.np-progress .label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.np-bar {
  height: 4px; background: var(--bg-3);
  border-radius: 100px; overflow: hidden;
  position: relative;
}
.np-bar .fill {
  height: 100%; background: var(--accent);
  border-radius: 100px;
  position: relative;
}
.np-bar .fill::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0;
  width: 12px; background: linear-gradient(90deg, transparent, var(--accent));
  filter: blur(4px);
}

/* ============ Archive ============ */
.archive {
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.arch-row {
  display: grid;
  grid-template-columns: 60px 2fr 1fr 1fr 1fr 60px;
  gap: 24px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: padding .2s, background .2s;
  position: relative;
}
.arch-row:hover { padding-left: 28px; background: var(--bg-2); }
.arch-row:hover::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
}
.arch-row.head {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase;
  cursor: default;
  padding: 12px 16px;
}
.arch-row.head:hover { padding: 12px 16px; background: transparent; }
.arch-row.head:hover::before { display: none; }
.arch-num { font-family: var(--font-mono); color: var(--fg-3); font-size: 12px; }
.arch-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.arch-meta { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); }
.arch-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.arch-arrow {
  display: grid; place-items: center;
  color: var(--fg-3); transition: color .2s, transform .2s;
}
.arch-row:hover .arch-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* ============ Footer / Contact ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 80px var(--pad-x) 32px;
}
.footer-hero {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 600; letter-spacing: -0.04em;
  line-height: 1; margin: 0 0 48px;
  text-wrap: balance;
}
.footer-hero em { font-style: italic; color: var(--accent); font-weight: 400; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.footer-col h5 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14px; color: var(--fg);
  margin: 0 0 8px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
}

/* ============ Project Detail Page ============ */
.detail {
  min-height: 100vh;
}
.detail-hero {
  padding: 64px var(--pad-x) 48px;
  border-bottom: 1px solid var(--line);
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-2); margin-bottom: 32px;
  cursor: pointer;
}
.back-link:hover { color: var(--accent); }
.detail-meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 24px;
}
.detail-meta .pill {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 100px;
}
.detail-meta .pill.live { color: var(--good); border-color: color-mix(in oklab, var(--good) 50%, var(--line)); }
.detail h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 600; letter-spacing: -0.04em;
  margin: 0 0 24px; line-height: 0.95;
}
.detail-tagline {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--fg-2); max-width: 640px; line-height: 1.5;
  margin: 0 0 48px;
}
.detail-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-stat .lbl {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 4px;
}
.detail-stat .val {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 500; letter-spacing: -0.02em;
}

.detail-media {
  padding: 48px var(--pad-x);
}
.detail-media-main {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.play-button {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 80px; height: 80px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 5;
  transition: transform .2s;
  box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 20%, transparent);
}
.play-button:hover { transform: translate(-50%,-50%) scale(1.1); }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  padding: 48px var(--pad-x);
}
.detail-section { margin-bottom: 56px; }
.detail-section h2 {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 0 20px;
}
.detail-section h2 .num {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); margin-right: 12px;
  letter-spacing: 0.1em;
}
.detail-section p { color: var(--fg-2); font-size: 16px; line-height: 1.7; margin: 0 0 16px; }
.detail-section ul { color: var(--fg-2); font-size: 15px; line-height: 1.8; padding-left: 20px; }

.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.gallery .shot {
  aspect-ratio: var(--gallery-ar, 4/3);
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform .2s;
}
.gallery .shot:hover { transform: scale(1.02); }

.credits-list {
  display: flex; flex-direction: column; gap: 12px;
}
.credit-row {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.credit-row .role { color: var(--fg-3); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

.detail-side {
  position: sticky; top: 80px;
  align-self: start;
  display: flex; flex-direction: column; gap: 32px;
}
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-2);
}
.side-card h4 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
  margin: 0 0 16px;
}
.side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.side-list li { font-size: 13px; color: var(--fg); display: flex; justify-content: space-between; }
.side-list li span { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; }

.detail-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dn-link {
  padding: 32px var(--pad-x);
  cursor: pointer;
  transition: background .2s;
  border-right: 1px solid var(--line);
}
.dn-link:last-child { border-right: none; text-align: right; }
.dn-link:hover { background: var(--bg-2); }
.dn-link .label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.dn-link .title {
  font-family: var(--font-display); font-size: 28px;
  font-weight: 500; letter-spacing: -0.02em;
}
.dn-link:hover .title { color: var(--accent); }

/* ============ Page transitions ============ */
.page { animation: pageIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Intro / loading ============ */
.intro {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: all;
}
.intro.done {
  pointer-events: none;
  animation: introOut .8s cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes introOut {
  to { transform: translateY(-100%); }
}
.intro-content {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  width: min(440px, 80vw);
}
.intro-mark {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700; font-size: 22px;
  position: relative;
  animation: markPulse 2s ease-in-out infinite;
}
@keyframes markPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.intro-name {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.02em;
}
.intro-bar {
  width: 100%; height: 2px;
  background: var(--bg-3); border-radius: 100px; overflow: hidden;
}
.intro-bar .fill {
  height: 100%; background: var(--accent);
  width: 0%;
  animation: introFill 1.4s cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes introFill {
  to { width: 100%; }
}
.intro-status {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; justify-content: space-between; width: 100%;
}

/* Responsive */
@media (max-width: 960px) {
  :root { --pad-x: 20px; }
  .nav { padding: 12px var(--pad-x); }
  .nav-links, .row:has(.nav-cta) { display: none; }
  
  .hero { 
    grid-template-columns: 1fr; 
    padding-top: 40px; 
    gap: 32px;
    text-align: center;
  }
  .hero h1 { font-size: clamp(42px, 12vw, 64px); }
  .hero-sub { margin: 0 auto 32px; }
  .hero-stats { justify-content: center; gap: 24px; }
  .hero-cta { justify-content: center; }

  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .now-playing, .detail-body { grid-template-columns: 1fr; }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .tl-content .achievements { grid-template-columns: 1fr; }
  
  .arch-row { grid-template-columns: 40px 1fr 60px; }
  .arch-row .arch-meta:nth-child(3),
  .arch-row .arch-meta:nth-child(4),
  .arch-row .arch-tags { display: none; }
  .arch-row.head { display: none; }
  
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  
  .detail h1 { font-size: 42px; }
}

@media (max-width: 480px) {
  .stack-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; }
}

/* ============ Media Overlay ============ */
.media-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 40px;
  animation: fadeIn .3s ease;
}
.media-overlay-close {
  position: absolute; top: 32px; right: 32px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-3); color: var(--fg);
  display: grid; place-items: center;
  cursor: pointer; border: 1px solid var(--line);
  z-index: 10;
  transition: transform .2s, background .2s;
}
.media-overlay-close:hover { transform: scale(1.1); background: var(--line); }
.media-container {
  width: 100%; max-width: 1280px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,0.6);
  position: relative;
}
.media-container iframe { width: 100%; height: 100%; border: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.detail-img { width: 100%; height: 100%; object-fit: cover; }
.detail-img.cover-hero { object-position: center 20%; }

/* ============ Project Card Enhancements ============ */
.pcard-icon-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  z-index: 5;
  transition: transform 0.3s ease;
}
.pcard:hover .pcard-icon-overlay { transform: translateY(-4px) scale(1.05); }
.pcard-icon-overlay img { width: 100%; height: 100%; object-fit: cover; }

.detail-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
}

.gallery .shot.clickable { cursor: zoom-in; transition: transform 0.2s; }
.gallery .shot.clickable:hover { transform: scale(1.02); z-index: 2; }

.tl-logo {
  width: 44px; height: 44px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.arch-title-group { display: flex; align-items: center; gap: 12px; }
.arch-icon { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); }

.media-container.img-view {
  background: transparent;
  box-shadow: none;
  max-height: 90vh;
}
.media-container.img-view img {
  border-radius: 8px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.8);
}
