/* ==========================================================================
   Victor C. Aguirre — portfolio stylesheet
   Structure: 1 fonts · 2 tokens · 3 base · 4 utilities · 5 chrome · 6 hero
   7 impact · 8 work · 9 videos · 10 projects · 11 about · 12 footer
   13 contact page · 14 motion · 15 print
   ========================================================================== */

/* 1 — Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: InstrumentSerif;
  src: url('assets/instrument-serif-regular.woff2') format('woff2'),
       url('assets/instrument-serif-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('assets/manrope-regular.woff2') format('woff2'),
       url('assets/manrope-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('assets/manrope-semibold.woff2') format('woff2'),
       url('assets/manrope-semibold.ttf') format('truetype');
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url('assets/plex-mono.woff2') format('woff2'),
       url('assets/plex-mono.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* 2 — Design tokens -------------------------------------------------------- */

:root {
  /* Surfaces and ink */
  --paper: #f4f5f6;
  --paper-sunken: #e9ebef;
  --paper-raised: #ffffff;
  --ink: #17191c;
  --ink-soft: #2b2f35;
  --muted: #5f646d;
  --line: #cdd0d5;
  --line-strong: #b4b9c2;
  /* Borders that carry meaning — form fields, outline buttons — need 3:1
     against both the page and their own fill (WCAG 1.4.11). --line-strong is
     decorative only and does not meet that. */
  --border-strong: #7d838e;

  /* Accent */
  --blue: #2449f2;
  --blue-deep: #1b37bd;
  --blue-pale: #dde3ff;
  --blue-light: #93a8ff;

  /* On dark surfaces */
  --on-dark: #f1f2f4;
  --on-dark-muted: #b7bcc6;
  --on-dark-line: #3d414a;

  /* Type scale */
  --font-sans: Manrope, 'Segoe UI', Arial, sans-serif;
  --font-serif: InstrumentSerif, Georgia, 'Times New Roman', serif;
  --font-mono: Plex, 'SFMono-Regular', Consolas, monospace;
  --step-display: clamp(3.1rem, 8.2vw, 7.4rem);
  --step-h2: clamp(2.1rem, 4.2vw, 4rem);
  --step-h3: clamp(1.75rem, 3vw, 2.9rem);
  --step-h4: clamp(1.25rem, 1.8vw, 1.6rem);
  --step-lead: clamp(1.0625rem, 1.25vw, 1.25rem);
  --step-body: 1.0625rem;
  --step-small: 0.9375rem;
  --step-micro: 0.8125rem;

  /* Rhythm */
  --gutter: clamp(20px, 4.4vw, 80px);
  --section-y: clamp(64px, 8vw, 116px);
  --block-y: clamp(38px, 4.6vw, 68px);
  --measure: 62ch;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.3s;

  --header-h: 84px;
}

/* 3 — Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* rem, not px, so the reader's own default font size is honoured. */
  font: 400 1rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

@media (min-width: 1200px) { body { font-size: 1.0625rem; } }

::selection { background: var(--blue); color: #fff; }

h1, h2, h3, h4, h5, p, figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }

em {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.055em;
}

a { color: inherit; text-decoration: none; }
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; cursor: pointer; }
a, button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
  border-radius: 2px;
}
.contact-section :focus-visible { outline-color: var(--blue-light); }

/* 4 — Utilities ------------------------------------------------------------ */

.section-wrap {
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono, .eyebrow, .header-descriptor {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
}
.eyebrow { display: block; color: var(--muted); text-transform: uppercase; text-wrap: balance; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Underlined inline link with a travelling arrow */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.4;
  padding: 6px 0;
  border-bottom: 1px solid currentColor;
  transition: color var(--speed);
}
.text-link .arrow { transition: transform var(--speed) var(--ease); }
.text-link:hover { color: var(--blue); }
.text-link:hover .arrow { transform: translate(3px, -3px); }
.text-link .mono { color: var(--muted); font-weight: 400; }
.text-link:hover .mono { color: inherit; }

/* Solid and outline buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step-small);
  font-weight: 600;
  line-height: 1.3;
  transition: background var(--speed), color var(--speed), border-color var(--speed), transform var(--speed) var(--ease);
}
.button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.button:active { transform: translateY(1px); }
.button--ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.button--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button--light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--ink); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 72px);
  margin-bottom: var(--block-y);
}
.section-heading .eyebrow { padding-top: 0.6em; }
h2 { font-size: var(--step-h2); }
h2 em { font-size: 1.12em; }
h3 { font-size: var(--step-h3); }

.source-note {
  font-size: var(--step-micro);
  line-height: 1.7;
  color: var(--muted);
  margin-top: 14px;
  max-width: var(--measure);
}

/* 5 — Page chrome: skip link, progress, header, nav ------------------------ */

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 120;
  padding: 12px 20px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 14px; }

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--blue);
  z-index: 60;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(4px)) { .site-header { background: var(--paper); } }

.header-inner {
  max-width: 1680px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
}

.wordmark {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 3.3vw, 3.1rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  padding: 2px 0 6px;
  font-kerning: normal;
  font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1;
  transition: color var(--speed);
}
.wordmark:hover { color: var(--blue); }

.header-descriptor { color: var(--muted); margin-inline: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.7vw, 26px);
  margin-left: auto;
}
.site-nav a {
  position: relative;
  font-size: var(--step-small);
  font-weight: 600;
  padding: 8px 0;
  white-space: nowrap;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed);
}
/* [aria-current] covers both the scroll spy's "true" and a page link's "page" */
.site-nav a:hover::after,
.site-nav a[aria-current]::after { transform: scaleX(1); }
.site-nav a[aria-current] { color: var(--blue); }
.site-nav .nav-external .arrow { margin-left: 5px; }
.site-nav .button { margin-left: 4px; }
.site-nav .button::after { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 600;
}
.nav-toggle .bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle .bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--speed) var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 1100px) {
  .header-descriptor { display: none; }

  /* Baseline, and what a visitor without JavaScript gets: the nav drops onto
     its own full-width row as a stacked list. It must never stay a nowrap
     row here — at phone widths that pushes the whole document sideways. */
  .header-inner { flex-wrap: wrap; }
  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0 0 12px;
  }
  /* :not(.button) so the pill keeps all four of its own borders — a blanket
     border-top on every nav link would strip the top edge off the outline
     button and leave it looking cut open. */
  .site-nav a:not(.button) {
    padding: 15px 2px;
    border-top: 1px solid var(--line);
    font-size: 1rem;
  }
  .site-nav a::after { display: none; }
  .site-nav .button { margin: 16px 0 0; justify-content: center; }

  /* Enhanced: once app.js sets data-nav, the same list becomes a dropdown
     behind the Menu button. */
  .site-header[data-nav] .nav-toggle:not([hidden]) { display: inline-flex; }
  .site-header[data-nav] .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(23, 25, 28, 0.5);
  }
  .site-header[data-nav="closed"] .site-nav { display: none; }
}

/* 6 — Hero ----------------------------------------------------------------- */

.hero {
  padding-top: clamp(26px, 3.4vw, 46px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.hero-meta strong { color: var(--ink); font-weight: 400; letter-spacing: 0.05em; }
.hero-meta .local-time { margin-left: 12px; }

h1 {
  font-size: var(--step-display);
  letter-spacing: -0.062em;
  line-height: 0.98;
  margin: clamp(24px, 3vw, 40px) 0 clamp(26px, 3.2vw, 44px);
}
.title-line { display: block; }
h1 em { color: var(--blue); font-size: 1.1em; line-height: 0.88; letter-spacing: -0.06em; }

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 4.4vw, 72px);
  align-items: center;
}

.hero-intro { display: flex; flex-direction: column; align-items: flex-start; }
.hero-bio { max-width: 52ch; margin: 18px 0 26px; }
.hero-bio p { font-size: var(--step-body); line-height: 1.72; }
.hero-bio p + p { margin-top: 15px; color: var(--muted); }
.hero-bio strong { font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }

/* Blue statistic panel with the 200-cell canvas */
.data-art {
  background: var(--blue);
  color: #fff;
  padding: clamp(18px, 2vw, 26px);
  position: relative;
  overflow: hidden;
}
.data-art-top { display: flex; justify-content: space-between; gap: 12px; color: var(--blue-pale); }
.data-art-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
  margin: 16px 0;
}
.hero-stat strong {
  display: block;
  font-size: clamp(3rem, 5.2vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hero-stat strong span { font-size: 0.5em; vertical-align: top; line-height: 1.4; }
.hero-stat > span { display: block; font-size: var(--step-small); line-height: 1.5; margin-top: 8px; color: var(--blue-pale); }
#video-grid { width: 100%; height: 150px; }
.data-art figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  padding-top: 12px;
  color: var(--blue-pale);
}
.diagram-mark { font-size: 20px; line-height: 1; }

/* Marquee strip between hero and first section */
.process-strip {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 16px 0;
}
.process-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 46s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.process-track b { font-weight: 400; color: var(--blue); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 6b — Multi-page chrome ---------------------------------------------------- */

/* A section heading promoted to <h1> on its own page. Without this it would
   inherit the hero's display size, which is far too large here. */
.section-title {
  font-size: var(--step-h2);
  letter-spacing: -0.06em;
  line-height: 1.07;
  margin: 0;
  animation: none;
}
.section-title em { font-size: 1.12em; }

/* Inner pages have no hero, so the first section needs a little air under
   the sticky header. */
.inner-page > section:first-of-type { padding-top: clamp(26px, 3.6vw, 52px); }

/* Home page: the four routes into the site */
.explore { padding-block: var(--block-y) var(--section-y); }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.explore-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
  padding: clamp(22px, 2.6vw, 34px);
  transition: background var(--speed);
}
.explore-card:hover { background: var(--paper-sunken); }
.explore-card > .mono { color: var(--muted); }
.explore-card h3 { font-size: var(--step-h4); }
/* Running prose sits at 1rem, not --step-small (15px). The token stays where it
   belongs — labels, meta lines, captions — but anything a visitor actually
   reads a sentence of should not be under 16px on a phone. */
.explore-card p { font-size: 1rem; line-height: 1.7; color: var(--muted); flex: 1; }
.explore-card .text-link { border-bottom: 0; padding: 0; margin-top: 6px; }
.explore-card:hover .text-link { color: var(--blue); }
.explore-card:hover .text-link .arrow { transform: translate(4px, 0); }

/* Previous / next, so the site can be read straight through */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(26px, 3.2vw, 46px);
  border-top: 1px solid var(--line);
}
.pager a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--step-small);
  font-weight: 600;
  padding: 10px 0;
  transition: color var(--speed);
}
.pager a:hover { color: var(--blue); }
.pager .eyebrow { display: block; margin-bottom: 1px; }
.pager-next { margin-left: auto; text-align: right; }
.pager .arrow { transition: transform var(--speed) var(--ease); font-size: 1.1em; }
.pager-prev:hover .arrow { transform: translateX(-4px); }
.pager-next:hover .arrow { transform: translateX(4px); }

@media (max-width: 560px) {
  .pager { flex-direction: column; align-items: stretch; gap: 4px; }
  .pager-next { margin-left: 0; text-align: left; flex-direction: row-reverse; justify-content: flex-end; }
}

/* 7 — Impact: Black Belt and Green Belt ------------------------------------ */

.impact-section {
  padding-block: var(--section-y);
  border-bottom: 1px solid var(--line);
}
.impact-section > .section-heading { margin-bottom: 24px; }
.impact-intro { max-width: var(--measure); font-size: var(--step-lead); line-height: 1.7; color: var(--muted); margin-bottom: clamp(30px, 3.4vw, 46px); }

.impact-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--blue);
  color: #fff;
  padding: clamp(24px, 2.6vw, 36px);
  margin-bottom: var(--block-y);
}
.impact-scoreboard > div { padding-inline: clamp(16px, 2vw, 30px); border-left: 1px solid rgba(255, 255, 255, 0.3); min-width: 0; }
.impact-scoreboard > div:first-child { border-left: 0; padding-left: 0; }
.impact-scoreboard > div:last-child { padding-right: 0; }
.impact-scoreboard .eyebrow { color: var(--blue-pale); }
.impact-scoreboard strong {
  display: block;
  font-size: clamp(2.8rem, 5.4vw, 5.6rem);
  line-height: 1.08;
  letter-spacing: -0.065em;
  font-weight: 500;
  margin: 14px 0 10px;
  font-variant-numeric: tabular-nums;
}
.impact-scoreboard strong > span { font-size: 0.36em; letter-spacing: -0.02em; margin-left: 4px; }
.impact-scoreboard p { font-size: 1rem; line-height: 1.65; color: #e7ecff; }

/* Case article: topline · summary rail · evidence */
.impact-case { border-top: 2px solid var(--ink); padding-top: 18px; }
.impact-case + .impact-case { margin-top: var(--block-y); }

.work-topline {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 22px;
  color: var(--muted);
}

.impact-case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(28px, 3.6vw, 58px);
  align-items: start;
  margin-top: 30px;
}
/* These section titles are <h2> so the pages run h1 → h2 → h3 with no gap, but
   they keep the h3 type size — the level is about the document outline, not how
   loud the heading looks. */
.work-copy h2, .impact-case-copy h2 { font-size: var(--step-h3); }
.impact-case-copy h2 { margin-bottom: 22px; }
.impact-case-copy p { font-size: var(--step-body); line-height: 1.75; color: var(--muted); max-width: 52ch; margin-top: 15px; }
.impact-case-copy p strong { color: var(--ink); font-weight: 600; }
.impact-case-copy .text-link { margin-top: 24px; }

/* Structured facts: context / role / evidence / result */
.case-facts { margin: 26px 0 0; border-top: 1px solid var(--line); }
.case-facts > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 10px 26px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.case-facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.case-facts dd { margin: 0; font-size: var(--step-small); line-height: 1.7; }
.case-facts dd strong { font-weight: 600; }

.cycle-comparison { background: var(--ink); color: var(--on-dark); padding: clamp(22px, 2.4vw, 32px); }
.cycle-comparison figcaption { padding-bottom: 24px; border-bottom: 1px solid var(--on-dark-line); margin-bottom: 22px; }
.cycle-comparison figcaption > .eyebrow { color: #d2d7e0; }
.cycle-comparison figcaption > .mono { display: block; color: var(--on-dark-muted); margin-top: 7px; }
.cycle-row { margin-top: 22px; }
.cycle-row-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 9px;
  font-size: var(--step-small);
  color: #d2d7e0;
}
.cycle-row-label strong { font-size: 1.4rem; font-weight: 500; letter-spacing: -0.035em; color: #fff; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cycle-row-label small { font-size: 0.8125rem; color: var(--on-dark-muted); font-weight: 400; }
.cycle-track { height: 13px; background: #31363f; overflow: hidden; }
.cycle-fill { display: block; width: var(--bar-size); height: 100%; }
.before-fill { background: #848f9f; }
.target-fill { border: 1px dashed #c4cbd8; background: transparent; }
.after-fill { background: var(--blue-light); }
.target-row .cycle-track { height: 9px; background: transparent; }
.cycle-chart-footnote {
  font-size: 0.75rem;
  line-height: 1.8;
  color: var(--on-dark-muted);
  border-top: 1px solid var(--on-dark-line);
  margin-top: 26px;
  padding-top: 16px;
}

.delay-breakdown { border: 1px solid var(--line); background: var(--paper-raised); padding: clamp(20px, 2.2vw, 28px); }
.delay-breakdown figcaption > strong {
  display: block;
  font-size: clamp(2.8rem, 4.4vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1.08;
  margin-top: 14px;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.delay-breakdown figcaption > strong span { font-size: 0.46em; letter-spacing: -0.02em; }
.delay-breakdown figcaption > p { font-size: 1rem; color: var(--muted); margin-top: 8px; }
.delay-stack { display: flex; height: 16px; margin: 22px 0 18px; }
.delay-stack > span:nth-child(1) { background: var(--blue); }
.delay-stack > span:nth-child(2) { background: #5468d6; }
.delay-stack > span:nth-child(3) { background: #8fa1ec; }
.delay-stack > span:nth-child(4) { background: #dfe3ea; }

.delay-table { width: 100%; border-collapse: collapse; font-size: var(--step-small); line-height: 1.6; }
.delay-table thead th { font: 400 0.75rem/1.5 var(--font-mono); letter-spacing: 0.05em; color: var(--muted); padding-bottom: 10px; text-align: left; }
.delay-table th { text-align: left; font-weight: 400; }
.delay-table th:not(:first-child), .delay-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delay-table tbody th, .delay-table tbody td { border-top: 1px solid #dde1e8; padding: 12px 0; }
.delay-table tbody th { padding-right: 16px; font-weight: 400; }
.delay-table td:last-child, .delay-table th:last-child { padding-left: 14px; }

/* 8 — Work: storytelling and printing operations --------------------------- */

.work-section { padding-block: var(--section-y); }
.work-item { border-top: 2px solid var(--ink); padding-top: 18px; }
.work-item + .work-item { margin-top: var(--block-y); }

.work-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 70px);
  align-items: end;
  padding: 28px 0;
}
.work-copy p { font-size: var(--step-body); line-height: 1.7; color: var(--muted); max-width: 48ch; }

.work-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  padding: 22px 0;
}
.work-proof > div { padding-left: clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.work-proof > div:first-child { padding-left: 0; border-left: 0; }
.work-proof strong {
  display: block;
  font-size: clamp(1.9rem, 3.6vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.06em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.work-proof span { display: block; font-size: var(--step-micro); color: var(--muted); margin-top: 4px; }

.operations-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 3.6vw, 56px);
  background: var(--ink);
  color: var(--on-dark);
  padding: clamp(26px, 3vw, 42px);
  margin-bottom: 26px;
}
.operations-metric > .eyebrow { color: var(--on-dark-muted); max-width: 26ch; }
.operations-metric strong {
  display: block;
  font-size: clamp(3.6rem, 7vw, 7.4rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.07em;
  margin: 20px 0 8px;
  font-variant-numeric: tabular-nums;
}
.operations-metric strong span { font-size: 0.5em; vertical-align: top; line-height: 1.5; color: var(--blue-light); }
.operations-unit { font-size: var(--step-small); color: var(--on-dark-muted); }
.operations-flow { display: flex; flex-direction: column; justify-content: center; }
.operations-flow > .eyebrow { color: var(--on-dark-muted); }
.operations-flow ol { list-style: none; margin: 16px 0 22px; padding: 0; }
.operations-flow li {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--on-dark-line);
  padding: 13px 0;
  font-size: 1rem;
}
.operations-flow li:last-child { border-bottom: 0; padding-bottom: 0; }
.operations-flow li .mono { color: var(--blue-light); }
.operations-rule { display: block; height: 3px; background: var(--on-dark-line); position: relative; overflow: hidden; }
.operations-rule::after {
  content: '';
  position: absolute;
  height: 3px; width: 35%;
  background: var(--blue-light);
  left: -35%;
  animation: flow 5s 1s var(--ease) infinite;
}
@keyframes flow { 0% { left: -35%; } 60%, 100% { left: 100%; } }

/* Disclosure blocks used by both work items */
.project-details { border-block: 1px solid var(--line); }
.project-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  font-size: var(--step-small);
  font-weight: 600;
}
.project-details summary::-webkit-details-marker { display: none; }
.detail-plus { font-family: var(--font-mono); font-size: 1.4rem; line-height: 1; font-weight: 400; transition: transform var(--speed); }
.project-details[open] .detail-plus, .credential-group[open] .detail-plus { transform: rotate(45deg); }
.details-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(22px, 2.6vw, 40px);
  padding: 10px 0 30px;
}
.details-body .eyebrow { margin-bottom: 12px; }
.details-body p { font-size: 1rem; line-height: 1.75; }
.project-details[open] .details-body { animation: fade-enter 0.4s var(--ease); }

/* 9 — Featured videos ------------------------------------------------------ */

.featured-videos { padding: clamp(30px, 3.4vw, 44px) 0; }
.featured-videos-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-bottom: 22px;
}
.featured-videos-heading h3 { font-size: var(--step-h4); font-weight: 600; margin-top: 8px; }
.video-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.video-actions .text-link { margin: 0; }

.video-minimize {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 600;
  transition: background var(--speed), border-color var(--speed);
}
.video-minimize:hover { background: var(--paper-sunken); border-color: var(--muted); }
.video-minimize [data-toggle-icon] { font-size: 1.3rem; line-height: 1; }
.video-minimize[hidden], .video-showcase[hidden] { display: none; }
.featured-videos.is-minimized .featured-videos-heading { margin-bottom: 0; }

.video-showcase {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 64px);
  align-items: center;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--paper-sunken);
  border: 1px solid var(--line);
}
.featured-player { width: 100%; min-width: 0; max-width: 320px; }
.embedded-video { aspect-ratio: 9 / 16; background: #111; overflow: hidden; position: relative; }
.embedded-video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* One entry's music licence restricts playback to youtube.com, so it stays an
   ordinary external link rather than a player selection. The arrow and the
   dotted rule mark it as leaving the site. */
.video-choice--offsite .video-choice-play { color: var(--blue); }
.video-choice--offsite .video-choice-copy strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--line-strong); }
.video-choice--offsite:hover .video-choice-copy strong { text-decoration-color: currentColor; }

.video-selection { min-width: 0; }
.selected-video-heading .eyebrow { color: var(--blue); }
.selected-video-heading h4 {
  font-size: clamp(1.6rem, 2.8vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.048em;
  font-weight: 600;
  margin-top: 12px;
}
.selected-video-external { margin-top: 16px; }

.video-playlist { margin-top: 26px; border-bottom: 1px solid var(--line-strong); }
.video-choice {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 18px;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line-strong);
  padding: 16px 12px;
  min-height: 72px;
  transition: background var(--speed), color var(--speed);
}
.video-choice:hover { background: #dce1ec; }
.video-choice[aria-current="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.video-choice-number { color: var(--muted); }
.video-choice-copy { min-width: 0; }
.video-choice-copy strong { display: block; font-size: var(--step-small); font-weight: 600; line-height: 1.45; }
.video-choice-copy .mono { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.03em; margin-top: 4px; }
.video-choice[aria-current="true"] .mono,
.video-choice[aria-current="true"] .video-choice-number { color: #e3e9ff; }
.video-choice-play { font-size: 0.8125rem; }

/* 10 — Built projects ------------------------------------------------------ */

.projects-section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.build-project { border-top: 2px solid var(--ink); padding-top: 18px; }
.build-project + .build-project { margin-top: var(--block-y); }

.build-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 1fr);
  align-items: start;
  gap: clamp(26px, 3.2vw, 44px);
}
.project-media { min-width: 0; background: var(--paper-raised); border: 1px solid var(--line); }
.project-media > a { display: block; }
.project-media img { width: 100%; }
.project-media figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 14px 18px;
  color: var(--muted);
}
.project-media figcaption > span { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; line-height: 1.6; }
.project-image-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.project-media figcaption a { color: var(--ink); font-size: var(--step-micro); display: inline-flex; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line-strong); }
.project-media figcaption a:hover { color: var(--blue); border-color: var(--blue); }
.image-enhancement-note { flex-basis: 100%; font-size: var(--step-micro); line-height: 1.7; color: var(--muted); }

.project-notes > .eyebrow { margin-bottom: 18px; }
.project-notes dl { margin: 0; }
.project-notes dl > div { border-top: 1px solid var(--line); padding: 16px 0; }
.project-notes dt { font-size: var(--step-small); font-weight: 600; }
.project-notes dd { font-size: var(--step-small); line-height: 1.7; color: var(--muted); margin: 5px 0 0; }
.project-role { border-top: 1px solid var(--line); padding-top: 18px; font-size: 1rem; line-height: 1.7; }
.project-role > .eyebrow { margin-bottom: 6px; }

.project-demo { width: 100%; background: #111; aspect-ratio: 16 / 9; }

/* 11 — About and credentials ----------------------------------------------- */

.about-section {
  background: var(--paper-sunken);
  padding-block: var(--section-y);
  max-width: none;
}
.about-inner { max-width: 1680px; margin-inline: auto; }

.about-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 30px;
  margin-bottom: var(--block-y);
}
.about-top .eyebrow { padding-top: 0; }

.about-statement {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 66px);
  align-items: start;
}
/* Desktop only: the heading keeps the left column to itself while the portrait
   sits at the top of the right column with the text beneath it, so the two
   sides finish at a similar height instead of the left running long.
   Below 900px .about-statement collapses to a single column (see the media
   query near the end of this file) and these placements must not apply — hence
   min-width rather than overriding them back to auto. The DOM order is heading,
   portrait, text, which is exactly what the phone layout should stack. */
@media (min-width: 901px) {
  .about-statement { row-gap: clamp(24px, 3vw, 40px); }
  .about-statement > .section-title { grid-column: 1; grid-row: 1 / span 2; }
  .about-statement > .about-portrait { grid-column: 2; grid-row: 1; }
  .about-statement > .about-body { grid-column: 2; grid-row: 2; }
  /* Same cap as .about-text, so the photo and the paragraphs under it share
     both edges instead of drifting apart as the column grows. */
  .about-statement > .about-portrait { width: 100%; max-width: 54ch; }
}

.about-portrait { width: min(280px, 100%); }
.about-portrait picture {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-raised);
  border: 1px solid var(--line);
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-portrait figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  text-align: center;
  /* Not .eyebrow: its uppercase transform would render PlaceID as PLACEID. */
  color: var(--ink);
}
.about-portrait figcaption b {
  font-weight: 500;
  font-size: var(--step-h4);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.about-portrait figcaption .mono { font-size: var(--step-small); }

.about-text { max-width: 54ch; }
/* Reading copy, so 1rem rather than --step-small (15px) — small enough to be a
   chore on a phone, and this is the one block of real prose on the page. */
.about-text p { font-size: 1rem; line-height: 1.8; margin-top: 16px; }
.about-text p:first-child { margin-top: 0; font-size: var(--step-lead); line-height: 1.6; letter-spacing: -0.02em; }
.about-text p:last-child { color: var(--muted); }

.about-links { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 28px; }

.credentials-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(32px, 4.4vw, 84px);
  margin-top: var(--block-y);
  border-top: 1px solid var(--line-strong);
  padding-top: 32px;
}
.learning-block { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.education-entry { margin-bottom: 24px; }
.education-entry h2 { font-size: 1.1rem; line-height: 1.4; }
.education-entry p { color: var(--muted); font-size: var(--step-small); margin: 4px 0; }
.education-entry .mono { color: var(--muted); }
.learning-note { margin: 34px 0 22px; max-width: 34ch; }
.learning-note h2 { font-size: clamp(1.6rem, 2.4vw, 2.4rem); line-height: 1.16; }
.learning-note p { font-size: 1rem; color: var(--muted); line-height: 1.7; margin-top: 14px; }

.credential-library { min-width: 0; }
.credential-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  margin-bottom: 12px;
}
#credential-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--step-small);
  font-weight: 600;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 10px 0;
}
#credential-toggle[hidden] { display: none; }
.credential-group { border-top: 1px solid var(--line-strong); }
.credential-group:last-child { border-bottom: 1px solid var(--line-strong); }
.credential-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-size: var(--step-small);
  font-weight: 600;
}
.credential-group > summary::-webkit-details-marker { display: none; }
.credential-group-end { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.credential-group-end > .mono { color: var(--muted); font-weight: 400; }
.credential-records { list-style: none; margin: 0; padding: 0 0 8px; }
.credential-record { padding: 18px 0; border-top: 1px solid #cbd0d8; }
.credential-period { display: block; color: var(--muted); margin-bottom: 8px; }
.credential-record h3 { font-size: var(--step-small); font-weight: 600; line-height: 1.5; }
.credential-issuer { font-size: var(--step-micro); line-height: 1.6; margin-top: 4px; color: var(--muted); }
.credential-identifiers { margin-top: 12px; font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.7; color: var(--muted); }
.credential-identifiers > div { display: flex; flex-wrap: wrap; gap: 0 12px; }
.credential-identifiers dt { flex-shrink: 0; }
.credential-identifiers dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.credential-status { font-size: var(--step-micro); line-height: 1.6; color: var(--blue); margin-top: 9px; }

/* 12 — Contact footer ------------------------------------------------------ */

.contact-section {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(44px, 5vw, 72px) 24px;
  max-width: none;
}
.contact-inner { max-width: 1680px; margin-inline: auto; }
.contact-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; color: var(--on-dark-muted); }
.contact-top .eyebrow { color: var(--on-dark-muted); }

.contact-heading {
  display: block;
  font-size: clamp(3rem, 11vw, 11rem);
  line-height: 1.04;
  letter-spacing: -0.07em;
  margin: clamp(24px, 3vw, 40px) 0 clamp(24px, 2.6vw, 36px);
  font-weight: 500;
}
.contact-heading .arrow { color: var(--blue-light); font-size: 0.6em; display: inline-block; }

.contact-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; padding-bottom: clamp(26px, 3vw, 40px); }
.contact-cta .direct-note { font-size: var(--step-micro); color: var(--on-dark-muted); max-width: 46ch; line-height: 1.7; }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(24px, 4vw, 60px);
  border-top: 1px solid var(--on-dark-line);
  padding-top: 26px;
}
.contact-links--bare { border-top: 0; padding-top: 0; }
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-small);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--speed), border-color var(--speed);
}
.contact-links a:hover { color: var(--blue-light); border-color: var(--blue-light); }
.contact-links .email-link { font-size: clamp(1rem, 1.7vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  border-top: 1px solid var(--on-dark-line);
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 20px;
  font-size: 0.75rem;
  color: var(--on-dark-muted);
}
/* The button and its neighbouring links must present the same hit area —
   padding on the button alone left the links at ~20px tall. */
.footer-bottom button,
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 10px 0;
  color: inherit;
  font-size: 0.75rem;
}
.footer-bottom button:hover, .footer-bottom a:hover { color: var(--on-dark); }

/* 13 — Contact page -------------------------------------------------------- */

.contact-page { padding-block: clamp(34px, 4vw, 60px) var(--section-y); }
.contact-page-head { max-width: 46ch; }
.contact-page-head h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  letter-spacing: -0.06em;
  line-height: 1;
  margin: 16px 0 20px;
}
.contact-page-head p { font-size: var(--step-lead); line-height: 1.65; color: var(--muted); }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr);
  gap: clamp(30px, 4vw, 72px);
  align-items: start;
  margin-top: var(--block-y);
}

.contact-form { border-top: 2px solid var(--ink); padding-top: 26px; }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 24px; }
.field label { display: block; font-size: var(--step-small); font-weight: 600; margin-bottom: 8px; }
.field .optional { font-weight: 400; color: var(--muted); font-size: var(--step-micro); margin-left: 6px; }
.field .hint { display: block; font-size: var(--step-micro); color: var(--muted); margin-top: 7px; line-height: 1.6; }

.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  /* Must not drop below 16px: iOS Safari zooms the page when a control smaller
     than that takes focus, and leaves it zoomed. This is why it is a literal
     1rem and not --step-small like the surrounding form text. */
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.field textarea { min-height: 168px; resize: vertical; line-height: 1.65; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 42px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 73, 242, 0.22);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #b3261e; }
.field input[aria-invalid="true"]:focus, .field textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.2); }
.field-error { display: block; font-size: var(--step-micro); line-height: 1.6; color: #a11d16; margin-top: 7px; font-weight: 600; }
.field-error:empty { display: none; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.form-footer .privacy-note { font-size: var(--step-micro); line-height: 1.7; color: var(--muted); max-width: 42ch; }
/* Matches the 16px text-entry controls beside it. Scoped to this button rather
   than .button, so the nav pill and the other ghost buttons keep their size. */
.submit-button { font-size: 1rem; }
.submit-button[aria-disabled="true"] { opacity: 0.65; cursor: progress; }

.form-status { margin-top: 24px; }
.form-status:empty { margin: 0; }
.status-card { border-left: 3px solid var(--line-strong); background: var(--paper-raised); padding: 18px 20px; }
/* Was 1.0625rem, which rendered smaller than the lede paragraph above it — a
   heading should not be quieter than the body text it introduces. */
.status-card h2 { font-size: clamp(1.1875rem, 1.4vw, 1.375rem); letter-spacing: -0.02em; margin-bottom: 6px; }
.status-card p { font-size: var(--step-small); line-height: 1.7; color: var(--muted); }
.status-card p + p { margin-top: 8px; }
.status-card a { border-bottom: 1px solid var(--line-strong); }
.status-card--success { border-left-color: #1a7f4b; }
.status-card--error { border-left-color: #b3261e; }
.status-card--busy { border-left-color: var(--blue); }

.contact-aside { display: grid; gap: 22px; }
.aside-card { border: 1px solid var(--line); background: var(--paper-raised); padding: clamp(20px, 2.2vw, 28px); }
.aside-card h2 { font-size: clamp(1.1875rem, 1.4vw, 1.375rem); margin-bottom: 12px; }
.aside-card p { font-size: var(--step-small); line-height: 1.75; color: var(--muted); }
.aside-card .direct-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 4px; }
.aside-card .direct-list li { border-top: 1px solid var(--line); }
.aside-card .direct-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  font-size: var(--step-small);
  font-weight: 600;
  transition: color var(--speed);
}
.aside-card .direct-list a:hover { color: var(--blue); }
.aside-card .direct-list .detail { font-weight: 400; color: var(--muted); font-size: var(--step-micro); }

/* 14 — Motion and reveal --------------------------------------------------- */

.reveal { transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.js-motion .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }

.title-line { animation: title-enter 0.9s var(--ease) both; }
.title-line:nth-child(2) { animation-delay: 0.1s; }
.hero-bottom { animation: fade-enter 1.1s 0.2s var(--ease) both; }
@keyframes title-enter { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade-enter { from { opacity: 0; } to { opacity: 1; } }

.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
.motion-paused { scroll-behavior: auto; }
.motion-paused .reveal { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-motion .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* 15 — Responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; }
  .data-art-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .build-showcase { grid-template-columns: 1fr; }
  .project-notes dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 26px; }
  .credentials-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 40px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-aside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

@media (max-width: 900px) {
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .section-heading .eyebrow { padding-top: 0; }
  .impact-case-grid { grid-template-columns: 1fr; }
  .work-copy { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .operations-panel { grid-template-columns: 1fr; }
  .about-statement { grid-template-columns: 1fr; gap: 26px; }
  .learning-block { position: static; }
  .video-showcase { grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 28px; }
  .credentials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  :root { --header-h: 72px; }
  .hero-meta { font-size: 0.6875rem; }
  .hero-meta .local-time { display: none; }
  h1 { font-size: clamp(2.8rem, 12.5vw, 4.4rem); line-height: 1.02; }
  .impact-scoreboard { grid-template-columns: 1fr; padding: 6px 22px; }
  .impact-scoreboard > div,
  .impact-scoreboard > div:first-child,
  .impact-scoreboard > div:last-child {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
    align-items: center;
  }
  .impact-scoreboard > div:first-child { border-top: 0; }
  .impact-scoreboard .eyebrow { grid-column: 1 / -1; margin-bottom: 8px; }
  .impact-scoreboard strong { font-size: clamp(2.4rem, 10vw, 3.6rem); margin: 0; }
  .case-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .work-proof { grid-template-columns: 1fr; padding: 0; }
  .work-proof > div { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
  .work-proof > div:first-child { border-top: 1px solid var(--line); }
  .work-proof > div:last-child { border-bottom: 1px solid var(--line); }
  .work-proof strong { font-size: 2.1rem; }
  .work-proof span { margin: 0; text-align: right; max-width: 14ch; }
  .video-showcase { grid-template-columns: 1fr; padding: 20px; }
  .featured-player { max-width: 290px; margin-inline: auto; }
  .contact-heading { font-size: 15vw; }
  .contact-links { gap: 12px; flex-direction: column; align-items: flex-start; }
  .footer-bottom > a { margin-left: auto; }
  .field-row { grid-template-columns: 1fr; }
  .form-footer { flex-direction: column; align-items: stretch; }
  .form-footer .submit-button { width: 100%; }

  /* Touch targets: these links are underlined, so growing their padding would
     push the rule away from the text. Extend the hit area instead. */
  .text-link,
  .project-media figcaption a,
  .contact-links a,
  .aside-card .direct-list a { position: relative; }
  .text-link::before,
  .project-media figcaption a::before,
  .contact-links a::before,
  .aside-card .direct-list a::before {
    content: '';
    position: absolute;
    inset: -8px -6px;
  }
}

@media (max-width: 400px) {
  .video-choice { grid-template-columns: 20px minmax(0, 1fr) 12px; gap: 10px; padding: 14px 8px; }
  .credential-identifiers > div { gap: 0 8px; }
  .hero-meta { flex-direction: column; gap: 4px; }
}

@media (min-width: 1900px) {
  :root { --gutter: clamp(80px, 6vw, 120px); }
}

/* 16 — Print --------------------------------------------------------------- */

@media print {
  .site-header, .reading-progress, .process-strip, .skip-link,
  .video-actions, .contact-cta, .footer-bottom button,
  #video-grid { display: none !important; }
  body { background: #fff; font-size: 11pt; }

  /* The dark panels invert for paper. The colour reset MUST reach descendants:
     they set their own light-on-dark colours, and without this the onboarding
     figures (28.0 / 20.0 / 17.3 days) print white on white and vanish. */
  .contact-section, .operations-panel, .cycle-comparison, .impact-scoreboard, .data-art,
  .contact-section *, .operations-panel *, .cycle-comparison *, .impact-scoreboard *, .data-art * {
    background: transparent !important;
    color: #000 !important;
    border-color: #999 !important;
  }
  .contact-section, .operations-panel, .cycle-comparison, .impact-scoreboard, .data-art {
    background: #fff !important;
    border: 1px solid #999;
  }

  /* Bars are the only thing that should still carry a fill — as grey, so the
     comparison survives a black-and-white printer. */
  .cycle-track { background: #e8e8e8 !important; }
  .cycle-fill { background: #555 !important; }
  .target-fill { background: transparent !important; border: 1px dashed #555 !important; }
  .delay-stack > span:nth-child(1) { background: #333 !important; }
  .delay-stack > span:nth-child(2) { background: #666 !important; }
  .delay-stack > span:nth-child(3) { background: #999 !important; }
  .delay-stack > span:nth-child(4) { background: #ddd !important; }

  .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; word-break: break-all; }
}

/* Portfolio navigation and skills, September 2026 */
.mobile-home{display:none}.header-descriptor{display:none}.site-nav{gap:clamp(12px,1.4vw,22px)}
.site-nav a{min-height:44px;display:inline-flex;align-items:center}
.skills-section{padding-block:clamp(48px,7vw,100px);scroll-margin-top:100px}
.skills-intro{max-width:65ch;line-height:1.7;margin-bottom:28px}
.skills-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:28px 0}
.skills-grid article{padding:clamp(24px,3vw,38px);border:1px solid var(--line);border-radius:16px;background:var(--paper)}
.skills-grid h3{font-size:clamp(24px,3vw,32px);line-height:1.2;margin:16px 0}
.skills-grid p{line-height:1.7;margin-bottom:20px}.skills-grid .text-link{display:inline-flex;min-height:44px;align-items:center}
@media(max-width:1100px){.mobile-home{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:999px;margin-left:auto}.nav-toggle{margin-left:0}.site-header[data-nav] .site-nav{max-height:calc(100dvh - var(--header-h));overflow-y:auto}.site-nav a{white-space:normal}}
@media(max-width:600px){.skills-grid{grid-template-columns:1fr}.hero-actions{gap:14px}.hero-actions .button{width:100%;justify-content:center}.contact-links a{overflow-wrap:anywhere}.header-inner{gap:12px}.skills-section{scroll-margin-top:90px}}
