/* Base styles are the static page: an illustrated resume that reads fine with no WebGPU and no JavaScript.
   html.live (added once the renderer is running) switches to the immersive scroll journey. */
:root {
  --bg: #f3f0e9;
  --text: #16181d;
  --muted: #5a5f69;
  --rule: #16181d22;
  --chip: #ffffff80;
  --ink: #16181d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --strip: 84px;
}
.dark, html.dark { --text: #eceef2; --muted: #a3a9b6; --rule: #ffffff2b; --chip: #ffffff14; }
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans); -webkit-text-size-adjust: 100%; transition: background-color 0.7s ease; }
body { margin: 0; padding-bottom: calc(var(--strip) + 24px); overflow-x: hidden; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

#stage { display: none; position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero, .band, .summary { background: var(--bg); color: var(--text); }
.col { width: min(100% - 32px, 680px); margin-inline: auto; }
.label { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(52px, 9vw, 104px); line-height: 0.98; }
h2 { font-size: clamp(36px, 5vw, 60px); line-height: 1.02; color: var(--ink); }
h3 { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 30px 0 10px; }
.role { margin: 12px 0 0; color: var(--muted); }
.honor img { height: 12px; width: 24px; flex: none; }
.honor { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin: 16px 0 0; padding: 5px 11px; border: 1px solid var(--ink); border-radius: 999px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.honor + .lede { margin-top: 14px; }
.lede { font: 400 clamp(19px, 1.6vw, 23px)/1.4 var(--serif); margin: 20px 0 0; text-wrap: pretty; }
ul { padding-left: 1.1em; margin: 18px 0 0; }
li { margin: 7px 0; text-wrap: pretty; }
li::marker { color: var(--ink); }

.hero { padding: 12vh 0 6vh; }
.hero .role { font-size: 19px; color: var(--text); }
.cue { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 40px; display: none; }

.band { padding: 64px 0; }
.band .card { border-top: 3px solid var(--ink); padding-top: 22px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 24px 0 4px; }
.stats div { border-top: 1px solid var(--rule); padding-top: 10px; }
.stats dt { font: 500 clamp(26px, 2.7vw, 36px)/1.05 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.stats dd { margin: 5px 0 0; font-size: 14px; line-height: 1.35; color: var(--muted); }

details { margin-top: 14px; }
summary { cursor: pointer; font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); padding: 8px 0; width: fit-content; }
details ul { margin-top: 6px; font-size: 15.5px; }
.pubs { font-size: 14.5px; }

/* the art: a simple gallery when static, the source of every texture when live */
.shots { width: min(100% - 32px, 980px); margin: 36px auto 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: center; }
.shots figure { margin: 0; text-align: center; }
.shots img, .shots video { max-width: 100%; max-height: 420px; width: auto; height: auto; border-radius: 10px; }
.shots figure[data-kind="logo"] img, .shots figure[data-kind="cutout"] img { border-radius: 0; max-height: 200px; }
.shots figcaption { font-size: 13.5px; line-height: 1.4; color: var(--muted); margin-top: 8px; }
.hero .shots, .summary .shots { grid-template-columns: minmax(0, 420px); justify-content: center; }
.summary .shots { display: none; }

.summary { padding: 64px 0 40px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; background: var(--chip); }
.actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 500; border: 1.5px solid var(--text); }
.button.ghost { background: transparent; color: var(--text); }
.button:hover { opacity: 0.85; }

.caption { display: none; }

/* ------------------------------------------------------------ bottom rail */
.rail { position: fixed; left: 0; right: 0; bottom: 0; height: var(--strip); z-index: 5; pointer-events: none;
  background: linear-gradient(to top, var(--bg) 60%, transparent); }
.rail .track { position: absolute; left: 0; right: 0; top: 30px; height: 1px; background: var(--rule); }
.rail .done { position: absolute; left: 0; top: -0.5px; height: 2px; background: var(--text); }
.rail .marker { position: absolute; top: -4px; width: 16px; height: 8px; margin-left: -8px; border-radius: 3px; background: var(--text); }
.stops .tick { position: absolute; top: 19px; width: 14px; height: 24px; margin-left: -7px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.stops .tick::before { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--muted); opacity: 0.55; transition: transform 0.15s; }
.stops .tick.past::before { background: var(--text); opacity: 1; }
.stops .tick:hover::before, .stops .tick:focus-visible::before { transform: scale(1.9); opacity: 1; }
.stops .tick:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; border-radius: 6px; }
.stops a { position: absolute; top: 12px; transform: translateX(-50%); pointer-events: auto; text-decoration: none; text-align: center;
  font: 500 11px/1.25 var(--mono); letter-spacing: 0.04em; color: var(--muted); padding: 0 8px 4px; white-space: nowrap; }
.stops a i { display: block; width: 11px; height: 11px; margin: 13px auto 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.stops a.past i { background: var(--ink); }
.stops a b { font-weight: 600; display: block; }
.stops a span { display: block; font-size: 10px; opacity: 0.8; }
.stops a .short { display: none; }
.stops a:hover, .stops a.on { color: var(--text); }
.stops a.on b { text-decoration: underline; text-underline-offset: 3px; }
.stops a.end { padding-inline: 2px; }
.stops a.end i { border-radius: 3px; border-color: var(--text); }
.stops a.end.past i { background: var(--text); }

#stats { display: none; position: fixed; top: 12px; z-index: 6; font: 500 11px/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.toplinks { position: fixed; top: 12px; right: 14px; z-index: 6; display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.toplinks a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text); }
.toplinks a:first-child { background: var(--text); color: var(--bg); }
.toplinks a:hover { opacity: 0.8; }
#stats { left: 14px; text-transform: none; }

/* ------------------------------------------------------------ live: the immersive journey */
.live #stage { display: block; }
.live body { touch-action: pan-y; }
.live.dragging { cursor: grabbing; user-select: none; }
.live #stats:not([hidden]) { display: block; }
.live .cue { display: block; }
.live .hero, .live .band, .live .summary { background: transparent; }
.live .shots { display: none; }
.live .col { width: min(43vw, 560px); margin-left: max(4.5vw, 28px); margin-right: auto; }
.live .hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0 0 var(--strip); }
.live .band { height: calc(var(--n, 1) * 105vh + 30vh); padding: 0; }
.live .pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding-bottom: var(--strip); pointer-events: none; }
.live .card { border-top: 0; padding-top: 0; max-height: calc(100svh - var(--strip) - 40px); overflow-y: auto; scrollbar-width: thin;
  opacity: var(--f, 1); transform: translateY(calc((1 - var(--f, 1)) * 26px)); }
.live .band.active .card { pointer-events: auto; }
.live .summary { min-height: 130vh; display: flex; align-items: center; padding: 14vh 0 8vh; }
.live .caption { display: block; position: fixed; z-index: 4; margin: 0; left: 53vw; right: 4vw; top: 80vh; text-align: center;
  font: 400 15px/1.4 var(--serif); font-style: italic; color: var(--muted); pointer-events: none; text-wrap: balance; }

@media (max-aspect-ratio: 115/100) {
  :root { --strip: 70px; }
  .live .col { width: calc(100% - 24px); margin-inline: auto; }
  .live .hero { align-items: flex-end; padding-bottom: calc(var(--strip) + 16px); }
  .live .hero h1 { font-size: 46px; }
  .live .hero .lede { font-size: 17px; margin-top: 12px; }
  .live .cue { margin-top: 18px; }
  .live .pin { align-items: flex-end; padding-bottom: calc(var(--strip) + 10px); }
  .live .card { max-height: 44svh; padding: 18px 18px 16px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 30px #00000022; }
  .live .summary { align-items: flex-start; padding-top: 50svh; }
  .live .caption { left: 16px; right: 16px; top: 41svh; font-size: 13px; }
  .stats { gap: 12px 16px; margin-top: 18px; }
  .stops a span, .stops a .long { display: none; }
  .stops a .short { display: block; }
  .stops a { padding: 0 9px 6px; font-size: 12px; }
}

/* Short laptop screens: tighten the card so a whole company fits without inner scrolling. */
@media (min-aspect-ratio: 115/100) and (max-height: 860px) {
  .live { font-size: 15px; }
  .live h2 { font-size: clamp(32px, 4.4vw, 46px); }
  .live .lede { font-size: 18px; margin-top: 14px; }
  .live .stats { gap: 10px 20px; margin-top: 16px; }
  .live .stats dt { font-size: 25px; }
  .live .stats dd { font-size: 13px; }
  .live .card ul { margin-top: 12px; }
  .live li { margin: 4px 0; }
  .live .label { margin-bottom: 8px; }
}

@media print {
  .rail, .toplinks, #stats, #stage, .caption { display: none !important; }
  body { padding: 0; }
}
