/* Bryce Lee — NCAS career portfolio
   One ground, one ink, one accent: International Orange, the colour of the SLS core stage foam.
   Switzer, one family. Square corners everywhere. */

@font-face { font-family: 'Switzer'; src: url('fonts/switzer-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('fonts/switzer-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('fonts/switzer-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --bg: #f4f5f3;
  --surface: #e6e8e4;
  --surface-2: #d5d8d3;
  --paper: #ffffff;
  --ink: #111315;
  --muted: #4a4f55;
  --accent: #e8530e;
  --accent-ink: #111315;
  --dark: #111315;
  --dark-2: #1c1f22;
  --dark-ink: #eef0ec;
  --dark-muted: #a7adb3;

  --font: 'Switzer', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --small: clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);
  --body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --lead: clamp(1.375rem, 1.15rem + 0.75vw, 1.875rem);
  --head: clamp(2.125rem, 1.3rem + 2.8vw, 4rem);
  --display: clamp(3.75rem, 1rem + 7.2vw, 8.5rem);

  --m: clamp(16px, 2.2vw, 32px);            /* the one page margin, equal on both sides */
  --pad: clamp(0px, 3vw, 56px);             /* gap on the inner side of a reading column */
  --section: clamp(7.5rem, 12vw, 15rem);    /* space between sections */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ───────── reset ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--body); line-height: 1.5; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
a { color: inherit; }
:target { scroll-margin-top: 1.5rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -4rem; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 0.7rem 1rem; text-decoration: none; }
.skip:focus { top: var(--m); }

/* ───────── type ───────── */
h1, h2, h3, h4 { font-weight: 500; text-wrap: balance; }
.display { font-size: var(--display); line-height: 0.92; letter-spacing: -0.045em; font-weight: 500; }
.head { font-size: var(--head); line-height: 1.02; letter-spacing: -0.035em; }
.lead { font-size: var(--lead); line-height: 1.28; letter-spacing: -0.02em; }
.small { font-size: var(--small); line-height: 1.45; letter-spacing: 0; }
p { max-width: 62ch; text-wrap: pretty; }
em { font-style: italic; }
.nums { font-variant-numeric: tabular-nums; }
sup.cite { font-size: 0.6em; line-height: 0; vertical-align: 0.6em; margin-left: 0.08em; font-weight: 500; letter-spacing: 0; }
sup.cite a { text-decoration: none; padding: 0 0.1em; }
sup.cite a:hover { text-decoration: underline; }
mark.todo { background: rgb(232 83 14 / 0.18); color: inherit; padding: 0 0.12em; }
.path mark.todo, .foot mark.todo { background: rgb(232 83 14 / 0.32); }

/* ───────── controls ───────── */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap; transition: transform 140ms var(--ease-out), background-color 180ms ease, color 180ms ease; }
.button--small { min-height: 2.5rem; padding: 0 1rem; font-size: var(--small); }
.button:active { transform: scale(0.97); }
.link, .link-plain { text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color 180ms ease, color 180ms ease; }
.link { text-decoration: underline; text-decoration-color: transparent; }
.link-plain { text-decoration: underline; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--ink); color: var(--bg); }
  .link:hover { text-decoration-color: currentColor; }
  .link-plain:hover { color: var(--accent); }
}

/* ───────── figures in the flow (phone, print, no-script) ───────── */
.figure__frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.figure__frame img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption { margin-top: 0.7rem; color: var(--muted); max-width: 56ch; }
.figure--dark figcaption { color: var(--dark-muted); }

/* ───────── split stage: half the screen never moves ───────── */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--m); padding: var(--m); }
.stage--b { padding-top: 0; }
.stage__col { min-width: 0; }
.stage--a .stage__col { padding-inline: 0 var(--pad); }
.stage--b .stage__col { padding-inline: var(--pad) 0; }
.stage__media { position: sticky; top: var(--m); height: calc(100svh - 2 * var(--m)); overflow: hidden; background: var(--dark); align-self: start; }
.stage__frame { position: absolute; inset: 0; opacity: 0; transition: opacity 1600ms ease; }
.stage__frame.is-on { opacity: 1; z-index: 1; }
.stage__img { position: absolute; inset: 0; overflow: hidden; }
.stage__img img, .stage__img video { width: 100%; height: 100%; object-fit: cover; }
.stage__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; padding: 0.95rem 1.2rem 1rem; background: var(--bg); font-size: var(--small); line-height: 1.4; }
.stage__bar > span:first-child { max-width: 52ch; }
.stage__tag { color: var(--muted); white-space: nowrap; }
.only-flow { display: none; }

/* hero */
.hero { min-height: calc(100svh - 2 * var(--m)); display: grid; grid-template-rows: auto 1fr auto; }
.nav { display: flex; align-items: center; gap: 1.6rem; min-height: 3.5rem; font-size: var(--small); }
.nav__name { font-weight: 500; text-decoration: none; margin-right: auto; font-size: var(--body); }
.nav__links { display: flex; gap: 1.4rem; }
.nav__links a { text-decoration-thickness: 0.08em; }
.hero__body { align-self: center; padding-block: 12vh 8vh; }
.hero__name { overflow: hidden; padding-bottom: 0.24em; margin-bottom: -0.24em; }
.hero__name .rise { display: inline-block; }
.hero__line { margin-top: 2.2rem; max-width: 36ch; }
.hero__actions { margin-top: 2.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; }
.hero__facts { display: grid; grid-template-columns: repeat(2, max-content); gap: 1.4rem 4rem; padding-bottom: 0.4rem; }
.hero__facts dt { color: var(--muted); }
.hero__facts dd { margin-top: 0.15rem; font-weight: 500; }

/* summary */
.summary { padding-block: var(--section) calc(var(--section) * 0.75); }
.summary .prose { margin-top: 2.8rem; }
.prose p + p { margin-top: 1.1em; }
.prose p.lead { max-width: 34ch; margin-bottom: 1.6rem; }

/* ───────── skill map ───────── */
.map { background: var(--surface); padding: var(--section) var(--m); }
.map__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--m); align-items: end; }
.map__head .lead { max-width: 30ch; }
.map__grid { position: relative; margin-top: clamp(3rem, 6vw, 6rem); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 1.3fr) minmax(0, 2.6fr) minmax(0, 0.9fr) minmax(0, 3.2fr); align-items: start; }
.map__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.map__lines path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 0; }
.map__skills { grid-column: 1; position: relative; z-index: 1; }
.map__targets { display: contents; }
.map__col { position: sticky; top: 18vh; z-index: 1; }
.map__col--exp { grid-column: 3; }
.map__col--area { grid-column: 5; }
.map__grid--exp-only { grid-template-columns: minmax(0, 6fr) minmax(0, 1.6fr) minmax(0, 3.6fr); }
.map__label { font-size: var(--small); color: var(--muted); font-weight: 400; margin-bottom: 0.9rem; }
.map__col ul { display: grid; gap: 0.5rem; }

.skill { position: relative; display: grid; width: 100%; padding: 0.9rem 1.2rem 0.95rem 2.4rem; transition: background-color 240ms var(--ease-out); }
.skill::before { content: ''; position: absolute; left: 0.85rem; top: calc(0.9rem + 0.42em * 1.6); width: 0.6rem; height: 0.6rem; background: var(--surface-2); transition: background-color 240ms var(--ease-out), transform 240ms var(--ease-out); font-size: var(--lead); }
.skill__name { font-size: var(--lead); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.skill__detail { margin-top: 0.3rem; font-size: var(--small); color: var(--muted); max-width: 52ch; }
.skill__links { display: none; margin-top: 0.55rem; font-size: var(--small); font-weight: 500; }
.skill[aria-pressed='true'] { background: var(--bg); }
.skill[aria-pressed='true']::before { background: var(--accent); transform: scale(1.35); }
.skill[aria-pressed='true'] .skill__links { display: block; }
@media (hover: hover) and (pointer: fine) {
  .skill:hover { background: rgb(244 245 243 / 0.6); }
  .skill:hover::before { background: var(--accent); }
}

.node { display: grid; padding: 0.85rem 1rem 0.9rem; text-decoration: none; background: var(--bg); transition: background-color 260ms var(--ease-out), color 260ms var(--ease-out), transform 260ms var(--ease-out); }
.node__name { font-weight: 500; line-height: 1.25; }
.node__sub { font-size: var(--small); color: var(--muted); margin-top: 0.15rem; transition: color 260ms var(--ease-out); }
.node.is-linked { background: var(--accent); color: var(--accent-ink); }
.node.is-linked .node__sub { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .node:hover { transform: translateX(4px); } }

/* ───────── experiences ───────── */
.experiences__head { padding-block: var(--section) 2rem; }
.experiences__head .lead { margin-top: 1.6rem; max-width: 32ch; }
.exp { padding-block: clamp(4rem, 9vw, 8rem); min-height: 92svh; display: grid; align-content: center; }
.exp:last-child { padding-bottom: var(--section); }
.exp__meta { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; color: var(--muted); font-size: var(--small); }
.exp__meta span:first-child { color: var(--ink); font-weight: 500; }
.exp__body { margin-top: 2.4rem; display: grid; gap: 2rem; }
.exp__h { font-size: var(--body); font-weight: 500; margin-bottom: 0.5rem; }
.exp__align { background: var(--surface); padding: 1.4rem 1.5rem 1.5rem; position: relative; }
.exp__align .exp__h::before { content: ''; display: inline-block; width: 0.55em; height: 0.55em; background: var(--accent); margin-right: 0.6em; vertical-align: 0.08em; }
.exp__skills { margin-top: 1.8rem; color: var(--muted); max-width: 60ch; }
.exp__skills-label { color: var(--ink); font-weight: 500; }

/* ───────── pathway (dark field) ───────── */
.path { background: var(--dark); color: var(--dark-ink); position: relative; }
.path__pin { padding: var(--section) var(--m) calc(var(--section) * 0.5); }
.path__title { font-size: min(var(--display), 8vh + 1.6rem); }
.path__panels { margin-top: 3rem; display: grid; gap: 4.5rem; }
.area__name { font-weight: 500; }
.area__where { color: var(--dark-muted); margin-top: 0.3rem; }
.area .figure { margin-top: 1.4rem; }
.area__text { margin-top: 1.2rem; max-width: 46ch; }
.area__path { margin-top: 1rem; color: var(--dark-muted); max-width: 46ch; font-size: var(--small); }
.area__path-label { color: var(--dark-ink); font-weight: 500; }
.path__index, .path__media { display: none; }
.path sup.cite a { color: var(--dark-ink); }

/* pinned layout: wide screens with script */
@media screen and (min-width: 1000px) {
  .js .path { height: calc(var(--n) * 70svh + 30svh); }
  .js .path__pin { position: sticky; top: 0; height: 100svh; padding: 0; display: grid; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }
  .js .path__text { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; padding: calc(var(--m) + 2vh) var(--pad) var(--m) var(--m); }
  .js .path__panels { position: relative; margin: 0; display: block; min-height: 0; }
  .js .area { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out), visibility 0s 500ms; }
  .js .area.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 600ms var(--ease-out) 120ms, transform 800ms var(--ease-out) 120ms, visibility 0s; }
  .js .area .only-flow { display: none; }
  .js .path__index { display: block; margin-bottom: 0.4rem; }
  .js .path__row { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 1rem; min-height: 2.75rem; padding: 0.45rem 0; color: var(--dark-muted); transition: color 240ms ease; white-space: nowrap; }
  .js .path__row > span:first-child { font-size: var(--body); font-weight: 500; }
  .js .path__row-where { font-size: var(--small); overflow: hidden; text-overflow: ellipsis; }
  .js .path__row.is-on { color: var(--dark-ink); }
  .js .path__row.is-on > span:first-child::before { content: ''; display: inline-block; width: 0.42em; height: 0.42em; background: var(--accent); margin-right: 0.5em; vertical-align: 0.12em; }
  .js .path__row:hover { color: var(--dark-ink); }
  .js .path__media { display: block; position: relative; overflow: hidden; background: var(--dark-2); }
  .js .path__frame { position: absolute; inset: 0; clip-path: inset(100% 0 0 0); transition: clip-path 1000ms var(--ease-in-out); }
  .js .path__frame.is-past, .js .path__frame.is-on { clip-path: inset(0); }
  .js .path__frame.is-on { z-index: 2; }
  .js .path__frame img, .js .path__frame video { width: 100%; height: 100%; object-fit: cover; }
  .js .path__cap { position: absolute; left: 0; bottom: 0; max-width: 60ch; padding: 0.95rem 1.2rem 1rem; background: var(--dark); color: var(--dark-muted); }
}

/* route */
.route { padding: calc(var(--section) * 0.5) var(--m) calc(var(--section) * 0.6); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--m) calc(var(--m) * 2); }
.route__list { display: grid; gap: 1.6rem; }
.route__step { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 5fr); gap: 0.4rem var(--m); align-items: baseline; }
.route__when { color: var(--muted); }
.route__now { font-weight: 600; color: var(--accent); }
.route__what { font-weight: 500; }
.route__detail { color: var(--muted); }

/* ───────── resume ───────── */
.resume { background: var(--surface); padding: var(--section) var(--m); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--m) calc(var(--m) * 2); align-items: start; }
.resume__side { position: sticky; top: 3rem; display: grid; gap: 1.4rem; justify-items: start; }
.resume__side p { max-width: 30ch; }
.resume__paper { container-type: inline-size; min-width: 0; }
.cv { background: var(--paper); padding: 2.2rem 2rem; font-size: 0.9375rem; line-height: 1.42; letter-spacing: 0; }
@media screen and (min-width: 1200px) {
  .resume__paper { max-width: 1020px; }
  .cv { aspect-ratio: 8.5 / 11; padding: 6.2cqi 6.8cqi; font-size: max(13px, 1.62cqi); overflow: hidden; }
}
.cv__name { font-size: 2.3em; line-height: 1; letter-spacing: -0.035em; font-weight: 500; }
.cv__contact { margin-top: 0.55em; color: var(--muted); max-width: none; }
.cv__objective { margin-top: 0.8em; max-width: none; }
.cv__sec { margin-top: 1.25em; }
.cv__sec h4 { font-size: 1em; font-weight: 600; margin-bottom: 0.35em; display: flex; align-items: center; gap: 0.55em; }
.cv__sec h4::before { content: ''; width: 0.55em; height: 0.55em; background: var(--accent); }
.cv__item + .cv__item { margin-top: 0.7em; }
.cv__row { display: flex; justify-content: space-between; gap: 1.5em; }
.cv__row strong { font-weight: 600; }
.cv__sub { color: var(--muted); }
.cv__notes { margin-top: 0.2em; max-width: none; }
.cv__bullets { margin: 0.25em 0 0; padding-left: 1.1em; }
.cv__bullets li + li { margin-top: 0.1em; }
.cv__skills { display: grid; gap: 0.2em; }
.cv__skills div { display: grid; grid-template-columns: 9.5em 1fr; gap: 1em; }
.cv__skills dt { font-weight: 600; }
.cv__plain { list-style: none; padding: 0; display: grid; gap: 0.2em; }

/* ───────── references ───────── */
.refs { padding: var(--section) var(--m) calc(var(--section) * 0.6); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--m) calc(var(--m) * 2); }
.refs__list { columns: 2; column-gap: calc(var(--m) * 2); padding-left: 1.6em; line-height: 1.45; }
.refs__list li { break-inside: avoid; margin-bottom: 0.9em; padding-left: 0.3em; scroll-margin-top: 2rem; }
.refs__list li::marker { font-variant-numeric: tabular-nums; font-weight: 500; }
.refs__list li:target { background: rgb(232 83 14 / 0.18); }
.refs__url { display: block; color: var(--muted); overflow-wrap: anywhere; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }
.refs__url:hover { color: var(--ink); }

/* AI disclosure: shares the references grid */
.ai { padding-bottom: 0; }
.ai__text p + p { margin-top: 0.9em; }

/* ───────── footer ───────── */
.foot { padding: calc(var(--section) * 0.55) var(--m) var(--m); }
.foot__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 3rem; align-items: end; color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; color: var(--ink); }

/* ───────── narrower screens ───────── */
@media screen and (max-width: 1100px) {
  .map__head, .refs, .route { grid-template-columns: 1fr; }
  .refs__list { font-size: var(--body); }
}
@media screen and (max-width: 899px) {
  :root { --pad: 0px; --section: clamp(4.5rem, 16vw, 7rem); }
  .stage { display: block; padding: var(--m); }
  .stage--b { padding-top: 0; }
  .stage__media { display: none; }
  .only-flow { display: block; }
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .nav { order: 0; flex-wrap: wrap; gap: 0.6rem 1.1rem; padding-bottom: 0.8rem; }
  .nav__name { width: 100%; margin-right: 0; }
  .nav .button { display: none; }
  .figure--hero { order: 1; margin-inline: calc(var(--m) * -1); }
  .figure--hero .figure__frame { aspect-ratio: auto; height: 52svh; }
  .figure--hero figcaption { padding-inline: var(--m); }
  .hero__body { order: 2; padding-block: 2.6rem 2.4rem; }
  .hero__facts { order: 3; grid-template-columns: 1fr; gap: 0.9rem; }
  .hero__line { margin-top: 1.3rem; }
  .hero__actions { margin-top: 1.8rem; }
  .summary .figure, .exp .figure { margin-top: 2.4rem; }
  .exp { min-height: 0; padding-block: 3.5rem; }
  .exp .figure { margin-top: 1.8rem; }

  .map { padding-inline: var(--m); }
  .map__grid { display: flex; flex-direction: column; }
  .map__lines { display: none; }
  .map__targets { order: -1; display: grid; gap: 0.6rem; position: sticky; top: 0; z-index: 3; background: var(--surface); padding: 0.8rem 0 0.9rem; margin-bottom: 0.4rem; }
  .map__col, .map__col--exp, .map__col--area { grid-column: auto; }
  .map__col { position: static; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: start; gap: 0.6rem; }
  .map__label { margin: 0.45rem 0 0; }
  .map__col ul { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; }
  .node { padding: 0.45rem 0.6rem; font-size: var(--small); }
  .node__sub { display: none; }
  .map__skills { margin-top: 0.4rem; }
  .skill { padding: 0.85rem 0.7rem 0.9rem 2rem; }
  .skill::before { left: 0.7rem; }

  .route__step { grid-template-columns: 1fr; gap: 0.15rem; }
  .resume { grid-template-columns: 1fr; padding-inline: var(--m); }
  .resume__side { display: contents; }
  .resume__side .button { order: 2; justify-self: start; margin-top: 0.6rem; }
  .resume__paper { order: 1; }
  .cv { padding: 1.5rem 1.2rem; font-size: 1rem; }
  .cv__row { flex-direction: column; gap: 0; }
  .cv__skills div { grid-template-columns: 1fr; gap: 0; }
  .refs { padding-inline: var(--m); }
  .refs__list { columns: 1; }
  .foot__row { grid-template-columns: 1fr; }
  .path__pin, .route { padding-inline: var(--m); }
}

/* ───────── motion ───────── */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__name .rise { transform: translateY(135%); animation: rise 1100ms var(--ease-out) 120ms forwards; }
  .js [data-rise] { opacity: 0; transform: translateY(20px); animation: fade-rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 380ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .figure[data-reveal] { opacity: 1; transform: none; }
  .js .figure[data-reveal] .figure__frame { clip-path: inset(0 0 100% 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js .figure[data-reveal] img { transform: scale(1.12); transition: transform 1600ms var(--ease-soft); }
  .js .figure[data-reveal].is-in .figure__frame { clip-path: inset(0); }
  .js .figure[data-reveal].is-in img { transform: none; }
  .stage__frame.is-on .stage__img img { animation: drift 16s var(--ease-soft) both; }
  .js .path__frame.is-on img { animation: drift 14s var(--ease-soft) both; }
  .map__lines path { animation: draw 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 60ms); }
}
@keyframes rise { to { transform: none; } }
@keyframes fade-rise { to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ───────── resume-only page (for the resume PDF) ───────── */
.cv-page { background: var(--paper); }
.cv-only { max-width: 816px; margin: 0 auto; }

/* ───────── print / PDF ───────── */
@page { size: letter; margin: 0.5in 0.55in; }
@media print {
  :root { --small: 8.6pt; --body: 10pt; --lead: 13.5pt; --head: 24pt; --display: 52pt; --section: 0.3in; --m: 0in; --pad: 0in; }
  html, body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: var(--body); line-height: 1.42; }
  .js [data-reveal], .js [data-rise], .js .hero__name .rise, .js .figure[data-reveal] .figure__frame, .js .figure[data-reveal] img { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
  .skip, .nav, .hero__actions, .stage__media, .map__lines, .map__targets, .path__index, .path__media, .resume__side .button, .foot__links a[download], .foot__links a[href='#top'] { display: none !important; }
  a { text-decoration: none; }
  .only-flow { display: block; }
  .figure, .exp__body > div, .area, .route__step, .refs__list li { break-inside: avoid; }
  .figure__frame { aspect-ratio: auto; height: 2.7in; }
  .figure figcaption { margin-top: 0.06in; }

  .stage { display: block; padding: 0; }
  .stage__col { padding: 0; }
  .hero { min-height: 0; display: block; }
  .nav { min-height: 0; }
  .nav__name { font-size: var(--body); }
  .hero__body { padding: 0.1in 0 0.2in; }
  .hero__line { margin-top: 0.14in; max-width: 44ch; }
  .hero__facts { margin-bottom: 0.2in; }
  .figure--hero .figure__frame { height: 6.2in; }
  .summary { padding: 0.35in 0 0; break-before: page; }
  .summary .prose { margin-top: 0.18in; }
  .summary .figure { margin-top: 0.22in; }
  .summary .figure__frame { height: 2.05in; }
  .prose p.lead { margin-bottom: 0.1in; max-width: none; }
  p { max-width: none; }

  .map { background: #fff; padding: 0; break-before: page; }
  .map__head { display: block; }
  .map__head .lead { margin-top: 0.08in; max-width: none; }
  .map__grid { display: block; margin-top: 0.2in; }
  .map__skills { columns: 2; column-gap: 0.3in; }
  .map__skills li { break-inside: avoid; }
  .skill { padding: 0.07in 0 0.09in 0.2in; background: none !important; }
  .skill::before { left: 0; top: 0.12in; background: var(--accent) !important; width: 0.07in; height: 0.07in; transform: none !important; }
  .skill__name { font-size: 11.5pt; }
  .skill__detail { font-size: 9pt; }
  .skill__links { display: block !important; font-size: 8.6pt; margin-top: 0.03in; }

  .stage--b .stage__col { padding: 0; }
  .experiences { break-before: page; }
  .experiences__head { padding: 0 0 0.05in; }
  .experiences__head .lead { margin-top: 0.08in; }
  .exp { min-height: 0; padding: 0.3in 0 0; display: grid; grid-template-columns: minmax(0, 1fr) 2.5in; grid-template-areas: 'title title' 'meta meta' 'body fig' 'skills fig'; column-gap: 0.25in; align-content: start; break-inside: avoid; }
  .exp__title { grid-area: title; }
  .exp__meta { grid-area: meta; }
  .exp .figure { grid-area: fig; }
  .exp__body { grid-area: body; }
  .exp__skills { grid-area: skills; }
  .exp:last-child { padding-bottom: 0; }
  .exp__title { font-size: 18pt; break-after: avoid; }
  .exp__meta { break-after: avoid; }
  .exp .figure { margin-top: 0.14in; }
  .exp .figure__frame { height: 2.9in; }
  .exp__body { margin-top: 0.14in; gap: 0.1in; }
  .exp__align { padding: 0.1in 0.14in; }
  .exp__skills { margin-top: 0.1in; }

  .path { background: var(--dark); height: auto !important; margin-top: 0; padding: 0.25in 0.3in 0.05in; break-before: page; }
  .path__panels { margin-top: 0.12in !important; }
  .path__title { break-after: avoid; }
  .path__pin { position: static !important; height: auto !important; display: block !important; padding: 0 !important; }
  .path__text { display: block !important; padding: 0 !important; }
  .path__title { font-size: var(--head); }
  .path__panels { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0.25in 0.3in !important; margin-top: 0.2in !important; position: static !important; }
  .area { position: static !important; opacity: 1 !important; visibility: visible !important; transform: none !important; display: block !important; }
  .area .only-flow { display: block !important; }
  .area .figure__frame { height: 0.8in; }
  .area__text { font-size: 9.3pt; margin-top: 0.06in; }
  .area .figure { margin-top: 0.1in; }
  .path__panels { gap: 0.18in 0.3in !important; }
  .route { display: block; padding: 0.15in 0 0.1in; break-inside: avoid; break-before: avoid; }

  .route__title { break-after: avoid; }
  .area__path { margin-top: 0.06in; }
  .route__title { font-size: 15pt; }
  .route__list { margin-top: 0.1in; gap: 0.07in; font-size: 9.6pt; }
  .route__step { gap: 0 0.2in; }

  .resume { display: block; background: #fff; padding: 0; break-before: page; break-after: page; }
  .resume__side { display: none; }
  .resume__paper { max-width: none; container-type: normal; }
  .cv { aspect-ratio: auto; padding: 0; font-size: 9.4pt; line-height: 1.36; height: 10in; overflow: hidden; }

  .refs { display: block; padding: 0; }
  .ai { padding: 0 0 0.2in; break-inside: avoid; }
  .ai .head, .refs .head { font-size: 18pt; }
  .ai__text { margin-top: 0.1in; }
  .refs__list { margin-top: 0.1in; font-size: 7.8pt; line-height: 1.32; columns: 2; column-gap: 0.3in; }
  .refs__list li { margin-bottom: 0.45em; }
  .refs__url { color: var(--muted); }
  .foot { padding: 0.15in 0 0; break-inside: avoid; }
  .foot__row { display: block; }

  .cv-page .cv { height: auto; font-size: 10pt; }
  .cv-only { max-width: none; }
}
