/* ==========================================================================
   Terminal 2035 v2, Catalin Bondari
   Near-black HUD, neon used with discipline:
   cyan = interactive / primary signal, lime = live / positive, amber = warning.
   ========================================================================== */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #05070A;
  --bg-1: #080B10;
  --bg-2: #0A0E14;
  --bg-3: #0E141C;
  /* lines (decorative only) */
  --line: #18212D;
  --line-2: #233042;
  /* control edge, 3.4:1 on bg */
  --control: #56657A;
  /* text: 17.1 / 7.7 / 5.8 on bg */
  --fg: #E6EDF5;
  --muted: #93A1B3;
  --dim: #7D8BA0;
  /* signal */
  --cyan: #22D3EE;
  --lime: #A3E635;
  --amber: #FBBF24;
  --cyan-08: rgba(34, 211, 238, .08);
  --cyan-16: rgba(34, 211, 238, .16);
  --lime-12: rgba(163, 230, 53, .12);
  --amber-12: rgba(251, 191, 36, .12);

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
  --max: 1360px;
  --header-h: 56px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 2px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* faint scanlines over everything (decorative). z-index scale: canvas 1, chapter 2, header 40, rail 45, scanlines 60, boot 90, skip link 100 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0 1px, transparent 1px 3px);
  opacity: .35;
}
/* blueprint grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
  opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
kbd { font: inherit; }
::selection { background: var(--cyan); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 6px var(--cyan-16);
}
main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 16px; top: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--cyan);
  color: var(--bg);
  font: 600 .875rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap, .bar {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --------------------------------------------------------------------------
   Header: HUD bar
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  /* no backdrop blur: it re-blurs the live WebGL hero every frame */
  background: rgba(5, 7, 10, .93);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
  font: 500 .875rem/1 var(--mono);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-right: auto;
}
.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font: 700 .75rem/1 var(--mono);
  letter-spacing: .04em;
  box-shadow: inset 0 0 12px var(--cyan-16), 0 0 14px rgba(34,211,238,.18);
}
.brand-sub { color: var(--lime); }
.brand-name { white-space: nowrap; }

.site-nav ul { list-style: none; display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  font: 500 .75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.nav-idx { color: var(--dim); font-size: .6875rem; }
.site-nav a:hover, .site-nav a[aria-current], .site-nav a.is-active { color: var(--fg); }
.site-nav a:hover .nav-idx, .site-nav a[aria-current] .nav-idx, .site-nav a.is-active .nav-idx { color: var(--cyan); }

.bar-tools { display: flex; align-items: center; gap: 8px; }
.clock {
  font: 500 .6875rem/1 var(--mono);
  color: var(--dim);
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
  display: none;
}
@media (min-width: 1680px) { .clock { display: inline; } }
@media (min-width: 1280px) and (max-width: 1499px) { .nav-idx { display: none; } .site-nav a { padding: 0 8px; } }

.cmd-btn, .nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  min-width: 44px;
  padding: 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--control);
  border-radius: var(--radius);
  color: var(--fg);
  font: 500 .75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.cmd-btn[hidden] { display: none; }
.cmd-btn kbd {
  padding: 4px 6px;
  border: 1px solid var(--line-2);
  color: var(--cyan);
  font-size: .6875rem;
}
.cmd-btn:hover, .nav-toggle:hover { border-color: var(--cyan); }
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.progress span {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  box-shadow: 0 0 8px var(--cyan);
}

@media (max-width: 1279px) {
  .js .nav-toggle { display: inline-flex; }
  .cmd-label { display: none; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(5, 7, 10, .97);
    border-bottom: 1px solid var(--line-2);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { min-height: 48px; font-size: .875rem; width: 100%; border-bottom: 1px solid var(--line); }
  /* no-JS: nav sits on its own row and scrolls */
  html:not(.js) .site-header .bar { flex-wrap: wrap; }
  html:not(.js) .site-nav { order: 3; width: 100%; overflow-x: auto; }
}
@media (max-width: 420px) { .brand-name { font-size: .75rem; } .brand { gap: 10px; } }

/* --------------------------------------------------------------------------
   Shared primitives
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(14,20,28,.72), rgba(8,11,16,.72));
  border: 1px solid var(--line-2);
  padding: 24px;
}
/* corner brackets */
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --c: var(--cyan);
  --s: 10px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--s),
    linear-gradient(var(--c), var(--c)) top right / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--s),
    linear-gradient(var(--c), var(--c)) bottom left / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--s),
    linear-gradient(var(--c), var(--c)) bottom right / var(--s) 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--s);
  background-repeat: no-repeat;
  opacity: .7;
  transition: opacity 200ms var(--ease);
}
.panel--flush { padding: 0; }
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -24px -24px 20px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255,255,255,.015);
  font: 500 .6875rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
h3.panel-title { font-size: .6875rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  font: 500 .6875rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.chip--lime { color: var(--lime); border-color: rgba(163,230,53,.4); background: var(--lime-12); }
.chip--lime::before { box-shadow: 0 0 8px var(--lime); }
.chip--cyan { color: var(--cyan); border-color: rgba(34,211,238,.4); background: var(--cyan-08); }
.chip--amber { color: var(--amber); border-color: rgba(251,191,36,.45); background: var(--amber-12); }
.chip--amber::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--cyan);
  color: var(--bg);
  font: 600 .8125rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 200ms var(--ease), background-color 200ms var(--ease), color 200ms var(--ease), transform 120ms var(--ease);
}
.button:hover { box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(34,211,238,.45); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button--ghost { background: rgba(5,7,10,.6); color: var(--fg); border-color: var(--control); }
.button--ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: inset 0 0 18px var(--cyan-16); }
.button[aria-disabled="true"] { opacity: .7; cursor: progress; }
.file-tag {
  padding: 2px 5px;
  border: 1px solid currentColor;
  font-size: .625rem;
  letter-spacing: .1em;
}
.arrow { display: inline-block; transition: transform 200ms var(--ease); }
a:hover .arrow, .card:hover .arrow { transform: translateX(3px); }

.eyebrow {
  font: 500 .75rem/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: 0 0 20px;
}
.prompt { color: var(--lime); margin-right: 4px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(240px, 42svh, 380px) 0 32px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}
.hero-viz {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-poster, .hero-viz canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: min(62%, 58svh);
  object-fit: cover;
  object-position: 62% 40%;
}
.hero-poster { opacity: .6; transition: opacity 900ms var(--ease); }
.hero-viz canvas { opacity: 0; transition: opacity 1200ms var(--ease); }
.hero-viz.is-live canvas { opacity: 1; }
.hero-viz.is-live .hero-poster { opacity: 0; }
/* readability scrim: bottom-weighted on mobile, left-weighted on desktop */
.hero-viz::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,7,10,0) 0%, rgba(5,7,10,0) 22%, rgba(5,7,10,.85) 48%, var(--bg) 62%);
}
@media (min-width: 900px) {
  .hero-viz::after {
    background:
      linear-gradient(90deg, rgba(5,7,10,.94) 0%, rgba(5,7,10,.7) 32%, rgba(5,7,10,0) 58%),
      linear-gradient(180deg, rgba(5,7,10,0) 62%, var(--bg) 100%);
  }
  .hero { padding-top: 140px; }
  .hero-poster, .hero-viz canvas { left: 22%; width: 78%; height: 100%; }
  .hero-poster { opacity: .85; }
}
.viz-hud {
  position: absolute;
  top: calc(var(--header-h) + 20px);
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font: 500 .6875rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  z-index: 1;
}
.viz-tag { padding: 4px 8px; border: 1px solid var(--line-2); background: rgba(5,7,10,.75); }
.viz-tag::before { content: "\25C9\00a0\00a0"; color: var(--lime); }
.viz-probe {
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  padding: 4px 8px;
  background: rgba(5,7,10,.75);
  border: 1px solid rgba(34,211,238,.35);
  text-transform: none;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.hero-viz.is-live .viz-probe { opacity: 1; }
@media (max-width: 899px), (pointer: coarse) { .viz-probe { display: none; } }

.hero-inner { position: relative; }
.hero h1 {
  font: 600 clamp(2.375rem, 1rem + 6.2vw, 6.25rem)/0.98 var(--mono);
  letter-spacing: -0.055em;
  text-transform: uppercase;
  max-width: 13ch;
  margin: 0 0 24px;
  text-wrap: balance;
  text-shadow: 0 0 32px rgba(34,211,238,.18);
}
.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}
@media (min-width: 900px) { .hero .lede { font-size: 1.25rem; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
@media (max-width: 480px) { .hero-actions .button { flex: 1 1 100%; } }

.ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line-2);
  background: rgba(5,7,10,.9);
}
@media (min-width: 900px) { .ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 20px 20px;
  border-right: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.stat::after {
  content: "";
  position: absolute; left: 20px; top: 0;
  width: 24px; height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.stat:nth-child(2)::after { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
@media (max-width: 899px) { .stat:nth-child(2n) { border-right: 0; } .stat:nth-child(n+3) { border-bottom: 0; } .stat { padding: 16px; } .stat::after { left: 16px; } }
@media (min-width: 900px) { .stat { border-bottom: 0; } .stat:last-child { border-right: 0; } }
.stat dt { font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.stat dd {
  margin: 0;
  font: 600 clamp(1.375rem, .9rem + 2vw, 2.25rem)/1 var(--mono);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Ticker
   -------------------------------------------------------------------------- */
.ticker {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.ticker-toggle {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  background: var(--bg-2);
  border: 0;
  border-right: 1px solid var(--line-2);
  color: var(--lime);
  font: 600 .6875rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  cursor: pointer;
}
.ticker-toggle[hidden] { display: none; }
.ticker-toggle[aria-pressed="true"] { color: var(--amber); }
.ticker-viewport { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; width: max-content; }
.ticker-list { list-style: none; display: flex; flex: none; }
.ticker-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0 13px 14px;
  font: 500 .8125rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg);
  white-space: nowrap;
}
.ticker-list li::after { content: "\25C6"; color: var(--cyan); font-size: .5rem; }
.ticker-list li:nth-child(3n+2)::after { color: var(--lime); }
.ticker-list[aria-hidden="true"] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .ticker-list[aria-hidden="true"] { display: flex; }
  .js .ticker-track { animation: ticker 60s linear infinite; }
  .js .ticker:hover .ticker-track,
  .js .ticker:focus-within .ticker-track,
  .js .ticker.is-paused .ticker-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { width: auto; }
  .ticker-list { flex-wrap: wrap; padding: 4px 8px; }
  .ticker-list li { padding-top: 8px; padding-bottom: 8px; }
}
html:not(.js) .ticker-track { width: auto; }
html:not(.js) .ticker-list { flex-wrap: wrap; }
@keyframes ticker { to { transform: translate3d(-50%, 0, 0); } }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 88px 0; border-bottom: 1px solid var(--line); position: relative; }
@media (min-width: 900px) { .section { padding: 128px 0; } }
.section-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .section-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
  .section-label { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.section-label .index {
  display: block;
  font: 500 .75rem/1 var(--mono);
  color: var(--cyan);
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.section-label .index::before { content: "[ "; color: var(--dim); }
.section-label .index::after { content: " ]"; color: var(--dim); }
.section-label h2 {
  font: 600 clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem)/1.05 var(--mono);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.section-path { margin: 12px 0 0; font: 400 .75rem/1 var(--mono); color: var(--dim); }
.section-path::after { content: "_"; color: var(--lime); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.subhead { margin: 56px 0 16px; }
.subhead h3 {
  font: 500 .8125rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.subhead h3::before { content: ""; width: 16px; height: 1px; background: var(--cyan); }

/* About */
.about-grid { display: grid; gap: 16px; }
@media (min-width: 1200px) { .about-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.prose { font-size: 1.0625rem; line-height: 1.7; }
.prose p { max-width: 66ch; }
.prose p:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .prose { padding: 32px; font-size: 1.125rem; } }
.kv { margin: 0; display: grid; }
.kv div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.kv div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { font: 500 .6875rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.kv dd { margin: 0; font-size: .9375rem; }

/* Experience */
.timeline { list-style: none; display: grid; gap: 12px; }
.timeline > li { display: grid; gap: 12px; padding: 24px; }
@media (min-width: 768px) { .timeline > li { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 28px 32px; } }
.tl-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
@media (min-width: 768px) { .tl-meta { flex-direction: column; } }
.when {
  margin: 0;
  font: 500 .8125rem/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  letter-spacing: .02em;
}
.timeline .tl-title { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -0.01em; margin-bottom: 4px; }
.org { margin: 0 0 8px; color: var(--muted); font-size: .9375rem; }
.desc { margin: 0; color: var(--fg); max-width: 60ch; }
.rotations { list-style: none; margin-top: 16px; display: grid; border-left: 1px solid var(--line-2); }
.rotations li { position: relative; padding: 12px 0 12px 20px; }
.rotations li::before { content: ""; position: absolute; left: -4px; top: 18px; width: 7px; height: 7px; background: var(--bg); border: 1px solid var(--cyan); }
.rotations .when { display: block; font-size: .75rem; color: var(--muted); }
.rotations h5 { font: 500 1rem/1.4 var(--sans); margin: 2px 0; }
.rotations p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* Work */
.cards { list-style: none; display: grid; gap: 16px; }
@media (min-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { height: 100%; display: flex; flex-direction: column; transition: border-color 250ms var(--ease), background-color 250ms var(--ease); }
.card-viz { width: calc(100% + 48px); max-width: none; height: 96px; margin: -20px -24px 20px; border-bottom: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 32px); }
.fan { stroke: none; }
.fan--outer { fill: rgba(34,211,238,.10); }
.fan--inner { fill: rgba(34,211,238,.22); }
.fan-line { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bars rect { fill: rgba(163,230,53,.16); stroke: rgba(163,230,53,.45); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bars-line { fill: none; stroke: var(--lime); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.card h3 { font: 600 clamp(1.375rem, 1.1rem + 1vw, 1.75rem)/1.2 var(--mono); letter-spacing: -0.03em; margin-bottom: 12px; text-transform: uppercase; }
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:focus-visible { outline: none; box-shadow: none; }
.card:focus-within { outline: 2px solid var(--cyan); outline-offset: 3px; }
.card p { color: var(--muted); }
.card .stack { font: 500 .75rem/1.6 var(--mono); color: var(--fg); letter-spacing: .02em; margin-top: auto; padding-top: 8px; }
.card .more { margin: 8px 0 0; font: 600 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: rgba(34,211,238,.5); background: linear-gradient(180deg, rgba(34,211,238,.06), rgba(8,11,16,.72)); }
  .panel:hover::before { opacity: 1; }
  .card:hover h3 a { color: var(--cyan); }
}
.notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(251,191,36,.4);
  background: var(--amber-12);
  font: 500 .75rem/1.5 var(--mono);
}
.notice, .card .notice { color: var(--amber); }
.notice svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }

.course-head {
  display: none;
  margin: 0;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line-2);
  font: 500 .6875rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--dim);
}
.course-list { list-style: none; }
.course-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms var(--ease);
}
.course-list li:last-child { border-bottom: 0; }
.course-list li > span:first-child { grid-column: 1 / -1; }
.course-list .title { display: block; font-weight: 500; }
.course-list .detail { display: block; font: 400 .8125rem/1.5 var(--mono); color: var(--muted); }
.course-list .credit { font-size: .875rem; color: var(--muted); }
.course-list .repo, .course-list .repo-na { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; justify-self: end; }
.course-list .repo { display: inline-flex; align-items: center; min-height: 44px; }
.course-list .repo::after { content: "\2197"; margin-left: 6px; }
.course-list .repo-na { color: var(--dim); }
@media (min-width: 768px) {
  .course-head, .course-list li { display: grid; grid-template-columns: minmax(0, 1fr) 200px 120px; gap: 16px; padding-left: 24px; padding-right: 24px; }
  .course-list li > span:first-child { grid-column: auto; }
  .course-head span:last-child { text-align: right; }
}
@media (hover: hover) and (pointer: fine) { .course-list li:hover { background: var(--cyan-08); } }

/* Credentials */
.cred-list { list-style: none; display: grid; gap: 12px; }
.cred-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding: 20px 24px; }
.cred-list strong { font-weight: 600; font-size: 1.125rem; }
.cred-list .meta { color: var(--muted); }
.num { font: 600 1.375rem/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--lime); letter-spacing: -0.02em; }
.skills { display: grid; gap: 12px; margin: 0; }
@media (min-width: 640px) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skills > div { padding: 20px; }
.skills dt { font: 500 .6875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); margin-bottom: 12px; }
.skills dd { margin: 0; }
.skills ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.skills li { padding: 5px 9px; border: 1px solid var(--line-2); font: 500 .8125rem/1.3 var(--mono); background: rgba(255,255,255,.015); }

/* Contact */
.contact-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .contact-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.form .lede { font-size: 1rem; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font: 500 .75rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--fg);
}
.field label::before { content: "> "; color: var(--lime); }
input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--control);
  border-radius: var(--radius);
  color: var(--fg);
  font: 400 1rem/1.5 var(--mono);
  caret-color: var(--lime);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
textarea { resize: vertical; min-height: 144px; }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-16), 0 0 24px rgba(34,211,238,.12); }
[aria-invalid="true"] { border-color: var(--amber); }
.error { margin: 6px 0 0; font: 500 .8125rem/1.4 var(--mono); color: var(--amber); }
.error:empty { display: none; }
.error:not(:empty)::before { content: "\25B2\00a0\00a0"; font-size: .625rem; vertical-align: 1px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 16px 0 0; font: 500 .875rem/1.5 var(--mono); }
.form-status:empty { display: none; }
.form-status[data-state="success"] { color: var(--lime); }
.form-status[data-state="error"] { color: var(--amber); }
.form-status[data-state="pending"] { color: var(--cyan); }
.link-list { list-style: none; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; text-decoration: none; color: var(--fg); min-height: 44px; }
.link-list .label { font: 600 .875rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); }
.link-list .label::after { content: " \2197"; }
.link-list .host { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.link-list a:hover .host { color: var(--fg); }

/* Footer */
.site-footer { padding: 28px 0 40px; font: 400 .8125rem/1.6 var(--mono); color: var(--muted); }
.site-footer .bar { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.site-footer p { margin: 0; }
.footer-links { margin-right: auto !important; }
.site-footer a { color: var(--fg); display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--cyan); }
.footer-hint { color: var(--dim); }
.footer-hint kbd { color: var(--cyan); }

/* --------------------------------------------------------------------------
   Case study pages
   -------------------------------------------------------------------------- */
.case-head { padding-top: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .case-head { padding-top: 88px; padding-bottom: 72px; } }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 32px; font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; text-decoration: none; }
.case-head h1 {
  font: 600 clamp(2.125rem, 1.1rem + 5vw, 5rem)/1 var(--mono);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 0 0 24px;
  max-width: 16ch;
  text-shadow: 0 0 32px rgba(34,211,238,.18);
}
.case-head .lede { max-width: 60ch; }
.case-head .notice { display: inline-flex; margin: 0 0 32px; }
.facts { display: grid; margin: 0; border: 1px solid var(--line-2); background: var(--bg-1); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts div { padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.facts div:last-child { border-bottom: 0; }
@media (min-width: 768px) { .facts div { border-bottom: 0; border-right: 1px solid var(--line-2); } .facts div:last-child { border-right: 0; } }
.facts dt { font: 500 .6875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 6px; }
.facts dd { margin: 0; }
.facts a { font: 600 .875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; min-height: 44px; }
.facts a::after { content: "\00a0\2197"; }
.case-body { padding-top: 64px; padding-bottom: 64px; display: grid; gap: 16px; }
.case-section { display: grid; gap: 16px; }
@media (min-width: 1024px) { .case-section { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; padding: 8px 0; } }
.case-section h2 { font: 600 1.375rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: -0.02em; display: flex; gap: 12px; align-items: baseline; }
@media (min-width: 1024px) { .case-section h2 { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.case-section .index { font: 500 .75rem/1 var(--mono); color: var(--cyan); letter-spacing: .1em; }
.case-section .body { font-size: 1.0625rem; line-height: 1.7; }
.case-section .body p { max-width: 66ch; }
.case-section .body p:last-child { margin-bottom: 0; }
.points { list-style: none; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 24px; max-width: 70ch; color: var(--muted); }
.points li::before { content: "\25B8"; position: absolute; left: 0; top: 0; color: var(--lime); }
.points strong { color: var(--fg); font-weight: 600; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 10px; border: 1px solid var(--line-2); font: 500 .8125rem/1.3 var(--mono); }
.case-next { padding-top: 48px; padding-bottom: 96px; border-top: 1px solid var(--line); }
.case-next .eyebrow { margin-bottom: 12px; }
.case-next a { display: inline-flex; align-items: center; gap: 16px; font: 600 clamp(1.5rem, 1rem + 2.4vw, 2.75rem)/1.1 var(--mono); letter-spacing: -0.04em; text-transform: uppercase; text-decoration: none; color: var(--fg); min-height: 44px; }
.case-next a:hover { color: var(--cyan); }

/* 404 */
.lost { min-height: calc(100svh - var(--header-h) - 120px); display: flex; flex-direction: column; justify-content: center; padding-top: 64px; padding-bottom: 64px; }
.lost .code { font: 600 clamp(5rem, 3rem + 14vw, 14rem)/.9 var(--mono); letter-spacing: -0.06em; color: var(--amber); text-shadow: 0 0 40px rgba(251,191,36,.25); margin: 0 0 16px; }
.lost h1 { font: 600 clamp(1.75rem, 1.2rem + 2.4vw, 3rem)/1.1 var(--mono); text-transform: uppercase; letter-spacing: -0.04em; margin: 0 0 20px; max-width: 22ch; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   Boot, palette (JS-only layers)
   -------------------------------------------------------------------------- */

.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
.boot.is-out { animation: boot-out 420ms var(--ease) forwards; }
@keyframes boot-out { to { clip-path: inset(0 0 100% 0); } }
.boot-screen { width: min(640px, 100%); font: 500 .875rem/1.8 var(--mono); color: var(--muted); }
.boot-screen .ok { color: var(--lime); }
.boot-screen .hl { color: var(--fg); font-size: clamp(1.125rem, .8rem + 1.6vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin-top: 12px; display: block; text-shadow: 0 0 24px rgba(34,211,238,.35); }
.boot-screen .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -0.15em; background: var(--cyan); animation: blink .9s steps(1) infinite; }
.boot-bar { margin-top: 20px; height: 2px; background: var(--line-2); overflow: hidden; }
.boot-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); transform-origin: 0 50%; transform: scaleX(0); }
.boot-skip {
  position: absolute; right: 16px; bottom: 16px;
  min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--control); color: var(--fg);
  font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; cursor: pointer;
}
.boot-skip:hover { border-color: var(--cyan); color: var(--cyan); }

.palette {
  width: min(640px, calc(100vw - 32px));
  max-width: none;
  max-height: min(560px, calc(100vh - 96px));
  margin: 12vh auto auto;
  padding: 0;
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid rgba(34,211,238,.5);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(34,211,238,.12);
  overflow: hidden;
}
.palette[open] { display: flex; flex-direction: column; }
.palette::backdrop { background: rgba(2,3,5,.8); }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line-2); }
.palette-head .p-prompt { color: var(--lime); font: 600 1rem/1 var(--mono); }
.palette-head input { border: 0; background: transparent; min-height: 56px; padding: 0; font-size: 1rem; box-shadow: none; }
.palette-head input:focus-visible { outline: none; box-shadow: none; }
.palette-head:focus-within { box-shadow: inset 0 -2px 0 var(--cyan); }
.palette-close { flex: none; min-height: 36px; min-width: 44px; padding: 0 8px; background: transparent; border: 1px solid var(--line-2); color: var(--muted); font: 500 .6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.palette-close:hover { color: var(--fg); border-color: var(--control); }
.palette-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.palette-group { padding: 10px 10px 6px; font: 500 .6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.palette-opt { display: flex; align-items: center; gap: 12px; padding: 11px 10px; cursor: pointer; border: 1px solid transparent; font-size: .9375rem; }
.palette-opt .po-key { font: 500 .6875rem/1 var(--mono); color: var(--dim); min-width: 28px; }
.palette-opt .po-hint { margin-left: auto; font: 500 .6875rem/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.palette-opt[aria-selected="true"] { background: var(--cyan-08); border-color: rgba(34,211,238,.45); }
.palette-opt[aria-selected="true"] .po-key { color: var(--cyan); }
.palette-empty { padding: 20px 10px; color: var(--muted); font: 500 .875rem/1.4 var(--mono); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line-2); font: 500 .6875rem/1 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }

/* ==========================================================================
   v2 layer: 3D hero HUD, horizontal stations, depth cards, right rail, micro-FX.
   Motion tokens (Emil): --ease (strong ease-out) for entries and state, --ease-io for
   on-screen travel, durations 120-260ms for UI, longer only for one-off reveals.
   ========================================================================== */
:root {
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --rail-w: 0px;
  --hud-r: var(--gutter);
}
@media (min-width: 1100px) and (hover: hover) { .has-rail { --rail-w: 52px; } }

/* cursor-reactive grid: a brighter copy of the blueprint grid, masked to a disc at the pointer */
.grid-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(34,211,238,.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.34) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(260px circle at var(--x, -999px) var(--y, -999px), #000 0%, rgba(0,0,0,.35) 45%, transparent 72%);
          mask-image: radial-gradient(260px circle at var(--x, -999px) var(--y, -999px), #000 0%, rgba(0,0,0,.35) 45%, transparent 72%);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}
.grid-glow.is-on { opacity: 1; }

/* --------------------------------------------------------------------------
   Hero: interactive scene + HUD
   -------------------------------------------------------------------------- */
.hero-inner, .hero-ledger { pointer-events: none; }
.hero-inner > *, .hero-ledger > * { pointer-events: auto; }
.hero-viz canvas { cursor: grab; touch-action: pan-y; }
.hero-viz.is-dragging canvas { cursor: grabbing; }
.hero-viz.is-live::after { pointer-events: none; }
.hero-viz.is-live .hero-poster { visibility: hidden; transition: opacity 900ms var(--ease), visibility 0s 900ms; }
@media (min-width: 900px) {
  .viz-hud { right: calc(var(--gutter) + var(--rail-w)); }
}

.probe-label {
  position: absolute; left: 0; top: 0; z-index: 2;
  padding: 6px 8px;
  border: 1px solid rgba(34,211,238,.55);
  background: rgba(5,7,10,.86);
  font: 500 .6875rem/1.45 var(--mono);
  color: var(--fg);
  white-space: pre;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms var(--ease);
  will-change: transform;
}
.probe-label.is-on { opacity: 1; }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 2;
  padding: 4px 7px;
  border: 1px solid rgba(163,230,53,.6);
  background: rgba(5,7,10,.88);
  font: 500 .6875rem/1.3 var(--mono);
  color: var(--fg);
  white-space: pre;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
.stn-viz.is-live .chart-tip { opacity: 1; }
.probe-label b { color: var(--cyan); font-weight: 600; }

.telemetry, .viz-hint { display: none; }
.hero-hud { display: contents; }
.hero-hud[hidden] { display: none; }
@media (min-width: 900px) {
  .hero-viz.is-live .telemetry {
    display: grid;
    position: absolute; z-index: 1;
    right: calc(var(--gutter) + var(--rail-w));
    bottom: 196px;
    margin: 0;
    min-width: 232px;
    border: 1px solid var(--line-2);
    background: rgba(5,7,10,.78);
    font: 500 .6875rem/1.3 var(--mono);
    letter-spacing: .08em;
  }
  .telemetry > div { display: flex; justify-content: space-between; gap: 18px; padding: 6px 10px; border-top: 1px solid var(--line); }
  .telemetry > div:first-child { border-top: 0; }
  .telemetry dt { color: var(--muted); }
  .telemetry dd { margin: 0; color: var(--fg); font-variant-numeric: tabular-nums; }
  .telemetry .tm-head { background: rgba(255,255,255,.02); }
  .telemetry .tm-head dt { color: var(--fg); }
  .telemetry .tm-head dd { color: var(--amber); text-transform: none; letter-spacing: .02em; }
  .telemetry .tm-real dd { color: var(--lime); }
  .hero-viz.is-live .viz-hint {
    display: block;
    position: absolute; z-index: 1;
    right: calc(var(--gutter) + var(--rail-w));
    top: calc(var(--header-h) + 154px);
    margin: 0;
    font: 500 .6875rem/1.4 var(--mono);
    color: var(--muted);
    letter-spacing: .04em;
  }
  .viz-hint kbd { color: var(--cyan); }
}
.hud-controls {
  position: absolute; z-index: 3;
  right: calc(var(--gutter) + var(--rail-w));
  top: calc(var(--header-h) + 94px);
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
  max-width: 460px;
}
.seg { display: inline-flex; border: 1px solid var(--control); background: rgba(5,7,10,.8); }
.seg-btn, .hud-btn {
  min-height: 32px; min-width: 44px; padding: 0 10px;
  background: rgba(5,7,10,.8);
  border: 0;
  color: var(--muted);
  font: 500 .6875rem/1 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer;
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.hud-btn { border: 1px solid var(--control); }
.seg-btn:hover, .hud-btn:hover { color: var(--fg); }
.hud-btn:hover { border-color: var(--cyan); }
.seg-btn[aria-pressed="true"] { color: var(--bg); background: var(--cyan); }
.hud-btn[aria-pressed="true"] { color: var(--amber); border-color: rgba(251,191,36,.6); background: var(--amber-12); }
.seg-btn:active, .hud-btn:active, .signal:active { transform: scale(.97); }
@media (max-width: 899px), (pointer: coarse) {
  .hud-controls { top: calc(var(--header-h) + 52px); right: var(--gutter); left: var(--gutter); justify-content: flex-start; }
  .seg-btn, .hud-btn { min-height: 44px; }
  .hud-btn[data-pin-centre] { display: none; }
}

.pins { list-style: none; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pin {
  position: absolute; left: 0; top: 0;
  display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: start;
  padding: 7px 6px 7px 10px;
  border: 1px solid rgba(163,230,53,.6);
  background: rgba(5,7,10,.9);
  font: 500 .6875rem/1.45 var(--mono);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
  will-change: transform;
  animation: pin-in 220ms var(--ease) both;
}
.pin::before { content: ""; position: absolute; left: -1px; bottom: -9px; width: 1px; height: 9px; background: var(--lime); }
.pin-id { color: var(--lime); font-weight: 600; }
.pin-x {
  grid-row: 1 / span 2; grid-column: 2;
  min-width: 28px; min-height: 28px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-2); color: var(--muted);
  font: 600 .75rem/1 var(--mono); cursor: pointer;
}
.pin-x:hover { color: var(--fg); border-color: var(--cyan); }
@keyframes pin-in { from { opacity: 0; transform: var(--t, none) scale(.96); } }

/* --------------------------------------------------------------------------
   Right HUD rail: scrubber / minimap, velocity, coordinates
   -------------------------------------------------------------------------- */
.hud-rail { display: none; }
@media (min-width: 1100px) and (hover: hover) {
  .hud-rail {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: fixed; z-index: 45;
    right: 8px; top: calc(var(--header-h) + 14px); bottom: 14px;
    width: 40px;
    font: 500 9px/1.2 var(--mono);
    letter-spacing: .06em;
    color: var(--muted);
  }
  /* backing strip: pinned stations slide under the rail without fighting its ticks */
  .hud-rail::before { content: ""; position: absolute; z-index: -1; right: -8px; top: -14px; bottom: -14px; width: 60px; background: linear-gradient(to left, rgba(5,7,10,.9) 72%, rgba(5,7,10,0)); border-left: 1px solid var(--line); pointer-events: none; }
}
.hr-head { color: var(--dim); text-transform: uppercase; }
.hr-track { position: relative; flex: 1; width: 40px; }
.hr-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.hr-fill { position: absolute; left: calc(50% - 1px); top: 0; width: 3px; height: 100%; background: linear-gradient(var(--cyan), var(--lime)); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); opacity: .7; }
.hr-link {
  position: absolute; left: 0; right: 0;
  height: 24px; margin-top: -12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
}
.hr-link::before { content: ""; width: 14px; height: 1px; background: currentColor; transition: width 160ms var(--ease), background-color 160ms var(--ease); }
.hr-link.is-sub::before { width: 7px; }
.hr-link:hover::before, .hr-link:focus-visible::before { width: 22px; }
.hr-link[aria-current="true"] { color: var(--cyan); }
.hr-link[aria-current="true"]::before { width: 22px; height: 2px; box-shadow: 0 0 8px var(--cyan); }
.hr-tip {
  position: absolute; right: 44px; top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px; white-space: nowrap;
  border: 1px solid var(--line-2); background: rgba(5,7,10,.92);
  font: 500 .6875rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--fg);
  opacity: 0; pointer-events: none;
  transition: opacity 120ms var(--ease);
}
.hr-link:hover .hr-tip, .hr-link:focus-visible .hr-tip { opacity: 1; }
.hr-cursor { position: absolute; left: 4px; right: 4px; top: 0; height: 0; border-top: 1px solid var(--lime); pointer-events: none; will-change: transform; }
.hr-cursor::after { content: ""; position: absolute; right: -3px; top: -4px; border: 4px solid transparent; border-right-color: var(--lime); }
.hr-read { display: grid; gap: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.hr-read span { display: block; color: var(--dim); }
.hr-read b { display: block; color: var(--fg); font-weight: 500; }

/* --------------------------------------------------------------------------
   Micro-FX: ripples, scan sweep, magnetic
   -------------------------------------------------------------------------- */
.ripple-host { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ripple { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 1px solid var(--cyan); border-radius: 50%; opacity: 0; }
.scan {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3;
  height: 140px; margin-top: -140px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,.06) 70%, rgba(34,211,238,.22) 99%, var(--cyan) 100%);
  opacity: 0;
}
[data-magnetic] { will-change: transform; }

/* --------------------------------------------------------------------------
   Experience chapter: stations (vertical by default, horizontal when pinned)
   -------------------------------------------------------------------------- */
.chapter { padding-bottom: 64px; z-index: 2; }
.chapter-track {
  width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 56px;
}
.chapter-intro .section-label { position: static; margin-bottom: 20px; }
.chapter-lede { color: var(--muted); max-width: 48ch; font-size: 1.0625rem; }
.chapter-index { list-style: none; display: grid; gap: 0; max-width: 420px; border-top: 1px solid var(--line-2); }
.chapter-index a {
  display: flex; align-items: center; gap: 14px; min-height: 44px;
  border-bottom: 1px solid var(--line-2);
  color: var(--fg); text-decoration: none;
  font: 500 .8125rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  transition: color 160ms var(--ease);
}
.chapter-index .ci-code { color: var(--dim); font-size: .6875rem; transition: color 160ms var(--ease); }
.chapter-index a:hover, .chapter-index a.is-active { color: var(--cyan); }
.chapter-index a.is-active .ci-code { color: var(--lime); }

.station { position: relative; display: grid; gap: 20px; align-content: start; }
.stn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.stn-code { font: 600 .75rem/1 var(--mono); color: var(--cyan); letter-spacing: .12em; }
.stn-head h3 { font: 600 clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem)/1.05 var(--mono); letter-spacing: -0.04em; text-transform: uppercase; margin-right: auto; }
.stn-meta { font: 500 .6875rem/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.stn-body { display: grid; gap: 20px; }
@media (min-width: 900px) { .stn-body { grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; align-items: stretch; } }
.stn-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stn-note { margin: 0; color: var(--muted); font-size: .9375rem; max-width: 46ch; }
.stn-kv { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.stn-kv div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.stn-kv dt { font: 500 .6875rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stn-kv dd { margin: 0; }

.stn-viz {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 48px 48px;
  background-color: rgba(5,7,10,.4);
  display: grid; place-items: center;
  overflow: hidden;
}
.stn-viz.is-live { background: transparent; border-color: rgba(34,211,238,.28); }
.stn-viz::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  --c: var(--cyan); --s: 12px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--s) 1px, linear-gradient(var(--c), var(--c)) top left / 1px var(--s),
    linear-gradient(var(--c), var(--c)) top right / var(--s) 1px, linear-gradient(var(--c), var(--c)) top right / 1px var(--s),
    linear-gradient(var(--c), var(--c)) bottom left / var(--s) 1px, linear-gradient(var(--c), var(--c)) bottom left / 1px var(--s),
    linear-gradient(var(--c), var(--c)) bottom right / var(--s) 1px, linear-gradient(var(--c), var(--c)) bottom right / 1px var(--s);
  background-repeat: no-repeat;
}
.viz-corner {
  position: absolute; left: 12px; top: 10px; z-index: 2;
  font: 500 .6875rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.stn-poster { width: 92%; height: auto; max-height: 86%; }
.stn-poster .g { stroke: var(--line-2); stroke-width: 1; }
.stn-poster .w { stroke: var(--cyan); stroke-width: 1; opacity: .7; }
.stn-poster .w.u { stroke: var(--lime); }
.stn-poster rect.u { fill: rgba(163,230,53,.35); stroke: var(--lime); stroke-width: 1; }
.stn-poster rect.d { fill: none; stroke: var(--cyan); stroke-width: 1; }
.stn-viz.is-live .stn-poster, .stn-viz.is-live .radar-poster { opacity: 0; }

/* range scrubber */
.scrub label { display: block; margin-bottom: 8px; font: 500 .75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--fg); }
.scrub label::before { content: "> "; color: var(--lime); }
.scrub input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 32px; padding: 0; margin: 0;
  background: transparent; border: 0; box-shadow: none;
  cursor: ew-resize;
}
.scrub input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--control) 0 1px, transparent 1px calc(100% / 15 - .01px)), linear-gradient(var(--control), var(--control)) 0 50% / 100% 1px no-repeat;
}
.scrub input[type="range"]::-moz-range-track { height: 10px; background: linear-gradient(var(--control), var(--control)) 0 50% / 100% 1px no-repeat; }
.scrub input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 22px; margin-top: -6px; background: var(--cyan); border: 0; box-shadow: 0 0 12px rgba(34,211,238,.5); }
.scrub input[type="range"]::-moz-range-thumb { width: 14px; height: 22px; background: var(--cyan); border: 0; border-radius: 0; }
.scrub input[type="range"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.readout {
  display: block;
  padding: 10px 12px;
  border-left: 2px solid var(--cyan);
  background: var(--cyan-08);
  font: 500 .8125rem/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

/* signals */
.signals { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.signal {
  min-height: 40px; padding: 0 12px;
  background: rgba(5,7,10,.6); border: 1px solid var(--control); color: var(--fg);
  font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease), background-color 160ms var(--ease), transform 120ms var(--ease);
}
.signal:hover { border-color: var(--cyan); color: var(--cyan); }
.signal[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); background: var(--lime-12); }

/* radar poster (no WebGL / no JS) */
.radar-poster {
  position: relative; container-type: inline-size;
  width: min(84%, 380px); aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,.45);
  background:
    linear-gradient(transparent calc(50% - .5px), rgba(34,211,238,.25) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(34,211,238,.25) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px)),
    conic-gradient(from 0deg, rgba(163,230,53,.28), transparent 60deg),
    repeating-radial-gradient(circle, transparent 0 calc(12.5% - 1px), rgba(34,211,238,.22) calc(12.5% - 1px) 12.5%);
  transition: opacity 600ms var(--ease);
}
.radar-poster i {
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--lime); box-shadow: 0 0 10px var(--lime);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -50cqw));
}

/* skill cube */
.skills--cube { grid-template-columns: 1fr !important; gap: 6px; }
.skills--cube > div { padding: 10px 12px; display: grid; grid-template-columns: 128px 1fr; gap: 10px; align-items: start; transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.skills--cube dt { margin: 4px 0 0; font-size: .6875rem; color: var(--muted); }
.skills--cube li { padding: 3px 7px; font-size: .75rem; }
.skills--cube > div.is-face { border-color: rgba(34,211,238,.6); background: var(--cyan-08); }
.skills--cube > div.is-face dt { color: var(--cyan); }
@media (max-width: 479px) { .skills--cube > div { grid-template-columns: 1fr; } }
.cube-controls { display: flex; gap: 6px; }
.cube-controls[hidden] { display: none; }
.cube-controls .hud-btn { min-height: 40px; }
.stn-viz--cube { cursor: grab; touch-action: pan-y; }
.stn-viz--cube.is-dragging { cursor: grabbing; }
html:not(.js) .stn-viz--cube { display: none; }
.cube-stage { --s: clamp(180px, 16vw + 50px, 290px); position: relative; width: var(--s); height: var(--s); perspective: 900px; perspective-origin: 50% 40%; }
.cube, .cube-wire { position: absolute; inset: 0; transform-style: preserve-3d; }
.cube { will-change: transform; transform: rotateX(-18deg) rotateY(-28deg); }
.cube-face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px;
  background: linear-gradient(160deg, rgba(14,20,28,.96), rgba(5,7,10,.96));
  border: 1px solid rgba(34,211,238,.6);
  box-shadow: inset 0 0 24px rgba(34,211,238,.12);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  font: 500 .75rem/1.35 var(--mono);
  color: var(--fg);
}
.cube-face[data-f="0"] { transform: rotateY(0deg) translateZ(calc(var(--s) / 2)); }
.cube-face[data-f="1"] { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube-face[data-f="2"] { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube-face[data-f="3"] { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube-face[data-f="4"] { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube-face[data-f="5"] { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.cube-face .cf-id { display: flex; justify-content: space-between; color: var(--muted); font-size: .625rem; letter-spacing: .12em; }
.cube-face .cf-title { color: var(--cyan); font-weight: 600; font-size: .9375rem; text-transform: uppercase; letter-spacing: .04em; line-height: 1.15; }
.cube-face .cf-n { margin-top: auto; font: 600 3.25rem/.8 var(--mono); letter-spacing: -0.06em; color: rgba(34,211,238,.22); }
.cube-face ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.cube-face li { padding: 2px 6px; border: 1px solid var(--line-2); font-size: .6875rem; }
.cube-face.is-front { border-color: var(--lime); box-shadow: inset 0 0 28px rgba(163,230,53,.14), 0 0 30px rgba(34,211,238,.12); }
.cube-wire { transform: rotateX(-18deg) rotateY(-28deg) scale3d(1.42, 1.42, 1.42); opacity: .5; }
.cube-wire i { position: absolute; inset: 0; border: 1px dashed rgba(34,211,238,.35); }
.cube-floor {
  position: absolute; left: 50%; top: 100%;
  width: 180%; height: 60%; margin: 28px 0 0 -90%;
  background: radial-gradient(closest-side, rgba(34,211,238,.18), transparent),
    repeating-linear-gradient(90deg, rgba(34,211,238,.12) 0 1px, transparent 1px 22px);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent);
  transform: rotateX(72deg);
  pointer-events: none;
}

/* timeline rail */
.rail { position: relative; }
.rail-list { position: relative; }
.rail-line { display: none; }
.timeline .rail-node { position: relative; transition: border-color 260ms var(--ease), background-color 260ms var(--ease); }
.rail-node.is-lit { border-color: rgba(34,211,238,.55); }
.rail-node.is-lit .when { color: var(--lime); }
/* vertical rail (mobile, reduced motion, no-JS) */
@media (max-width: 899px) {
  .rail-list { padding-left: 26px; }
  .rail-list::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
  .rail-node::after { content: ""; position: absolute; left: -24px; top: 30px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--bg); border: 1px solid var(--cyan); transition: background-color 260ms var(--ease), box-shadow 260ms var(--ease); }
  .rail-node.is-lit::after { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 10px var(--lime); }
}

/* horizontal mode (desktop, motion allowed, JS + GSAP): added by JS as .is-horizontal */
.chapter.is-horizontal { padding: 0; border-bottom: 1px solid var(--line); }
.chapter.is-horizontal .chapter-pin { height: 100vh; height: 100svh; overflow: hidden; overflow: clip; }
.chapter.is-horizontal .chapter-track {
  display: flex; align-items: stretch; gap: clamp(48px, 6vw, 112px);
  width: max-content; max-width: none; height: 100%;
  margin: 0;
  padding: calc(var(--header-h) + 36px) calc(var(--gutter) + var(--rail-w) + 40px) 40px var(--gutter);
  will-change: transform;
}
.chapter.is-horizontal .chapter-intro { width: clamp(340px, 30vw, 460px); align-self: center; }
.chapter.is-horizontal .station { width: clamp(820px, 76vw, 1180px); grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.chapter.is-horizontal .stn-body { min-height: 0; }
.chapter.is-horizontal .stn-viz { min-height: 0; height: 100%; }
.chapter.is-horizontal .stn-copy { overflow: auto; }
.chapter.is-horizontal .station--rail { width: auto; }
.chapter.is-horizontal .rail { height: 100%; display: flex; flex-direction: column; justify-content: center; perspective: 1400px; perspective-origin: 50% 30%; }
.chapter.is-horizontal .rail-list {
  display: flex; align-items: flex-end; gap: 96px;
  padding: 0 24px 96px;
  transform-style: preserve-3d;
}
.chapter.is-horizontal .rail-node { flex: none; width: 360px; display: block; padding: 24px; transform-origin: 50% 100%; }
.chapter.is-horizontal .rail-node .tl-meta { flex-direction: row; margin-bottom: 14px; }
.chapter.is-horizontal .rail-node::after {
  content: ""; position: absolute; left: 50%; bottom: -66px; width: 1px; height: 60px;
  background: linear-gradient(var(--line-2), var(--cyan));
  transition: background 260ms var(--ease);
}
.chapter.is-horizontal .rail-node::before { z-index: 1; }
.chapter.is-horizontal .rail-node .node-dot {
  position: absolute; left: 50%; bottom: -78px; width: 11px; height: 11px; margin-left: -5px;
  transform: rotate(45deg); background: var(--bg); border: 1px solid var(--cyan);
  transition: background-color 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.chapter.is-horizontal .rail-node.is-lit .node-dot { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 14px var(--lime), 0 0 32px rgba(163,230,53,.5); }
.chapter.is-horizontal .rail-line {
  display: block; position: absolute; left: 0; right: 0; bottom: calc(50% - 250px);
  height: 140px; margin-bottom: -70px;
  transform: rotateX(78deg);
  transform-origin: 50% 50%;
  background:
    linear-gradient(90deg, transparent, rgba(34,211,238,.9) 2%, rgba(34,211,238,.9) 98%, transparent) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(34,211,238,.22) 0 1px, transparent 1px 48px),
    linear-gradient(transparent 0%, rgba(34,211,238,.06) 50%, transparent 100%);
  pointer-events: none;
}
.rail-signal { position: absolute; left: 0; top: 50%; width: 180px; height: 3px; margin-top: -1.5px; background: linear-gradient(90deg, transparent, var(--lime), transparent); box-shadow: 0 0 18px var(--lime); will-change: transform; }

/* station canvases: one small WebGL canvas per instrument, mounted only while near the viewport */
.stn-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0; transition: opacity 600ms var(--ease); }
.stn-viz.is-live .stn-gl { opacity: 1; }

/* --------------------------------------------------------------------------
   Work cards: true 3D with depth layers + specular highlight
   -------------------------------------------------------------------------- */
.card-plate, .card-spec { display: none; }
.js .cards { perspective: 1400px; }
.js .card[data-card3d] { transform-style: preserve-3d; cursor: pointer; }
.js .card[data-card3d] h3 a::after { content: none; }
.js .card-layer { transform: translateZ(0); transition: transform 420ms var(--ease); }
.js .card-plate {
  display: block; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid rgba(34,211,238,.35);
  background: repeating-linear-gradient(135deg, rgba(34,211,238,.05) 0 1px, transparent 1px 9px);
  transform: translateZ(0); opacity: 0;
  transition: transform 420ms var(--ease), opacity 260ms var(--ease);
}
.js .card-spec {
  display: block; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--px, 50%) var(--py, 30%), rgba(230,237,245,.09), rgba(34,211,238,.05) 30%, transparent 55%);
  opacity: 0; transition: opacity 260ms var(--ease);
}
.js .card.is-lifted { border-color: rgba(34,211,238,.55); }
.js .card.is-lifted .card-plate { transform: translateZ(-46px); opacity: 1; }
.js .card.is-lifted .card-spec { opacity: 1; }
.js .card.is-lifted .card-layer--viz { transform: translateZ(26px); }
.js .card.is-lifted .card-layer--title { transform: translateZ(54px); }
.js .card.is-lifted .card-layer--chip { transform: translateZ(70px); }
.js .card.is-lifted .card-layer--more { transform: translateZ(38px); }
.js .card.is-lifted h3 a { color: var(--cyan); }
.cred-note { margin: 20px 0 0; color: var(--muted); font-size: .9375rem; }

/* --------------------------------------------------------------------------
   Reduced motion for the v2 layer: static, no pin, instant
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .grid-glow, .scan, .ripple-host, .rail-signal { display: none !important; }
  .stn-viz--cube { cursor: default; }
  .js .card-layer, .js .card-plate { transition: none; }
}

/* --------------------------------------------------------------------------
   Reduced motion: no transitions, no ticker, no canvas, instant everything
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .hero-viz canvas { display: none; }
  .hero-viz .hero-poster { opacity: .85; }
}

@media print {
  body::before, body::after, .hero-viz, .ticker, .site-header { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
   Restored content: projects, writing, media, reading, more about me.
   Same primitives as the rest of v2: panels with brackets, mono micro-labels,
   cyan = interactive, lime = live/original, amber only for warnings.
   ========================================================================== */
.section-lede { color: var(--muted); max-width: 62ch; font-size: 1.0625rem; margin: 0 0 28px; }
.section-cta { margin: 28px 0 0; }
.section-cta--work { margin-top: 24px; color: var(--muted); font-size: .9375rem; }
.subhead--first { margin-top: 0; }

/* project cards: three across on wide screens */
@media (min-width: 700px) and (max-width: 899px) { .cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cards--3 .card h3 { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); }
.cards--3 .card p:not(.panel-title):not(.stack):not(.more) { font-size: .9375rem; }
.proj-viz .pv-grid rect { fill: none; stroke: var(--line-2); }
.proj-viz .pv-hot rect { fill: rgba(34,211,238,.14); stroke: rgba(34,211,238,.6); }
.proj-viz text { fill: var(--muted); font: 600 12px var(--mono); text-anchor: middle; }
.proj-viz .pv-line, .proj-svg .pv-line { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.proj-viz .pv-line--lime { stroke: var(--lime); }
.proj-viz .pv-line--dim, .proj-svg .pv-line--dim { stroke: var(--dim); stroke-dasharray: 4 4; }
.proj-viz .pv-ticks path { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.proj-viz .pv-bubble rect { fill: rgba(34,211,238,.12); stroke: rgba(34,211,238,.55); vector-effect: non-scaling-stroke; }
.proj-viz .pv-wave, .proj-svg .pv-wave { fill: none; stroke: var(--lime); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.proj-viz .pv-win rect { fill: none; stroke: rgba(34,211,238,.35); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.proj-viz .pv-dots circle, .proj-svg .pv-dots circle { fill: var(--cyan); }
.proj-viz .pv-tiles rect { fill: rgba(34,211,238,.08); stroke: rgba(34,211,238,.4); vector-effect: non-scaling-stroke; }

/* "What I do" */
.services { list-style: none; display: grid; gap: 12px; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .services { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.service { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.svc-n { font: 500 .6875rem/1 var(--mono); color: var(--cyan); letter-spacing: .12em; }
.service h4 { font: 600 1rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .02em; }
.service p { margin: 0; color: var(--muted); font-size: .9375rem; }
.svc-link { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; min-height: 44px; font: 500 .75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; }

/* post cards (home + blog index) */
.post-grid { list-style: none; display: grid; gap: 16px; }
@media (min-width: 760px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .post-grid:not(.post-grid--home) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .post-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-item[hidden] { display: none; }
.post-card { height: 100%; display: flex; flex-direction: column; gap: 10px; transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.post-card .panel-title { margin-bottom: 8px; }
.pc-idx { color: var(--dim); }
.pc-title { font: 600 1.0625rem/1.35 var(--sans); letter-spacing: -0.01em; }
.pc-title a { color: var(--fg); text-decoration: none; }
.pc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pc-title a:focus-visible { outline: none; box-shadow: none; }
.post-card:focus-within { outline: 2px solid var(--cyan); outline-offset: 3px; }
.pc-excerpt { margin: 0; color: var(--muted); font-size: .9375rem; }
.pc-meta { margin: auto 0 0; padding-top: 6px; font: 500 .75rem/1.4 var(--mono); color: var(--fg); letter-spacing: .02em; }
.pc-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pc-tags li { padding: 3px 7px; border: 1px solid var(--line-2); font: 500 .6875rem/1.3 var(--mono); color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .post-card:hover, .media-card:hover { border-color: rgba(34,211,238,.5); }
  .post-card:hover .pc-title a { color: var(--cyan); }
}

/* media: lite YouTube facades (no iframe until play) */
.media-card { height: 100%; display: flex; flex-direction: column; gap: 12px; }
.media-card .panel-title { margin-bottom: 4px; }
.yt { position: relative; aspect-ratio: 16 / 9; background: var(--bg); border: 1px solid var(--line-2); overflow: hidden; }
.yt-link { position: absolute; inset: 0; display: block; color: var(--fg); }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .82; filter: saturate(.85); transition: opacity 200ms var(--ease); }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px;
  border: 1px solid var(--cyan); background: rgba(5,7,10,.82);
  box-shadow: 0 0 18px rgba(34,211,238,.35);
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.yt-play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -5px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--cyan); }
.yt-link:hover img, .yt-link:focus-visible img { opacity: 1; }
.yt-link:hover .yt-play, .yt-link:focus-visible .yt-play { background: var(--cyan); }
.yt-link:hover .yt-play::after, .yt-link:focus-visible .yt-play::after { border-left-color: var(--bg); }
.yt-link:active .yt-play { transform: scale(.97); }
.yt-link:focus-visible { outline-offset: -3px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mc-title { font: 600 1rem/1.35 var(--sans); }
.mc-meta { margin: 0; font: 500 .75rem/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.mc-why { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
/* --------------------------------------------------------------------------
   Row sections (Media, Reading): header on top, full-width horizontal tracks.
   Native scroll-snap first; app.js adds HUD prev/next, a position readout,
   arrow keys, mouse drag and edge fades. Without JS the track still scrolls.
   -------------------------------------------------------------------------- */
.section-head { display: grid; gap: 20px; margin-bottom: 36px; }
@media (min-width: 1024px) {
  .section-head { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; align-items: end; }
  .section-head .section-label { position: static; }
}
.section-head .section-lede { margin: 0; }

@property --fl { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fr { syntax: "<length>"; inherits: false; initial-value: 0px; }

.carousel { --gap: 12px; --cw: 85vw; --fade: calc(var(--gutter) + 12px); position: relative; }
@media (min-width: 700px) {
  .carousel { --gap: 16px; }
  .carousel--media { --cw: clamp(300px, calc((100% - 2 * var(--gap)) / 2.2), 460px); }
  .carousel--books { --cw: clamp(250px, calc((100% - 3 * var(--gap)) / 3.5), 320px); }
}
@media (min-width: 1100px) {
  /* about 2.6 cards in view, so the next one always peeks in */
  .carousel--media { --cw: clamp(320px, calc((100% - 2 * var(--gap)) / 2.6), 460px); }
  /* exactly three items: fill the row instead of leaving a gap */
  .carousel-track:has(> .carousel-item:nth-child(3):last-child) { --cw: calc((100% - 2 * var(--gap)) / 3); }
}
.carousel + .carousel { margin-top: 56px; }

.carousel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 44px; margin-bottom: 12px; }
.carousel-bar .subhead { margin: 0; }
.carousel-bar:empty { display: none; }

.car-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.car-pos {
  min-width: 8ch; margin-right: 10px;
  font: 500 .75rem/1 var(--mono); letter-spacing: .1em; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
.car-pos .cur { color: var(--fg); font-weight: 600; }
.car-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: rgba(5,7,10,.8);
  color: var(--cyan);
  cursor: pointer;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
}
/* HUD corner ticks */
.car-btn::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--cyan), var(--cyan)) top left / 6px 1px,
    linear-gradient(var(--cyan), var(--cyan)) top left / 1px 6px,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 6px 1px,
    linear-gradient(var(--cyan), var(--cyan)) bottom right / 1px 6px;
  background-repeat: no-repeat;
  opacity: .8;
}
.car-btn svg { width: 16px; height: 16px; }
.car-btn:hover:not(:disabled) { border-color: var(--cyan); box-shadow: inset 0 0 14px var(--cyan-16), 0 0 14px rgba(34,211,238,.2); }
.car-btn:active:not(:disabled) { transform: scale(.97); }
.car-btn:disabled { color: var(--dim); border-color: var(--line-2); cursor: default; }
.car-btn:disabled::before { opacity: 0; }

.carousel-track {
  --fl: 0px;
  --fr: var(--fade);
  list-style: none;
  position: relative;
  display: flex; gap: var(--gap);
  margin: 0 calc(-1 * var(--gutter));
  padding: 6px var(--gutter) 16px;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
  scrollbar-color: var(--control) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
  transition: --fl 220ms var(--ease), --fr 220ms var(--ease);
}
@media (prefers-reduced-motion: no-preference) { .carousel-track { scroll-behavior: smooth; } }
.carousel-track[data-at-start="false"] { --fl: var(--fade); }
.carousel-track[data-at-end="true"] { --fr: 0px; }
.carousel-track:focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 6px var(--cyan-16); border-radius: 0; }
.carousel-track.is-draggable { cursor: grab; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; -webkit-user-select: none; }
.carousel-track.is-dragging * { cursor: grabbing; }
.carousel-item { flex: 0 0 var(--cw); min-width: 0; scroll-snap-align: start; }
.carousel-item img { -webkit-user-drag: none; }

/* books: typographic spine + generated cover in the HUD palette (no cover images) */
.book {
  --ink: var(--cyan); --ink-a: rgba(34,211,238,.55); --ink-c: rgba(34,211,238,.28); --ink-b: rgba(34,211,238,.12);
  display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  min-height: 340px;
  padding: 0;
  transition: border-color 200ms var(--ease);
}
.book:nth-child(3n+2) { --ink: var(--lime); --ink-a: rgba(163,230,53,.55); --ink-c: rgba(163,230,53,.28); --ink-b: rgba(163,230,53,.12); }
.book-spine {
  position: relative; grid-column: 1; grid-row: 1 / -1;
  display: flex; justify-content: center; align-items: flex-end; padding: 16px 0;
  border-right: 1px solid var(--line-2);
  background: repeating-linear-gradient(180deg, transparent 0 5px, rgba(255,255,255,.035) 5px 6px), rgba(255,255,255,.015);
}
.book-spine::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ink); box-shadow: 0 0 10px var(--ink-a); }
.book-spine::after { content: ""; position: absolute; left: 10px; right: 10px; top: 16px; height: 22px; background: repeating-linear-gradient(180deg, var(--line-2) 0 1px, transparent 1px 4px); }
.book-n { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 .6875rem/1 var(--mono); letter-spacing: .16em; color: var(--ink); }
.book-art {
  position: relative; grid-column: 2; grid-row: 1; display: block; height: 112px; overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  background:
    linear-gradient(135deg, transparent 49%, var(--ink-a) 49.6%, transparent 50.4%),
    repeating-linear-gradient(0deg, transparent 0 15px, var(--line) 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, var(--line) 15px 16px),
    radial-gradient(120% 100% at 85% 0%, var(--ink-b), transparent 65%);
}
.book:nth-child(4n+2) .book-art {
  background:
    repeating-radial-gradient(circle at 82% 130%, transparent 0 13px, var(--ink-c) 13px 14px),
    radial-gradient(90% 120% at 82% 100%, var(--ink-b), transparent 70%);
}
.book:nth-child(4n+3) .book-art {
  background:
    linear-gradient(var(--ink-c), var(--ink-c)) 10% 100% / 7% 38% no-repeat,
    linear-gradient(var(--ink-c), var(--ink-c)) 24% 100% / 7% 58% no-repeat,
    linear-gradient(var(--ink-c), var(--ink-c)) 38% 100% / 7% 30% no-repeat,
    linear-gradient(var(--ink-c), var(--ink-c)) 52% 100% / 7% 72% no-repeat,
    linear-gradient(var(--ink-a), var(--ink-a)) 66% 100% / 7% 50% no-repeat,
    linear-gradient(var(--ink-c), var(--ink-c)) 80% 100% / 7% 84% no-repeat,
    repeating-linear-gradient(0deg, transparent 0 21px, var(--line) 21px 22px);
}
.book:nth-child(4n) .book-art {
  background:
    radial-gradient(circle, var(--ink-c) 1px, transparent 1.6px) 0 0 / 10px 10px,
    linear-gradient(160deg, transparent 40%, var(--ink-b) 100%);
}
.book-art::after {
  content: attr(data-n);
  position: absolute; right: 12px; bottom: 6px;
  font: 700 2.75rem/1 var(--mono); letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px var(--ink-a);
}
.book-title { grid-column: 2; grid-row: 2; padding: 18px 20px 0; font: 600 1.0625rem/1.3 var(--mono); letter-spacing: -0.02em; text-transform: uppercase; overflow-wrap: anywhere; hyphens: auto; }
.book-author { grid-column: 2; grid-row: 4; align-self: end; margin: 0; padding: 14px 20px 20px; font: 500 .75rem/1.5 var(--mono); letter-spacing: .04em; color: var(--fg); }
.book-author time { color: var(--muted); }
.book-desc { grid-column: 2; grid-row: 3; margin: 0; padding: 10px 20px 0; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
@media (hover: hover) and (pointer: fine) { .book:hover { border-color: rgba(34,211,238,.5); } }


/* more about me */
.me-grid { display: grid; gap: 16px; }
@media (min-width: 1100px) { .me-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .me-main { grid-column: 1 / -1; } }
.me-h { font: 600 .8125rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); margin-bottom: 14px; }
.me-grid .prose { font-size: 1rem; }

/* footer: replay intro */
.footer-btn {
  min-height: 44px; padding: 0 12px;
  background: transparent; border: 1px solid var(--control); border-radius: var(--radius);
  color: var(--fg); font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
  transition: border-color 150ms var(--ease), color 150ms var(--ease);
}
.footer-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.footer-btn[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Blog index + post pages
   -------------------------------------------------------------------------- */
.blog-body { padding-top: 48px; padding-bottom: 96px; display: grid; gap: 24px; }
.filters { display: grid; gap: 16px; }
html:not(.js) .filters { display: none; }
.filters .field { margin: 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  min-height: 40px; padding: 0 12px;
  background: rgba(5,7,10,.6); border: 1px solid var(--control); color: var(--fg);
  font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease), background-color 160ms var(--ease);
}
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn[aria-pressed="true"] { border-color: var(--cyan); color: var(--bg); background: var(--cyan); }
.filter-count { margin: 0; font: 500 .8125rem/1.4 var(--mono); color: var(--muted); }
.filter-empty { color: var(--muted); font: 500 .9375rem/1.5 var(--mono); }
.filter-empty[hidden] { display: none; }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

.post-head .post-title { font-size: clamp(1.75rem, 1rem + 2.8vw, 3.375rem); line-height: 1.06; max-width: 26ch; letter-spacing: -0.04em; text-wrap: balance; }
.source-note { margin-top: 24px; padding: 14px 18px; border: 1px solid rgba(34,211,238,.4); border-left-width: 3px; background: var(--cyan-08); max-width: 80ch; }
.source-note p { margin: 0; font-size: .9375rem; }
.source-note .sn-title { margin-bottom: 6px; font: 600 .6875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); }
.post-body { padding-top: 48px; padding-bottom: 48px; }
.post-prose { max-width: 820px; overflow-wrap: break-word; }
@media (min-width: 900px) { .post-prose { padding: 40px 48px; } }
.post-prose p, .post-prose li { max-width: 70ch; }
.post-prose h2 { font: 600 clamp(1.125rem, 1rem + .6vw, 1.375rem)/1.3 var(--mono); text-transform: uppercase; letter-spacing: -0.01em; margin: 2em 0 .7em; }
.post-prose h3 { font: 600 1.0625rem/1.35 var(--sans); margin: 1.6em 0 .5em; color: var(--fg); }
.post-prose > :first-child { margin-top: 0; }
.post-prose ul, .post-prose ol { padding-left: 1.4em; margin: 0 0 1em; display: grid; gap: .4em; }
.post-prose li::marker { color: var(--lime); }
.post-prose blockquote { margin: 0 0 1.4em; padding: 4px 0 4px 18px; border-left: 2px solid var(--cyan); color: var(--muted); font-style: normal; }
.post-prose blockquote p:last-child { margin-bottom: 0; }
.post-prose pre { margin: 0 0 1.4em; padding: 16px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line-2); font: 400 .8125rem/1.6 var(--mono); tab-size: 4; }
.post-prose pre:focus-visible { outline-offset: 2px; }
.post-prose code { font-family: var(--mono); font-size: .875em; color: var(--lime); }
.post-prose pre code { color: var(--fg); font-size: inherit; }
.post-prose strong { color: var(--fg); font-weight: 600; }
/* post tables, figures, further reading */
.table-wrap { margin: 0 0 1.4em; overflow-x: auto; border: 1px solid var(--line-2); }
.table-wrap:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fig .table-wrap { margin-bottom: 0; }
.post-prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; }
.post-prose th, .post-prose td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.post-prose thead th { font: 600 .6875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); background: var(--bg); white-space: nowrap; }
.post-prose tbody th { font-weight: 600; color: var(--fg); }
.post-prose tbody tr:last-child > * { border-bottom: 0; }
.cm-table td { font: 500 .9375rem/1.4 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-tag { margin-left: 6px; padding: 1px 5px; border: 1px solid var(--line-2); font: 600 .6875rem/1.3 var(--mono); color: var(--muted); }
.cm-good { background: var(--lime-12); }
.cm-bad { background: var(--amber-12); }
.ctx { display: grid; gap: 12px; }
@media (min-width: 640px) { .ctx { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctx-col { padding: 14px 16px; border: 1px solid var(--line-2); background: var(--bg); }
.post-prose .ctx-h { margin: 0 0 10px; font: 600 .6875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); }
.post-prose .ctx-row { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font: 500 .8125rem/1.4 var(--mono); }
.ctx-row b { color: var(--fg); }
.ctx-vec { flex: none; padding: 1px 6px; border: 1px solid var(--line-2); color: var(--muted); }
.ctx-a { border-color: var(--cyan); color: var(--cyan); }
.ctx-b { border-color: var(--lime); color: var(--lime); }
.ctx-c { border-color: var(--amber); color: var(--amber); }
.dv-svg { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); background: var(--bg); }
.dv-h { font: 600 13px var(--mono); fill: var(--fg); }
.dv-v { font: 600 13px var(--mono); fill: var(--fg); }
.dv-l { font: 500 12px var(--mono); fill: var(--muted); }
.dv-axis { stroke: var(--control); stroke-width: 1; }
.dv-bar { fill: var(--control); }
.dv-bar.dv-hi { fill: var(--cyan); }
.post-refs { max-width: 820px; margin-top: 24px; }
@media (min-width: 900px) { .post-refs { padding: 32px 48px; } }
.post-refs h2 { margin: 0 0 14px; font: 600 .75rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); }
.post-refs ol { margin: 0; padding-left: 1.4em; display: grid; gap: .6em; }
.post-refs li { max-width: 70ch; font-size: .9375rem; }
.post-refs li::marker { color: var(--lime); font-family: var(--mono); }
.post-refs .ref-by { color: var(--muted); }
.post-ai-note { max-width: 820px; margin: 20px 0 0; font: 500 .75rem/1.5 var(--mono); color: var(--muted); }
.pc-date, .post-date { font-variant-numeric: tabular-nums; }
.post-note { padding: 10px 14px; border: 1px dashed var(--control); color: var(--muted); font-size: .9375rem; }

.fig { margin: 1.6em 0; }
.fig figcaption { margin-top: 10px; font: 500 .75rem/1.5 var(--mono); color: var(--muted); }
.fig-steps ol { list-style: none; padding: 0; display: grid; gap: 8px; counter-reset: none; }
@media (min-width: 640px) { .fig-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fig-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.015); font: 500 .8125rem/1.35 var(--mono); text-transform: uppercase; letter-spacing: .04em; max-width: none; }
.fig-steps .fs-n { color: var(--cyan); font-size: .6875rem; letter-spacing: .12em; }
.fig-flow .ff { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--line-2); background: var(--bg); font: 500 .8125rem/1.4 var(--mono); }
.ff-in { color: var(--fg); }
.ff-box { padding: 8px 14px; border: 1px solid var(--cyan); color: var(--cyan); box-shadow: 0 0 14px rgba(34,211,238,.2); }
.ff-out { color: var(--lime); }
.ff-arrow { color: var(--dim); }

.post-nav { display: grid; gap: 12px; padding-top: 32px; padding-bottom: 96px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line-2); text-decoration: none; color: var(--fg); min-height: 44px; transition: border-color 160ms var(--ease); }
.pn:hover { border-color: var(--cyan); }
.pn--next { text-align: right; }
@media (min-width: 900px) { .pn--next:only-child { grid-column: 2; } }
.pn-dir { font: 500 .6875rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--cyan); }
.pn-title { font-weight: 500; }

/* project detail pages */
.proj-fig { margin: 0 0 16px; }
.proj-fig img { width: 100%; max-width: 640px; height: auto; border: 1px solid var(--line-2); }
.proj-fig--svg { max-width: 640px; }
.proj-svg { width: 100%; height: 160px; border: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, transparent 0 31px, var(--line) 31px 32px); }
.proj-fig figcaption { margin-top: 8px; font: 500 .75rem/1.4 var(--mono); color: var(--muted); }
@media (min-width: 1024px) { .proj-fig { margin-left: calc((100% - 48px) * 3 / 12 + 48px); } }
.dd-na { color: var(--muted); font: 500 .875rem/1.4 var(--mono); }
.steps { padding-left: 1.4em; display: grid; gap: 10px; color: var(--muted); max-width: 70ch; }
.steps li::marker { color: var(--lime); font-family: var(--mono); }
.case-section .body code { font: .875em var(--mono); color: var(--lime); }
.case-section .body .points + p, .case-section .body p + .points, .case-section .body .points + .points { margin-top: 1em; }
.proj-card .card-index { white-space: nowrap; }
