/* ============================================================
   liamdcollier.com — stylesheet (rebuild, v3)
   ------------------------------------------------------------
   DESIGN TOKENS

   Palette derivation (from Phase 1 reference analysis):
   - Background `#FBF6EC` — warm paper, sits in Sive's `#fff1e5`
     family but slightly lighter. Personal-site cluster lives on
     the warm-light side (Sive cream, Webb light grey, Kalzumeus
     white). Distinct from Infraxus's dark institutional `#0D0D0D`.
   - Body `#1A1A1A`, headings `#0A0A0A` — near-black,
     high contrast against warm paper.
   - Accent `#1E50FF` — matches Infraxus `--accent` exactly to
     bridge the brand family. Echoes Sive's vivid `#00b`.
   - Highlight `#FFD200` — Pigford-style gold underline for
     personal-emphasis links. Used selectively, not on every link.
   - Muted `#6B6B6B` for meta. Divider `#E8DEC9` (warm-tinted hairline).
   - Status: green `#10B981` Live, amber `#F59E0B` Production,
     cool grey `#71717A` Internal.

   Type derivation:
   - Fraunces variable for display moments (wordmark, identity
     name, eyebrow labels via small caps). Self-hosted.
   - Inter variable for body, navigation, descriptions, all
     systems. Self-hosted.
   - Inter Italic for emphasis. Self-hosted.
   - Optical sizing on every type-bearing element.

   Spacing: 8px base. Modular scale 1.25 for type. ============================================================ */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces.woff2') format('woff2-variations'),
       url('/fonts/Fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter.woff2') format('woff2-variations'),
       url('/fonts/Inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Italic.woff2') format('woff2-variations'),
       url('/fonts/Inter-Italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Metric-matched fallbacks: keep layout stable across font swap. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 107.4%;
  ascent-override: 90%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 99%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  /* Spatial — 8px base */
  --s-1:   8px;
  --s-2:  16px;
  --s-3:  24px;
  --s-4:  32px;
  --s-5:  40px;
  --s-6:  48px;
  --s-8:  64px;
  --s-10: 80px;
  --s-12: 96px;
  --s-16: 128px;

  /* Colour */
  --c-bg:        #FBF6EC;
  --c-body:      #1A1A1A;
  --c-heading:   #0A0A0A;
  --c-accent:    #1E50FF;
  --c-accent-hi: #0033CC;
  --c-highlight: #FFD200;
  --c-muted:     #6B6B6B;
  --c-rule:      #E8DEC9;
  --c-rule-2:    #D9CDB1;
  --c-select:    #FFE680;

  /* Status */
  --c-live:        #10B981;
  --c-production:  #F59E0B;
  --c-internal:    #71717A;
  --c-refining:    #F59E0B;
  --c-indev:       #94A3B8;

  /* Type stacks */
  --f-display: 'Fraunces', 'Fraunces Fallback', Georgia, 'Times New Roman', serif;
  --f-body:    'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --content-max: 760px;
  --identity-max: 880px;
  --gutter:      var(--s-8);
}

/* -------- Reset (minimal) -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, dl, dt, dd, figure, hr { margin: 0; padding: 0; }
ul, ol { list-style: none; }
hr { border: 0; height: 1px; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; }

html {
  background: var(--c-bg);
  color: var(--c-body);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s-12);
}

body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  font-optical-sizing: auto;
  font-feature-settings: "kern" on, "liga" on, "calt" on, "onum" on;
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hanging-punctuation: first allow-end;
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-body);
}

::selection { background: var(--c-select); color: var(--c-body); }

/* -------- Skip link -------- */
.skip {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip:focus, .skip:focus-visible {
  position: fixed;
  top: 16px; left: 16px;
  width: auto; height: auto;
  margin: 0; padding: 8px 16px;
  clip: auto;
  background: var(--c-bg);
  color: var(--c-accent);
  text-decoration: underline;
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  z-index: 100;
  font-family: var(--f-body);
}

/* -------- Layout shell -------- */
.shell {
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell--wide {
  max-width: calc(var(--identity-max) + var(--gutter) * 2);
}

/* ============================================================
   Section 1 — Header bar
   Persistent at top, not sticky.
   Wordmark on left (Fraunces, with gold-highlight underline,
   à la Pigford), nav row on right (Inter, eyebrow scale).
   ============================================================ */

.masthead {
  border-bottom: 1px solid var(--c-rule);
  padding: var(--s-3) 0;
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--c-heading);
  font-variation-settings: "opsz" 20, "SOFT" 50, "WONK" 0, "wght" 500;
  /* Pigford-style gold highlight underline — sets this site's
     personality the moment the page loads. */
  background-image: linear-gradient(180deg, transparent 0 78%, var(--c-highlight) 78% 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 2px;
  transition: background-size 120ms ease;
}
.wordmark:hover {
  background-image: linear-gradient(180deg, transparent 0 70%, var(--c-highlight) 70% 96%, transparent 96%);
}

.primary-nav {
  display: flex;
  gap: var(--s-3);
  font-size: 14px;
  letter-spacing: 0.01em;
}
.primary-nav a {
  color: var(--c-body);
  padding: 6px 0;
  position: relative;
  transition: color 120ms ease-out;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease-out;
}
.primary-nav a:hover { color: var(--c-accent); }
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
}

/* ============================================================
   Section 2 — Identity block
   Two-column on desktop: text + headshot.
   Career arc uses Sive's bracketed-year pattern.
   ============================================================ */

.identity {
  padding: var(--s-12) 0 var(--s-10);
}
.identity__grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--s-6);
  align-items: start;
}
.identity__text {
  min-width: 0;
}
.identity__name {
  font-family: var(--f-display);
  font-weight: 380;
  font-size: clamp(40px, 5.2vw, 60px);
  line-height: 1.05;
  color: var(--c-heading);
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60, "SOFT" 50, "WONK" 0, "wght" 380;
  text-wrap: balance;
  margin-bottom: var(--s-3);
}
.identity__role {
  font-size: 19px;
  line-height: 1.45;
  color: var(--c-body);
  max-width: 50ch;
  text-wrap: pretty;
  margin-bottom: var(--s-5);
}
.identity__role .hi-link {
  color: var(--c-accent);
  background-image: linear-gradient(180deg, transparent 0 78%, var(--c-highlight) 78% 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 2px;
  text-decoration: none;
  transition: background-size 120ms ease, color 120ms ease;
}
.identity__role .hi-link:hover {
  color: var(--c-accent-hi);
  background-image: linear-gradient(180deg, transparent 0 70%, var(--c-highlight) 70% 96%, transparent 96%);
}

.career-arc {
  display: grid;
  row-gap: var(--s-1);
  border-top: 1px solid var(--c-rule);
  padding-top: var(--s-3);
}
.career-arc li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--s-2);
  align-items: baseline;
  font-size: 16px;
  line-height: 1.5;
}
.career-year {
  font-family: var(--f-body);
  color: var(--c-muted);
  font-size: 13px;
  font-feature-settings: "tnum" on, "lnum" on;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.01em;
}
.career-line {
  color: var(--c-body);
}

.identity__photo {
  margin: 0;
}
.identity__photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--c-rule-2);
  background: #fff;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ============================================================
   Section template — eyebrow + title + rule
   The connective tissue across the page (per Phase 5 of spec).
   ============================================================ */

.section {
  padding: var(--s-10) 0;
  border-top: 1px solid var(--c-rule);
}
.section--diagram { padding-top: var(--s-8); padding-bottom: var(--s-8); }
.section--contact { padding-bottom: var(--s-8); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.eyebrow {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-feature-settings: "tnum" on, "lnum" on, "ss01" on;
  white-space: nowrap;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--c-accent);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 3px;
}
.section__title {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--c-heading);
  line-height: 1.2;
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0, "wght" 400;
  text-wrap: balance;
}

/* ============================================================
   Section 3 — Built (systems block)
   Each system is a designed row: name | status pill | description.
   ============================================================ */

.section__intro {
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-body);
  max-width: 64ch;
  text-wrap: pretty;
  margin: 0 0 var(--s-4);
}

.systems {
  display: grid;
  row-gap: var(--s-3);
}
.system {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 6px var(--s-2);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--c-rule);
}
.system:last-child {
  border-bottom: 1px solid var(--c-rule);
}
.system__num {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0.06em;
  font-feature-settings: "tnum" on, "lnum" on;
  padding-top: 5px;
  grid-row: span 2;
}
.system__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.system__name {
  font-family: var(--f-body);
  font-size: 17px;
  font-weight: 500;
  color: var(--c-heading);
  margin: 0;
  letter-spacing: -0.005em;
}
.system__name a {
  color: var(--c-heading);
  text-decoration: none;
  border-bottom: 1px solid var(--c-accent);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.system__name a:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent-hi);
}
.system__url {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--c-muted);
  font-feature-settings: "tnum" on, "lnum" on;
}
.system__desc {
  color: var(--c-body);
  font-size: 16px;
  line-height: 1.55;
  max-width: 70ch;
  text-wrap: pretty;
  margin: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--c-rule-2);
  background: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-body);
  font-feature-settings: "ss01" on;
  white-space: nowrap;
  flex-shrink: 0;
}
.status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-internal);
  flex-shrink: 0;
}
.status--live::before        { background: var(--c-live); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.status--refining::before    { background: var(--c-refining); box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.status--indev::before       { background: transparent; box-shadow: inset 0 0 0 1px var(--c-indev); }

/* ============================================================
   Section 4 — Architecture diagram (inlined SVG)
   ============================================================ */

.diagram { margin: 0; }
.diagram__svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 760;
}
.diagram__scroll {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.diagram__scroll-hint {
  display: none;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 6px 0 0;
  text-align: right;
}
.diagram__svg .diag-b   { stroke: var(--c-body); fill: var(--c-bg); stroke-width: 1.2; }
.diagram__svg .diag-ba  { stroke: var(--c-accent); fill: var(--c-bg); stroke-width: 1.4; }
.diagram__svg .diag-a   { stroke: var(--c-body); fill: none; stroke-width: 1.2; }
.diagram__svg .diag-ad  { stroke: var(--c-body); fill: none; stroke-width: 1; stroke-dasharray: 4 3; }
.diagram__svg .diag-ru  { stroke: var(--c-rule); stroke-width: 1; }
.diagram__svg .diag-ru2 { stroke: var(--c-rule-2); stroke-width: 1; }
.diagram__svg .diag-lbl { font-family: var(--f-body); font-size: 14px; font-weight: 600; fill: var(--c-heading); letter-spacing: -0.005em; }
.diagram__svg .diag-sub { font-family: var(--f-body); font-size: 11px; font-weight: 400; fill: var(--c-muted); }
.diagram__svg .diag-col { font-family: var(--f-body); font-size: 11px; font-weight: 600; fill: var(--c-accent); letter-spacing: 0.18em; }
.diagram__svg .diag-eyb { font-family: var(--f-body); font-size: 11px; font-weight: 600; fill: var(--c-muted); letter-spacing: 0.18em; }
.diagram__svg .diag-num { font-family: var(--f-body); font-size: 10px; font-weight: 600; fill: var(--c-muted); }
.diagram__svg .diag-live { fill: var(--c-live); }
.diagram__svg .diag-prod { fill: var(--c-production); }
.diagram figcaption {
  margin-top: var(--s-3);
  text-align: center;
  font-family: var(--f-body);
  font-size: 13px;
  font-style: italic;
  color: var(--c-muted);
}

/* ============================================================
   Section 5 — Questions
   Italic body, custom marker, indented.
   ============================================================ */

.questions {
  display: grid;
  row-gap: var(--s-2);
  max-width: 64ch;
}
.questions li {
  position: relative;
  padding-left: 28px;
  font-style: italic;
  color: var(--c-body);
  text-wrap: pretty;
}
.questions li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--c-accent);
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.55;
  font-family: var(--f-body);
}

/* ============================================================
   Section 6 — Background (definition list)
   Two-column grid on desktop, stacked on mobile.
   ============================================================ */

.bg-list {
  display: grid;
  row-gap: var(--s-3);
}
.bg-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-2) var(--s-3);
  padding: var(--s-3) 0;
  border-top: 1px solid var(--c-rule);
  align-items: baseline;
}
.bg-row:last-child {
  border-bottom: 1px solid var(--c-rule);
}
.bg-row dt {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-heading);
  letter-spacing: 0.01em;
  font-feature-settings: "tnum" on, "lnum" on;
  font-variant-numeric: tabular-nums lining-nums;
}
.bg-row dt .bg-place {
  display: block;
  color: var(--c-heading);
}
.bg-row dt .bg-date {
  display: block;
  color: var(--c-muted);
  margin-top: 2px;
  font-weight: 400;
}
.bg-row dd {
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-body);
  text-wrap: pretty;
  max-width: 64ch;
}

/* ------------------------------------------------------------
   Career operating-mode diagram (inlined SVG above the bg-list).
   Same visual register as the architecture diagram; uses the
   page's existing palette and type tokens. Mode bands run
   horizontally; era blocks step up across time.
   ------------------------------------------------------------ */

.career-diagram { margin: 0; }
.section--background .section__head { margin-bottom: var(--s-8); }
.section--background .career-diagram { margin-bottom: var(--s-4); }
.section--background .bg-list { margin-top: var(--s-4); row-gap: 0; }
.section--background .bg-row { padding: 18px 0; }

.career-diagram__scroll {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.career-diagram__svg {
  display: block;
  width: 100%;
  height: auto;
}
.career-diagram__svg--desktop {
  aspect-ratio: 1280 / 400;
}
.career-diagram__svg--mobile {
  display: none;
  aspect-ratio: 327 / 450;
  max-width: 440px;
  margin: var(--s-3) auto 0;
}
.career-diagram__svg .cd-eyb       { font-family: var(--f-body); font-size: 11px; font-weight: 600; fill: var(--c-muted); letter-spacing: 0.18em; font-feature-settings: "tnum" on, "lnum" on, "ss01" on; }
.career-diagram__svg .cd-eyb-rule  { stroke: var(--c-rule);   stroke-width: 1; fill: none; }
.career-diagram__svg .cd-band      { stroke: var(--c-rule);   stroke-width: 0.5; fill: none; }
.career-diagram__svg .cd-mode      { font-family: var(--f-body); font-size: 11px; font-weight: 500; fill: var(--c-muted); letter-spacing: -0.005em; }
.career-diagram__svg .cd-axis-rule { stroke: var(--c-rule-2); stroke-width: 1; fill: none; }
.career-diagram__svg .cd-tick      { stroke: var(--c-body);   stroke-width: 1; }
.career-diagram__svg .cd-year      { font-family: var(--f-body); font-size: 11px; font-weight: 400; fill: var(--c-muted); font-feature-settings: "tnum" on, "lnum" on; }
.career-diagram__svg .cd-era       { stroke: var(--c-body);   stroke-width: 1.2; fill: var(--c-bg); }
.career-diagram__svg .cd-trans     { stroke: var(--c-body);   stroke-width: 1.2; fill: none; }
.career-diagram__svg .cd-ongoing   { stroke: var(--c-body);   stroke-width: 1.2; stroke-dasharray: 3 3; fill: none; }
.career-diagram__svg .cd-annot     { font-family: var(--f-body); font-size: 11px; font-weight: 500; fill: var(--c-body); font-feature-settings: "tnum" on, "lnum" on; letter-spacing: 0.005em; }
.career-diagram__svg .cd-annot2    { font-family: var(--f-body); font-size: 10px; font-style: italic; fill: var(--c-muted); font-feature-settings: "tnum" on, "lnum" on; }
.career-diagram__svg .cd-mde-dot   { fill: var(--c-muted); }
.career-diagram__svg .cd-mde-leader{ stroke: var(--c-muted);  stroke-width: 0.5; fill: none; }
.career-diagram__svg .cd-mde-text  { font-family: var(--f-body); font-size: 10px; font-style: italic; fill: var(--c-muted); }

/* Build-in animation — plays once on first IntersectionObserver hit.
   Defaults render fully visible (end state) so no-JS / no-IO clients
   are unaffected. JS adds .career-diagram--prepared on script run
   (hides animatable elements) then .career-diagram--play on first
   intersection (triggers the staggered reveal). */
.career-diagram--prepared:not(.career-diagram--play) .cd-band,
.career-diagram--prepared:not(.career-diagram--play) .cd-mode,
.career-diagram--prepared:not(.career-diagram--play) .cd-axis-rule,
.career-diagram--prepared:not(.career-diagram--play) .cd-tick,
.career-diagram--prepared:not(.career-diagram--play) .cd-year,
.career-diagram--prepared:not(.career-diagram--play) .cd-era,
.career-diagram--prepared:not(.career-diagram--play) .cd-trans,
.career-diagram--prepared:not(.career-diagram--play) .cd-annot,
.career-diagram--prepared:not(.career-diagram--play) .cd-annot2,
.career-diagram--prepared:not(.career-diagram--play) .cd-mde { opacity: 0; }

.career-diagram--prepared:not(.career-diagram--play) .cd-band,
.career-diagram--prepared:not(.career-diagram--play) .cd-axis-rule {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
.career-diagram--prepared:not(.career-diagram--play) .cd-trans {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}
.career-diagram--prepared:not(.career-diagram--play) .cd-era {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

/* Desktop animation timeline — applies at viewport ≥ 768px so the
   mobile SVG (which shares cd-era-N class names) doesn't inherit
   desktop pacing. */
@media (min-width: 768px) {
  /* Phase 1 (0.0–0.30s): structural axis + bands */
  .career-diagram--play .cd-mode      { animation: cd-fade 0.30s ease-out 0.00s both; }
  .career-diagram--play .cd-band      { animation: cd-fade 0.20s ease-out 0.00s both, cd-line-draw 0.40s ease-out 0.00s both; }
  .career-diagram--play .cd-axis-rule { animation: cd-fade 0.20s ease-out 0.00s both, cd-line-draw 0.40s ease-out 0.00s both; }
  .career-diagram--play .cd-tick      { animation: cd-fade 0.20s ease-out calc(0.05s + var(--i, 0) * 0.018s) both; }
  .career-diagram--play .cd-year      { animation: cd-fade 0.20s ease-out calc(0.07s + var(--i, 0) * 0.018s) both; }

  /* Era 1 — Student (0.20–0.45s) */
  .career-diagram--play .cd-era-1      { animation: cd-fade 0.25s ease-out 0.20s both, cd-block-draw 0.35s ease-out 0.20s both; }
  .career-diagram--play .cd-annot.cd-annot-1,
  .career-diagram--play .cd-annot2.cd-annot-1 { animation: cd-fade 0.20s ease-out 0.40s both; }
  .career-diagram--play .cd-trans-1    { animation: cd-fade 0.08s ease-out 0.50s both, cd-line-draw 0.08s ease-out 0.50s both; }

  /* Era 2 — Employee (0.55–0.80s) */
  .career-diagram--play .cd-era-2      { animation: cd-fade 0.25s ease-out 0.55s both, cd-block-draw 0.35s ease-out 0.55s both; }
  .career-diagram--play .cd-annot.cd-annot-2,
  .career-diagram--play .cd-annot2.cd-annot-2 { animation: cd-fade 0.20s ease-out 0.75s both; }
  .career-diagram--play .cd-trans-2    { animation: cd-fade 0.08s ease-out 0.85s both, cd-line-draw 0.08s ease-out 0.85s both; }

  /* Era 3 — Remote contractor (0.90–1.15s) */
  .career-diagram--play .cd-era-3      { animation: cd-fade 0.25s ease-out 0.90s both, cd-block-draw 0.35s ease-out 0.90s both; }
  .career-diagram--play .cd-annot.cd-annot-3,
  .career-diagram--play .cd-annot2.cd-annot-3 { animation: cd-fade 0.20s ease-out 1.10s both; }
  .career-diagram--play .cd-trans-3    { animation: cd-fade 0.08s ease-out 1.20s both, cd-line-draw 0.08s ease-out 1.20s both; }

  /* Era 4 — In-house operator (1.25–1.50s) */
  .career-diagram--play .cd-era-4      { animation: cd-fade 0.25s ease-out 1.25s both, cd-block-draw 0.35s ease-out 1.25s both; }
  .career-diagram--play .cd-annot.cd-annot-4,
  .career-diagram--play .cd-annot2.cd-annot-4 { animation: cd-fade 0.20s ease-out 1.45s both; }
  .career-diagram--play .cd-trans-4    { animation: cd-fade 0.08s ease-out 1.55s both, cd-line-draw 0.08s ease-out 1.55s both; }

  /* Era 5 — Founder NYC (1.60–1.85s) */
  .career-diagram--play .cd-era-5      { animation: cd-fade 0.25s ease-out 1.60s both, cd-block-draw 0.35s ease-out 1.60s both; }
  .career-diagram--play .cd-annot.cd-annot-5,
  .career-diagram--play .cd-annot2.cd-annot-5 { animation: cd-fade 0.20s ease-out 1.80s both; }

  /* Era 6 — Founder MEL/MDE (2.00–2.35s, no transition — same band as era 5,
     small pause after era 5 lands so the two Founder eras read sequentially). */
  .career-diagram--play .cd-era-6      { animation: cd-fade 0.25s ease-out 2.00s both, cd-block-draw 0.35s ease-out 2.00s both; }
  .career-diagram--play .cd-annot.cd-annot-6,
  .career-diagram--play .cd-annot2.cd-annot-6 { animation: cd-fade 0.20s ease-out 2.20s both; }

  /* Medellín pin drop (2.35–2.70s) */
  .career-diagram--play .cd-mde { animation: cd-mde-drop 0.35s ease-out 2.35s both; }
}

/* Mobile layout — vertical staircase below 768px.
   The desktop scroll wrapper is hidden; the mobile SVG takes its place.
   Mode labels become full-weight near-black (left axis treatment).
   Animation re-specified for top-down vertical sequencing. */
@media (max-width: 767.98px) {
  .career-diagram__scroll { display: none; }
  .career-diagram__svg--mobile { display: block; }
  .career-diagram__svg--mobile .cd-mode { font-weight: 400; fill: var(--c-body); }

  /* Mode labels fade in 0.00–0.15s (all five at once) */
  .career-diagram--play .cd-mode      { animation: cd-fade 0.15s ease-out 0.00s both; }

  /* Era 1 — Student (0.15–0.50s): block draws, annotations fade */
  .career-diagram--play .cd-era-1      { animation: cd-fade 0.25s ease-out 0.15s both, cd-block-draw 0.35s ease-out 0.15s both; }
  .career-diagram--play .cd-annot.cd-annot-1,
  .career-diagram--play .cd-annot2.cd-annot-1,
  .career-diagram--play .cd-year-1     { animation: cd-fade 0.20s ease-out 0.30s both; }

  /* Era 2 — Employee (0.55–0.90s) */
  .career-diagram--play .cd-era-2      { animation: cd-fade 0.25s ease-out 0.55s both, cd-block-draw 0.35s ease-out 0.55s both; }
  .career-diagram--play .cd-annot.cd-annot-2,
  .career-diagram--play .cd-annot2.cd-annot-2,
  .career-diagram--play .cd-year-2     { animation: cd-fade 0.20s ease-out 0.70s both; }

  /* Era 3 — Remote contractor (0.95–1.30s) */
  .career-diagram--play .cd-era-3      { animation: cd-fade 0.25s ease-out 0.95s both, cd-block-draw 0.35s ease-out 0.95s both; }
  .career-diagram--play .cd-annot.cd-annot-3,
  .career-diagram--play .cd-annot2.cd-annot-3,
  .career-diagram--play .cd-year-3     { animation: cd-fade 0.20s ease-out 1.10s both; }

  /* Era 4 — In-house operator (1.35–1.70s) */
  .career-diagram--play .cd-era-4      { animation: cd-fade 0.25s ease-out 1.35s both, cd-block-draw 0.35s ease-out 1.35s both; }
  .career-diagram--play .cd-annot.cd-annot-4,
  .career-diagram--play .cd-annot2.cd-annot-4,
  .career-diagram--play .cd-year-4     { animation: cd-fade 0.20s ease-out 1.50s both; }

  /* Era 5 — Founder NYC (1.75–2.10s) */
  .career-diagram--play .cd-era-5      { animation: cd-fade 0.25s ease-out 1.75s both, cd-block-draw 0.35s ease-out 1.75s both; }
  .career-diagram--play .cd-annot.cd-annot-5,
  .career-diagram--play .cd-annot2.cd-annot-5,
  .career-diagram--play .cd-year-5     { animation: cd-fade 0.20s ease-out 1.90s both; }

  /* Era 6 — Founder MEL/MDE (2.15–2.45s, smaller — same mode level) */
  .career-diagram--play .cd-era-6      { animation: cd-fade 0.20s ease-out 2.15s both, cd-block-draw 0.30s ease-out 2.15s both; }
  .career-diagram--play .cd-annot.cd-annot-6,
  .career-diagram--play .cd-annot2.cd-annot-6,
  .career-diagram--play .cd-year-6     { animation: cd-fade 0.18s ease-out 2.27s both; }

  /* Medellín pin drop (2.50–2.65s, attached to Student era) */
  .career-diagram--play .cd-mde        { animation: cd-mde-drop 0.20s ease-out 2.50s both; }
}

@keyframes cd-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cd-line-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes cd-block-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes cd-mde-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .career-diagram--prepared .cd-band,
  .career-diagram--prepared .cd-mode,
  .career-diagram--prepared .cd-axis-rule,
  .career-diagram--prepared .cd-tick,
  .career-diagram--prepared .cd-year,
  .career-diagram--prepared .cd-era,
  .career-diagram--prepared .cd-trans,
  .career-diagram--prepared .cd-annot,
  .career-diagram--prepared .cd-annot2,
  .career-diagram--prepared .cd-mde { opacity: 1; }
  .career-diagram--prepared .cd-band,
  .career-diagram--prepared .cd-axis-rule,
  .career-diagram--prepared .cd-trans { stroke-dasharray: none; stroke-dashoffset: 0; }
  .career-diagram--play * { animation: none !important; }
}

.career-diagram figcaption {
  margin-top: var(--s-3);
  text-align: center;
  font-family: var(--f-body);
  font-size: 13px;
  font-style: italic;
  color: var(--c-muted);
}

/* ============================================================
   Section 7 — Detail (three single-line facts)
   ============================================================ */

.detail-list {
  display: grid;
  row-gap: var(--s-3);
  font-size: 16px;
  max-width: 70ch;
}
.detail-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: var(--s-3);
  align-items: baseline;
  border-top: 1px solid var(--c-rule);
  padding-top: var(--s-2);
  color: var(--c-body);
  text-wrap: pretty;
}
.detail-list li:last-child {
  border-bottom: 1px solid var(--c-rule);
  padding-bottom: var(--s-2);
}
.detail__tag {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-accent);
}
.detail__fact { display: block; }

/* ============================================================
   Section 8 — Contact
   ============================================================ */

.contact-email {
  font-family: var(--f-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
  margin-bottom: var(--s-3);
  font-variation-settings: "opsz" 28, "SOFT" 50, "WONK" 0, "wght" 400;
}
.contact-email a {
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-accent);
  padding-bottom: 2px;
  transition: color 120ms ease, border-bottom-width 120ms ease;
}
.contact-email a:hover {
  color: var(--c-accent-hi);
  border-bottom: 2px solid var(--c-accent-hi);
}
.contact-elsewhere {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  font-size: 14px;
  color: var(--c-muted);
}
.contact-elsewhere li::before {
  content: "→";
  color: var(--c-accent);
  margin-right: 8px;
}
.contact-elsewhere a {
  color: var(--c-body);
  border-bottom: 1px solid var(--c-rule-2);
  padding-bottom: 2px;
  transition: color 120ms ease, border-bottom-color 120ms ease;
}
.contact-elsewhere a:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ============================================================
   Section 9 — Footer
   ============================================================ */

.footer {
  padding: var(--s-8) 0 var(--s-6);
}
.footer hr {
  background: var(--c-rule);
  margin-bottom: var(--s-3);
}
.footer__line {
  font-size: 13px;
  color: var(--c-muted);
  font-family: var(--f-body);
}
.footer__line + .footer__line { margin-top: 4px; }

/* ============================================================
   Inline link defaults — inside body content
   Section/row-specific links override this.
   ============================================================ */

main a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease;
}
main a:hover { color: var(--c-accent-hi); text-decoration-thickness: 2px; }
main a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 1px; }

/* Wordmark / nav / status / system_name / contact links handled above
   override the underline default cleanly. */
.wordmark, .primary-nav a, .system__name a, .career-line a,
.status, .contact-email a, .contact-elsewhere a {
  text-decoration: none;
}

/* ============================================================
   Mobile (≤ 720px)
   ============================================================ */

@media (max-width: 720px) {
  :root { --gutter: var(--s-3); }

  body { font-size: 17px; }

  .masthead {
    padding: var(--s-2) 0;
  }
  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
  }
  .primary-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-3);
  }
  .primary-nav a { padding: 8px 0; min-height: 32px; display: inline-flex; align-items: center; }

  .identity { padding: var(--s-8) 0 var(--s-8); }
  .identity__grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .identity__photo { order: -1; max-width: 180px; }
  .identity__name { font-size: 36px; }

  .career-arc li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .career-year { font-size: 12px; }

  .section { padding: var(--s-8) 0; }
  .section__head { gap: var(--s-2); margin-bottom: var(--s-4); }
  .section__title { font-size: 22px; }

  .system { padding: var(--s-2) 0; grid-template-columns: 28px 1fr; }
  .system__name { font-size: 16px; }
  .system__num { font-size: 10px; padding-top: 3px; }

  .bg-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: var(--s-2) 0;
  }

  .detail-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .questions li { font-size: 16px; }

  .diagram__scroll { padding-bottom: 4px; }
  .diagram__scroll .diagram__svg {
    width: 760px;
    max-width: none;
    aspect-ratio: 1280 / 720;
    height: auto;
  }
  .diagram__scroll-hint { display: block; }

  .section--background .section__head { margin-bottom: var(--s-6); }
  .section--background .career-diagram { margin-bottom: var(--s-6); }
  .section--background .bg-list { margin-top: var(--s-6); }
  .section--background .bg-row { padding: var(--s-2) 0; }
  /* Mobile career-diagram horizontal scroll fallback removed — replaced
     by the dedicated vertical mobile SVG handled in the 768px block. */
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}

/* ============================================================
   Caps fallback for browsers without font-variant-caps
   ============================================================ */
@supports not (font-variant-caps: all-small-caps) {
  .eyebrow, .status { font-size: 10px; }
}
