:root {
  /* Backgrounds */
  --bg:        #05090e;
  --surface:   #0b1016;
  --surface-2: #111820;

  /* Borders */
  --border:    rgba(255, 255, 255, 0.055);
  --border-md: rgba(255, 255, 255, 0.09);

  /* Company accent */
  --brand:      #38bdf8;
  --brand-dim:  rgba(56, 189, 248, 0.12);
  --brand-ring: rgba(56, 189, 248, 0.22);

  /* Jam Sense */
  --js:        #38bdf8;
  --js-dim:    rgba(56, 189, 248, 0.09);
  --js-ring:   rgba(56, 189, 248, 0.22);

  /* Breeze Brain */
  --bb:        #4ade80;
  --bb-dim:    rgba(74, 222, 128, 0.09);
  --bb-ring:   rgba(74, 222, 128, 0.22);

  /* Stash Flow */
  --sf:        #fb923c;
  --sf-dim:    rgba(251, 146, 60, 0.09);
  --sf-ring:   rgba(251, 146, 60, 0.22);

  /* Mind Head */
  --mh:        #d4cb3a;
  --mh-dim:    rgba(212, 203, 58, 0.09);
  --mh-ring:   rgba(212, 203, 58, 0.22);

  /* Toolbox */
  --sb:        #a78bfa;
  --sb-dim:    rgba(167, 139, 250, 0.09);
  --sb-ring:   rgba(167, 139, 250, 0.22);

  /* Skeletor */
  --sk:        #c3b391;
  --sk-dim:    rgba(195, 179, 145, 0.09);
  --sk-ring:   rgba(195, 179, 145, 0.22);

  /* Proto Pilot */
  --pp:        #2dd4bf;
  --pp-dim:    rgba(45, 212, 191, 0.09);
  --pp-ring:   rgba(45, 212, 191, 0.22);

  /* Semantic status: a failing bar. Passing takes the project accent. */
  --fail:      #f9a8d4;

  /* Text */
  --text:   #e8edf4;
  --text-2: #7a8fa8;
  --text-3: #617791;

  /* Layout */
  --hero-font: clamp(3rem, 9vw, 12rem);
  --max-w: 1280px;
  --pad: clamp(1.25rem, 5vw, 3.5rem);

  /* Fonts */
  --ff-head: 'Space Grotesk', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Scroll-driven values (updated by JS) */
  --nav-scrim: 0;
  --nav-mark: 0;
  --nav-pointer: none;
  --hero-scale: 1;
  --hero-lift: 0px;
  --hero-opacity: 1;
  --cue-opacity: 1;
}

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

html { scroll-behavior: smooth; }
html, body { margin: 0; height: auto; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #7dd3fc; }


/* Hero entrance: settles out of a blur, rising, letter-spacing closing. */
@keyframes sr-word-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(14px); letter-spacing: .05em; }
  to   { opacity: 1; transform: none;             filter: blur(0);    letter-spacing: -.04em; }
}
@keyframes sr-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
/* Slow breath on the cyan half of the wordmark. */
/* drop-shadow, not text-shadow: the letters are SVG. */
@keyframes sr-word-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
  50%      { filter: drop-shadow(0 0 22px rgba(56, 189, 248, .5)); }
}
/* The cue line draws itself downward, over and over. */
@keyframes sr-cue-draw {
  0%        { transform: scaleY(0); opacity: 0; }
  28%       { transform: scaleY(1); opacity: 1; }
  68%       { transform: scaleY(1); opacity: 1; }
  100%      { transform: scaleY(1); opacity: 0; }
}

/* ── Fixed backdrops ─────────────────────────────────── */
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
/* Four concentric bands of the same dot grid, so the grid can wake outward
   from the wordmark by fading bands in turn (opacity only), and stay lit.
   The band masks sum to 1. The grid dims as the hero scrolls away, down to
   .18 of itself, which is the content panel's .025: no seam where the
   panel rides over it. */
.backdrop-dots { opacity: calc(.18 + .82 * var(--hero-opacity)); }
.backdrop-dots i {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 30px 30px;
  --at: circle at 50% 44%;
}
.backdrop-dots i:nth-child(1) { --n: 0; --m: radial-gradient(var(--at), #000 8vmax, transparent 18vmax); }
.backdrop-dots i:nth-child(2) { --n: 1; --m: radial-gradient(var(--at), transparent 8vmax, #000 18vmax, #000 24vmax, transparent 34vmax); }
.backdrop-dots i:nth-child(3) { --n: 2; --m: radial-gradient(var(--at), transparent 24vmax, #000 34vmax, #000 40vmax, transparent 50vmax); }
.backdrop-dots i:nth-child(4) { --n: 3; --m: radial-gradient(var(--at), transparent 40vmax, #000 50vmax); }
.backdrop-dots i { -webkit-mask-image: var(--m); mask-image: var(--m); }
.js-type .backdrop-dots i { opacity: 0; }
.js-type.hero-lit .backdrop-dots i {
  opacity: 1;
  animation: sr-dots-wake .5s ease-out calc(var(--n) * 170ms) backwards;
}
@keyframes sr-dots-wake { from { opacity: 0; } }
.backdrop-glow {
  background:
    radial-gradient(ellipse 60% 50% at 20% 6%, rgba(56, 189, 248, .05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 88%, rgba(74, 222, 128, .03) 0%, transparent 70%);
}
/* The corner glows drift. The scale covers the edges the shift exposes. */
@media (prefers-reduced-motion: no-preference) {
  .backdrop-glow { animation: sr-glow-drift 26s ease-in-out infinite alternate; }
}
@keyframes sr-glow-drift {
  to { transform: translate3d(1.5%, 1%, 0) scale(1.06); }
}

/* ── Nav ─────────────────────────────────────────────── */
.nav-scrim {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  height: 78px;
  background: rgba(5, 9, 14, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: var(--nav-scrim);
  pointer-events: none;
}
.nav-rule {
  position: fixed;
  top: 77px; left: 0; right: 0;
  z-index: 11;
  height: 1px;
  background: var(--border);
  opacity: var(--nav-scrim);
  pointer-events: none;
}
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 11;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  pointer-events: none;
}
.wordmark {
  font: 600 1.3rem var(--ff-head);
  letter-spacing: -.025em;
  color: var(--text);
  opacity: var(--nav-mark);
  pointer-events: var(--nav-pointer);
}
.wordmark:hover { color: var(--text); }
.wordmark em { font-style: normal; font-weight: 400; color: var(--brand); }
/* With script, the header holds a small copy of the hero's block
   wordmark, which the scroll handler flies in from the hero (see
   "Wordmark into the header"). The padding is room for the L, which
   hangs left of the S. */
.wordmark.bw {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  padding-left: .25em;
  white-space: nowrap;
  opacity: var(--nav-word, 0);
  will-change: transform;
}
.hero h1 { opacity: var(--hero-word, 1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  opacity: var(--nav-mark);
  pointer-events: var(--nav-pointer);
}
.nav-contact {
  font: 400 .875rem var(--ff-body);
  color: var(--brand);
  white-space: nowrap;
}
.nav-contact:hover { text-decoration: underline; }

/* ── Hero ────────────────────────────────────────────── */
/* The hero is fixed and owns the whole first screen. .hero-wrap is only a
   spacer: it reserves exactly one viewport of scroll, during which the
   content panel slides up over the hero and the nav takes its place. */
.hero-wrap { position: relative; z-index: 0; height: 100vh; height: 100svh; }
.hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1;
  height: 100vh; height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad);
}
.hero-inner {
  position: relative;   /* anchors the bloom and the trace canvas */
  transform: translateY(var(--hero-lift)) scale(var(--hero-scale));
  opacity: var(--hero-opacity);
  will-change: transform, opacity;
}
/* .hero-glow is a blurred copy of the wordmark laid under it (see "Hero
   after effects"), so it takes the same metrics. */
.hero h1, .hero-glow {
  margin: 0;
  font: 800 var(--hero-font)/1 var(--ff-head);
  letter-spacing: -.04em;
  color: var(--text);
}
.hero h1 { position: relative; }   /* anchors the caret */
.hero h1 em, .hero-glow em { font-style: normal; color: var(--brand); }
/* inline-block so transform and letter-spacing animate; no whitespace
   between the two in the markup, so they stay kerned as one word. */
.hero h1 .hero-word, .hero-glow .hero-word { display: inline-block; }
.hero h1 span.hero-word {
  animation: sr-word-in 1.15s cubic-bezier(.16, .8, .26, 1) backwards;
}
.hero h1 em.hero-word {
  animation:
    sr-word-in 1.15s cubic-bezier(.16, .8, .26, 1) 120ms backwards,
    sr-word-glow 6.5s ease-in-out 1.6s infinite;
}
/* "skyrow" is drawn in the icon's letter style: 14-unit bars, 9-unit
   slits, 45° chamfers, a thin grey ring offset from the fill. One glyph
   per SVG so the caret can type between them. Baseline is y=60 and the
   x-height y=0, so 1 unit = .0075em puts the x-height on the font's. */
.bw .bk {
  display: inline-block;
  vertical-align: -.2025em;   /* 27 units of descender below baseline */
  margin-right: .0675em;      /* one 9-unit slit between letters */
}
.bw .bk svg {
  display: block;
  width: calc(var(--w) * .0075em);
  height: .915em;
  overflow: visible;
}
/* The last glyph carries no trailing slit, so the word stays centred. */
.bw .bk.end { margin-right: 0; }
.bw .bk path { fill: var(--text); }
/* ".labs" in the L's colours: brand fill, the L's darker blue ring. */
.bw em .bk path { fill: var(--brand); }

/* The blue L wraps the S, as in the icon. The anchor is a zero-size box
   on the baseline at the S's left edge, so the L hangs outside the
   wordmark's layout. */
.bw .l-anchor {
  display: inline-block;
  position: relative;
  width: 0;
  height: 0;
}
.bw .l-mark {
  position: absolute;
  left: -.225em;
  top: -.51em;
  width: .72em;
  height: .72em;
  overflow: visible;
}
/* The pen runs down the stem then along the foot, revealing the L
   through a mask so its chamfered corners survive the draw. */
.bw .l-pen { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js-type .hero h1 .l-pen { stroke-dashoffset: 1; }
.js-type.hero-lit .hero h1 .l-pen {
  animation: sr-l-reveal .3s cubic-bezier(.65, 0, .35, 1) 40ms forwards;
}
@keyframes sr-l-reveal { to { stroke-dashoffset: 0; } }

/* ── Typed wordmark ──────────────────────────────────── */
/* Only under .js-type (set in <head>): "skyrow" is typed, then ".",
   then "labs" shows as a dim autosuggestion and is
   accepted. Without the class the wordmark is simply there; the
   watchdog beside that class removes it if the script never takes over.
   The script sets .hero-run when it does and .hero-lit on the accept,
   and everything after the press keys off .hero-lit: one clock. */
.js-type .hero h1 .hero-word { visibility: hidden; animation: none; }
.js-type .hero h1 .ch.in,
.js-type .hero h1 .ch.ghost,
.js-type .hero h1 .l-anchor { visibility: visible; }
/* A typed letter settles rather than appears. */
.js-type .hero h1 .ch.in:not(.accept) svg {
  animation: sr-key-in .24s cubic-bezier(.2, .9, .3, 1.2) backwards;
}
@keyframes sr-key-in { from { opacity: 0; transform: translateY(.06em) scale(.92); } }
/* --i is the letter's place in "labs": the suggestion arrives, and is
   accepted, as a wave from the left. */
.hero h1 .ch.ghost {
  opacity: .6;
  animation: sr-ghost-in .3s ease calc(var(--i, 0) * 35ms) backwards;
}
.hero h1 .ch.ghost path { fill: var(--text-3); }
@keyframes sr-ghost-in { from { opacity: 0; transform: translateX(-.03em); } }
.hero h1 .ch.accept { transition: opacity .3s ease calc(var(--i, 0) * 45ms); }
.hero h1 .ch.accept path { transition: fill .3s ease calc(var(--i, 0) * 45ms); }
.hero h1 .ch.accept svg {
  animation: sr-accept-pop .5s cubic-bezier(.3, .7, .3, 1) calc(var(--i, 0) * 45ms);
}
@keyframes sr-accept-pop { 40% { transform: translateY(-.035em); } }

/* The caret is a zero-size box the script moves to a baseline point
   with a transform, so it glides between letters and nothing it does
   shifts the line. */
.hero h1 .caret {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 0;
  transition: transform 90ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.hero h1 .caret::before {
  content: '';
  position: absolute;
  left: .03em;
  bottom: -.13em;
  width: .07em;
  height: .9em;
  background: var(--brand);
  box-shadow: 0 0 .3em rgba(56, 189, 248, .45);
}
@keyframes sr-caret-blink {
  0%, 38%  { opacity: 1; }
  50%, 88% { opacity: 0; }
  100%     { opacity: 1; }
}
.hero h1 .caret.on   { opacity: 1; animation: sr-caret-blink 1.06s ease-in-out infinite; }
.hero h1 .caret.busy { animation: none; }
.hero h1 .caret.done { animation: sr-fade-out .45s ease forwards; }
@keyframes sr-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* Everything below the wordmark is held at its first frame until the tab
   press, then follows on these beats. */
.js-type .hero p,
.js-type .activity,
.js-type .activity-grid .col,
.js-type .cue { animation-play-state: paused; }
.js-type.hero-lit .hero p,
.js-type.hero-lit .activity,
.js-type.hero-lit .activity-grid .col,
.js-type.hero-lit .cue { animation-play-state: running; }
.js-type .hero p   { animation-delay: 200ms; }
.js-type .activity { animation-delay: 400ms; }
.js-type .activity-grid .col { animation-delay: calc(400ms + var(--c) * 11ms); }
.js-type .cue      { animation-delay: 700ms; }

.hero p {
  margin: 28px auto 0;
  max-width: 40ch;
  text-wrap: balance;
  font: 400 clamp(17px, 1.5vw, 22px)/1.7 var(--ff-body);
  letter-spacing: .01em;
  color: var(--text-2);
  animation: sr-fade-up .9s cubic-bezier(.16, .8, .26, 1) 340ms backwards;
}
.cue {
  position: absolute;
  bottom: 26px; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: var(--cue-opacity);
  pointer-events: none;
  animation: sr-fade-up .9s cubic-bezier(.16, .8, .26, 1) 620ms backwards;
}
.cue-label {
  font: 400 10.5px var(--ff-mono);
  letter-spacing: .14em;
  color: var(--text-3);
}
.cue-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--text-3), transparent);
  transform-origin: top;
  animation: sr-cue-draw 2.8s ease-in-out 1.5s infinite;
}

/* ── Content panel ───────────────────────────────────── */
/* Opaque so it hides the hero as it rides over it, and at least one
   viewport tall so it always reaches the top of the screen. It carries
   copies of the fixed backdrops so the texture stays continuous. */
.content-panel {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    radial-gradient(ellipse 60% 50% at 20% 6%, rgba(56, 189, 248, .05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 88%, rgba(74, 222, 128, .03) 0%, transparent 70%);
  background-size: 30px 30px, cover, cover;
  background-attachment: fixed, fixed, fixed;
}
/* Children must not be compressed (the panel grows past one screen when
   the cards stack), and need an explicit width — their `margin: 0 auto`
   suppresses flex stretch, which would otherwise size them to max-content
   and break the responsive column count. */
.content-panel > * { flex: 0 0 auto; width: 100%; }

/* The projects group takes the panel's spare height and centres itself in
   it, so the footer lands at the bottom without a void above it. The top
   padding clears the fixed nav. */
.content-panel > .projects-panel { flex: 1 0 auto; }
.projects-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 78px 0;
}
.projects-panel > * { flex: 0 0 auto; width: 100%; }

/* ── Activity banner ─────────────────────────────────── */
/* Generated by scripts/activity.py — everything between the markers in
   the markup is rewritten wholesale, so edit the script, not the HTML. */
/* Sized to the wordmark above it: the run from the k in "skyrow" to the
   b in ".labs", outline to outline, measures 3.73x the hero font size
   (the drawn glyphs' widths are fixed, so this is exact), and both centre on the
   same axis. It has to key off the font rather than a percentage of the
   h1 — below ~720px the tagline is the wider element, so the h1 box stops
   tracking the wordmark. The floor keeps a year of cells legible on a
   phone, where the exact alignment stops mattering anyway. */
.activity {
  width: clamp(260px, calc(3.73 * var(--hero-font)), 100%);
  margin: 30px auto 0;
  /* Same curve as the wordmark and tagline; the tagline lands at 340ms,
     so this follows just behind it. The fade is shorter than the others
     on purpose: the sweep starts on the same beat and crosses in ~570ms,
     so the grid needs to be at full strength by roughly then. */
  animation: sr-fade-up .6s cubic-bezier(.16, .8, .26, 1) 540ms backwards;
}
.activity-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 10px;
}
.activity-title {
  font: 500 9.5px var(--ff-mono);
  letter-spacing: .14em;
  color: var(--text-3);
  white-space: nowrap;
}
/* Shrinks rather than wraps — a wrapped stat line doubles the height of
   the banner's header and unbalances the hero. */
.activity-stat {
  font: 500 clamp(9.5px, 1.1vw, 12.5px) var(--ff-mono);
  letter-spacing: .06em;
  /* This is the most persuasive fact on the page. It was set two steps
     below body text in a colour at 1.9:1 — hidden twice over. */
  color: var(--text-2);
  white-space: nowrap;
}
/* The grid keeps its aspect ratio and shrinks with the column. */
.activity-grid {
  display: block;
  width: 100%;
  height: auto;
}
/* A band of light crosses the grid: each column brightens a beat after
   the one to its left. Each column's flare is short relative to that
   offset, so roughly three columns are lit at any moment and the light
   reads as a line crossing the grid. Driving it per column rather than
   with an overlay means only the cells light up — the gaps between them
   stay dark, which is what made the same idea fail over the hero text. */
@keyframes sr-grid-sweep {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(2.7) saturate(1.2); }
}
.activity-grid .col {
  /* Runs once and never repeats. The flare stays ~3.8x the offset
     between columns, which is what keeps the lit band about four columns
     wide — changing the speed means scaling both numbers, not just the
     offset. At an 11ms offset the line crosses in ~570ms. It starts on
     540ms — the same beat the banner's own fade-up begins — so the light
     travels while the grid is arriving rather than after it. */
  animation: sr-grid-sweep 44ms linear;
  animation-delay: calc(540ms + var(--c) * 11ms);
}
.activity-grid rect { fill: var(--brand); }
.activity-grid .lv0 { fill: rgba(255, 255, 255, .045); }
.activity-grid .lv1 { fill-opacity: .22; }
.activity-grid .lv2 { fill-opacity: .44; }
.activity-grid .lv3 { fill-opacity: .70; }
.activity-grid .lv4 { fill-opacity: 1; }

/* ── What we do ──────────────────────────────────────── */
/* The card groups raise a question the cards cannot answer: why is a CLI
   sitting next to a wind-powered datacenter? This section answers it once,
   between the hero and the work, and then gets out of the way. Copy is
   condensed from skyrow-workspace/strategy/vision.md. */
.thesis {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
/* Full container width so the closing rule lands on the same right edge
   as the card grid below it; the prose keeps its own measure instead. */
.thesis-inner {
  padding-bottom: 4.5rem;
  border-bottom: 1px solid var(--border);
}
/* No heading above it — the statement is the heading. Sized off the
   viewport so it holds one line for as long as the container is wide
   enough for it, and wraps rather than overflows once it isn't. */
.thesis-lead {
  margin: 0;
  text-align: center;
  font: 400 clamp(16px, 1.8vw, 25px)/1.5 var(--ff-body);
  letter-spacing: -.005em;
  color: var(--text);
  text-wrap: balance;
}
/* Same marks the rest of the copy uses, so *…* behaves here too. */
.thesis-lead em { font-style: normal; font-weight: 500; color: var(--text); }
.thesis-lead b { font-weight: 500; color: var(--text); }

/* ── Projects ────────────────────────────────────────── */
/* Two groups stacked — primary first, the smaller work under it. */
.project-group + .project-group { margin-top: 4.5rem; }

.projects-head {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad) 0;
}
.projects-head-inner {
  display: flex;
  align-items: baseline;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 32px;
}
.projects-head h2 {
  margin: 0;
  font: 700 clamp(1.85rem, 2.6vw, 2.5rem) var(--ff-head);
  letter-spacing: -.025em;
  color: var(--text);
}
/* The minor group announces itself more quietly than the primary one. */
.projects-head h3 {
  margin: 0;
  font: 600 clamp(1.2rem, 1.6vw, 1.5rem) var(--ff-head);
  letter-spacing: -.02em;
  color: var(--text-2);
}
/* Every card dimension keys off these. All text on a card takes one size,
   and every group shares them, so a section differs only by its heading. */
.grid {
  --card-min: 460px;
  --vis-h: 250px;
  --name-size: 1.55rem;
  --label-gap: 8px;
  --icon-size: 34px;
  --badge-size: 14px;
  --badge-pad: 6px 11px;
  --badge-gap: 8px;
  --body-pad: 26px 30px 28px;
  --desc-size: var(--badge-size);
  --tag-size: var(--badge-size);

  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.grid > .card-slot {
  flex: 1 1 var(--card-min);
  max-width: 100%;
}
/* A card alone on the last row keeps a row-mate's width, centred by the grid,
   instead of growing across it. The clamp resolves to half the row while two
   cards fit side by side, and to the full row once they wrap. */
.grid > .card-slot:last-child:nth-child(odd) {
  flex-grow: 0;
  flex-basis: clamp(calc((100% - 2rem) / 2), (2 * var(--card-min) + 2rem - 100%) * 999, 100%);
}
/* Sits midway to the next group, whose top margin matches. */
.group-flagship::after {
  content: "";
  position: relative;
  z-index: 2;
  display: block;
  width: calc(100% - 2 * var(--pad));
  max-width: calc(var(--max-w) - 2 * var(--pad));
  height: 1px;
  margin: 4.5rem auto 0;
  background: var(--border-md);
}

/* ── Project card ────────────────────────────────────── */
/* The slot holds the label and the card as one unit, so the whole group
   lifts together and cards stay flush within a row. */
.card-slot {
  display: flex;
  flex-direction: column;
  transition: transform .18s cubic-bezier(.4, 0, .2, 1);
}

.card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.4, 0, .2, 1), box-shadow .18s, border-color .18s;
}
.card-slot:hover { transform: translateY(-5px); }
.card-js { --accent: var(--js); }
.card-bb { --accent: var(--bb); }
.card-mh { --accent: var(--mh); }
.card-sf { --accent: var(--sf); }
.card-sb { --accent: var(--sb); }
.card-sk { --accent: var(--sk); }
.card-pp { --accent: var(--pp); }

.card-js:hover  { border-color: var(--js-ring);  box-shadow: 0 24px 64px rgba(56, 189, 248, .08), 0 0 0 1px var(--js-ring); }
.card-bb:hover  { border-color: var(--bb-ring);  box-shadow: 0 24px 64px rgba(74, 222, 128, .08), 0 0 0 1px var(--bb-ring); }
.card-mh:hover  { border-color: var(--mh-ring);  box-shadow: 0 24px 64px rgba(212, 203, 58, .08), 0 0 0 1px var(--mh-ring); }
.card-sf:hover  { border-color: var(--sf-ring);  box-shadow: 0 24px 64px rgba(251, 146, 60, .08), 0 0 0 1px var(--sf-ring); }
.card-sb:hover  { border-color: var(--sb-ring);  box-shadow: 0 24px 64px rgba(167, 139, 250, .08), 0 0 0 1px var(--sb-ring); }
.card-sk:hover  { border-color: var(--sk-ring);  box-shadow: 0 24px 64px rgba(195, 179, 145, .08), 0 0 0 1px var(--sk-ring); }
.card-pp:hover  { border-color: var(--pp-ring);  box-shadow: 0 24px 64px rgba(45, 212, 191, .08), 0 0 0 1px var(--pp-ring); }

.card-vis {
  height: var(--vis-h);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.card-js .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(56, 189, 248, .09) 0%, transparent 75%); }
.card-bb .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(74, 222, 128, .09) 0%, transparent 75%); }
.card-mh .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(212, 203, 58, .09) 0%, transparent 75%); }
.card-sf .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(251, 146, 60, .09) 0%, transparent 75%); }
.card-sb .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(167, 139, 250, .09) 0%, transparent 75%); }
.card-sk .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(195, 179, 145, .09) 0%, transparent 75%); }
.card-pp .card-vis { background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(45, 212, 191, .09) 0%, transparent 75%); }
/* Every card's art is now a file in art/, loaded as an <img> so its own
   animation clock runs untouched by this stylesheet. The svg.art rule
   stays for trying a mark out inline in sandbox/ before it becomes one. */
.card-vis svg.art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.card-vis img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: var(--body-pad);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Repo badges. Hand-set for now; a scheduled job will write these once
   the projects have releases and CI worth reporting. Cards with nothing
   true to say carry no row at all. */
/* One bar per card: ci outcome, version, status, in that order. Every
   segment takes the project's own accent, so a card reads as one object
   rather than a row of unrelated chips. A failing run recolours the whole
   bar — the point is that it is impossible to miss. */
.card-foot {
  margin-top: auto;
  padding-top: 20px;
  /* A column, because a dialog can stack a second bar under the first.
     With one bar it centres exactly as a row did. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  /* Each card sets --bar inline to its own accent. A failure cannot
     override that inline value, so it sets --bar-final instead, which
     the stylesheet owns and therefore wins. */
  color: var(--bar-final, var(--bar));
}
.card-foot[data-ci="fail"] { --bar-final: var(--fail); }
/* Rides inside the leading segment, dimmed against its own colour. */
.bar-key { opacity: .62; margin-right: 5px; }
.bar {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--bar-final, var(--bar));
  border-radius: 6px;
  overflow: hidden;
  min-width: 0;
}
.bar .seg {
  font: 500 var(--badge-size, 10.5px) var(--ff-mono);
  letter-spacing: .06em;
  padding: var(--badge-pad, 4px 9px);
  white-space: nowrap;
  /* A wash of the project's accent rather than the accent itself: the
     label takes the same colour as "skyrow" in the wordmark, and that
     near-white needs a dark ground to stay legible. A solid fill also
     swallowed the frame and the dividers, which are the same accent. */
  background: color-mix(in srgb, var(--bar-final, var(--bar)) 16%, transparent);
  color: var(--text);
}
/* The divider is the same colour as the frame, at the same weight. */
.bar .seg + .seg { border-left: 1px solid var(--bar-final, var(--bar)); }
/* No segment is emphasised over another: the cards do not all lead with
   the same kind of segment, and a filled leader would make them differ. */


/* The name rides above the card, outside its frame. */
.card-label {
  display: flex;
  align-items: center;
  gap: var(--label-gap, 8px);
  margin: 0 0 12px 2px;
}
.card-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-name {
  font: 600 var(--name-size) var(--ff-head);
  letter-spacing: -.025em;
  color: var(--text);
  /* The row is only as wide as the card; the name yields before the
     status pill does, rather than both spilling into the next column. */
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-name em { font-style: normal; font-weight: 400; }
/* Sits at the far end of the label row, opposite the name. Dim until
   hovered, so it never competes with the project name beside it. */
.card-out {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  color: var(--text-2);
  opacity: .5;
  transition: opacity .15s ease, color .15s ease;
}
.card-out:hover,
.card-out:focus-visible { color: var(--out); opacity: 1; }
/* A lettermark rather than a glyph: same chip as the project icon at the
   other end of the row, so the two ends of the label match. */
.card-mark {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  background: var(--out-dim);
  border: 1px solid var(--out-ring);
  font: 700 calc(var(--icon-size) * .44) var(--ff-head);
  letter-spacing: -.03em;
  color: var(--text);
  opacity: 1;
  transition: border-color .15s ease;
}
.card-mark em { font-style: normal; color: var(--out); }
.card-mark:hover,
.card-mark:focus-visible { border-color: var(--out); color: var(--text); }
/* The same chip at the same end of the row, for a label whose repo is
   private. It is not a link — there is nowhere for it to go — so it keeps
   the chip and drops the hover, which would promise one. */
.card-lock { color: var(--out); cursor: default; }
.card-lock:hover { border-color: var(--out-ring); color: var(--out); }
/* The line each illustration used to carry baked in at 0.32 alpha, lifted
   out of the SVG into real markup. In the art it was an 11px smudge that
   never resolved; here it is legible, selectable, and owned by README.md
   like every other description on the page. */
.card-tagline {
  margin: 0 0 10px;
  font: 500 var(--tag-size, 10px) var(--ff-mono);
  letter-spacing: .1em;
  color: var(--accent);
  opacity: .9;
}
.card-desc {
  margin: 0;
  font: 400 var(--desc-size)/1.65 var(--ff-body);
  color: var(--text-2);
}
.card-desc b { font-weight: 500; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  margin: 0;
  font: 400 .8125rem var(--ff-body);
  color: var(--text-3);
}
.footer-copy strong { color: var(--text-2); font-weight: 500; }
/* A contact route, not a decoration — it was the smallest type on the
   page in the least legible colour. */
.footer-mail {
  font: 400 12px var(--ff-mono);
  letter-spacing: .08em;
  color: var(--text-2);
}
.footer-mail:hover { color: var(--brand); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 560px) {
  .projects-head-inner { flex-direction: column; align-items: center; gap: .5rem; }
  /* The bar never wraps and the card clips, so the longest bar has to fit
     a 320px screen on one line. */
  .grid {
    --badge-size: clamp(11px, 3.4vw, 12px);
    --badge-pad: 5px 6px;
    --body-pad: 26px 16px 28px;
  }
}

/* Below this the banner is too narrow for the label and the stat to
   share a line; the stat is the half worth keeping. */
@media (max-width: 1000px) {
  .activity-title { display: none; }
  .activity-head { justify-content: center; }
}

/* ── Hero after effects ──────────────────────────────── */
/* Everything here starts when "labs" is accepted (.hero-lit on <html>) and ramps
   from nothing into its loop: each element runs an intro whose last frame
   is the loop's first. Only opacity and transform animate, so none of it
   repaints. The glow is two blurred copies of the wordmark that the script
   lays under it: "near" is the tight halo, "far" the wide one that flares
   on the press and then breathes. The glint and the outline traces are
   drawn by script on .hero-traces, which start at .hero-fx. */
.hero-bloom-wrap {
  /* The hero wordmark hides on the first pixel of scroll; so does its light. */
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--hero-word, 1);
  pointer-events: none;
}
.hero-bloom {
  position: absolute;
  left: 50%;
  top: calc(var(--hero-font) * .5);
  width: calc(var(--hero-font) * 7.8);
  height: calc(var(--hero-font) * 3.65);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(56, 189, 248, .16) 0%, rgba(56, 189, 248, .05) 45%, transparent 72%);
  opacity: 0;
}
.hero-lit .hero-bloom {
  animation:
    sr-bloom-in 2.2s cubic-bezier(.16, .8, .26, 1) both,
    sr-fx-bloom 6s ease-in-out 2.2s infinite;
}
@keyframes sr-bloom-in {
  from { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  to   { transform: translate(-50%, -50%) scale(1);  opacity: .85; }
}
@keyframes sr-fx-bloom {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: .85; }
  50%      { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

/* The "." is a lamp: a hot core that pulses on the dot, and a ping that
   leaves it every few seconds. Both sit on the dot's centre, 72.13% down
   its glyph box, and are .105em across, the dot's 14 units. The ping goes
   under the letters (the h1 is no stacking context while it is opaque). */
.hero h1 .ch.dot { position: relative; }
.hero h1 .ch.dot::before,
.hero h1 .ch.dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 72.13%;
  width: .105em;
  height: .105em;
  margin: -.0525em 0 0 -.0525em;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.hero h1 .ch.dot::before {
  z-index: -1;
  box-shadow: 0 0 0 .008em rgba(56, 189, 248, .9), 0 0 .03em .01em rgba(56, 189, 248, .5);
}
.hero h1 .ch.dot::after {
  background: radial-gradient(closest-side, #fff 0%, rgba(224, 244, 255, .85) 30%, rgba(125, 211, 252, 0) 100%);
}
.hero-lit .hero h1 .ch.dot::before { animation: sr-dot-ping 3.2s cubic-bezier(.2, .7, .3, 1) 1.2s infinite; }
.hero-lit .hero h1 .ch.dot::after  { animation: sr-dot-core 3.2s ease-in-out infinite; }
@keyframes sr-dot-ping {
  0%        { transform: scale(1);   opacity: .9; }
  70%, 100% { transform: scale(5.5); opacity: 0; }
}
@keyframes sr-dot-core {
  0%, 100% { transform: scale(.7); opacity: .35; }
  40%      { transform: scale(1.1); opacity: 1; }
}

/* One ring leaves the "." as "labs" is accepted; the script centres it. */
.hero-ring {
  position: absolute;
  width: calc(var(--hero-font) * 6);
  height: calc(var(--hero-font) * 6);
  margin: calc(var(--hero-font) * -3) 0 0 calc(var(--hero-font) * -3);
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(56, 189, 248, 0) 76%, rgba(56, 189, 248, .4) 96%, rgba(56, 189, 248, 0) 100%);
  opacity: 0;
}
.hero-ring.go { animation: sr-ring 1.2s cubic-bezier(.16, .8, .3, 1) forwards; }
@keyframes sr-ring {
  from { transform: scale(.02); opacity: .9; }
  to   { transform: scale(1);   opacity: 0; }
}

.hero-glow {
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  will-change: opacity;
}
/* The copies carry no grey ring. Outranks the inline rule in index.html. */
.hero-glow.bw .hero-word .bk path { filter: none; }
.hero-glow-near span.hero-word .bk svg { filter: blur(.018em); opacity: .3; }
.hero-glow-near .l-mark                { filter: blur(.035em); opacity: .75; }
.hero-glow-near em.hero-word           { filter: blur(6px);    opacity: .6; }
.hero-glow-far span.hero-word .bk svg  { filter: blur(.05em);  opacity: .4; }
.hero-glow-far .l-mark                 { filter: blur(.08em);  opacity: .9; }
.hero-glow-far em.hero-word            { filter: blur(24px);   opacity: .5; }
/* The L's glow waits for the pen that draws the L. */
.js-type.hero-lit .hero-glow .l-mark { animation: sr-l-glow-in .5s ease .3s backwards; }
@keyframes sr-l-glow-in { from { opacity: 0; } }
.hero-lit .hero-glow-near {
  animation: sr-near-in 2.2s ease-out both, sr-near 6s ease-in-out 2.2s infinite;
}
.hero-lit .hero-glow-far {
  animation: sr-far-in 2.2s ease-out both, sr-far 6s ease-in-out 2.2s infinite;
}
@keyframes sr-near-in { 0% { opacity: 0; } 25%, 100% { opacity: .8; } }
@keyframes sr-near    { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }
@keyframes sr-far-in  { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: .55; } }
@keyframes sr-far     { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.hero-traces {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.activity-grid .lv3,
.activity-grid .lv4 {
  filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0));
  transition: filter 1.4s ease;
}
.hero-fx .activity-grid .lv4 { filter: drop-shadow(0 0 3px rgba(56, 189, 248, .8)); }
.hero-fx .activity-grid .lv3 { filter: drop-shadow(0 0 2px rgba(56, 189, 248, .45)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-inner { transform: none !important; }
  .hero h1 .hero-word, .hero p, .cue, .cue-line { animation: none !important; }
  .activity, .activity-grid .col { animation: none !important; }
  .card-slot:hover { transform: none; }
  /* The after effects hold still at their resting glow; nothing is drawn. */
  .hero-lit .hero-bloom { animation: none; opacity: .85; }
  .hero-lit .hero-glow-near { animation: none; opacity: .8; }
  .hero-lit .hero-glow-far  { animation: none; opacity: .55; }
  .activity-grid .lv3, .activity-grid .lv4 { transition: none; }
  .hero-lit .hero h1 .ch.dot::before { animation: none; }
  .hero-lit .hero h1 .ch.dot::after  { animation: none; opacity: .6; }
}
