/* ==========================================================================
   Manuel Montoya: "Chart and logbook"
   --------------------------------------------------------------------------
   Visual language borrowed from aeronautical charts, used to tell a pilot-to-
   engineer story. Copy stays plain; the chart vocabulary carries the voice.

   Color   paper  #EEF2F0  cool chart paper (not cream)
           ink    #13253B  chart text navy
           magenta #A3216B route ink: your path, active state, the one accent
           blue   #1D5AA3  airspace blue: places, structure
           land   #DDE6DC  low-terrain tint
   Type    Archivo (variable: width 62–125, weight 100–900). Wide for display,
           normal for reading, condensed + tabular figures for chart data.
   Motion  One orchestrated moment (hero flight). Everything else answers a
           scroll or a pointer and shows what changed. Off under reduced motion.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #EEF2F0;
  --paper-deep: #E2E9E5;
  --ink: #13253B;
  --ink-soft: #46596C;
  --rule: #C5D0CC;
  --grid: #A9BECD;
  --magenta: #A3216B;
  --blue: #1D5AA3;
  --land: #DDE6DC;
  --coast: #7F9A92;
  --on-accent: #FFFFFF;
  --duo: url(#duo-light);

  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);
  --display: clamp(3.4rem, 0.9rem + 8.2vw, 8.6rem);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --nav-h: 60px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0D1724;
  --paper-deep: #132133;
  --ink: #E4ECF3;
  --ink-soft: #9EB1C4;
  --rule: #26394F;
  --grid: #2A4560;
  --magenta: #EE6BB0;
  --blue: #7DB2F2;
  --land: #17293C;
  --coast: #3F5C78;
  --on-accent: #0D1724;
  --duo: url(#duo-dark);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 24px); }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-variation-settings: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
main { overflow-x: clip; } /* the compass rose rotates in; keep its bounding box from widening the page */
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--magenta); }
button { font: inherit; color: inherit; cursor: pointer; }
abbr[title] { text-decoration: none; }
::selection { background: var(--magenta); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 3px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; color: var(--paper); }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Layout primitives ---------- */
.section {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  padding-top: clamp(96px, 13vw, 176px);
}
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  align-items: end;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--ink);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__title {
  font-size: var(--step-3);
  font-stretch: 112%;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.section__lede {
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 38ch;
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 48px; padding: 0 1.25rem;
  border: 1.5px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: background-color 160ms var(--ease-standard), color 160ms var(--ease-standard), border-color 160ms var(--ease-standard), transform 100ms;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--magenta); border-color: var(--magenta); color: var(--on-accent); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms var(--ease-standard);
  view-transition-name: nav;
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav__inner {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 2rem;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-stretch: 112%; letter-spacing: -0.01em; white-space: nowrap;
}
.nav__brand:hover { color: var(--ink); }
.nav__mark { width: 22px; height: 22px; fill: none; stroke: var(--magenta); stroke-width: 2; }
.nav__mark circle + circle { fill: var(--magenta); stroke: none; }
.nav__links { margin-left: auto; display: flex; gap: 1.6rem; }
.nav__links a {
  position: relative; padding: 0.5rem 0;
  color: var(--ink-soft); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  transition: color 160ms var(--ease-standard);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.15rem; height: 2px;
  background: var(--magenta); transform: scaleX(0); transform-origin: left;
  transition: transform 300ms var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__theme {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  transition: border-color 160ms, transform 300ms var(--ease-out);
}
.nav__theme:hover { border-color: var(--ink); }
.nav__theme:active { transform: rotate(-25deg); }
.nav__theme .icon { width: 18px; height: 18px; }
.icon--sun { display: none; }
[data-theme="dark"] .icon--sun { display: block; }
[data-theme="dark"] .icon--moon { display: none; }
.nav__menu {
  display: none; margin-left: auto;
  min-height: 40px; padding: 0 0.9rem; border-radius: 3px;
  border: 1px solid var(--rule); background: transparent; font-weight: 600; font-size: 0.9375rem;
}
.nav__track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.nav__track-line {
  position: absolute; inset: 0; background: var(--magenta);
  transform: scaleX(var(--progress, 0)); transform-origin: left;
}
.nav__track-plane {
  position: absolute; left: 0; top: -9px; width: 20px; height: 20px; color: var(--magenta);
  transform: translateX(var(--plane-x, -24px)) rotate(90deg);
}

/* ---------- Hero ---------- */
.hero {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(24px, 4vh, 48px));
  padding-bottom: clamp(24px, 4vh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}
.hero__name {
  font-size: var(--display);
  font-weight: 760;
  font-stretch: 125%;
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.hero__line { display: block; overflow: clip; padding: 0.02em 0 0.16em; margin: -0.02em 0 -0.16em; }
.hero__line > span { display: block; }
.hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 34ch;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__meta { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- Chart ---------- */
.chart {
  justify-self: end;
  width: 100%;
  max-width: calc(min(100svh - var(--nav-h) - 170px, 840px) * 640 / 940);
  min-width: min(100%, 300px);
}
.chart__frame { position: relative; }
.chart__svg { width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart__grat { fill: none; stroke: var(--grid); stroke-width: 0.6; }
.chart__land { fill: var(--land); stroke: var(--coast); stroke-width: 0.7; stroke-linejoin: round; }
.chart__borders { fill: none; stroke: var(--coast); stroke-width: 0.6; stroke-dasharray: 3 2.5; opacity: 0.8; }
.chart__labels text {
  font-size: 11px; font-stretch: 87.5%; font-weight: 500;
  fill: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.chart__route-halo { fill: none; stroke: var(--paper); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.chart__route { fill: none; stroke: var(--magenta); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chart__leg rect { fill: var(--paper); stroke: var(--magenta); stroke-width: 1.25; }
.chart__leg text {
  fill: var(--magenta); font-size: 12.5px; font-weight: 650; text-anchor: middle;
  font-variant-numeric: tabular-nums; font-stretch: 93%;
}
.chart__plane { color: var(--magenta); }
.chart__neatline { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.chart__cursor line { stroke: var(--magenta); stroke-width: 0.8; stroke-dasharray: 4 3; }
.chart__cursor { opacity: 0; transition: opacity 160ms; pointer-events: none; }
.chart.is-tracking .chart__cursor { opacity: 0.7; }
.chart__caption {
  margin-top: 0.9rem; font-size: 0.875rem; line-height: 1.5; color: var(--ink-soft); max-width: 44ch;
}
.chart__readout {
  display: block; margin-bottom: 0.15rem;
  color: var(--ink); font-weight: 650; font-stretch: 93%; font-variant-numeric: tabular-nums;
}
.chart__scan { display: none; }

/* waypoints: blue like towered airports on a sectional */
.wp { cursor: pointer; }
.wp text { paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.wp__ring { fill: var(--paper); stroke: var(--blue); stroke-width: 2; transition: stroke 160ms, stroke-width 160ms; }
.wp__dot { fill: var(--blue); transition: fill 160ms; }
.wp__pulse { fill: none; stroke: var(--magenta); stroke-width: 1.5; opacity: 0; }
.wp__code { font-size: 14px; font-weight: 750; fill: var(--blue); letter-spacing: 0.02em; }
.wp__name { font-size: 12.5px; font-weight: 500; fill: var(--ink); }
.wp__time { font-size: 12.5px; font-weight: 650; fill: var(--magenta); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.wp__hit { fill: transparent; }
.wp__focus { fill: none; stroke: var(--magenta); stroke-width: 2; stroke-dasharray: 4 3; opacity: 0; }
.wp:focus-visible .wp__focus { opacity: 1; }
.wp__block--left text { text-anchor: end; }
.wp:hover .wp__ring, .wp:focus-visible .wp__ring { stroke: var(--magenta); stroke-width: 3; }
.wp:hover .wp__dot, .wp:focus-visible .wp__dot { fill: var(--magenta); }
.wp:focus-visible { outline: none; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.about__portrait { position: sticky; top: calc(var(--nav-h) + 32px); }
.portrait { position: relative; max-width: 380px; margin-inline: auto; }
.portrait img { position: relative; z-index: 1; width: 100%; height: auto; -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%); mask-image: linear-gradient(to bottom, #000 78%, transparent 99%); }
.portrait .portrait__duo {
  position: absolute; inset: 0; z-index: 2;
  filter: var(--duo);
  clip-path: inset(0 0 0 0);
  transition: clip-path 900ms var(--ease-in-out);
}
.portrait:hover .portrait__duo { clip-path: inset(0 0 100% 0); }
.compass {
  position: absolute; z-index: 0; left: 50%; top: 34%;
  width: min(118%, 100vw); max-width: none; translate: -50% -50%;
  color: var(--ink-soft); overflow: visible;
}
.compass line { stroke: currentColor; stroke-width: 0.6; }
.compass .major { stroke-width: 1.1; }
.compass text { fill: currentColor; font-size: 7px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.compass .north { fill: var(--magenta); }
.compass circle { fill: none; stroke: currentColor; stroke-width: 0.6; }
.about__text h2 { margin-bottom: 1.75rem; }
.about__text p { max-width: 62ch; text-wrap: pretty; }
.about__text p + p { margin-top: 1rem; }
.about__lead { font-size: var(--step-1); line-height: 1.5; }

.logbook { margin-top: 3rem; }
.logbook table { width: 100%; border-collapse: collapse; border: 1.5px solid var(--ink); }
.logbook caption { caption-side: top; text-align: left; font-weight: 650; font-size: 0.875rem; margin-bottom: 0.6rem; }
.logbook th, .logbook td { text-align: left; border-right: 1px solid var(--rule); vertical-align: bottom; }
.logbook th:last-child, .logbook td:last-child { border-right: 0; }
.logbook th {
  padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--ink);
  font-size: 0.8125rem; font-weight: 500; line-height: 1.3; color: var(--ink-soft);
}
.logbook td {
  padding: 0.6rem 0.8rem 0.5rem;
  font-size: clamp(1.75rem, 1rem + 2vw, 2.6rem); font-weight: 680; font-stretch: 93%;
  line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.odo { display: inline-flex; }
.odo__col { display: inline-block; height: 1em; overflow: hidden; }
.odo__strip { display: flex; flex-direction: column; transform: translateY(calc(var(--d) * -1em)); }
.odo__strip span { height: 1em; line-height: 1; }

/* ---------- Endeavor: defense in depth ---------- */
.endeavor__body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.layers { margin: 0; }
.layers__stage { position: relative; max-width: 540px; aspect-ratio: 1; margin-inline: auto; }
.layers__svg { width: 100%; height: 100%; overflow: visible; }
.layers__ring circle { fill: var(--paper); stroke: var(--blue); stroke-width: 1.5; transition: fill 260ms var(--ease-standard), stroke 260ms, stroke-width 260ms; }
.layers__ring[data-layer="cloud"] circle, .layers__ring[data-layer="apps"] circle { fill: var(--paper-deep); }
.layers__ring--core circle { fill: var(--blue); }
.layers__arcs text { font-size: 12.5px; font-weight: 650; fill: var(--ink-soft); text-anchor: middle; letter-spacing: 0.02em; }
.layers__arcs .layers__core-label { fill: var(--paper); font-size: 15px; font-weight: 720; }
.blip circle { fill: var(--magenta); }
.blip text { font-size: 12px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.blip { transition: opacity 260ms; }
.layers[data-active] .layers__ring circle { stroke-width: 1; }
.layers[data-active="cloud"] .layers__ring[data-layer="cloud"] circle,
.layers[data-active="identity"] .layers__ring[data-layer="identity"] circle,
.layers[data-active="apps"] .layers__ring[data-layer="apps"] circle {
  fill: color-mix(in srgb, var(--magenta) 13%, var(--paper)); stroke: var(--magenta); stroke-width: 2.5;
}
.layers[data-active="people"] .layers__ring[data-layer="people"] circle { fill: var(--magenta); stroke: var(--magenta); }
.layers[data-active="cloud"] .blip:not([data-layer="cloud"]),
.layers[data-active="identity"] .blip:not([data-layer="identity"]),
.layers[data-active="apps"] .blip:not([data-layer="apps"]),
.layers[data-active="people"] .blip { opacity: 0.25; }
.layers figcaption { margin-top: 1rem; text-align: center; font-size: 0.875rem; color: var(--ink-soft); }
.layers__sweep {
  position: absolute; inset: 3.75%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: conic-gradient(from 0deg, transparent 0deg 300deg, color-mix(in srgb, var(--magenta) 30%, transparent) 358deg, transparent 360deg);
}

.layer-list { counter-reset: layer; }
.layer-list li {
  position: relative; padding: 1.1rem 0 1.1rem 2.25rem; border-top: 1px solid var(--rule);
  transition: background-color 200ms;
}
.layer-list li:last-child { border-bottom: 1px solid var(--rule); }
.layer-list li::before {
  content: ""; position: absolute; left: 0.2rem; top: 1.55rem;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--blue); background: var(--paper);
  transition: border-color 200ms, background-color 200ms;
}
.layer-list li[data-layer="people"]::before { background: var(--blue); }
.layer-list li.is-active::before { border-color: var(--magenta); background: var(--magenta); }
.layer-list h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.3; margin-bottom: 0.25rem; }
.layer-list p { color: var(--ink-soft); max-width: 46ch; }
.endeavor__note {
  margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 60ch;
  font-size: var(--step-1); line-height: 1.5; text-wrap: pretty;
}

/* ---------- Experience: the flight log ---------- */
.log { position: relative; padding-left: 64px; }
.log__track { position: absolute; left: 19px; top: 2.6rem; bottom: 2.5rem; width: 2px; }
.log__track::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 11px);
}
.log__line { position: absolute; inset: 0; background: var(--magenta); transform-origin: top; transform: scaleY(var(--p, 1)); }
.log__plane {
  position: absolute; left: 50%; top: 0; width: 22px; height: 22px; color: var(--magenta);
  transform: translate(-50%, calc(var(--py, 0px) - 50%)) rotate(180deg);
  display: none;
}
.leg {
  position: relative;
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 2rem;
  padding: 2rem 0; border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.leg:last-child { border-bottom: 1px solid var(--rule); }
.leg::before {
  content: ""; position: absolute; left: -49px; top: 2.45rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-soft);
  transition: background-color 300ms, border-color 300ms, transform 300ms var(--ease-out);
}
.leg--waypoint::before { left: -53px; top: 2.2rem; width: 18px; height: 18px; border: 2.5px solid var(--blue); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 10px var(--blue); }
.leg.is-passed::before { border-color: var(--magenta); background: var(--magenta); }
.leg--waypoint.is-passed::before { box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 10px var(--magenta); background: var(--paper); }
.leg > * { grid-column: 2; }
.leg__when { grid-column: 1; grid-row: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.leg__where { grid-column: 1; grid-row: 2; font-size: 0.9375rem; color: var(--ink-soft); }
.leg__where abbr { color: var(--blue); font-weight: 750; letter-spacing: 0.02em; margin-right: 0.3rem; }
.leg__role { font-size: var(--step-2); font-weight: 680; line-height: 1.2; letter-spacing: -0.012em; margin-bottom: 0.6rem; }
.leg__role span { display: block; margin-top: 0.2rem; font-size: var(--step-0); font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.leg p:not([class]) { max-width: 62ch; text-wrap: pretty; }
.leg:target { animation: target-flash 2s var(--ease-standard); }
@keyframes target-flash {
  0%, 30% { background: color-mix(in srgb, var(--magenta) 12%, transparent); }
  100% { background: transparent; }
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.tags li {
  font-size: 0.8125rem; font-weight: 500; line-height: 1; color: var(--ink-soft);
  padding: 0.4rem 0.55rem; border: 1px solid var(--rule); border-radius: 2px;
}
.education { margin-top: 3.5rem; padding-left: 64px; }
.education__title { font-size: var(--step-1); font-weight: 680; margin-bottom: 1rem; }
.education__list li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 2rem; padding: 0.55rem 0; border-top: 1px solid var(--rule); }
.education__years { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ---------- Skills: checklist ---------- */
.checklist { columns: 2; column-gap: clamp(2rem, 6vw, 5rem); }
.checklist li {
  break-inside: avoid;
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--rule);
}
.checklist__item { font-weight: 650; white-space: nowrap; }
.checklist__lead {
  flex: 1 1 1.5rem; min-width: 1.5rem; align-self: center; translate: 0 0.25em;
  border-bottom: 2px dotted color-mix(in srgb, var(--ink-soft) 70%, transparent);
  transform-origin: left;
}
.checklist__resp { text-align: right; color: var(--blue); font-weight: 560; max-width: 62%; text-wrap: balance; }
.checklist li::after {
  content: ""; flex: none; align-self: center;
  width: 0.7rem; height: 0.38rem; margin: 0 0.15rem 0.2rem 0.25rem;
  border-left: 2px solid var(--magenta); border-bottom: 2px solid var(--magenta);
  rotate: -45deg;
}
.checklist__done { margin-top: 1.5rem; font-weight: 650; color: var(--magenta); }

/* ---------- Projects ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}
.feature__globe {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 640px;
  cursor: grab; touch-action: pan-y; user-select: none;
}
.feature__globe.is-dragging { cursor: grabbing; }
.feature__canvas { width: 100%; height: 100%; }
.feature__hint, .feature__country { position: absolute; left: 0; font-size: 0.8125rem; color: var(--ink-soft); }
.feature__hint { bottom: 0; }
.feature__country { top: 0; font-weight: 650; color: var(--ink); min-height: 1.5em; }
.feature__title { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); font-stretch: 112%; font-weight: 720; letter-spacing: -0.028em; line-height: 1; margin-bottom: 1.25rem; }
.feature__text > p { max-width: 44ch; text-wrap: pretty; }
.feature__links { margin-top: 1.75rem; }
.feature__markets { margin-top: 1.75rem; font-size: 0.9375rem; color: var(--ink-soft); }
.feature__markets summary { cursor: pointer; color: var(--blue); font-weight: 600; width: fit-content; }
.feature__markets summary:hover { color: var(--magenta); }
.feature__markets p { margin-top: 0.75rem; max-width: 52ch; }

.work {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 3vw, 2.5rem);
}
.work__item--tall { grid-row: span 2; }
.work__item h3 { font-size: var(--step-1); font-weight: 680; margin: 1.1rem 0 0.35rem; }
.work__item p { color: var(--ink-soft); font-size: 1rem; text-wrap: pretty; }
.work__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; }
.work__links a {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 32px;
  color: var(--ink); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
  border-bottom: 1.5px solid var(--magenta);
}
.work__links a:hover { color: var(--magenta); }
.work__links .icon { width: 1em; height: 1em; }

.media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper-deep); }
.work__item--tall .media { aspect-ratio: 5 / 6; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media .media__duo {
  position: absolute; inset: 0;
  filter: var(--duo);
  clip-path: inset(0 0 0 0);
  transition: clip-path 700ms var(--ease-in-out);
}
.media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--magenta); opacity: 0; pointer-events: none;
}
.work__item:hover .media__duo, .work__item:focus-within .media__duo,
.product:hover .media__duo, .product:focus-within .media__duo,
.ai figure:hover .media__duo { clip-path: inset(0 0 100% 0); }
.projects__more { margin-top: clamp(2.5rem, 5vw, 4rem); color: var(--ink-soft); }

/* Products being built now: the largest project entries */
.products {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: clamp(4.5rem, 9vw, 7.5rem);
}
.product .media { aspect-ratio: 3 / 2; }
.product__title {
  margin: 1.4rem 0 0.3rem;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-stretch: 112%; font-weight: 720;
  letter-spacing: -0.02em; line-height: 1.05;
}
.product__tagline { margin-bottom: 0.9rem; color: var(--magenta); font-weight: 600; }
.product > p:not([class]) { color: var(--ink-soft); max-width: 56ch; text-wrap: pretty; }
.product > p:not([class]) + p:not([class]) { margin-top: 0.75rem; }
.product .work__links { margin-top: 1rem; }
.work__heading { margin-bottom: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: var(--step-1); font-weight: 680; }

/* Endeavor: bringing AI into the work */
.ai {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
  margin-top: clamp(4rem, 8vw, 6rem);
}
.ai figure .media { aspect-ratio: 4 / 3; }
.ai figcaption { margin-top: 0.6rem; font-size: 0.875rem; color: var(--ink-soft); max-width: 52ch; }
.ai__title {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-stretch: 112%; font-weight: 720;
  letter-spacing: -0.02em; line-height: 1.05;
}
.ai__text > p { max-width: 46ch; text-wrap: pretty; }
.ai__quote {
  margin: 1.75rem 0; padding-left: 1.1rem; border-left: 3px solid var(--magenta);
  font-size: var(--step-1); font-weight: 620; line-height: 1.4; text-wrap: balance;
}
.ai__inset { max-width: 320px; }
.projects__more a { font-weight: 600; }

/* ---------- Writing ---------- */
.posts li { border-top: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.post {
  display: grid; grid-template-columns: 168px minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2.5rem); align-items: center;
  padding: 1.5rem 0; color: inherit; text-decoration: none;
}
.post:hover { color: inherit; }
.post__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper-deep); }
.post__thumb img { width: 100%; height: 100%; object-fit: cover; filter: var(--duo); transition: filter 500ms var(--ease-standard), scale 700ms var(--ease-out); }
.post:hover .post__thumb img, .post:focus-visible .post__thumb img { filter: none; scale: 1.04; }
.post__body { display: grid; gap: 0.35rem; }
.post__title {
  font-size: var(--step-2); font-weight: 680; line-height: 1.2; letter-spacing: -0.012em; width: fit-content;
  background: linear-gradient(var(--magenta), var(--magenta)) no-repeat left bottom / 0% 2px;
  padding-bottom: 0.1rem;
  transition: background-size 450ms var(--ease-out), color 200ms;
}
.post:hover .post__title, .post:focus-visible .post__title { background-size: 100% 2px; color: var(--magenta); }
.post__excerpt { color: var(--ink-soft); max-width: 60ch; }
.post__meta { font-size: 0.875rem; color: var(--ink-soft); font-weight: 500; }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact__title { font-size: var(--display); font-stretch: 125%; letter-spacing: -0.035em; line-height: 0.9; border-top: 1.5px solid var(--ink); padding-top: 1.25rem; }
.contact__lede { margin-top: 1.75rem; font-size: var(--step-1); max-width: 40ch; color: var(--ink-soft); }
.contact__email { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.contact__email a {
  font-size: clamp(1.5rem, 0.8rem + 3.4vw, 3.25rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15;
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--magenta);
  text-decoration-thickness: 3px; text-underline-offset: 0.18em; overflow-wrap: anywhere;
}
.contact__email a:hover { color: var(--magenta); }
.contact__copy {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; padding: 0 0.9rem;
  border: 1px solid var(--rule); border-radius: 3px; background: transparent; font-weight: 600; font-size: 0.9375rem;
  transition: border-color 160ms, color 160ms;
}
.contact__copy:hover { border-color: var(--ink); }
.contact__copy.is-copied { border-color: var(--magenta); color: var(--magenta); }
.contact__social { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin-top: 2.5rem; }
.contact__social a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; color: var(--ink); font-weight: 600; text-decoration: none; }
.contact__social a:hover { color: var(--magenta); }
.contact__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem;
  margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.contact__facts dt { font-size: 0.8125rem; color: var(--ink-soft); margin-bottom: 0.25rem; }
.contact__facts dd { font-weight: 560; }

/* ---------- Footer ---------- */
.footer {
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding: 1.5rem 0 2.5rem; border-top: 1.5px solid var(--ink);
  font-size: 0.875rem; color: var(--ink-soft);
}
.footer__coords { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

/* ==========================================================================
   Articles (writing pages)
   ========================================================================== */
.article { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 96px)); padding-bottom: 6rem; }
.article__back { margin-bottom: 2rem; }
.article__back a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--magenta); }
.article__back a:hover { color: var(--magenta); }
.article__title { font-size: clamp(2.4rem, 1.2rem + 5vw, 4.6rem); font-stretch: 118%; font-weight: 740; line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance; }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-top: 1.25rem; font-size: 0.9375rem; color: var(--ink-soft); }
.article__hero { margin: 2.5rem 0 3rem; border: 1.5px solid var(--ink); aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-deep); }
.article__hero img { width: 100%; height: 100%; object-fit: cover; filter: var(--duo); }
.prose { font-size: 1.125rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.4em; font-size: var(--step-2); font-weight: 700; line-height: 1.2; letter-spacing: -0.012em; }
.prose h3 { margin-top: 1.8em; font-size: var(--step-1); font-weight: 680; line-height: 1.3; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose ul { padding-left: 1.4em; list-style: none; }
.prose ul li { position: relative; }
.prose ul li + li { margin-top: 0.45em; }
.prose ul li::before { content: ""; position: absolute; left: -1.1em; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--magenta); }
.prose pre {
  overflow-x: auto; padding: 1rem 1.15rem; border-left: 3px solid var(--magenta);
  background: var(--paper-deep); font-size: 0.9375rem; line-height: 1.55;
}
.prose code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }
.prose :not(pre) > code { padding: 0.1em 0.35em; background: var(--paper-deep); border-radius: 2px; }
.prose img { width: 100%; height: auto; border: 1px solid var(--rule); }
.prose figure { margin: 2em 0; }
.prose b, .prose strong { font-weight: 680; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.25rem; }
.prose dt { font-weight: 650; }
.prose dt code { white-space: nowrap; }
.prose dd { margin: 0; }
.article__foot { margin-top: 4rem; padding-top: 1.5rem; border-top: 1.5px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.article__foot a { font-weight: 600; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: auto; padding-top: calc(var(--nav-h) + 48px); }
  .chart { justify-self: center; max-width: 520px; }
  .about, .endeavor__body, .feature { grid-template-columns: minmax(0, 1fr); }
  .about__portrait { position: relative; top: 0; }
  .portrait { max-width: 280px; }
  .section__head { grid-template-columns: minmax(0, 1fr); }
  .checklist { columns: 1; }
  .contact__facts { grid-template-columns: minmax(0, 1fr); }
  .products, .ai { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .nav__menu { display: inline-flex; align-items: center; }
  .nav__inner { gap: 0.75rem; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 0.8rem 0; font-size: 1.0625rem; border-bottom: 1px solid var(--rule); }
  .nav__links a::after { display: none; }
}
@media (max-width: 640px) {
  .log { padding-left: 40px; }
  .log__track { left: 9px; }
  .leg { grid-template-columns: minmax(0, 1fr); }
  .leg > *, .leg__when, .leg__where { grid-column: 1; grid-row: auto; }
  .leg__where { margin-bottom: 0.75rem; }
  .leg::before { left: -35px; }
  .leg--waypoint::before { left: -39px; }
  .education { padding-left: 0; }
  .education__list li { grid-template-columns: minmax(0, 1fr); }
  .work { grid-template-columns: minmax(0, 1fr); }
  .work__item--tall { grid-row: auto; }
  .work__item--tall .media { aspect-ratio: 4 / 3; }
  .post { grid-template-columns: 96px minmax(0, 1fr); }
  .post__meta { display: none; }
  .post__title { font-size: var(--step-1); }
  .post__excerpt { font-size: 0.9375rem; }
  .logbook table, .logbook tbody, .logbook tr, .logbook td { display: block; }
  .logbook thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .logbook td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-right: 0; border-bottom: 1px solid var(--rule); }
  .logbook td:last-child { border-bottom: 0; }
  .logbook td::before { content: attr(data-label); font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); font-stretch: 100%; white-space: normal; }
  .checklist li { flex-wrap: wrap; }
  .checklist__resp { max-width: none; }
}

@media (pointer: coarse) {
  .nav__brand, .article__back a { min-height: 44px; }
  .nav__menu { min-height: 44px; }
  .nav__theme { width: 44px; height: 44px; }
  .work__links a, .contact__social a, .contact__copy { min-height: 44px; min-width: 44px; }
  .feature__markets summary { padding-block: 10px; }
  .contact__email a { display: inline-block; padding-block: 8px; }
}
.prose pre:focus-visible { outline-offset: 2px; }

/* ==========================================================================
   Motion. Everything below is opt-in via .motion (set only when the visitor
   has not asked for reduced motion). Without it, every element sits in its
   final state.
   ========================================================================== */

/* Hero orchestration: chart prints from south to north, the name takes off
   from condensed to wide, then the route is flown (driven by site.js). */
.motion .chart__base { animation: chart-print 1500ms var(--ease-in-out) both; }
.motion .chart__scan {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--magenta); box-shadow: 0 0 12px var(--magenta);
  animation: chart-scan 1500ms var(--ease-in-out) both;
}
@keyframes chart-print { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes chart-scan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(calc(-1 * var(--chart-h, 600px))); opacity: 0; }
}

.motion .hero__line > span { animation: name-in 1250ms var(--ease-out) both; }
.motion .hero__line + .hero__line > span { animation-delay: 120ms; }
@keyframes name-in {
  from { transform: translateY(102%); font-stretch: 62%; letter-spacing: 0.02em; }
  to { transform: none; font-stretch: 125%; letter-spacing: -0.035em; }
}
.motion .hero__lede, .motion .hero__actions, .motion .hero__meta { animation: rise 800ms var(--ease-out) both; }
.motion .hero__lede { animation-delay: 420ms; }
.motion .hero__actions { animation-delay: 520ms; }
.motion .hero__meta { animation-delay: 620ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Route + waypoints before the flight. JS adds .is-flying and .is-landed. */
.motion .chart:not(.is-landed) .chart__route { stroke-dasharray: 1; stroke-dashoffset: var(--route-off, 1); }
.motion .chart:not(.is-landed) .chart__route-halo { opacity: 0; }
.motion .chart .chart__route-halo { transition: opacity 600ms; }
.motion .chart:not(.is-flying):not(.is-landed) .chart__plane { opacity: 0; }
.motion .chart .wp { opacity: 0; transition: opacity 300ms; }
.motion .chart .wp .wp__ring { transform-box: fill-box; transform-origin: center; transform: scale(0.3); transition: transform 500ms var(--ease-out), stroke 160ms, stroke-width 160ms; }
.motion .chart .wp.is-on { opacity: 1; }
.motion .chart .wp.is-on .wp__ring { transform: none; }
.motion .chart .chart__clocks { opacity: 0; transition: opacity 500ms; }
.motion .chart.is-landed .chart__clocks { opacity: 1; }
.motion .chart .chart__leg { opacity: 0; transform: translateX(-6px); transition: opacity 500ms, transform 500ms var(--ease-out); }
.motion .chart .chart__leg.is-on { opacity: 1; transform: none; }
.motion .chart.is-landed .wp__pulse { transform-box: fill-box; transform-origin: center; animation: beacon 3.2s var(--ease-out) infinite 400ms; }
@keyframes beacon { 0% { opacity: 0.8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(3.2); } }

/* Portrait: compass rose swings onto heading 360 when the section arrives. */
.motion .about .compass { rotate: -40deg; opacity: 0; transition: rotate 2200ms var(--ease-out), opacity 900ms; }
.motion .about.is-in .compass { rotate: 0deg; opacity: 0.55; }

/* Logbook odometer */
.motion .logbook .odo__strip { transform: translateY(0); transition: transform 1600ms var(--ease-out); transition-delay: calc(var(--c, 0) * 90ms + 150ms); }
.motion .logbook.is-in .odo__strip { transform: translateY(calc(var(--d) * -1em)); }

/* Defense in depth: rings ripple outward, then one radar sweep lights the blips. */
.motion .layers .layers__ring { transform-box: view-box; transform-origin: 240px 240px; opacity: 0; transform: scale(0.82); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
.motion .layers .layers__ring--core { transition-delay: 0ms; }
.motion .layers .layers__ring[data-layer="apps"] { transition-delay: 120ms; }
.motion .layers .layers__ring[data-layer="identity"] { transition-delay: 240ms; }
.motion .layers .layers__ring[data-layer="cloud"] { transition-delay: 360ms; }
.motion .layers.is-in .layers__ring { opacity: 1; transform: none; }
.motion .layers .layers__arcs { opacity: 0; transition: opacity 600ms 700ms; }
.motion .layers.is-in .layers__arcs { opacity: 1; }
.motion .layers .blip { opacity: 0; }
.motion .layers .blip circle { transform-box: fill-box; transform-origin: center; }
.motion .layers.is-in .blip { animation: blip-on 700ms var(--ease-out) both; animation-delay: calc(900ms + var(--sweep-at, 0ms)); }
@keyframes blip-on { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 1; } }
.motion .layers.is-in .blip circle { animation: blip-ping 900ms var(--ease-out) both; animation-delay: calc(900ms + var(--sweep-at, 0ms)); }
@keyframes blip-ping { 0% { transform: scale(2.4); } 100% { transform: scale(1); } }
.motion .layers.is-in .layers__sweep { animation: sweep 2400ms linear 900ms both; }
@keyframes sweep {
  0% { opacity: 0; transform: rotate(0deg); }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: rotate(360deg); }
}
.motion .layers[data-active] .blip { animation: none; opacity: 1; }
.motion .layers[data-active] .blip circle { animation: none; }
.motion .layers[data-active="cloud"] .blip:not([data-layer="cloud"]),
.motion .layers[data-active="identity"] .blip:not([data-layer="identity"]),
.motion .layers[data-active="apps"] .blip:not([data-layer="apps"]),
.motion .layers[data-active="people"] .blip { opacity: 0.25; }

/* Flight log: the plane and route follow the scroll position (site.js sets --p and --py). */
.motion .log__line { transform: scaleY(var(--p, 0)); }
.motion .log__plane { display: block; }
.motion .leg:not(.is-passed)::before { transform: scale(0.85); }

/* Checklist: items are run one by one. */
.motion [data-checklist] .checklist__lead { transform: scaleX(0); transition: transform 500ms var(--ease-out); transition-delay: calc(var(--i, 0) * 85ms); }
.motion [data-checklist] .checklist__resp { opacity: 0; transform: translateX(-6px); transition: opacity 400ms, transform 400ms var(--ease-out); transition-delay: calc(var(--i, 0) * 85ms + 250ms); }
.motion [data-checklist] li::after { scale: 0; transition: scale 350ms cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i, 0) * 85ms + 380ms); }
.motion [data-checklist].is-in .checklist__lead { transform: none; }
.motion [data-checklist].is-in .checklist__resp { opacity: 1; transform: none; }
.motion [data-checklist].is-in li::after { scale: 1; }
.motion .checklist__done { opacity: 0; transition: opacity 600ms; transition-delay: 1900ms; }
.motion [data-checklist].is-in + .checklist__done { opacity: 1; }

/* Project images develop from cyanotype to color with a scan line. */
.motion .work__item:hover .media::after,
.motion .work__item:focus-within .media::after,
.motion .product:hover .media::after,
.motion .product:focus-within .media::after,
.motion .ai figure:hover .media::after { animation: media-scan 700ms var(--ease-in-out); }
@keyframes media-scan { 0% { bottom: 0; opacity: 1; } 90% { opacity: 1; } 100% { bottom: 100%; opacity: 0; } }

/* ==========================================================================
   View transitions
   ========================================================================== */
@view-transition { navigation: auto; }
.nav__brand { view-transition-name: brand; }
::view-transition-old(root) { animation: 220ms var(--ease-standard) both vt-out; }
::view-transition-new(root) { animation: 380ms var(--ease-out) 60ms both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
::view-transition-group(*) { animation-duration: 450ms; animation-timing-function: var(--ease-out); }

/* Theme switch: the new theme is revealed as a circle from the toggle. */
html.theme-vt::view-transition-old(root) { animation: none; }
html.theme-vt::view-transition-new(root) { animation: theme-reveal 650ms var(--ease-in-out); }
html.theme-vt [style*="view-transition-name"], html.theme-vt .nav, html.theme-vt .nav__brand { view-transition-name: none !important; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 100%) var(--vt-y, 0)); }
  to { clip-path: circle(150vmax at var(--vt-x, 100%) var(--vt-y, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  .nav, .skip, .chart__scan, .contact__copy, .feature__globe { display: none !important; }
  .section { padding-top: 2rem; }
  .hero { min-height: auto; }
}
