/* ============================================================
   Kanav Mehta — Quantitative AI Researcher
   Design system v4 · "Cyan Ledger" — electric cyan × ledger gold,
   grotesk display with serif-italic accents, midnight / ice themes
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@1,9..144,400;1,9..144,450;1,9..144,500&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-serif: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --bg: #020609;
  --bg-soft: #050c12;
  --surface: #07131d;
  --surface-2: #0b1c28;
  --line: rgba(86, 183, 229, 0.17);
  --line-strong: rgba(86, 183, 229, 0.34);
  --text: #9fe0f5;
  --muted: #a8bfd1;
  --faint: #9ab2c4;
  --accent: #0abfff;
  --accent-ink: #00131e;
  --ice: #bcefff;
  /* Dual-accent system: cyan drives actions, gold marks ledger details. */
  --gold: #e8b86a;
  --gold-soft: rgba(232, 184, 106, 0.1);
  --cyan: #5fd4ff;
  --cyan-soft: rgba(95, 212, 255, 0.08);
  --green: #3ddc97;
  --red: #ff7a93;
  --hero-glow-a: rgba(0, 156, 255, 0.12);
  --hero-glow-b: rgba(227, 172, 85, 0.07);
  --grid-line: rgba(8, 191, 255, 0.045);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.32);
  --header-bg: rgba(2, 6, 9, 0.88);

  /* Glass & halo (let the backdrop breathe through surfaces) */
  --glass: color-mix(in srgb, var(--surface) 66%, transparent);
  --glass-2: color-mix(in srgb, var(--surface-2) 60%, transparent);
  --glass-deep: color-mix(in srgb, var(--bg-soft) 52%, transparent);
  --glass-blur: blur(14px);
  --halo-gold: rgba(227, 172, 85, 0.18);
  --halo-cyan: rgba(0, 132, 255, 0.14);
  --halo-text: 0 0 36px rgba(8, 191, 255, 0.28);
  --halo-text-gold: 0 0 34px rgba(227, 172, 85, 0.3);

  --radius: 8px;
  --radius-sm: 5px;
  --wrap: 1360px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme='light'] {
  color-scheme: light;
  --bg: #f5faff;
  --bg-soft: #ecf4fa;
  --surface: #ffffff;
  --surface-2: #e5f0f8;
  --line: rgba(17, 93, 133, 0.17);
  --line-strong: rgba(17, 93, 133, 0.32);
  --text: #0f2b3f;
  --muted: #3d5a73;
  --faint: #425f78;
  --accent: #00648f;
  --accent-ink: #ffffff;
  --ice: #004f73;
  --gold: #7c5516;
  --gold-soft: rgba(124, 85, 22, 0.09);
  --cyan: #00607f;
  --cyan-soft: rgba(0, 96, 127, 0.07);
  --green: #0f6b4f;
  --red: #a62b4d;
  --hero-glow-a: rgba(0, 157, 229, 0.09);
  --hero-glow-b: rgba(143, 98, 31, 0.06);
  --grid-line: rgba(0, 109, 159, 0.04);
  --shadow-card: 0 18px 44px rgba(21, 75, 107, 0.08);
  --header-bg: rgba(245, 250, 255, 0.92);

  --halo-gold: rgba(143, 98, 31, 0.14);
  --halo-cyan: rgba(0, 132, 200, 0.08);
  --halo-text: none;
  --halo-text-gold: none;
}

/* ---------- Fallback: no backdrop-filter support → denser glass ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass: color-mix(in srgb, var(--surface) 93%, transparent);
    --glass-2: color-mix(in srgb, var(--surface-2) 90%, transparent);
    --glass-deep: color-mix(in srgb, var(--bg-soft) 85%, transparent);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

/* Themed scrollbar */
html {
  scrollbar-color: color-mix(in srgb, var(--gold) 26%, var(--surface-2)) var(--bg);
}

::-webkit-scrollbar {
  width: 11px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--gold) 28%, var(--surface-2));
  border-radius: 8px;
  border: 3px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--gold) 45%, var(--surface-2));
}

/* The visual effects never sit above the semantic page content. */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px 420px at 82% -6%, var(--hero-glow-a), transparent 68%),
    radial-gradient(720px 460px at 8% 12%, var(--hero-glow-b), transparent 70%);
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--gold-soft);
  color: var(--text);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 14px;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Layout shells ---------- */
.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.site-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 652px), var(--line) calc(50% - 652px), transparent calc(50% - 651px), transparent calc(50% + 651px), var(--line) calc(50% + 651px), transparent calc(50% + 652px));
  opacity: 0.32;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

.page-section {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 88px 44px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  position: relative;
}

/* A fine cyan light traces each section divider. */
.section-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--gold) 52%, transparent),
    var(--line) 38%,
    transparent 97%);
}

.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -0.045em;
  line-height: 1.16;
  text-wrap: balance;
}

.section-note {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.kicker::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: 0.8;
}

.lead {
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.7;
  margin: 14px 0 0;
  max-width: 62ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 44px;
  height: 80px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: var(--gold-soft);
  box-shadow: inset 0 0 16px var(--gold-soft), 0 0 20px var(--gold-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
}

.brand-role {
  display: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.site-nav a.active {
  color: var(--text);
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px 1px color-mix(in srgb, var(--gold) 55%, transparent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.nav-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-toggle:hover,
.nav-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

.theme-toggle svg,
.nav-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

:root:not([data-theme='light']) .moon-icon {
  display: none;
}

[data-theme='light'] .sun-icon {
  display: none;
}

.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button .arr {
  font-family: var(--font-mono);
  font-size: 13px;
  transition: transform 0.22s var(--ease);
}

.button:hover .arr {
  transform: translateX(3px);
}

.button.primary,
.button.accent {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 82%, #001018);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 26px -8px var(--accent);
}

.button.primary:hover,
.button.accent:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 38px -6px var(--accent);
}

[data-theme='light'] .button.primary,
[data-theme='light'] .button.accent {
  color: var(--accent-ink);
}

.button.cyan {
  background: var(--cyan-soft);
  border-color: var(--line-strong);
  color: var(--cyan);
}

[data-theme='light'] .button.cyan {
  border-color: var(--line-strong);
}

.button.cyan:hover {
  box-shadow: 0 10px 28px var(--halo-cyan);
}

.button.ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.button.ghost:hover {
  background: var(--surface);
  border-color: var(--gold);
}

.button.small {
  padding: 9px 15px;
  font-size: 13.5px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 42%, var(--hero-glow-a), transparent 52%),
    radial-gradient(560px 420px at 6% 98%, var(--hero-glow-b), transparent 70%);
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: var(--wrap);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding: 96px 44px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
  gap: 72px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero h1 {
  margin: 30px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(42px, 5.25vw, 76px);
  line-height: 1.035;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

/* Serif-italic gold accent: the editorial counterpoint inside grotesk type. */
.hero h1 em,
.page-title h1 em,
.section-head h2 em,
.contact-panel h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 450;
  letter-spacing: -0.015em;
  color: var(--gold);
  text-shadow: var(--halo-text-gold);
}

.hero-copy {
  min-width: 0;
}

.hero .lead {
  font-size: 17px;
  max-width: 57ch;
  margin-top: 26px;
}

.terminal-readout {
  margin: 32px 0 0;
  padding: 16px 20px;
  max-width: 620px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--glass-deep);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-readout .cyan {
  color: var(--cyan);
}

.terminal-readout .gold {
  color: var(--gold);
}

.hero-portrait {
  position: relative;
  justify-self: end;
  width: min(380px, 100%);
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--glass-deep);
  box-shadow:
    0 0 80px -30px var(--accent),
    0 26px 60px -30px var(--halo-gold),
    var(--shadow-card);
}

.hero-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  /* Anchor the square crop to the top so the hairline is never trimmed. */
  object-position: 50% 0%;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

/* Theme-following portrait: exactly one image per color scheme.
   Dark scheme shows the default capture; light scheme swaps in the light one. */
:root:not([data-theme='light']) .hero-portrait img.portrait-light {
  display: none;
}

[data-theme='light'] .hero-portrait img.portrait-dark {
  display: none;
}

/* HUD corner brackets: cyan leads, gold trails the far corner. */
.hero-portrait::before {
  content: '';
  position: absolute;
  inset: -5px;
  pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 38px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1px 38px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 38px 1px no-repeat,
    linear-gradient(var(--gold), var(--gold)) right bottom / 1px 38px no-repeat;
}

.portrait-caption {
  margin: 18px 0 2px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Digital rain: decorative canvas, readable foreground ---------- */
.matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  /* Let rain show on both sides and between sections; keep reading areas calm. */
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.55) 22%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.55) 78%, #000);
}

.matrix-toggle {
  position: fixed;
  z-index: 120;
  left: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--faint);
  background: var(--glass-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.matrix-toggle:hover { color: var(--accent); border-color: var(--accent); }
.matrix-toggle svg { width: 14px; height: 14px; }
.matrix-toggle .motion-play { display: none; }
[data-motion='paused'] .matrix-toggle .motion-pause { display: none; }
[data-motion='paused'] .matrix-toggle .motion-play { display: block; }
[data-motion='paused'] .ticker-track,
[data-motion='paused'] .eyebrow .dot,
[data-page-hidden] .ticker-track,
[data-page-hidden] .eyebrow .dot { animation-play-state: paused; }
[data-theme='light'] .matrix-canvas {
  opacity: 0.5;
  /* Light theme needs less masking: keep the rain present across the page. */
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.72) 22%, rgba(0, 0, 0, 0.58) 50%, rgba(0, 0, 0, 0.72) 78%, #000);
}

/* ---------- Ticker tape ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  position: relative;
}

.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  z-index: 2;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-soft), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-soft), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 46s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-item b {
  color: var(--text);
  font-weight: 500;
}

.ticker-item .up { color: var(--green); }
.ticker-item .sep {
  color: var(--faint);
  opacity: 0.55;
  padding-left: 20px;
}

/* ---------- Metrics strip ---------- */
.metric-strip {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 44px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.metric {
  padding: 12px 28px;
  border-left: 1px solid var(--line-strong);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.35s var(--ease);
}

.metric:hover {
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
  box-shadow: 0 0 34px -12px var(--halo-gold);
}

.metric strong {
  font-family: var(--font-mono);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ice);
  background: linear-gradient(180deg,
    var(--text) 32%,
    color-mix(in srgb, var(--accent) 68%, var(--text)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

.metric strong sup {
  font-size: 0.55em;
  color: var(--gold);
  margin-left: 2px;
}

.metric span {
  font-size: 13px;
  color: var(--faint);
  line-height: 1.5;
}

/* ---------- Featured work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  position: relative;
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), background-color 0.35s var(--ease);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--edge, var(--gold)), transparent 70%);
  opacity: 0.85;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow:
    var(--shadow-card),
    0 0 40px -12px color-mix(in srgb, var(--edge, var(--gold)) 38%, transparent);
}

.feature-card.factor { --edge: var(--gold); }
.feature-card.trading { --edge: var(--cyan); }
.feature-card.ai { --edge: var(--green); }

.feature-card .label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--edge, var(--gold));
}

.feature-card h3 {
  margin: 12px 0 14px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.square-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.square-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.square-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: var(--edge, var(--gold));
  opacity: 0.75;
}

/* ---------- QuantLink spotlight ---------- */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: start;
}

.spotlight-copy h3 {
  margin: 18px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.spotlight-copy .lead {
  font-size: 16.5px;
}

.check-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.check-list li::before {
  content: '◆';
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--gold);
  font-size: 12px;
}

.check-list li b {
  color: var(--text);
  font-weight: 600;
}

/* Pipeline panel */
.panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    var(--shadow-card),
    0 0 48px -12px var(--halo-gold),
    0 0 90px -30px var(--halo-cyan);
  overflow: hidden;
}

.panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--glass-2);
}

.panel-bar .lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel-bar .lamp:nth-child(1) { background: var(--gold); }
.panel-bar .lamp:nth-child(2) { background: var(--accent); opacity: 0.55; }
.panel-bar .lamp:nth-child(3) { background: var(--accent); opacity: 0.28; }

.panel-bar span {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  min-width: 0;
  overflow-wrap: anywhere;
}

.panel-body {
  padding: 20px 18px 22px;
  display: grid;
  gap: 10px;
}

.pipe-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12.5px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.pipe-row:hover {
  border-color: color-mix(in srgb, var(--cyan) 38%, var(--line));
  box-shadow: 0 0 22px -10px var(--halo-cyan);
}

.pipe-row .step {
  color: var(--accent);
  font-size: 11px;
}

.pipe-row .name {
  color: var(--text);
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.pipe-row .name small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.pipe-row .stat {
  color: var(--cyan);
  font-size: 11px;
  white-space: nowrap;
}

.panel-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.panel-foot b {
  color: var(--cyan);
  font-weight: 500;
}

/* ---------- Experience ledger ---------- */
.ledger {
  border-top: 1px solid var(--line);
}

.ledger-row {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 150px;
  gap: 26px;
  padding: 32px 16px 32px 28px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}

.ledger-row::before {
  content: '';
  position: absolute;
  top: 39px;
  left: 0;
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  background: var(--bg);
  box-shadow: 0 0 10px var(--gold-soft);
}

.ledger-row:hover {
  background: color-mix(in srgb, var(--surface) 52%, transparent);
}

.ledger-when {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--faint);
  padding-top: 4px;
}

.ledger-when b {
  display: block;
  color: var(--gold);
  font-weight: 500;
}

.ledger-role h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.ledger-role .org {
  margin: 3px 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

.ledger-role p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.68;
  max-width: 68ch;
}

.ledger-tag {
  justify-self: end;
  align-self: start;
  margin-top: 4px;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.ledger-tag.current {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 40%, transparent);
  background: color-mix(in srgb, var(--green) 7%, transparent);
}

/* ---------- Project cards ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.filter-button {
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.filter-button:hover {
  color: var(--text);
  border-color: var(--gold);
}

.filter-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

[data-theme='light'] .filter-button.active {
  color: var(--accent-ink);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  display: flex;
}

.project-card[hidden] {
  display: none;
}

.project-card-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), background-color 0.35s var(--ease);
}

.project-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--edge, var(--gold)), transparent 72%);
  opacity: 0.8;
}

.project-card[data-project~='factor'] { --edge: var(--gold); }
.project-card[data-project~='trading'] { --edge: var(--cyan); }
.project-card[data-project~='ai'] { --edge: var(--green); }
.project-card[data-project~='options'] { --edge: var(--gold); }
.project-card[data-project~='market'] { --edge: var(--red); }
.project-card.flagship { --edge: var(--gold); }

.project-card-inner:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--edge, var(--gold)) 34%, var(--line-strong));
  box-shadow:
    var(--shadow-card),
    0 0 38px -12px color-mix(in srgb, var(--edge, var(--gold)) 34%, transparent);
}

.project-type {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.project-card h2,
.project-card h3 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  border-inline: 0;
  background: transparent;
}

.project-metrics span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.project-metrics span small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

.project-card .square-list {
  margin-bottom: 16px;
}

.project-card .square-list li {
  font-size: 13.5px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 14px;
}

.tag {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--glass-deep);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.project-card-inner:hover .tag,
.feature-card:hover .tag,
.skill-block:hover .tag {
  color: var(--text);
  border-color: color-mix(in srgb, var(--edge, var(--gold)) 30%, var(--line));
}

.project-card .inline-actions {
  margin-top: 20px;
}

/* ---------- Flagship highlight ---------- */
.flagship-tag {
  display: inline-block;
  margin-left: 0;
  padding: 3px 10px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
}

.project-card.flagship .project-card-inner {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}

.showcase-figure {
  margin: 16px 0 4px;
}

.showcase-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.showcase-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* Dashboard captures: sit under the fact sheet in the left rail.
   Captured at ~2× display size so the browser downsamples crisply. */

/* Theme-following dashboard shot: exactly one image per color scheme.
   Dark scheme shows the dark capture; light scheme swaps in the light one. */
.dash-shot-theme img {
  display: none;
}

:root:not([data-theme='light']) .dash-shot-theme img.dash-dark {
  display: block;
}

[data-theme='light'] .dash-shot-theme img.dash-light {
  display: block;
}

/* Left-rail dashboard capture: sits under the fact sheet, keeps pages compact */
.fact-col {
  display: grid;
  gap: 18px;
  align-content: start;
}

.fact-col .fact-sheet {
  position: static;
}

.fact-col .showcase-figure {
  margin: 0;
}

.fact-col .showcase-figure img {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

/* ---------- Tearsheet strip ---------- */
.tearsheet-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tearsheet-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--glass);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.tearsheet-link:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 30px -12px var(--halo-cyan);
}

.tearsheet-link b {
  font-size: 14.5px;
  font-weight: 600;
}

.tearsheet-link span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Blogs ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.blog-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), background-color 0.35s var(--ease);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow:
    var(--shadow-card),
    0 0 36px -12px var(--halo-gold);
}

.article-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.blog-card h2,
.blog-card h3,
.article-card h2,
.article-card h3 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

.blog-card p:not(.article-meta) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.article-grid {
  display: grid;
  gap: 18px;
  margin-top: 46px;
}

.article-card {
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
}

.article-card .lead {
  font-size: 15.5px;
  margin-top: 6px;
}

.article-card .square-list {
  margin-top: 20px;
}

/* ---------- Skills ---------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill-block {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-color 0.35s var(--ease);
}

.skill-block:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 32px -12px var(--halo-cyan);
}

.skill-block h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.skill-block h3::before {
  content: '//';
  font-family: var(--font-mono);
  color: var(--gold);
  margin-right: 10px;
  font-weight: 500;
}

.skill-block p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.edu-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
}

.edu-card .school {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0;
}

.edu-card h3 {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}

.edu-card .when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.edu-card ul {
  margin: 14px 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.edu-card li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
}

.edu-card li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Contact ---------- */
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 44px;
  align-items: center;
  padding: 52px 48px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(560px 300px at 88% 0%, var(--hero-glow-a), transparent 70%),
    radial-gradient(480px 280px at 4% 110%, var(--hero-glow-b), transparent 72%),
    var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    var(--shadow-card),
    0 0 70px -18px var(--halo-gold);
}

.contact-panel h2 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.contact-panel .lead {
  font-size: 16px;
}

.contact-channels {
  display: grid;
  gap: 12px;
}

.channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--glass-deep);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}

.channel:hover {
  border-color: var(--gold);
  transform: translateX(4px);
  box-shadow: 0 0 26px -12px var(--halo-gold);
}

.channel .ch-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.channel .ch-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.channel .arr {
  font-family: var(--font-mono);
  color: var(--gold);
}

/* ---------- Detail pages ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(700px 340px at 78% -20%, var(--hero-glow-a), transparent 70%);
}

.page-hero > .page-section { position: relative; z-index: 2; }

.page-title {
  max-width: 880px;
}

.page-title h1 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
}

.fact-sheet {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: grid;
  gap: 0;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.fact-row:last-child {
  border-bottom: 0;
}

.fact-row span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 2px;
}

.fact-row b {
  font-weight: 500;
  text-align: right;
}

.prose h2 {
  margin: 38px 0 14px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

.prose .square-list li {
  font-size: 15px;
}

/* ---------- Data tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 4px;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line-strong);
}

.data-table td:first-child {
  color: var(--text);
  font-weight: 500;
}

.data-table td {
  color: var(--muted);
}

.data-table tbody tr:hover {
  background: var(--glass-deep);
}

/* ---------- Tearsheet frame ---------- */
.tearsheet-frame {
  width: 100%;
  height: 940px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.tearsheet-frame.tearsheet-theme-unavailable {
  border-style: dashed;
}

@media (max-width: 640px) {
  .tearsheet-frame {
    height: 640px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  margin-top: 24px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-brand strong {
  font-size: 15px;
}

.footer-brand span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease),
    background-color 0.35s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Gentle stagger when grid siblings enter together */
.metric-strip > .reveal:nth-child(2),
.work-grid > .reveal:nth-child(2),
.project-grid > .reveal:nth-child(2),
.blog-grid > .reveal:nth-child(2),
.skill-grid > .reveal:nth-child(2) {
  transition-delay: 0.07s;
}

.metric-strip > .reveal:nth-child(3),
.work-grid > .reveal:nth-child(3),
.project-grid > .reveal:nth-child(3),
.blog-grid > .reveal:nth-child(3),
.skill-grid > .reveal:nth-child(3) {
  transition-delay: 0.14s;
}

.metric-strip > .reveal:nth-child(4),
.work-grid > .reveal:nth-child(4),
.project-grid > .reveal:nth-child(4),
.blog-grid > .reveal:nth-child(4),
.skill-grid > .reveal:nth-child(4) {
  transition-delay: 0.21s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
  }
  .eyebrow .dot {
    animation: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .matrix-toggle { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-content {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr);
    gap: 36px;
    padding-top: 64px;
  }
  .hero-portrait {
    justify-self: start;
  }
  .hero h1 { font-size: clamp(42px, 5.7vw, 58px); }
  .hero .lead { font-size: 15px; }
  .portrait-caption { flex-direction: column; gap: 5px; }
  .hero .eyebrow { font-size: 10px; }
  .section-note { white-space: normal; max-width: 220px; }
  .work-grid,
  .project-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .spotlight,
  .contact-panel,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .fact-sheet {
    position: static;
  }
  .tearsheet-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .ledger-row {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .ledger-tag {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .nav-inner { height: 72px; padding-inline: 24px; gap: 12px; }
  .nav-actions { margin-left: auto; }
  .nav-toggle {
    display: grid;
  }
  .site-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px 22px 20px;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    padding: 12px 14px;
    font-size: 16px;
  }
  .site-nav a.active::after {
    left: 14px;
    right: auto;
    width: 22px;
  }
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }
  .page-section { padding: 64px 28px; }
  .hero-content { padding-inline: 28px; }
  .hero .inline-actions { gap: 8px; }
}

@media (min-width: 1240px) {
  .brand-role {
    display: inline;
  }
}

@media (max-width: 640px) {
  .page-section {
    padding: 56px 20px;
  }
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    padding-top: 48px;
    padding-bottom: 64px;
    padding-inline: 20px;
  }
  .hero h1 { font-size: clamp(40px, 10.8vw, 62px); letter-spacing: -0.055em; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 0.06em; }
  .hero .lead { font-size: 16px; line-height: 1.75; }
  .hero-portrait { width: min(320px, 88%); justify-self: center; }
  .portrait-caption { flex-direction: row; gap: 8px; font-size: 8px; }
  .terminal-readout { font-size: 10px; padding: 14px; }
  .matrix-canvas { opacity: 0.28; }
  .matrix-toggle { left: 16px; bottom: 24px; }
  .page-title h1 { font-size: clamp(34px, 9vw, 48px); }
  .brand { font-size: 14px; gap: 9px; }
  .nav-inner { padding-inline: 20px; }
  .section-note { text-align: left; max-width: none; }
  .metric { padding: 8px 14px; }
  .metric strong { font-size: 32px; }
  .metric span { font-size: 12px; }
  .panel-bar { gap: 4px; padding: 12px; }
  .panel-bar .lamp { flex-shrink: 0; width: 6px; height: 6px; margin-left: 3px; }
  .panel-bar span { font-size: 9px; letter-spacing: 0.07em; }
  .panel-body { padding: 10px; }
  .pipe-row { grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 14px 8px; }
  .pipe-row .stat { grid-column: 2; font-size: 9px; }
  .panel-foot { flex-wrap: wrap; font-size: 9px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 10px 7px; }
  .fact-sheet { padding: 18px; }
  .fact-row { font-size: 12px; }
  .fact-row span { font-size: 10px; }
  .footer-inner { padding: 32px 20px; }
  .channel { flex-wrap: wrap; gap: 6px 12px; padding: 14px; }
  .channel .ch-value { font-size: 13px; overflow-wrap: anywhere; }
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: 20px;
  }
  .work-grid,
  .project-grid,
  .blog-grid,
  .skill-grid,
  .edu-grid,
  .tearsheet-strip {
    grid-template-columns: 1fr;
  }
  .ledger-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ledger-tag {
    grid-column: 1;
    justify-self: start;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .contact-panel {
    padding: 34px 24px;
  }
  .article-card {
    padding: 26px 22px;
  }
}
