/* ============================================================
   Dhiraj Kumar Sharma — short-scroll deck
   Light, dense, roughly two and a half screens. A horizontal
   Armada pipeline as the centrepiece band.

   RULE: nothing is hidden waiting on JS or an animation. Every
   element paints at rest; motion is only ever added on top.
   ============================================================ */

:root {
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono",
    "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --bg:         #F6F7FA;
  --panel:      #FFFFFF;
  --panel-2:    #FCFCFE;
  --edge:       #E4E7ED;
  --edge-hot:   #C7CCD6;
  --ink:        #15171C;
  --ink-2:      #4C5361;
  --ink-3:      #737A88;
  --accent:     #2F5BEA;
  --accent-2:   #1E42BE;
  --accent-dim: rgba(47, 91, 234, 0.085);
  --on-accent:  #FFFFFF;

  --gap: clamp(10px, 1vw, 16px);
  --pad: clamp(16px, 1.5vw, 26px);
  --r:   clamp(12px, 1vw, 18px);
  --maxw: 1240px;

  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --d-fast: 160ms; --d-mid: 320ms;
  --tempo: 2600ms;   /* one shared heartbeat for every loop on the page */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #101218;
    --panel:      #171A21;
    --panel-2:    #1C202A;
    --edge:       #262B35;
    --edge-hot:   #39404E;
    --ink:        #ECEFF4;
    --ink-2:      #A7AEBD;
    --ink-3:      #7C8493;
    --accent:     #7FA0FF;
    --accent-2:   #9DB6FF;
    --accent-dim: rgba(127, 160, 255, 0.13);
    --on-accent:  #0E1017;
  }
  body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
}

*, *::before, *::after { box-sizing: border-box }
* { margin: 0; font-synthesis: none }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }

body {
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem)/1.5 var(--font-sans);
  overflow-wrap: anywhere;
}

h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.028em }
ul, ol { list-style: none; padding: 0 }
a { color: inherit }
b, strong { font-weight: 600; color: var(--ink) }
code { font: 500 0.92em var(--font-mono); color: var(--accent) }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
:focus:not(:focus-visible) { outline: none }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--panel); border: 1px solid var(--edge-hot);
  padding: 10px 18px; border-radius: 999px; font-size: 0.875rem; text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px }

/* ---------- the deck: four bands, normal flow ---------- */
.deck {
  width: min(100% - 2 * var(--gap), var(--maxw));
  margin-inline: auto;
  padding-block: var(--gap) clamp(28px, 4vw, 56px);
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* explicit rows so DOM order and visual order stay independent */
.p-id     { grid-column: 1 / 6;  grid-row: 1 }
.p-ai     { grid-column: 6 / 13; grid-row: 1 }
.p-armada { grid-column: 1 / 13; grid-row: 2 }
.p-exp    { grid-column: 1 / 7;  grid-row: 3 }
.p-work   { grid-column: 7 / 13; grid-row: 3 }
.p-stack  { grid-column: 1 / 13; grid-row: 4 }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  padding: var(--pad);
  min-width: 0;
  display: flex; flex-direction: column;
  transition: border-color var(--d-mid) var(--ease-out),
              background-color var(--d-mid) var(--ease-out);
}
@media (hover: hover) {
  .panel:hover { border-color: var(--edge-hot); background: var(--panel-2) }
}

.panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px }
.panel-head h2 { font-size: clamp(1rem, 0.88rem + 0.5vw, 1.3rem); line-height: 1.1 }
.panel-sub { font-size: 0.75rem; color: var(--ink-3); margin-bottom: 10px }

/* ---------- identity ---------- */
.kicker {
  font: 500 0.625rem/1.4 var(--font-mono);
  letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
  animation: pulse var(--tempo) ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-dim) }
  70%  { box-shadow: 0 0 0 10px rgba(47,91,234,0) }
  100% { box-shadow: 0 0 0 0 rgba(47,91,234,0) }
}
.p-id h1 {
  font-size: clamp(1.75rem, 1.15rem + 2.2vw, 2.9rem);
  line-height: 0.97; letter-spacing: -0.035em; margin-top: 14px;
}
.role-line { color: var(--ink-2); margin-top: 12px; line-height: 1.45 }
.blurb { color: var(--ink-3); margin-top: 10px; line-height: 1.5 }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px }
.btn {
  display: inline-flex; align-items: center;
  font: 500 0.8125rem/1 var(--font-sans);
  text-decoration: none; white-space: nowrap;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--edge-hot); color: var(--ink);
  transition: border-color var(--d-fast) var(--ease-standard),
              background-color var(--d-fast) var(--ease-standard),
              color var(--d-fast) var(--ease-standard),
              transform var(--d-fast) var(--ease-standard);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600 }
.btn-primary:focus-visible { outline-color: var(--ink) }
@media (hover: hover) {
  .btn:hover { border-color: var(--accent); color: var(--accent) }
  .btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent) }
}
.btn:active { transform: scale(0.97) }
.links {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
  font: 400 0.75rem/1 var(--font-mono); color: var(--ink-3);
}
.links a { text-decoration: none; border-bottom: 1px solid var(--edge-hot); padding-bottom: 2px }
@media (hover: hover) { .links a:hover { color: var(--accent); border-color: var(--accent) } }

/* ---------- armada: a wide, short band ---------- */
.tag-live {
  margin-left: auto;
  font: 500 0.5625rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
  padding: 5px 9px; border-radius: 999px; white-space: nowrap;
}
/* his own line from the Armada launch post — better than anything written for him */
.pull {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 0.9rem + 0.55vw, 1.35rem);
  letter-spacing: -0.02em; line-height: 1.25;
  margin: 4px 0 12px; max-width: 34ch;
}

/* Video preview cards. LinkedIn will not allow its player to be embedded
   off-site, so these are poster + link — honest about where they lead, but
   they read as video rather than as a text link. */
/* The LinkedIn poster is a pale, text-dense title slide. Below roughly 260px
   it degrades into a grey smudge, so the poster column is sized to keep it
   legible rather than to keep the card small. */
.vid {
  display: grid; grid-template-columns: 288px minmax(0, 1fr);
  gap: 16px; align-items: center;
  text-decoration: none; color: inherit;
  border: 1px solid var(--edge); border-radius: 12px;
  padding: 10px; margin-bottom: 14px;
  max-width: 640px;
  transition: border-color var(--d-fast) var(--ease-standard),
              background-color var(--d-fast) var(--ease-standard),
              transform var(--d-fast) var(--ease-out);
}
.vid img {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 7px; display: block; background: var(--edge);
  border: 1px solid var(--edge);
}
.vid-meta { font-size: 0.75rem; color: var(--ink-3); line-height: 1.45 }
.vid-meta b { display: block; color: var(--accent); font-size: 0.8125rem; margin-bottom: 2px }
.vid.sm { max-width: 100%; grid-template-columns: 208px minmax(0, 1fr); margin: 12px 0 0 }
@media (hover: hover) {
  .vid:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px) }
}
@media (max-width: 700px) { .vid, .vid.sm { grid-template-columns: minmax(0, 1fr) } }

.watch {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.8125rem; font-weight: 500; color: var(--accent);
  text-decoration: none; margin-bottom: 14px; line-height: 1.35;
}
.watch.sm { font-size: 0.75rem; margin: 8px 0 0 }
.play {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid var(--accent);
  position: relative;
}
.watch.sm .play { width: 18px; height: 18px }
.play::after {
  content: ""; position: absolute; top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-left: 6px solid var(--accent);
  border-block: 4px solid transparent;
}
.watch.sm .play::after { border-left-width: 5px; border-block-width: 3.5px }
@media (hover: hover) {
  .watch { transition: color var(--d-fast) var(--ease-standard) }
  .watch:hover { text-decoration: underline; text-underline-offset: 3px }
  .watch .play { transition: transform var(--d-fast) var(--ease-out), background-color var(--d-fast) var(--ease-standard) }
  .watch:hover .play { transform: scale(1.12); background: var(--accent) }
  .watch:hover .play::after { border-left-color: var(--on-accent) }
}
@media (prefers-reduced-motion: no-preference) {
  .watch .play { animation: playPulse var(--tempo) ease-out infinite }
  @keyframes playPulse {
    0%, 60%, 100% { box-shadow: 0 0 0 0 var(--accent-dim) }
    75% { box-shadow: 0 0 0 7px rgba(47,91,234,0) }
  }
}

.fanout { margin: 0; display: grid; gap: 12px }
/* capped rather than full-bleed — the pipeline should read as a diagram,
   not as wallpaper across the whole band */
.fanout svg {
  width: 100%; max-width: 600px; height: auto;
  margin-inline: auto; overflow: visible; display: block;
}
.fanout path, .fanout rect {
  fill: none; stroke: var(--edge-hot); stroke-width: 1.4; vector-effect: non-scaling-stroke;
}
.fanout .trunk, .fanout .tail { stroke: var(--ink-3) }
.fanout .node {
  fill: var(--panel); stroke: var(--ink-3); stroke-width: 1.4;
  vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center;
}
.fanout .node.owner { fill: var(--ink); stroke: var(--ink) }
/* the intermediate reconcile points, where a nested level folds back up */
.fanout .node.join { fill: var(--accent-dim); stroke: var(--accent); stroke-width: 1.6 }
.fanout .lane.l1 { stroke: var(--ink-3) }

/* across-fan reconciliation — drawn dashed and marching so it reads as a live
   negotiation between sibling branches, not part of the static tree */
.fanout .xfan {
  stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 5;
  opacity: 0.75;
  animation: march calc(var(--tempo) / 3) linear infinite;
}
@keyframes march { to { stroke-dashoffset: -18 } }
.fanout .gate { stroke: var(--accent); fill: var(--accent-dim) }
/* 11px, not 12 — at 12 the five stage labels collide across a 592-unit box */
.fanout .fan-labels text {
  font: 600 11px var(--font-mono); letter-spacing: 0.04em; fill: var(--ink-2);
  paint-order: stroke; stroke: var(--panel); stroke-width: 6px; stroke-linejoin: round;
}
.fanout .owner-tag { font-size: 10px; fill: var(--ink); letter-spacing: 0.03em }
.fanout figcaption { font-size: 0.78125rem; color: var(--ink-3); line-height: 1.5; max-width: 92ch }

/* Work travelling the whole pipeline — additive only; the diagram reads fine
   without any of it. pathLength=1 normalises every segment, so one set of
   keyframes drives paths of wildly different lengths at the same apparent
   speed, and the stage delays make a single wave roll left to right. */
/* A dash alone reads as "a dash sliding". The glow gives it mass, and the
   easing gives it intent: it leaves the fan quickly, then eases into the
   gate rather than arriving at constant speed. */
.fanout .pulse {
  stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 0.13 0.87; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 3px color-mix(in oklab, var(--accent) 55%, transparent));
  animation: travel var(--tempo) cubic-bezier(0.2, 0.55, 0.25, 1) infinite;
}
.fanout .s0 { animation-delay: 0ms }
.fanout .s1 { animation-delay: 240ms }
.fanout .s2 { animation-delay: 470ms }
.fanout .p0 { animation-delay: 700ms }
.fanout .p1 { animation-delay: 760ms }
.fanout .p2 { animation-delay: 720ms }
.fanout .p3 { animation-delay: 800ms }
.fanout .p4 { animation-delay: 740ms }
.fanout .p5 { animation-delay: 830ms }
.fanout .s4 { animation-delay: 1180ms }
.fanout .s5 { animation-delay: 1420ms }
.fanout .s6 { animation-delay: 1660ms }
/* fades in fast, holds, then dims as it hands off to the next stage */
@keyframes travel {
  0%   { stroke-dashoffset: 1; opacity: 0 }
  8%   { opacity: 1 }
  78%  { opacity: 1 }
  100% { stroke-dashoffset: 0; opacity: 0 }
}

.fanout .node { animation: nodeBeat var(--tempo) ease-in-out infinite; animation-delay: 800ms }
.fanout circle:nth-of-type(2) { animation-delay: 840ms }
.fanout circle:nth-of-type(3) { animation-delay: 820ms }
.fanout circle:nth-of-type(4) { animation-delay: 880ms }
.fanout circle:nth-of-type(5) { animation-delay: 860ms }
.fanout circle:nth-of-type(6) { animation-delay: 900ms }
@keyframes nodeBeat { 0%,10%,100% { transform: scale(1) } 22% { transform: scale(1.45) } }

/* the join points light as their level folds up */
.fanout .node.join { animation: joinBeat var(--tempo) ease-in-out infinite; animation-delay: 1320ms }
@keyframes joinBeat {
  0%,12%,100% { fill: var(--accent-dim); r: 5 }
  24% { fill: var(--accent); r: 6.4 }
}

/* The arrival payoff. Work reaching the gate should resolve into something,
   not just tint — the gate fills, a ring expands out of it once, and a tick
   confirms. That is the verification, made visible. */
.fanout .gate { animation: gateBeat var(--tempo) ease-out infinite }
@keyframes gateBeat {
  0%, 66%, 100% { fill: var(--accent-dim); stroke: var(--accent) }
  76% { fill: var(--accent); stroke: var(--accent) }
}
.fanout .gate-ring {
  fill: none; stroke: var(--accent); stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: gateRing var(--tempo) cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes gateRing {
  0%, 70% { opacity: 0; transform: scale(1) }
  78%     { opacity: 0.7; transform: scale(1) }
  100%    { opacity: 0; transform: scale(1.9) }
}
.fanout .gate-tick {
  fill: none; stroke: var(--on-accent); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: gateTick var(--tempo) ease-out infinite;
}
@keyframes gateTick {
  0%, 70%  { stroke-dashoffset: 1; opacity: 0 }
  76%      { opacity: 1 }
  86%      { stroke-dashoffset: 0; opacity: 1 }
  96%      { stroke-dashoffset: 0; opacity: 0 }
  100%     { stroke-dashoffset: 1; opacity: 0 }
}

/* ---------- AI panel ---------- */
.ai-list { display: grid; gap: 10px; margin-top: 4px }
.ai-list li {
  line-height: 1.5; color: var(--ink-2);
  padding-left: 12px; border-left: 2px solid var(--edge);
  transition: border-color var(--d-fast) var(--ease-standard);
}
/* only the leading label is a block; emphasis inside the sentence stays inline */
.ai-list li > b:first-child { display: block; color: var(--ink); margin-bottom: 1px }
@media (hover: hover) { .ai-list li:hover { border-left-color: var(--accent) } }

/* ---------- stats: sit with the name, where the eye lands first ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px;
  margin-top: auto; padding-top: 22px;
  border-top: 1px solid var(--edge);
}
.stats strong {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.25rem, 0.9rem + 1.3vw, 1.85rem);
  line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.stats span { display: block; font-size: 0.6875rem; color: var(--ink-3); margin-top: 5px; line-height: 1.35 }

/* ---------- glyphs ----------
   One small diagram per project, in the same hairline language as the Armada
   pipeline: structure drawn in rules, movement drawn in accent. Decorative and
   aria-hidden — every glyph restates something the adjacent prose already says. */
.glyph { width: 132px; height: auto; flex: none; overflow: visible }
.glyph.mini { width: 108px; margin-bottom: 6px }
.glyph .g-line, .glyph .g-gate, .glyph .g-store, .glyph .g-token, .glyph .g-cloud, .glyph .g-merge {
  fill: none; stroke: var(--edge-hot); stroke-width: 1.3; vector-effect: non-scaling-stroke;
}
.glyph .g-fill { fill: var(--edge); stroke: none }
.glyph .g-gate, .glyph .g-store, .glyph .g-token { stroke: var(--accent); fill: var(--accent-dim) }
.glyph .g-merge { stroke: var(--accent); fill: var(--accent-dim) }
.glyph .g-eye { fill: var(--ink-3); stroke: none }
.glyph .g-check { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.glyph .g-cloud { stroke: var(--accent) }

/* the moving part */
.glyph .g-flow {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 0.22 0.78; stroke-dashoffset: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .glyph .g-flow {
    animation: gflow var(--tempo) cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }
  .glyph .g-flow.d2 { animation-delay: 260ms }
  .glyph .g-flow.d3 { animation-delay: 520ms }
  .glyph .g-flow.slow { animation-duration: calc(var(--tempo) * 1.5) }
  .glyph .g-flow.fast { animation-duration: calc(var(--tempo) / 2) }
  @keyframes gflow {
    0%   { stroke-dashoffset: 1; opacity: 0 }
    14%  { opacity: 1 }
    72%  { opacity: 1 }
    100% { stroke-dashoffset: 0; opacity: 0 }
  }

  /* Beam: tiles light in sequence under an auto-playing hero */
  .glyph .hero { animation: heroGlow calc(var(--tempo) * 1.5) ease-in-out infinite }
  @keyframes heroGlow {
    0%, 70%, 100% { fill: var(--edge) }
    35% { fill: var(--accent-dim) }
  }
  .glyph .tile { animation: tileGlow calc(var(--tempo) * 1.5) ease-in-out infinite }
  .glyph .t2 { animation-delay: 200ms }
  .glyph .t3 { animation-delay: 400ms }
  .glyph .t4 { animation-delay: 600ms }
  @keyframes tileGlow {
    0%, 55%, 100% { fill: var(--edge) }
    22% { fill: var(--accent) }
  }

  /* job search: postings arrive, then the gate holds */
  .glyph .src { animation: srcBlink var(--tempo) ease-in-out infinite }
  .glyph .s2 { animation-delay: 120ms }
  .glyph .s3 { animation-delay: 240ms }
  .glyph .s4 { animation-delay: 360ms }
  @keyframes srcBlink { 0%, 60%, 100% { stroke: var(--edge-hot) } 20% { stroke: var(--accent) } }
  .glyph .g-check { animation: checkIn var(--tempo) ease-out infinite }
  @keyframes checkIn { 0%, 62%, 100% { opacity: 0.25 } 78% { opacity: 1 } }

  /* ado-pr: the short-lived action token expires */
  .glyph .g-token { animation: tokenLife calc(var(--tempo) / 2) ease-in-out infinite }
  @keyframes tokenLife {
    0%, 100% { fill: transparent; stroke: var(--edge-hot) }
    45% { fill: var(--accent-dim); stroke: var(--accent) }
  }
}

.has-glyph { display: flex; flex-direction: column; align-items: flex-start }

/* ---------- experience / work lists ---------- */
.track, .work-list { display: grid; gap: 12px; margin-top: 4px }
.track li, .work-list li { padding-bottom: 11px; border-bottom: 1px solid var(--edge) }
.work-list li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start }
@media (max-width: 620px) {
  .work-list li { grid-template-columns: minmax(0, 1fr) }
  .work-list .glyph { width: 118px }
}
.track li:last-child, .work-list li:last-child { border-bottom: 0; padding-bottom: 0 }
.track-top, .work-top { display: flex; align-items: baseline; gap: 8px }
.track-top b, .work-top b { font-size: 0.9375rem }
.track-top i, .work-top i {
  margin-left: auto; font: 400 0.6875rem/1 var(--font-mono);
  color: var(--ink-3); font-style: normal; white-space: nowrap;
}
.work-top i { color: var(--accent) }
.track p, .work-list p { line-height: 1.5; color: var(--ink-3); margin-top: 3px }

/* ---------- stack ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px }
.chips span {
  font: 500 0.75rem/1 var(--font-sans);
  border: 1px solid var(--edge); border-radius: 999px;
  padding: 7px 11px; color: var(--ink-2); white-space: nowrap;
}
.chips .hot { border-color: var(--accent); color: var(--accent); background: var(--accent-dim) }
.creds { font-size: 0.75rem; color: var(--ink-3); margin-top: 12px; line-height: 1.5 }
.creds a { color: var(--ink-2) }

/* ---------- entrance: additive, never gates visibility ---------- */
@media (prefers-reduced-motion: no-preference) {
  .panel { animation: rise 560ms var(--ease-out) both }
  .p-ai     { animation-delay: 60ms }
  .p-armada { animation-delay: 120ms }
  .p-exp    { animation-delay: 180ms }
  .p-work   { animation-delay: 220ms }
  .p-stack  { animation-delay: 260ms }
  @keyframes rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

  /* Scroll-linked lift for the lower bands. Scroll-driven timelines are
     positional, not clock-driven, so a stalled frame loop cannot strand a
     panel mid-fade — and where unsupported nothing hides at all. */
  @supports (animation-timeline: view()) {
    .p-exp, .p-work, .p-stack {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 62%;
    }
    @keyframes rise-in {
      from { opacity: 0.25; transform: translateY(26px) scale(0.985) }
      to   { opacity: 1; transform: none }
    }
  }

  /* rows tick in as their panel arrives */
  .ai-list li, .track li, .work-list li { animation: slide-in 520ms var(--ease-out) both }
  .ai-list li:nth-child(2), .track li:nth-child(2), .work-list li:nth-child(2) { animation-delay: 70ms }
  .ai-list li:nth-child(3), .track li:nth-child(3), .work-list li:nth-child(3) { animation-delay: 140ms }
  .ai-list li:nth-child(4), .track li:nth-child(4) { animation-delay: 210ms }
  .ai-list li:nth-child(5), .track li:nth-child(5) { animation-delay: 280ms }
  @keyframes slide-in { from { opacity: 0; transform: translateX(-8px) } to { opacity: 1; transform: none } }

  .chips span { animation: chip-in 400ms var(--ease-out) both }
  .chips span:nth-child(n+4)  { animation-delay: 60ms }
  .chips span:nth-child(n+9)  { animation-delay: 120ms }
  .chips span:nth-child(n+14) { animation-delay: 180ms }
  @keyframes chip-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
}

/* cursor-reactive lighting — a soft highlight tracking the pointer */
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              var(--accent-dim), transparent 70%);
  transition: opacity var(--d-mid) var(--ease-out);
}
@media (hover: hover) { .panel:hover::before { opacity: 1 } }
.panel > * { position: relative }

@media (hover: hover) {
  .chips span { transition: transform var(--d-fast) var(--ease-out),
                            border-color var(--d-fast) var(--ease-standard),
                            color var(--d-fast) var(--ease-standard) }
  .chips span:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent) }
  .track li, .work-list li { transition: transform var(--d-fast) var(--ease-out) }
  .track li:hover, .work-list li:hover { transform: translateX(3px) }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .p-id, .p-ai, .p-armada, .p-exp, .p-work, .p-stack {
    grid-column: 1 / 13; grid-row: auto;
  }
  .stats { grid-template-columns: repeat(4, 1fr) }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, 1fr) }
  .fanout .fan-labels text { font-size: 15px }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
  .fanout .pulse { opacity: 0 }
  .fanout .gate { fill: var(--accent) }
}

/* ---------- print ---------- */
@media print {
  :root { --bg:#fff; --panel:#fff; --edge:#ccc; --ink:#000; --ink-2:#333; --ink-3:#555; --accent:#000 }
  .panel { break-inside: avoid; margin-bottom: 8px }
  .fanout .pulse, .skip-link { display: none }
  * { animation: none !important; transition: none !important }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9px }
}
