@font-face {
  font-family: Geist;
  src: url("assets/fonts/geist.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* ───────────────────────────────────────────────────────────────────
   Palette. Every colour on the page comes from here; nothing below
   this block hard-codes one. The base hues are kept as space-separated
   RGB channels so alpha variants can be mixed inline.
   ─────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* ── surfaces ──  cool porcelain, never a flat white; the steps are far
     enough apart that each band reads as its own plane */
  --bg-rgb:    242 245 249;
  --bg:        rgb(var(--bg-rgb));
  --bg-1:      #E6ECF6;    /* lifted band: contact, footer, the sheet */
  --bg-2:      #FFFFFF;    /* cards and media wells */
  --bg-3:      #FBFCFE;    /* hover state of a card */
  --line:      #D2DAE6;
  --line-2:    #BFCAD9;
  --edge:      transparent;                                  /* dark theme only */
  --lift:      0 1px 2px rgb(13 25 45 / .05),
               0 14px 30px -20px rgb(13 25 45 / .28);        /* planes cast, not glow */
  --lift-hi:   0 2px 4px rgb(13 25 45 / .06),
               0 26px 52px -24px rgb(13 25 45 / .38);        /* the same plane, raised */

  /* ── type ── */
  --text:      #0F1419;
  --text-2:    #4A5563;
  --text-3:    #5C6878;    /* lightest colour used for real text - AA on every surface */
  --text-hi:   #080C12;    /* the metric figures */
  --display-2: #68748A;   /* the surname, one step back from the ink */

  /* ── slate ──  the structural accent: labels, numbers, hairlines */
  --ac-rgb:    90 104 126;
  --ac:        rgb(var(--ac-rgb));
  --ac-dk:     #96A3B5;    /* weaker: rules, bullets, small marks (non-text) */
  --ac-dim:    rgb(var(--ac-rgb) / .22);

  /* ── azure ──  the live accent: anything you can press, follow or track */
  --hl-rgb:    28 95 208;
  --hl:        rgb(var(--hl-rgb));
  --hl-lt:     #164FAF;    /* hover: goes deeper, not lighter */
  --hl-dk:     #5E90D8;    /* soft blue marks and rules */
  --hl-on:     #FFFFFF;    /* text sitting on filled azure */
  --hl-dim:    rgb(var(--hl-rgb) / .28);

  /* Two accents, four jobs, no gradients. Azure marks what you can act
     on; slate marks structure. Nothing else gets to be coloured. */

  /* ── ambience ── */
  --aura-1:    rgb(var(--hl-rgb) / .10);
  --aura-2:    rgb(var(--ac-rgb) / .10);
  --ok:        var(--hl);  /* the "open to work" dot */
  --grain-op:  .035;

  /* images adapt to the theme rather than being baked for one of them */
  --contact-bg:  linear-gradient(180deg, var(--bg-1), rgb(var(--bg-rgb) / 0) 72%);

  /* ── the inverted plane ──────────────────────────────────────────
     This was a saturated navy: #122C5C, by a distance the most
     chromatic area on a page whose blue is otherwise a thin accent.
     It read as a second website rather than a second surface, and it
     fought the AsylumCompass screenshot sitting directly above it,
     which is navy too.

     It is now the page's own ink used as a surface — a cool slate with
     the same hue as --text, three and a half times less chromatic. A
     chapter break, not a change of brand.

     Everything on the plane other than the plane itself is the "on
     dark" ramp, which is the same ramp the dark theme uses. One set of
     values for light ground, one for dark ground, and a dark band in a
     light theme is simply the second set. [data-theme="dark"] aliases
     these rather than repeating them, so the two cannot drift. */
  --nv-bg-a:   #1A212C;
  --nv-bg-b:   #0F141B;
  --nv-ring:   #141A24;   /* the ring punched around each rail dot */
  --nv-line:   #2B3340;
  --nv-line-2: #3A4352;
  --nv-rule:   #5A6472;
  --nv-text:   #EDEFF2;
  --nv-text-2: #A7ADB6;
  --nv-text-3: #868D97;
  --nv-ac-rgb: 194 201 212;
  --nv-ac:     rgb(var(--nv-ac-rgb));
  --nv-ac-dk:  #717A85;
  --nv-label:  #A7ADB6;
  --nv-hl-rgb: 88 166 255;
  --nv-hl-lt:  #9ECBFF;
  --nv-hl-dk:  #2F6FBF;

  /* ── type ──  one ramp. Nothing below sets a size that is not on it. */
  --t-display: clamp(3.3rem, 11.5vw, 10.5rem);  /* the name */
  --t-1:       clamp(2.9rem, 8.5vw, 7rem);      /* "Get in touch." */
  --t-2:       clamp(2.1rem, 4.4vw, 3.6rem);    /* section headings */
  --t-3:       clamp(1.8rem, 3.2vw, 2.85rem);   /* project titles */
  --t-4:       clamp(1.35rem, 2.1vw, 1.75rem);  /* role titles */
  --t-5:       1.3rem;                          /* card titles */
  --t-6:       1.15rem;                         /* muted role title */
  --t-lead:    clamp(1.02rem, 1.35vw, 1.18rem); /* hero lede */
  --t-body:    1rem;
  --t-sm:      .92rem;
  --t-xs:      .84rem;
  --t-2xs:     .76rem;
  --t-label:   .68rem;                          /* tracked uppercase labels */
  --t-micro:   .64rem;
  --t-suffix:  .56em;     /* rides the metric figure, not the ramp */

  --lh-flat:    1;
  --lh-display: .88;
  --lh-tight:   1.04;
  --lh-snug:    1.3;
  --lh-body:    1.62;
  --lh-relaxed: 1.68;
  --lh-label:   1.45;

  --tr-display: -.062em;
  --tr-2:       -.05em;
  --tr-4:       -.035em;
  --tr-body:    -.008em;
  --tr-tight:   -.028em;
  --tr-label:   .2em;
  --tr-label-sm: .16em;

  --w-light:   300;
  --w-regular: 400;
  --w-medium:  500;
  --w-strong:  550;
  --w-semi:    600;

  /* ── space ──  a 4px-rooted ramp, plus the page's vertical rhythm.
     Sections use the rhythm tokens; everything inside uses the ramp. */
  --s-1:  .25rem;  --s-2:  .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5:  1.25rem; --s-6:  1.5rem;  --s-7: 2rem;    --s-8: 2.5rem;
  --s-9:  3rem;    --s-10: 4rem;    --s-11: 5rem;   --s-12: 6.5rem;

  --sec-y:    clamp(4rem, 8vw, 6.5rem);      /* a full section */
  --sec-y-sm: clamp(2.6rem, 5vw, 4rem);      /* a band */
  --gap-head: clamp(2.4rem, 5vw, 4rem);      /* heading block to content */
  --gap-row:  clamp(1.8rem, 3.4vw, 2.8rem);  /* row to row */
  --gap-col:  clamp(2rem, 5vw, 5rem);        /* two-column gutter */
  --gap-card: clamp(1rem, 2vw, 1.6rem);      /* card to card */
  --gap-entry: clamp(2.2rem, 4vw, 3.4rem);   /* one entry on the timeline to the next */
  --pad-card: clamp(1.4rem, 2.4vw, 2rem);

  /* measure — how far a line of text is allowed to run. Three widths,
     chosen so no column exceeds about 75 characters at its own size. */
  --measure-sm: 34rem;    /* secondary prose, captions */
  --measure:    40rem;    /* body prose */
  --measure-lg: 46rem;    /* ledes and statements, which run larger */

  /* ── geometry & motion ──
     Motion was the last axis still written as literals; twenty-three
     different durations had accumulated, which is not a system but a
     sediment. Six remain, chosen by what is moving rather than by how
     it felt at the time, and one rule governs the pairs: a thing leaves
     faster than it arrives, because waiting for something to go is the
     only part of an interface nobody enjoys. */
  --e:  cubic-bezier(.16, 1, .3, 1);
  --e2: cubic-bezier(.33, 1, .68, 1);
  --e3: cubic-bezier(.22, 1.1, .36, 1);     /* a little overshoot, for panels */
  --m-snap:  .18s;   /* a value that tracks the pointer or the scroll */
  --m-exit:  .26s;   /* anything on its way out */
  --m-tint:  .3s;    /* a colour, on a control */
  --m-tap:   .45s;   /* an icon or a control answering the pointer */
  --m-move:  .6s;    /* an element settling into its place */
  --m-plane: .9s;    /* a plane, a panel or a heading arriving */
  --m-draw:  1.1s;   /* something drawn at the pace you read it */
  --m-step:  90ms;   /* one place in a stagger */
  --m-lag:   .12s;   /* the beat before a sequence starts */
  --r:     4px;            /* content planes; controls stay pill-shaped */
  --r-pill: 2rem;

  /* ── what the page draws with ──  as opposed to the space it leaves.
     These were literals scattered through the file, and several of
     them appeared twice — which is how two things that are supposed to
     match quietly stop matching. */
  --rule:    1px;          /* a hairline: borders, dividers, the spine */
  --rule-2:  2px;          /* an emphatic rule: the progress bar, the address */
  --icon:    1.05rem;      /* every inline icon */
  --dot:     7px;          /* a node on the timeline */
  --mark:    .35rem;       /* a bullet */
  --ctl-h:    3rem;        /* a button */
  --ctl-h-sm: 2.6rem;      /* a compact control: the menu toggle */
  --ctl-h-lg: 3.2rem;      /* a full-width control on a touch sheet */
  --bar-h:   1.5px;        /* the two rules in the menu mark, and their */
  --bar-gap: 5px;          /* gap: the cross is derived from both */
  --rail-indent: clamp(1.4rem, 2.6vw, 2.2rem);

  /* ── the page's own edges ──  the gutter is stated once so the shell
     and the full-bleed mobile sheet line up on it instead of agreeing
     by accident. */
  --gutter: 5.5%;
  --shell: 78rem;
  --head-h:     5rem;      /* one source of truth: masthead and sheet share it */
  --head-h-min: 4.1rem;    /* the masthead once it has stuck */
  --head-h-sm:  4.3rem;

  /* ── the title page's rhythm ──  four steps, fluid like the name
     above them. They live here rather than in .hero so the first
     screen can be re-tuned as one thing. */
  --gap-name:    clamp(1.1rem, 2.4vw, 1.9rem);   /* kicker to the name */
  --gap-lede:    clamp(1.5rem, 3vw, 2.2rem);     /* the name to the line under it */
  --gap-actions: clamp(1.8rem, 3vw, 2.5rem);     /* the line to the buttons */
  --gap-meta:    clamp(1.4rem, 2.4vw, 2rem);     /* the buttons to the small print */
  --body: Geist, "Helvetica Neue", Arial, sans-serif;
}

/* The nocturne scheme, kept intact: add data-theme="dark" to <html>. */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-rgb:    14 16 20;
  --bg-1:      #13161C;
  --bg-2:      #171B22;
  --bg-3:      #1C212A;
  --line:      #242A33;
  --line-2:    #333B46;
  --edge:      rgb(255 255 255 / .045);
  --lift:      0 0 transparent;
  --lift-hi:   0 0 transparent;

  /* the "on dark" ramp lives once, at :root, as --nv-*; the inverted
     band in the light theme and the whole dark theme are the same
     situation — ink on a dark plane — and now share one set of values */
  --text:      var(--nv-text);
  --text-2:    var(--nv-text-2);
  --text-3:    var(--nv-text-3);
  --text-hi:   #FBFCFE;
  --display-2: #79808B;

  --ac-rgb:    var(--nv-ac-rgb);
  --ac-dk:     var(--nv-ac-dk);
  --ac-dim:    rgb(var(--ac-rgb) / .18);

  --hl-rgb:    var(--nv-hl-rgb);
  --hl-lt:     var(--nv-hl-lt);
  --hl-dk:     var(--nv-hl-dk);
  --hl-on:     #06121F;
  --hl-dim:    rgb(var(--hl-rgb) / .22);

  --aura-1:    rgb(var(--hl-rgb) / .16);
  --aura-2:    #6E7BC92e;
  --grain-op:  .035;

  --contact-bg:  linear-gradient(180deg, var(--bg-1), rgb(var(--bg-rgb) / 0) 72%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + var(--s-2)); -webkit-text-size-adjust: 100%; }
html { scrollbar-color: var(--line-2) transparent; scrollbar-gutter: stable; }
body {
  margin: 0; color: var(--text); background: var(--bg); font-weight: var(--w-regular);
  font: 1rem/1.62 var(--body); letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, dl, dd, dt, figure, ol, ul { margin: 0; }
p, li { text-wrap: pretty; }   /* no single-word last lines */
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--hl); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--hl); color: var(--hl-on); }
.symbols { display: none; }
.icon {
  width: var(--icon); height: var(--icon); flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.shell { width: min(calc(100% - var(--gutter) * 2), var(--shell)); margin-inline: auto; }
.skip-link {
  position: fixed; top: var(--s-3); left: var(--s-3); z-index: 90; padding: var(--s-3) var(--s-5);
  background: var(--hl); color: var(--hl-on); font-weight: var(--w-semi); font-size: var(--t-xs);
  border-radius: var(--r); transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ─────────────────────────────  ATMOSPHERE  ───────────────────────── */
/* Three very soft pools of light over the base, so no two regions of the
   page are the same value. Its own fixed layer, promoted once, so scrolling
   never repaints it. */
.field {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 75% at 50% -20%, var(--aura-1) 0%, transparent 62%),
    radial-gradient(80% 55% at -5% 72%,   var(--aura-2) 0%, transparent 66%);
  transform: translateZ(0);
}
.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none;
  opacity: var(--grain-op); will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
.progress { position: fixed; inset: 0 0 auto; z-index: 70; height: var(--rule-2); pointer-events: none; }
.progress i {
  display: block; height: 100%; background: var(--hl);
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
}
.aura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aura i { position: absolute; display: block; border-radius: 50%; filter: blur(90px); opacity: .85; }
.aura-a {
  width: 46rem; height: 34rem; top: -14rem; left: -10rem;
  background: radial-gradient(closest-side, var(--aura-1), transparent 72%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.aura-b {
  width: 42rem; height: 30rem; top: 18%; right: -14rem;
  background: radial-gradient(closest-side, var(--aura-2), transparent 72%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.aura-c {
  width: 54rem; height: 30rem; left: 50%; top: -8rem; translate: -50% 0;
  background: radial-gradient(closest-side, rgb(var(--hl-rgb) / .14), transparent 70%);
  animation: drift-a 30s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(6rem, 3rem, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-5rem, -4rem, 0) scale(1.08); } }

/* ─────────────────────────────  MOTION PRIMITIVES  ────────────────── */
.js .rise, .js .reveal { opacity: 0; transform: translate3d(0, 14px, 0); }
.js .reveal .case-media { clip-path: inset(0 0 100% 0); transition: clip-path var(--m-draw) var(--e) var(--m-lag); }
/* the body of a project arrives in steps behind its image */
.js .reveal .step { opacity: 0; transform: translate3d(0, 10px, 0); }
.js .reveal.in .step {
  opacity: 1; transform: none;
  transition: opacity var(--m-move) var(--e) calc(var(--k, 0) * var(--m-step) + var(--m-lag)),
              transform .8s var(--e) calc(var(--k, 0) * 90ms + 140ms);
}
.js .reveal.in .case-media { clip-path: inset(0 0 0 0); }
.js .rise { transition: opacity var(--m-plane) var(--e) var(--d, 0s), transform var(--m-plane) var(--e) var(--d, 0s); }
.js .reveal {
  transition: opacity var(--m-plane) var(--e) calc(var(--i, 0) * var(--m-step)),
              transform .85s var(--e) calc(var(--i, 0) * 80ms);
}
.js.is-ready .rise, .js .rise.in, .js .reveal.in { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.js .split .line > span { display: block; transform: translate3d(0, 110%, 0); transition: transform var(--m-plane) var(--e) calc(var(--l, 0) * var(--m-step)); }
.js .reveal.in .split .line > span, .js .split.in .line > span { transform: none; }
.js .rise-y { display: block; transform: translate3d(0, 115%, 0); }
.js .rise-y { transition: transform var(--m-draw) var(--e) var(--d, 0s); }
.js.is-ready .rise-y { transform: none; }

/* ─────────────────────────────  HEADER  ───────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60; background: transparent;
  transition: background var(--m-tap) var(--e2), border-color var(--m-tap) var(--e2), backdrop-filter var(--m-tap);
  border-bottom: var(--rule) solid transparent;
}
.site-header.is-stuck {
  background: rgb(var(--bg-rgb) / .96); backdrop-filter: blur(10px) saturate(130%); border-bottom-color: var(--line);
}
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: nowrap;
  min-height: var(--head-h); transition: min-height var(--m-tap) var(--e2);
}
.is-stuck .masthead { min-height: var(--head-h-min); }
.nav-open .masthead { transition: none; }
/* The name is the mark. Three pictorial marks were drawn and none of
   them earned its place beside a name this short; a typographic lockup
   says more and survives every size. */
.identity { display: inline-flex; align-items: baseline; gap: var(--s-3); flex: none; }
.wordmark { font-size: var(--t-body); font-weight: var(--w-semi); letter-spacing: var(--tr-tight); white-space: nowrap; }
.identity .role {
  position: relative; padding-left: var(--s-4); color: var(--text-3);
  font-size: var(--t-micro); font-weight: var(--w-medium);
  letter-spacing: var(--tr-label); text-transform: uppercase;
  white-space: nowrap; transition: color var(--m-tint);
}
/* the title steps aside before either half of the lockup can wrap */
@media (max-width: 1080px) { .identity .role { display: none; } }
.identity .role::before {
  content: ""; position: absolute; left: 0; top: .1em; bottom: .1em;
  width: var(--rule); background: var(--line-2);
}
.identity:hover .role { color: var(--text-2); }
.primary-nav { display: flex; align-items: center; gap: clamp(1.3rem, 2.3vw, 2.3rem); font-size: var(--t-xs); }
/* :not(.btn) because the two buttons at the foot of the mobile sheet are
   also descendants of the nav. Without it this rule out-specified
   .btn-primary and painted white-on-blue text in --text-2 — 2.0:1, and
   invisible in practice. */
.primary-nav a:not(.btn) { color: var(--text-2); transition: color var(--m-tint); }
.primary-nav a span { position: relative; display: inline-block; padding-block: var(--s-1); }
.primary-nav a span::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: var(--rule);
  background: var(--hl); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--m-tap) var(--e);
}
.primary-nav a:not(.btn):hover { color: var(--text); }
.primary-nav a:hover span::after, .primary-nav a.is-active span::after { transform: scaleX(1); transform-origin: 0 50%; }
.primary-nav a.is-active { color: var(--hl); }
.status-pill {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: .42rem .8rem .42rem .68rem;
  border: var(--rule) solid var(--hl-dim); background: rgb(var(--hl-rgb) / .06);
  border-radius: var(--r-pill); font-size: var(--t-2xs); color: var(--text-2);
}
.pulse { position: relative; width: .4rem; height: .4rem; border-radius: 50%; background: var(--ok); }
.pulse::after {
  content: ""; position: absolute; inset: -.2rem; border-radius: 50%; border: var(--rule) solid var(--ok);
  animation: pulse 2.4s var(--e2) infinite;
}
@keyframes pulse { 0% { opacity: .9; transform: scale(.6); } 70%, 100% { opacity: 0; transform: scale(1.7); } }
.menu-toggle, .menu-fallback { display: none; }
.nav-cta { display: none; }

/* ─────────────────────────────  HERO  ─────────────────────────────── */
.hero {
  position: relative; isolation: isolate;
  padding-block: clamp(3.4rem, 8vw, 7rem) var(--sec-y-sm);
}
/* Its own plane: a wash that is lit from above and behind the name, so
   the first screen has depth instead of one flat tone. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(56% 48% at 50% 10%, rgb(var(--hl-rgb) / .11), transparent 72%),
    radial-gradient(70% 55% at 92% -12%, rgb(var(--ac-rgb) / .14), transparent 68%),
    radial-gradient(60% 50% at 4% 24%, rgb(var(--ac-rgb) / .10), transparent 70%),
    linear-gradient(180deg, var(--bg-1), rgb(var(--bg-rgb) / 0) 58%);
}
.hero-copy { position: relative; z-index: 2; text-align: center; will-change: transform; }
.kicker {
  display: inline-flex; align-items: center; gap: var(--s-4); color: var(--hl);
  font-size: var(--t-2xs); font-weight: var(--w-semi); letter-spacing: var(--tr-label); text-transform: uppercase;
}
.kicker::before, .kicker::after { content: ""; width: clamp(1.4rem, 4vw, 3rem); height: var(--rule); background: linear-gradient(90deg, transparent, var(--hl-dk)); }
.kicker::after { background: linear-gradient(90deg, var(--hl-dk), transparent); }
.display {
  position: relative;
  margin-top: var(--gap-name);
  font-size: var(--t-display); line-height: var(--lh-display);
  letter-spacing: var(--tr-display); font-weight: var(--w-medium);
}
/* one redline pass across the name on arrival */
.js.is-ready .display::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 51%; height: var(--rule);
  background: linear-gradient(90deg, transparent, var(--hl-lt) 45%, var(--hl) 55%, transparent);
  transform-origin: 0 50%; pointer-events: none;
  animation: redline 1.9s var(--e) .45s both;
}
@keyframes redline {
  0%        { transform: scaleX(0); opacity: 0; }
  18%       { opacity: 1; }
  62%, 100% { transform: scaleX(1); }
  100%      { opacity: 0; }
}
.display .muted { color: var(--display-2); }
.lede {
  max-width: var(--measure); margin: var(--gap-lede) auto 0;
  color: var(--text-2); font-size: var(--t-lead); line-height: var(--lh-body);
  letter-spacing: var(--tr-body); text-wrap: balance;
}
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--gap-actions); }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: var(--ctl-h); padding: var(--s-3) var(--s-6); border-radius: var(--r-pill); font-size: var(--t-sm); font-weight: var(--w-strong);
  border: var(--rule) solid transparent; transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform var(--m-tap) var(--e), background var(--m-tint), border-color var(--m-tint), color var(--m-tint);
}
.btn:active { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(.985); transition-duration: .08s; }
.btn .icon { transition: transform var(--m-tap) var(--e); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--hl); color: var(--hl-on); font-weight: var(--w-semi); }
.btn-primary:hover { background: var(--hl-lt); }

.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--hl); color: var(--hl-lt); }
.hero-meta {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  margin-top: var(--gap-meta); color: var(--text-3); font-size: var(--t-xs);
}
.hero-meta .icon { width: .92rem; height: .92rem; color: var(--ac-dk); margin-right: -.2rem; }
.hero-meta .where { display: inline-flex; align-items: center; gap: var(--s-2) var(--s-3); }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); flex: none; }
@media (max-width: 900px) {
  .hero-meta { flex-direction: column; gap: var(--s-2); }
  .hero-meta .sep { display: none; }
}
/* ─────────────────────────────  METRICS  ──────────────────────────── */
.metrics { position: relative; padding-block: var(--sec-y-sm) var(--gap-row); }
.metrics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-card) var(--gap-col);
  padding-block: var(--s-8) 0; border-top: var(--rule) solid var(--line);
}
/* markup is dt-then-dd (as the spec requires); column-reverse puts the figure on top */
.metrics-grid > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.metrics dd {
  font-size: var(--t-2); line-height: var(--lh-flat); font-weight: var(--w-light);
  letter-spacing: var(--tr-display); font-variant-numeric: lining-nums tabular-nums;
  color: var(--text-hi);
}
/* The qualifier belongs to the figure, so it sits on the same baseline in
   the same ink — raised grey superscripts read as a footnote, not a number. */
.metrics dd .suf {
  font-size: var(--t-suffix); color: inherit; font-weight: var(--w-light);
  letter-spacing: var(--tr-display); margin-left: .04em;
}
.metrics dt { margin-top: var(--s-3); color: var(--text-3); font-size: var(--t-2xs); line-height: var(--lh-label); letter-spacing: normal; }
.metrics-note {
  margin-top: var(--s-7); color: var(--text-3);
  font-size: var(--t-micro); letter-spacing: var(--tr-label-sm); text-transform: uppercase;
}


/* ─────────────────────────────  THESIS  ──────────────────────────── */
/* One line between the numbers and the work: what the numbers were for. */
.thesis { padding-block: var(--sec-y-sm); }
.thesis .shell { border-block: var(--rule) solid var(--line); }
.thesis p {
  max-width: var(--measure-lg); padding-block: var(--s-8);
  font-size: var(--t-4); line-height: var(--lh-snug);
  letter-spacing: var(--tr-4); font-weight: var(--w-medium);
  text-wrap: balance;
}

/* ─────────────────────────────  SECTIONS  ─────────────────────────── */
.section { position: relative; padding-block: var(--sec-y); }
.eyebrow { display: flex; align-items: center; gap: var(--s-3); color: var(--hl); font-size: var(--t-label); font-weight: var(--w-semi); letter-spacing: var(--tr-label); text-transform: uppercase; }
.eyebrow i {
  width: 1.6rem; height: var(--rule); background: var(--hl-dk);
  transform-origin: 0 50%; transition: transform var(--m-plane) var(--e) var(--m-lag);
}
.js .reveal .eyebrow i, .js .eyebrow.reveal i { transform: scaleX(0); }
.js .reveal.in .eyebrow i, .js .eyebrow.reveal.in i { transform: scaleX(1); }
.eyebrow.sm { color: var(--text-3); font-size: var(--t-micro); letter-spacing: var(--tr-label); margin-bottom: var(--s-4); }
.sec-head { margin-bottom: var(--gap-head); }
.sec-head h2, .exp-head h2 {
  margin-top: var(--s-5); font-size: var(--t-2); line-height: var(--lh-tight);
  letter-spacing: var(--tr-2); font-weight: var(--w-medium); text-wrap: balance;
}
.sec-sub { margin-top: var(--s-5); max-width: var(--measure-sm); color: var(--text-2); line-height: var(--lh-relaxed); font-size: var(--t-body); }

/* ─────────────────────────────  CASES  ────────────────────────────── */
/* Each project opens with an index row — number, kind, year — so the two
   read as entries in a set rather than as two stacked blocks. */
.case + .case { margin-top: var(--sec-y-sm); }
.case-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: var(--s-4);
  padding-bottom: var(--s-4); border-bottom: var(--rule) solid var(--line);
  margin-bottom: var(--gap-row);
}
.case-no {
  font-size: var(--t-5); font-weight: var(--w-semi); color: var(--ac);
  letter-spacing: var(--tr-tight); font-variant-numeric: tabular-nums;
}
.case-kind, .case-year {
  font-size: var(--t-label); font-weight: var(--w-semi); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--text-3);
}
.case-year { justify-self: end; }
.case-grid { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: var(--gap-col); }
.case:nth-child(even) .case-grid .case-media { order: 2; }
.case-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.case-tags li {
  padding: .32rem .66rem; border: var(--rule) solid var(--line); border-radius: var(--r-pill);
  background: var(--bg-2); color: var(--text-3); font-size: var(--t-2xs); line-height: var(--lh-snug);
}
.case-media {
  position: relative; overflow: hidden; border-radius: var(--r);
  border: var(--rule) solid var(--line); background: var(--bg-2);
  box-shadow: inset 0 var(--rule) 0 var(--edge), var(--lift);
  transition: border-color var(--m-move) var(--e), transform var(--m-move) var(--e), box-shadow var(--m-move) var(--e);
  transform: perspective(1200px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
}
.case-media { aspect-ratio: 16 / 10; }
/* a screenshot is not a crop: the frame takes the height the image needs */
.case-media.shot { aspect-ratio: auto; }
.case-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
  transition: transform var(--m-draw) var(--e), filter var(--m-plane) var(--e);
}
/* ── the screenshots ──  shown as what they are: a running product.
   A browser bar above, the view cropped to its top rather than the whole
   page shrunk to nothing, and a frame that casts rather than glows. */
.shot { display: flex; flex-direction: column; background: var(--bg-2); }
.shot-bar {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 0 var(--s-4); height: 2.1rem; flex: none;
  border-bottom: var(--rule) solid var(--line); background: var(--bg);
}
.shot-bar i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--line-2); }
.shot-bar i:first-child { margin-left: 0; }
.shot-bar span {
  margin-left: var(--s-3); color: var(--text-3);
  font-size: var(--t-micro); letter-spacing: var(--tr-body);
}
.shot-view { position: relative; flex: 1; }
/* No crop, no zoom, no scale: the frame takes whatever height the image
   needs and every edge of it stays inside. Hover lifts the whole plane
   instead, which reads as a window you can open rather than one that
   swallows its own content. */
.shot-view img { width: 100%; height: auto; display: block; }
.case-shot:hover .case-media, .case-shot:focus-visible .case-media {
  box-shadow: inset 0 var(--rule) 0 var(--edge), var(--lift-hi);
}

.case-shot { display: block; border-radius: var(--r); }
.case-chip {
  position: absolute; z-index: 3; left: 50%; top: 50%;
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  background: var(--hl); color: var(--hl-on);
  font-size: var(--t-micro); font-weight: var(--w-semi);
  letter-spacing: var(--tr-label-sm); text-transform: uppercase;
  box-shadow: 0 10px 28px -12px rgb(var(--hl-rgb) / .7);
  opacity: 0; transform: translate(-50%, -50%) scale(.92);
  transition: opacity var(--m-tint) var(--e), transform var(--m-tap) var(--e3);
}
.case-shot:hover .case-chip, .case-shot:focus-visible .case-chip {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}
.case-media:hover { border-color: var(--line-2); }

.case-media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 var(--rule) var(--ac-dim); opacity: 0; transition: opacity var(--m-move) var(--e);
}
.case-media:hover::before { opacity: 1; }
.case-media figcaption {
  position: absolute; inset: auto 0 0; z-index: 3; display: flex; justify-content: space-between; gap: var(--s-4);
  padding: 2.5rem .95rem .8rem; color: var(--text-3); font-size: var(--t-micro); letter-spacing: var(--tr-label-sm); text-transform: uppercase;
  background: linear-gradient(transparent, rgb(var(--bg-rgb) / .88) 55%);
}
.case-body h3 { margin: 0 0 1rem; font-size: var(--t-3); line-height: var(--lh-tight); letter-spacing: var(--tr-2); font-weight: var(--w-medium); }
.case-lede { color: var(--text-2); line-height: var(--lh-relaxed); max-width: var(--measure-sm); }
.case-points { margin-top: var(--s-7); display: grid; gap: var(--s-3); }
.case-points li {
  position: relative; padding-left: var(--s-6); color: var(--text-3); font-size: var(--t-sm); line-height: var(--lh-body);
}
.case-points li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: var(--mark); height: var(--mark);
  background: var(--ac-dk); transform: rotate(45deg);
}
.case-links { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-7); margin-top: var(--s-7); }
/* ── links ──  two roles and one mechanic. A lead link is azure and
   underlined; a quiet link is body grey and earns its underline on
   hover. Both grow the rule from the left and nudge their icon. */
.link-lead, .link-quiet {
  position: relative; display: inline-flex; align-items: center; gap: var(--s-2);
  padding-bottom: var(--s-1); transition: color var(--m-tint);
}
.link-lead  { color: var(--hl); font-size: var(--t-sm); font-weight: var(--w-strong);
              border-bottom: var(--rule) solid var(--hl-dim); }
.link-quiet { color: var(--text-2); font-size: var(--t-xs); }
.link-lead::after, .link-quiet::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: var(--rule);
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--m-tap) var(--e);
}
.link-lead:hover::after, .link-quiet:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.link-lead:hover  { color: var(--hl-lt); }
.link-quiet:hover { color: var(--hl); }
.link-lead .icon, .link-quiet .icon { transition: transform var(--m-tap) var(--e); }
.link-lead:hover .icon, .link-quiet:hover .icon { transform: translateX(3px); }



/* ─────────────────────────────  EXPERIENCE  ───────────────────────── */
/* The one inverted plane: it anchors the middle of a light page and gives
   the blue somewhere to live at full strength. Scoped tokens, so every rule
   inside the section keeps working unchanged. */
.experience {
  --bg-1:      var(--nv-ring);     /* the ring punched around each rail dot */
  --line:      var(--nv-line);
  --line-2:    var(--nv-line-2);
  --edge:      rgb(255 255 255 / .07);
  --lift:      0 0 transparent;
  --lift-hi:   0 0 transparent;
  --text:      var(--nv-text);
  --text-2:    var(--nv-text-2);
  --text-3:    var(--nv-text-3);
  --ac:        var(--nv-ac);
  --ac-dk:     var(--nv-ac-dk);
  --ac-dim:    rgb(var(--nv-ac-rgb) / .22);
  --hl-rgb:    var(--nv-hl-rgb);
  --hl-lt:     var(--nv-hl-lt);
  --hl-dk:     var(--nv-hl-dk);
  --hl-dim:    rgb(var(--nv-hl-rgb) / .25);
  color: var(--nv-text);
  background: linear-gradient(168deg, var(--nv-bg-a), var(--nv-bg-b));
  box-shadow: inset 0 var(--rule) 0 var(--edge);
}
/* the section label sits quietly on the navy; the vivid blue belongs to
   things you can act on, not to a caption */
.experience .eyebrow { color: var(--nv-label); }
.experience .eyebrow i { background: var(--nv-rule); }
.exp-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: var(--gap-col); align-items: start; }
/* clears the masthead by one step of the ramp, so it is tied to the
   bar rather than to a number that happened to look right */
.exp-head { position: sticky; top: calc(var(--head-h) + var(--s-7)); }
.rail { position: relative; padding-left: var(--rail-indent); }
.rail::before {
  content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: var(--rule);
  background: linear-gradient(180deg, var(--ac-dk), var(--line) 55%, transparent);
  transform: scaleY(var(--rail, 1)); transform-origin: 50% 0;
}
.js .rail { --rail: 0; }
.js .rail::before { transition: transform var(--m-snap) linear; }
.rail > li { position: relative; }
.rail > li + li { margin-top: var(--gap-entry); }
.rail > li::before {
  content: ""; position: absolute; left: calc(var(--rail-indent) * -1); top: .62rem;
  width: var(--dot); height: var(--dot); margin-left: calc(var(--dot) / -2); border-radius: 50%;
  background: var(--hl); box-shadow: 0 0 0 4px var(--bg-1), 0 0 14px rgb(var(--hl-rgb) / .5);
}
.rail > li.muted-item::before { background: var(--line-2); box-shadow: 0 0 0 4px var(--bg-1); }
.yr { display: flex; align-items: center; gap: var(--s-3); color: var(--text-3); font-size: var(--t-2xs); font-weight: var(--w-semi); letter-spacing: var(--tr-label-sm); text-transform: uppercase; }
.rail > li:not(.muted-item) .yr { color: var(--ac); }
.now {
  padding: .14rem .5rem; border: var(--rule) solid var(--hl-dim); border-radius: var(--r-pill);
  color: var(--hl-lt); font-size: var(--t-micro); letter-spacing: var(--tr-label-sm);
}
.rail h3 { margin: .7rem 0 .7rem; font-size: var(--t-4); letter-spacing: var(--tr-4); font-weight: var(--w-medium); }
.muted-item h3 { color: var(--text-2); font-size: var(--t-6); }
.rail > li > p:not(.yr) { color: var(--text-2); line-height: var(--lh-relaxed); max-width: var(--measure); }
.muted-item > p:not(.yr) { color: var(--text-3); }
.rail ul { margin-top: var(--s-5); display: grid; gap: var(--s-3); }
.rail ul li { position: relative; padding-left: var(--s-5); color: var(--text-3); font-size: var(--t-sm); line-height: var(--lh-body); max-width: var(--measure); }
.rail ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: var(--rule); background: var(--ac-dk); }

/* ─────────────────────────────  CAPABILITIES  ─────────────────────── */
/* Four groups, so two by two: the resume names four, and a 3+1 row
   leaves the fourth card reading as an afterthought. */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-card); }
.cap {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r);
  padding: var(--pad-card); border: var(--rule) solid var(--line);
  background: linear-gradient(170deg, var(--bg-2), rgb(var(--bg-rgb) / .4));
  box-shadow: inset 0 var(--rule) 0 var(--edge), var(--lift);
  transition: border-color var(--m-tap) var(--e), transform var(--m-tap) var(--e), background var(--m-tap) var(--e), box-shadow var(--m-tap) var(--e);
}
.cap::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(16rem 16rem at var(--px, 50%) var(--py, 0%),
              rgb(var(--hl-rgb) / .14), transparent 68%);
  transition: opacity var(--m-tap) var(--e);
}
.cap:hover { border-color: var(--line-2); transform: translateY(-3px); background: linear-gradient(170deg, var(--bg-3), var(--bg-2)); }
.cap:hover::after { opacity: 1; }
.cap-no { color: var(--ac); font-size: var(--t-2xs); font-weight: var(--w-semi); letter-spacing: var(--tr-label-sm); }
.cap h3 { margin: .8rem 0 1.3rem; font-size: var(--t-5); letter-spacing: var(--tr-4); font-weight: var(--w-medium); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tags li {
  padding: .4rem .72rem; border: var(--rule) solid var(--line-2); border-radius: var(--r-pill);
  color: var(--text-2); font-size: var(--t-2xs); line-height: var(--lh-snug); transition: border-color var(--m-tint), color var(--m-tint);
}
.tags li:hover { border-color: var(--hl-dk); color: var(--hl-lt); }
.credentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-col); margin-top: var(--gap-head); padding-top: var(--gap-row); border-top: var(--rule) solid var(--line); }
.cred p { font-size: var(--t-sm); line-height: var(--lh-body); }
.cred p + p { margin-top: var(--s-2); }
.cred .dim { color: var(--text-3); font-size: var(--t-xs); }

/* ─────────────────────────────  CONTACT  ──────────────────────────── */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: var(--sec-y); border-top: var(--rule) solid var(--line);
  background: var(--contact-bg);
  box-shadow: inset 0 var(--rule) 0 var(--edge);
}
/* Centred, to answer the hero. Everything between the two runs on one
   left spine because it is a document being read; these two are not.
   The hero is the title page and this is the closing page, and a block
   whose whole job is a single address is stronger on the centre line
   than hanging off a margin. */
.contact-inner { position: relative; z-index: 2; text-align: center; }
.contact .eyebrow { justify-content: center; }
/* the eyebrow rule mirrored, so a centred label is symmetrical */
.contact .eyebrow::after {
  content: ""; width: 1.6rem; height: var(--rule); background: var(--hl-dk);
  transform-origin: 100% 50%; transition: transform var(--m-plane) var(--e) var(--m-lag);
}
.js .contact .eyebrow.reveal::after { transform: scaleX(0); }
.js .contact .eyebrow.reveal.in::after { transform: scaleX(1); }
.contact h2 { margin-top: var(--s-6); font-size: var(--t-1); line-height: var(--lh-display); letter-spacing: var(--tr-display); font-weight: var(--w-medium); }
/* one blue focus per block: the address, not the heading above it */
.contact h2 em { font-style: normal; color: var(--display-2); }
.contact-sub { max-width: var(--measure-sm); margin: var(--s-6) auto 0; color: var(--text-2); line-height: var(--lh-relaxed); text-wrap: balance; }
.contact-links { display: grid; justify-items: center; gap: var(--s-6); margin-top: var(--gap-row); }
.mailto {
  position: relative; display: inline-flex; align-items: center; gap: var(--s-4);
  font-size: var(--t-3); font-weight: var(--w-medium); letter-spacing: var(--tr-4);
  color: var(--hl); padding-bottom: var(--s-2); transition: color var(--m-tint);
}
.mailto .icon { width: 1.1em; height: 1.1em; stroke-width: 1.5; transition: transform var(--m-tap) var(--e); }
.mailto::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--rule-2);
  background: currentColor; transform: scaleX(1); transform-origin: 0 50%;
  transition: transform var(--m-tap) var(--e);
}
.mailto:hover { color: var(--hl-lt); }
.mailto:hover .icon { transform: translateX(4px); }
.profiles { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3) var(--s-7); }
.c-link .icon { color: var(--ac-dk); transition: color var(--m-tint); }
.c-link:hover .icon { color: var(--hl); }
.contact-note { max-width: var(--measure-sm); margin: var(--gap-row) auto 0; color: var(--text-3); font-size: var(--t-xs); line-height: var(--lh-body); text-wrap: balance; }
.contact-note.tight { margin-top: var(--s-2); }

/* ─────────────────────────────  DOCUMENT PAGES  ───────────────────
   404 and privacy run on the same chrome as the homepage — same header,
   same field, same footer — so they read as rooms in one building
   rather than as pages someone bolted on. */
.doc { position: relative; isolation: isolate; padding-block: var(--sec-y) var(--sec-y-sm); }
.doc-head { max-width: var(--measure-lg); margin-bottom: var(--gap-head); }
.doc h1 {
  margin-top: var(--s-5);
  font-size: var(--t-2); line-height: var(--lh-tight);
  letter-spacing: var(--tr-2); font-weight: var(--w-medium); text-wrap: balance;
}
.doc-lede { margin-top: var(--s-5); max-width: var(--measure); color: var(--text-2); font-size: var(--t-lead); line-height: var(--lh-body); }
.doc-body { max-width: var(--measure); }
.doc-body h2 {
  margin-top: var(--s-9); padding-top: var(--s-4); border-top: var(--rule) solid var(--line);
  font-size: var(--t-5); line-height: var(--lh-snug);
  letter-spacing: var(--tr-4); font-weight: var(--w-medium);
}
.doc-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-body p { margin-top: var(--s-4); color: var(--text-2); line-height: var(--lh-relaxed); }
.doc-body a { color: var(--hl); text-decoration: underline; text-decoration-color: var(--hl-dim); text-underline-offset: .22em; transition: text-decoration-color var(--m-tint), color var(--m-tint); }
.doc-body a:hover { color: var(--hl-lt); text-decoration-color: currentColor; }
.doc-body code {
  padding: .1em .4em; border: var(--rule) solid var(--line); border-radius: var(--r);
  background: var(--bg-2); font-size: var(--t-xs); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc-meta { margin-top: var(--s-9); padding-top: var(--s-4); border-top: var(--rule) solid var(--line); color: var(--text-3); font-size: var(--t-2xs); }
.doc-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

/* the 404 is the same page, centred */
.doc.lost { display: grid; place-content: center; justify-items: center; text-align: center; min-height: min(72svh, var(--measure)); }
.doc.lost .doc-head { margin-bottom: 0; display: grid; justify-items: center; }
.doc.lost h1 { font-size: var(--t-1); line-height: var(--lh-display); letter-spacing: var(--tr-display); }
.doc.lost .doc-lede { margin-inline: auto; }

/* the pared-back masthead these pages use */
.nav-back .icon { transform: rotate(180deg); }
.nav-back:hover .icon { transform: rotate(180deg) translateX(-3px); }

/* ─────────────────────────────  FOOTER  ──────────────────────────
   The masthead again, at the end of the document, and literally so:
   the lockup in the foot is the same element with the same rules as
   the one in the head, down to hiding the title at the same width. The
   only difference is where it takes you, and since the head's lockup
   already points at #top, there is not even that. No arrow, no "Back
   to top" link: one gesture, one control, in two places.

   Height is the other half of the relationship. The masthead is one
   --head-h; the foot is two, one for the lockup and its links and one
   for the colophon, each the same height as the bar at the top of the
   page. That is why the foot has weight without looking bolted on, and
   why its two bands are equal by construction rather than by a pair of
   paddings that happen to add up. */
footer { border-top: var(--rule) solid var(--line); background: var(--bg-1); box-shadow: inset 0 var(--rule) 0 var(--edge); }
.experience ::selection { background: var(--hl-lt); color: var(--nv-bg-b); }
.footer-top, .footer-base {
  display: flex; align-items: center; flex-wrap: wrap;
  min-height: var(--head-h); padding-block: var(--s-4);
}
.footer-top { justify-content: space-between; gap: var(--s-4) var(--s-7); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); font-size: var(--t-xs); }
.footer-nav a { color: var(--text-3); transition: color var(--m-tint); }
.footer-nav a:hover { color: var(--hl); }
.footer-base {
  gap: var(--s-2) var(--s-5); border-top: var(--rule) solid var(--line);
  color: var(--text-3); font-size: var(--t-2xs);
}

/* ───────────────────────  SCROLL-DRIVEN MOTION  ────────────────────
   Where the browser can tie an animation to the scroll position itself,
   an element responds to the scroll position as it passes. It runs on
   the compositor, costs the main thread nothing, and simply does not
   apply where it is unsupported — there is no JS fallback by design.

   A parallax drift inside the frame is deliberately NOT one of these.
   It scaled the screenshots up and let the frame clip the overflow,
   which shaved the navigation off one edge and the buttons off the
   other. A screenshot is evidence; it is shown whole. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .thesis .shell {
      animation: thesis-rule linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
    @keyframes thesis-rule {
      from { border-color: transparent; }
      to   { border-color: var(--line); }
    }
  }
}

/* ─────────────────────────────  RESPONSIVE  ───────────────────────── */
@media (max-width: 1080px) {
  .exp-grid { grid-template-columns: 1fr; }
  .exp-head { position: static; }
  .credentials { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 860px) {
  .case-grid, .case:nth-child(even) .case-grid .case-media { grid-template-columns: 1fr; order: 0; }
  .case-media { order: 0; }
  .cap-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: var(--s-7) 0; }
  .metrics-grid > div:nth-child(odd) { border-left: 0; }
}
@media (max-width: 760px) {
  /* anchors land under a masthead of this height, not the desktop one */
  html { scroll-padding-top: calc(var(--head-h-sm) + var(--s-2)); }
  html:not(.js) .menu-fallback { display: inline-block; color: var(--hl); }
  /* one height, always: a masthead that resizes while the sheet opens
     is the shake you feel */
  .masthead, .is-stuck .masthead {
    min-height: var(--head-h-sm); transition: none; flex-wrap: nowrap; row-gap: 0;
  }
  /* ── the menu is a sheet, not a cramped drop-down ──────────────────
     The whole thing is one idea: the masthead lifts a plane down over
     the page, and the page's own ruled lines draw themselves across it.
     Nothing flies in from off-screen, because nothing on this site
     arrives that way.

     Opening and closing are deliberately not the same move played
     backwards. Opening is a sequence you are meant to watch: the plane
     unrolls, then the words settle into it, then the rules draw, then
     the pill and the buttons. Closing is a single decision you have
     already made, so it is one fast movement with no stagger at all —
     every delay below sits on .nav-open, which means the moment the
     class comes off, everything leaves together. */
  .menu-toggle:not([hidden]) {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: var(--s-3);
    min-height: var(--ctl-h-sm); padding: var(--s-2) var(--s-4);
    border: var(--rule) solid var(--line-2); border-radius: var(--r-pill);
    font-size: var(--t-xs); font-weight: var(--w-medium); color: var(--text); cursor: pointer;
    background: var(--bg-2); box-shadow: var(--lift);
    transition: border-color var(--m-tint), color var(--m-tint), background var(--m-tint);
  }
  .menu-toggle[aria-expanded="true"] { border-color: var(--hl); color: var(--hl); }
  .menu-toggle:active { transform: scale(.96); transition-duration: .07s; }

  /* The word turns over rather than being swapped out. Both words are
     in the box, so the button cannot change width as the label changes
     — "Menu" and "Close" are not the same length, and that jump was
     visible every time. */
  .menu-label { display: grid; overflow: hidden; }
  .menu-label i {
    grid-area: 1 / 1; display: block; font-style: normal;
    transition: transform var(--m-tap) var(--e), opacity var(--m-tint) linear;
  }
  /* the word going out gives up its opacity on the way, so the two are
     never both fully legible in a one-line window */
  .menu-label i:last-child { transform: translateY(100%); opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-label i { transform: translateY(-100%); opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-label i:last-child { transform: translateY(0); opacity: 1; }

  /* Two bars become a cross in two beats, not one: opening, they meet
     first and then cross; closing, they uncross first and then part.
     translate and rotate are separate properties, so each beat can hold
     its own delay without a keyframe in sight. */
  .menu-icon { display: grid; gap: var(--bar-gap); width: var(--icon); }
  .menu-icon i {
    display: block; height: var(--bar-h); border-radius: var(--bar-h); background: currentColor;
    transition: translate var(--m-exit) var(--e2) var(--m-snap), rotate var(--m-exit) var(--e);
  }
  .menu-toggle[aria-expanded="true"] .menu-icon i {
    transition: translate var(--m-exit) var(--e2), rotate var(--m-tap) var(--e) var(--m-snap);
  }
  /* half the distance between the two bars' centres, derived rather
     than measured, so the cross stays a cross if either value moves */
  .menu-toggle[aria-expanded="true"] .menu-icon i:first-child {
    translate: 0 calc((var(--bar-gap) + var(--bar-h)) / 2); rotate: 45deg;
  }
  .menu-toggle[aria-expanded="true"] .menu-icon i:last-child {
    translate: 0 calc((var(--bar-gap) + var(--bar-h)) / -2); rotate: -45deg;
  }

  .nav-open { overflow: hidden; }
  /* The masthead has to be fixed while the sheet is open, because a pinned
     body has no scroll left for position: sticky to resolve against — the
     header would ride up off the top with the rest of the page. Going
     fixed takes it out of the flow, though, and everything below it then
     closes the gap: the page behind the sheet jumped up by exactly the
     masthead's height on open and back down on close, which is the shake.
     So the body holds its place. The height is written to --lock-pad from
     the real box as the sheet opens; the fallback is the same height
     derived from its own tokens, for the frame before JS has measured. */
  .nav-open body {
    position: fixed; left: 0; right: 0; width: 100%; overflow: hidden;
    padding-top: var(--lock-pad, calc(var(--head-h-sm) + var(--rule)));
  }
  .nav-open .site-header {
    position: fixed; inset: 0 0 auto; background: var(--bg); border-bottom-color: var(--line);
    backdrop-filter: none; transition: none;
  }

  .primary-nav {
    --sheet-step: calc(var(--m-step) / 2);
    position: fixed; inset: var(--head-h-sm) 0 0; z-index: 1;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: clamp(1rem, 4vw, 1.8rem) var(--gutter) calc(1.8rem + env(safe-area-inset-bottom));
    /* The sheet is the lifted tone, not the page tone. They were the
       same colour, which made the wipe invisible: the plane could only
       be inferred from the text it covered. One step of value and the
       edge reads as an edge. */
    background: var(--bg-1); overflow-y: auto; overscroll-behavior: contain;
    box-shadow: inset 0 var(--rule) 0 var(--edge);
    /* the plane unrolls from the masthead's own hairline — the same
       wipe the project frames use, so the sheet belongs to the page
       rather than being borrowed from an app */
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path var(--m-exit) var(--e2), visibility var(--m-exit);
  }
  .nav-open .primary-nav {
    clip-path: inset(0 0 0 0); visibility: visible; will-change: clip-path;
    transition: clip-path var(--m-tap) var(--e), visibility 0s;
  }

  .primary-nav > a:not(.btn) {
    position: relative;
    display: flex; align-items: center; gap: var(--s-4);
    padding: var(--s-5) var(--s-1);
    font-size: var(--t-4); font-weight: var(--w-medium); letter-spacing: var(--tr-4); color: var(--text);
    opacity: 0; transform: translate3d(0, 10px, 0);
    transition: opacity var(--m-exit) linear, transform var(--m-exit) var(--e2), color var(--m-tint);
  }
  /* the rule under each line is drawn, not printed */
  .primary-nav > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--rule);
    background: var(--line); transform: scaleX(0); transform-origin: 0 50%;
    transition: transform var(--m-exit) var(--e2);
  }
  .primary-nav > a span::after { display: none; }
  .primary-nav > a.is-active { color: var(--hl); }
  .primary-nav > a:active { color: var(--hl); }
  .nav-open .primary-nav > a {
    opacity: 1; transform: none;
    transition: opacity var(--m-tap) linear var(--sd), transform var(--m-tap) var(--e) var(--sd), color var(--m-tint);
  }
  .nav-open .primary-nav > a::after {
    transform: scaleX(1);
    transition: transform var(--m-move) var(--e) var(--sd);
  }
  .primary-nav > a:nth-child(1) { --sd: var(--m-lag); }
  .primary-nav > a:nth-child(2) { --sd: calc(var(--m-lag) + var(--sheet-step)); }
  .primary-nav > a:nth-child(3) { --sd: calc(var(--m-lag) + var(--sheet-step) * 2); }
  .primary-nav > a:nth-child(4) { --sd: calc(var(--m-lag) + var(--sheet-step) * 3); }

  .primary-nav .status-pill {
    align-self: flex-start; margin-top: var(--s-6);
    opacity: 0; transform: translate3d(0, 10px, 0);
    transition: opacity var(--m-exit) linear, transform var(--m-exit) var(--e2);
  }
  .nav-open .primary-nav .status-pill {
    opacity: 1; transform: none;
    --sd: calc(var(--m-lag) + var(--sheet-step) * 4);
    transition: opacity var(--m-tap) linear var(--sd), transform var(--m-tap) var(--e) var(--sd);
  }

  .nav-cta {
    display: grid; gap: var(--s-3); margin-top: auto; padding-top: var(--s-7);
    opacity: 0; transform: translate3d(0, 10px, 0);
    transition: opacity var(--m-exit) linear, transform var(--m-exit) var(--e2);
  }
  .nav-open .nav-cta {
    opacity: 1; transform: none;
    --sd: calc(var(--m-lag) + var(--sheet-step) * 5);
    transition: opacity var(--m-tap) linear var(--sd), transform var(--m-tap) var(--e) var(--sd);
  }
  .nav-cta .btn { width: 100%; min-height: var(--ctl-h-lg); font-size: var(--t-sm); }
  .hero { padding-top: var(--s-8); }
  .display { font-size: var(--t-display); letter-spacing: var(--tr-display); }
  .hero-meta { font-size: var(--t-2xs); }
  .case-points li, .rail ul li { font-size: var(--t-xs); }
  .case-head { grid-template-columns: auto 1fr; }
  .case-year { grid-column: 2; justify-self: end; }
  .case-kind { display: none; }
  /* The foot keeps its rule on a narrow page: it becomes three rows
     instead of two — lockup, links, colophon — and each of them is
     still exactly one masthead tall. */
  .footer-top, .footer-base { min-height: var(--head-h-sm); }
  .footer-top {
    flex-direction: column; align-items: stretch; justify-content: center;
    gap: 0; padding-block: 0;
  }
  .footer-top > * { display: flex; align-items: center; min-height: var(--head-h-sm); }
  .footer-nav { gap: var(--s-3) var(--s-5); }
}
@media (max-width: 420px) {
  /* the page's edge comes in a little; the sheet follows it, because
     both read the same token */
  :root { --gutter: 5%; }
  .btn { padding-inline: var(--s-4); font-size: var(--t-xs); }
  .metrics dd { font-size: var(--t-3); }
}

/* ─────────────────────────────  REDUCED MOTION  ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rise, .js .reveal, .js .rise-y, .js .split .line > span,
  .js .reveal .step, .primary-nav > a, .primary-nav .status-pill, .nav-cta {
    opacity: 1 !important; transform: none !important;
  }
  .js .reveal .case-media { clip-path: none; }
  .js .reveal .eyebrow i, .js .eyebrow.reveal i,
  .js .contact .eyebrow.reveal::after { transform: none; }
  .hero-copy, [data-magnetic], [data-tilt] { transform: none !important; }
  .js .rail::before { transform: none; }
  .js.is-ready .display::after { display: none; }
  .grain { display: none; }
}

/* ─────────────────────────────  PRINT  ────────────────────────────
   Browsers drop background colours when printing, so the dark theme
   would come out as near-white on white. Print gets its own palette. */
@media print {
  :root {
    color-scheme: light;
    --text: #000; --text-2: #1f1f1f; --text-3: #3a3a3a;
    --ac: #333; --ac-dk: #8d8d8d;
    --hl: #1a1a1a; --hl-lt: #1a1a1a; --hl-dk: #8d8d8d;
    --hl-dim: #c8c8c8; --hl-on: #fff; --edge: transparent; --lift: none; --lift-hi: none;
    --grain-op: 0; --aura-1: transparent; --aura-2: transparent;
    --ac-dim: #c8c8c8; --text-hi: #000; --display-2: #000;
    --line: #c8c8c8; --line-2: #c8c8c8;
  }
  body { background: #fff; background-attachment: scroll; color: #000; font-size: 10.5pt; line-height: 1.45; }
  html.nav-open, .nav-open body { position: static; overflow: visible; }
  /* Paper has no frames to spare. Everything the print rules below reset —
     the sections' opacity, their 14px rise — is a transitioned property, so
     switching to print media starts a 0.9s fade rather than finishing it,
     and whatever the renderer samples before that lands is what gets
     printed: a page of half-faded, slightly offset text. Nothing animates
     on paper, so nothing here needs a duration. */
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .field, .grain, .progress, .aura,
  .hero::before, .case-shot,
  .site-header, .skip-link, .actions, .status-pill, .nav-cta,
  /* the foot's nav is all in-page anchors; on paper it is noise */
  .case-media, footer .up, .footer-nav { display: none !important; }
  .js .rise, .js .reveal, .js .rise-y,
  .js .split .line > span, .js .reveal .step, .hero-copy { opacity: 1 !important; transform: none !important; }
  /* the timeline's spine is drawn by scroll, and on paper it never was */
  .js .rail::before { transform: none; }
  .js.is-ready .display::after { display: none; }   /* the redline sweep */
  .shell { width: 100%; }
  .hero { padding-top: 0; }
  .hero-copy { text-align: left; }
  .display { font-size: 30pt; margin-top: .3rem; }
  /* gradient-clipped text: the gradient box itself prints, so clear it */
  .display .muted, .contact h2 em {
    background: none; -webkit-background-clip: border-box; background-clip: border-box;
    color: #000; -webkit-text-fill-color: #000;
  }
  .lede, .hero-meta { margin-left: 0; margin-right: 0; max-width: none; text-align: left; justify-content: flex-start; align-items: flex-start; }
  .kicker::before, .kicker::after, .eyebrow i { display: none; }
  .kicker, .eyebrow, .case-num span, .cap-no, .yr { color: #000; }
  .section { padding-block: 1.2rem; }
  .sec-head h2, .exp-head h2, .contact h2 { font-size: 16pt; margin-top: .4rem; }
  .contact { padding-block: var(--s-5); }
  /* the centre line is a screen gesture; on paper everything is left */
  .contact-inner { text-align: left; }
  .contact .eyebrow { justify-content: flex-start; }
  .contact .eyebrow::after { display: none; }
  .contact-sub, .contact-note { margin-inline: 0; }
  .contact-links { justify-content: flex-start; justify-items: start; }
  .profiles { justify-content: flex-start; }
  .exp-grid, .cap-grid, .credentials, .case-grid { display: block; }
  .cap, .case + .case { border: 0; padding: 0; margin-top: .9rem; }
  .metrics-grid { display: flex; gap: 1.2rem; }
  .metrics-grid > div { border: 0; padding: 0; text-align: left; }
  .metrics dd { font-size: 18pt; color: #000; }
  .tags li { border-color: #c8c8c8; padding: .1rem .35rem; }
  .experience {
    background: #fff; color: #000; box-shadow: none;
    --nv-label: #333;
    --text: #000; --text-2: #1f1f1f; --text-3: #3a3a3a;
    --ac: #333; --ac-dk: #8d8d8d;
    --hl: #1a1a1a; --hl-lt: #1a1a1a; --hl-dk: #8d8d8d;
    --line: #c8c8c8; --line-2: #c8c8c8; --bg-1: #fff; --edge: transparent; --lift: none;
  }
  .cap, .rail > li, .cred { break-inside: avoid; page-break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #3a3a3a; word-break: break-all; }
  .link-lead[href^="http"] { display: inline; }
  .link-lead[href^="http"]::after { position: static; background: none; }
  .identity a::after, .c-link[href^="mailto"]::after,
  .case-shot::after, [aria-hidden="true"]::after { content: none; }
}
