/* ==========================================================================
   Clint Cadio — "Race Day"
   The page is laid out like a course: Start → Work → About → Splits → Finish.
   Night palette: carbon page, bone type, warm grey details.
   Archivo (condensed for display), IBM Plex Mono for timing labels.
   ========================================================================== */

:root {
  --bg: #1b1b1b;      /* carbon */
  --fg: #edeae3;      /* bone */
  --mute: #8a857d;    /* warm grey */
  --line: #34322f;
  --panel: #232220;
  --soft: #c9c4ba;    /* body copy on panels */
  --bg-rgb: 27, 27, 27;
  --fg-rgb: 237, 234, 227;
  --cal0: #232220; --cal1: #33312e; --cal2: #57534d; --cal3: #a29d93;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}

/* Day run: the same course, inverted. Bone page, carbon type. */
:root[data-theme="light"] {
  --bg: #edeae3;
  --fg: #1b1b1b;
  --mute: #6d6860;
  --line: #d4d0c7;
  --panel: #e2ded5;
  --soft: #3b3935;
  --bg-rgb: 237, 234, 227;
  --fg-rgb: 27, 27, 27;
  --cal0: #e2ded5; --cal1: #cfcac0; --cal2: #9a958b; --cal3: #4e4a44;
}
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; padding: 8px 14px; background: var(--fg); color: var(--bg); }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* Timing-sheet labels */
.tag {
  font: 400 11px/1.6 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
.slant { font-style: italic; font-weight: 300; font-variation-settings: "wdth" 88; letter-spacing: -.01em; }

/* Underline that draws in on hover */
.finish-grid a, .course-name, .finish-base a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.finish-grid a:hover, .course-name:hover, .finish-base a:hover { background-size: 100% 1px; }

/* ---------- Course bar ---------- */
.course { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); border-bottom: 1px solid transparent; }
.course.is-scrolled { background: rgba(var(--bg-rgb), .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.course.is-finish { color: var(--bg); }
.course.is-finish.is-scrolled { background: rgba(var(--fg-rgb), .82); border-color: rgba(var(--bg-rgb), .1); }
.course-inner { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); height: 60px; padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.course-name { font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.course-cta { font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 9px 14px; border: 1px solid currentColor; border-radius: 4px; transition: background-color .4s var(--ease), color .4s var(--ease); }
.course-cta:hover { background: var(--fg); color: var(--bg); }
.course.is-finish .course-cta:hover { background: var(--bg); color: var(--fg); }
.course-track { position: relative; flex: 1; max-width: 640px; margin: 0 auto; }
.course-line { position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: currentColor; opacity: .22; }
.course-fill { position: absolute; left: 6px; top: 50%; height: 1px; width: 0; background: currentColor; }
.course-track ol { position: relative; display: flex; justify-content: space-between; }
.course-track a { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.cp-dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid currentColor; background: var(--bg); transition: background-color .4s var(--ease), transform .4s var(--ease); }
.course.is-finish .cp-dot { background: var(--fg); }
.cp-label { font: 400 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .55; transition: opacity .4s; padding-right: 8px; background: var(--bg); }
.course.is-finish .cp-label { background: var(--fg); }
.course.is-scrolled .cp-label { background: transparent; }
.course-track a.is-passed .cp-dot { background: currentColor; }
.course-track a.is-here .cp-dot { background: currentColor; transform: scale(1.25); }
.course-track a.is-here .cp-label, .course-track a:hover .cp-label { opacity: 1; }
@media (max-width: 820px) { .cp-label { display: none; } .course-track { max-width: 260px; } }

/* ---------- Start ---------- */
.start { min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 40px; }
.start .wrap { width: 100%; }
.start-top { display: flex; align-items: center; gap: 22px; margin-bottom: clamp(28px, 4vh, 48px); }
.bib {
  display: grid; grid-template-rows: auto 1fr auto; place-items: center;
  min-width: 74px; height: 86px; padding: 6px 12px; border: 1.5px solid var(--fg); border-radius: 6px;
}
.bib-top, .bib-bottom { font: 500 8.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.bib-no { font: 800 36px/1 var(--sans); font-variation-settings: "wdth" 66; letter-spacing: .01em; }
.headline, .seg-title, .finish-title {
  font-family: var(--sans); font-weight: 800; font-variation-settings: "wdth" 68;
  text-transform: uppercase; letter-spacing: -.005em;
}
.headline { font-size: clamp(48px, 7.6vw, 100px); line-height: .88; }
.ln { display: block; overflow: hidden; padding-bottom: .04em; }
.ln > span { display: inline-block; }
.start-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: clamp(32px, 5vh, 56px); }
.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(48px, 9vh, 96px); padding-top: 20px; border-top: 1px solid var(--line); }
.readout dd { margin-top: 6px; font-size: 15px; }
@media (max-width: 760px) {
  /* Phones: the start is one clean screen (sphere, title, headline, button); the detail row is left out */
  .start { min-height: 100svh; padding-top: 0; padding-bottom: calc(max(40px, env(safe-area-inset-bottom)) + 5svh); align-items: flex-end; }
  .start .readout { display: none; }
}

/* ---------- Segments ---------- */
.seg { padding-top: clamp(120px, 18vh, 200px); }
.seg-head { margin-bottom: clamp(48px, 8vh, 80px); }
.seg-no { display: flex; align-items: center; gap: 14px; font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 22px; }
.seg-no > span:first-child { color: var(--fg); }
.seg-no > span:first-child::after { content: ""; display: inline-block; width: 48px; height: 1px; margin-left: 14px; vertical-align: middle; background: currentColor; opacity: .5; }
.seg-title { font-size: clamp(44px, 7.4vw, 120px); line-height: .88; }
.seg-deck { margin-top: 24px; max-width: 44ch; color: var(--mute); font-size: 17px; }

/* ---------- Work: results board ---------- */
.results { border-top: 1px solid var(--fg); }
.result {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px);
  padding: clamp(20px, 3vh, 28px) 0; border-bottom: 1px solid var(--line);
}
.result-stat {
  display: flex; flex-direction: column; justify-content: center; min-height: clamp(220px, 30vw, 380px);
  padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .6s var(--ease);
}
.result:hover .result-stat { border-color: var(--mute); }
.result--lead .result-stat { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.stat { font: 800 clamp(84px, 13vw, 210px)/.82 var(--sans); font-variation-settings: "wdth" 66; letter-spacing: -.01em; white-space: nowrap; }
.stat--word { font-size: clamp(56px, 8vw, 128px); text-transform: uppercase; }
.stat-sub { margin-top: 16px; font: italic 300 clamp(18px, 1.8vw, 26px)/1.2 var(--sans); font-variation-settings: "wdth" 88; opacity: .7; }
.result-body { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.result-body h3 { font: 800 clamp(34px, 3.6vw, 52px)/1 var(--sans); font-variation-settings: "wdth" 72; text-transform: uppercase; }
.result-body > p:not(.tag) { color: var(--soft); max-width: 46ch; }
.live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--fg); vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.facts dd { margin-top: 4px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips li { font: 400 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--soft); }
@media (max-width: 860px) { .result { grid-template-columns: minmax(0, 1fr); } }
.result-stat, .result-body { min-width: 0; }

/* ---------- Strava calendar ---------- */
.strava { margin-top: clamp(80px, 12vh, 140px); }
.strava-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.strava-total { margin-top: 10px; font: 800 clamp(40px, 5vw, 72px)/1 var(--sans); font-variation-settings: "wdth" 68; text-transform: uppercase; }
.strava-total .slant { color: var(--mute); text-transform: none; font-size: .62em; }
.cal { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.cal i, .cal-key i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--cal0); }
.cal i[data-l="1"], .cal-key i[data-l="1"] { background: var(--cal1); }
.cal i[data-l="2"], .cal-key i[data-l="2"] { background: var(--cal2); }
.cal i[data-l="3"], .cal-key i[data-l="3"] { background: var(--cal3); }
.cal i[data-l="4"], .cal-key i[data-l="4"] { background: var(--fg); }
.cal i.pad { visibility: hidden; }
.cal-key { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 14px; }
.cal-key i { width: 10px; height: 10px; }
@media (max-width: 640px) {
  .cal-scroll { display: grid; gap: 14px; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.bib-card { border: 1.5px solid var(--fg); border-radius: 10px; overflow: hidden; max-width: 420px; }
.bib-card-strip { display: flex; justify-content: space-between; padding: 11px 14px; background: var(--fg); color: var(--bg); font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.bib-card-photo { aspect-ratio: 4 / 5; overflow: hidden; }
.bib-card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 75%; filter: grayscale(1) contrast(1.05); transform: scale(1.02); transition: filter 1s var(--ease), transform 1.4s var(--ease); }
@media (hover: hover) and (pointer: fine) { .bib-card:hover .bib-card-photo img { filter: grayscale(0); transform: scale(1.05); } }
.lede { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; }
.about-copy > .tag { margin-top: 18px; }
.about-copy > .minor { margin: clamp(48px, 7vh, 72px) 0 4px; padding-bottom: 14px; border-bottom: 1px solid var(--fg); color: var(--fg); }
.rules li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rule-no { align-self: start; justify-self: start; font: 500 11px/1 var(--mono); letter-spacing: .1em; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--mute); }
.rules h4 { font: 700 clamp(20px, 1.8vw, 26px)/1.2 var(--sans); font-variation-settings: "wdth" 85; }
.rules p { margin-top: 8px; color: var(--mute); font-size: 15.5px; }
.kit > div { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.kit .tag { margin: 0; }
.kit ul { display: flex; flex-wrap: wrap; row-gap: 6px; font-size: 15.5px; color: var(--fg); }
.kit li:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--mute); }
@media (max-width: 560px) { .kit > div { grid-template-columns: 1fr; gap: 10px; } }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .bib-card { max-width: 340px; }
}

/* ---------- Splits ---------- */
.splits-head, .split-row { display: grid; grid-template-columns: 200px minmax(0, 1.3fr) minmax(0, 1fr) 170px 28px; gap: 24px; align-items: baseline; }
.splits-head { padding: 0 14px 12px; border-bottom: 1px solid var(--fg); }
.split { border-bottom: 1px solid var(--line); }
.split-row { width: 100%; padding: 24px 14px; border-radius: 6px; transition: background-color .4s var(--ease); }
.split-row:hover, .split.is-open .split-row { background: var(--panel); }
.split-role { font: 700 clamp(20px, 2.2vw, 30px)/1.15 var(--sans); font-variation-settings: "wdth" 78; }
.split-role .tag, .split-co .tag { display: inline-block; margin-left: 10px; vertical-align: middle; font-size: 10px; }
.split-co { font-size: 15px; }
.split-co .co-logo + .tag { vertical-align: 2px; }
.split-icon { position: relative; justify-self: end; width: 14px; height: 14px; align-self: center; }
.split-icon::before, .split-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform .5s var(--ease); }
.split-icon::after { transform: rotate(90deg); }
.split.is-open .split-icon::after { transform: rotate(0deg); }
.split-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.split-more > div { overflow: hidden; }
.split.is-open .split-more { grid-template-rows: 1fr; }
.split-more p { padding: 4px 14px 26px calc(200px + 24px + 14px); color: var(--soft); max-width: 82ch; }
@media (max-width: 760px) {
  .splits-head { display: none; }
  .split-row { grid-template-columns: 1fr 20px; gap: 6px 12px; }
  .split-time { grid-column: 1 / -1; }
  .split-icon { grid-row: 2; grid-column: 2; }
  .split-co { grid-column: 1; }
  .split-more p { padding-left: 14px; }
}

/* ---------- Finish: the page crosses the line and turns bone ---------- */
.finish { min-height: 100svh; padding-bottom: 32px; color: var(--bg); display: flex; flex-direction: column; justify-content: flex-end; }
.finish .wrap { width: 100%; }
.tape {
  height: 10px; margin-bottom: clamp(56px, 10vh, 100px); border-radius: 999px; opacity: .8;
  background: repeating-conic-gradient(var(--bg) 0 25%, transparent 0 50%) 0 0 / 10px 10px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.finish .seg-no { color: rgba(var(--bg-rgb), .6); }
.finish .seg-no > span:first-child { color: var(--bg); }
.finish-title { font-size: clamp(52px, 9vw, 150px); line-height: .88; }
.finish-mail { display: inline-block; margin-top: clamp(32px, 5vh, 56px); font: 300 clamp(20px, 2.4vw, 34px)/1.1 var(--sans); font-variation-settings: "wdth" 85; border-bottom: 1px solid currentColor; padding-bottom: 6px; transition: opacity .4s; }
.finish-mail:hover { opacity: .6; }
.finish-grid { display: grid; grid-template-columns: repeat(2, max-content); justify-content: start; gap: 24px clamp(48px, 8vw, 120px); margin-top: clamp(64px, 12vh, 120px); padding-top: 0; border-top: 0; }
.finish .tag { color: rgba(var(--bg-rgb), .55); }
.finish-grid p:not(.tag) { margin-top: 6px; font-size: 15px; }
.finish-base { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 1px solid rgba(var(--bg-rgb), .12); }
@media (max-width: 760px) { .finish-grid { grid-template-columns: repeat(2, max-content); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* School tag: "UofT" opens to "University of Toronto" on hover, focus or tap */
.school {
  display: inline-flex; align-items: center; margin-left: 8px; vertical-align: 1px;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px;
  font: 400 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
  cursor: default; white-space: nowrap; outline: none;
  transition: border-color .5s var(--ease), color .5s var(--ease), background-color .5s var(--ease);
}
.school-short, .school-full { display: inline-block; overflow: hidden; transition: max-width .7s var(--ease), opacity .5s var(--ease); }
.school-short { max-width: 4em; text-transform: none; letter-spacing: .06em; }
.school-full { max-width: 0; opacity: 0; }
.school:hover, .school:focus-visible { border-color: var(--fg); color: var(--fg); }
.school:hover .school-short, .school:focus-visible .school-short { max-width: 0; opacity: 0; }
.school:hover .school-full, .school:focus-visible .school-full { max-width: 16em; opacity: 1; }

/* A distinct ampersand inside the mono tags: Archivo italic and a touch larger, same colour as the tag */
.amp { font: italic 400 1.45em/0 var(--sans); font-variation-settings: "wdth" 90; letter-spacing: 0; text-transform: none; color: inherit; margin: 0 .15em; vertical-align: -.06em; }

/* ---------- Night / Day switch ---------- */
.theme { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0; font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.theme-track { position: relative; width: 40px; height: 22px; border: 1px solid currentColor; border-radius: 999px; transition: background-color .5s var(--ease); }
.theme-knob {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  /* night: a crescent moon cut from the knob */
  background: transparent; box-shadow: inset -4px -2px 0 0 currentColor;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease), background-color .7s var(--ease);
}
.theme-knob::before {
  /* day: little sun rays */
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: repeating-conic-gradient(currentColor 0 6deg, transparent 6deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent 8px, #000 8.5px); mask: radial-gradient(circle, transparent 8px, #000 8.5px);
  opacity: 0; transform: rotate(-90deg) scale(.6); transition: opacity .5s var(--ease), transform .8s var(--ease);
}
:root[data-theme="light"] .theme-knob { transform: translateX(18px) rotate(180deg); background: currentColor; box-shadow: inset 0 0 0 0 currentColor; }
:root[data-theme="light"] .theme-knob::before { opacity: 1; transform: rotate(0) scale(1); }
.theme:hover .theme-knob { transform: rotate(-20deg); }
:root[data-theme="light"] .theme:hover .theme-knob { transform: translateX(18px) rotate(200deg); }
.theme-label { display: inline-grid; }
.theme-label span { grid-area: 1 / 1; transition: opacity .4s var(--ease), transform .6s var(--ease); }
.theme-label span:last-child { opacity: 0; transform: translateY(60%); }
:root[data-theme="light"] .theme-label span:first-child { opacity: 0; transform: translateY(-60%); }
:root[data-theme="light"] .theme-label span:last-child { opacity: 1; transform: none; }
@media (max-width: 820px) { .theme-label { display: none; } }

/* The switch wipes the new palette in as a circle from the button */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* A quieter ampersand inside role titles */
.split-role .and { font-size: .72em; font-weight: 500; margin: 0 .08em; vertical-align: .08em; }

/* ---------- Work cards link out to the real thing ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.result:has(.result-link) { position: relative; cursor: pointer; }
/* the heading's link stretches over the whole card */
.result-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.result-link:focus-visible { outline: none; }
.result:has(.result-link:focus-visible) .result-stat { outline: 1px solid currentColor; outline-offset: 4px; }
.result-stat { position: relative; }
.visit {
  position: absolute; top: clamp(14px, 2vw, 22px); right: clamp(14px, 2vw, 22px);
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px;
  border: 1px solid currentColor; border-radius: 999px;
  font: 400 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  opacity: .35; transition: opacity .5s var(--ease), background-color .5s var(--ease), color .5s var(--ease);
}
.visit-arrow { display: inline-block; transition: transform .6s var(--ease); }
.result:hover .visit { opacity: 1; background: var(--fg); color: var(--bg); border-color: var(--fg); }
.result--lead:hover .visit { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.result:hover .visit-arrow { transform: translate(2px, -2px); }
.result:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
@media (hover: none) { .visit { opacity: 1; } }

/* ---------- About photo: hover (desktop) or tap (phones) for colour ---------- */
.bib-card { cursor: pointer; }
.bib-card.is-color .bib-card-photo img { filter: grayscale(0); transform: scale(1.05); }
.bib-hint .hint-tap, .bib-hint .hint-back { display: none; }
@media (hover: none) {
  .bib-hint .hint-hover { display: none; }
  .bib-hint .hint-tap { display: inline; }
}
.bib-card.is-color .bib-hint .hint-hover, .bib-card.is-color .bib-hint .hint-tap { display: none; }
.bib-card.is-color .bib-hint .hint-back { display: inline; }
.bib-card.is-color .bib-hint::before { animation: none; opacity: 1; }
.bib-card-strip .live::before { background: var(--bg); }

/* company logos in the stat boxes: one colour, follows the box and the theme */
.stat-logo {
  position: absolute; display: block; right: clamp(18px, 3vw, 40px); bottom: clamp(18px, 3vw, 40px);
  height: clamp(52px, 6.5vw, 92px); aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: var(--logo) right bottom / contain no-repeat; mask: var(--logo) right bottom / contain no-repeat;
  opacity: .9; transition: transform .6s var(--ease);
}
.stat-logo--rhyme { --logo: url("../img/logos/rhyme.png?v=4"); aspect-ratio: 600 / 767; }
.stat-logo--jeeves { --logo: url("../img/logos/jeeves.svg?v=2"); aspect-ratio: 191 / 197; }
.stat-logo--ironman { --logo: url("../img/logos/ironman.svg?v=2"); aspect-ratio: 34.5 / 47.5; }
.result:hover .stat-logo { transform: translateY(-3px); }

/* company wordmarks in the Splits rows */
.co-logo {
  display: inline-block; height: 22px; vertical-align: middle;
  background: currentColor;
  -webkit-mask: var(--logo) left center / contain no-repeat; mask: var(--logo) left center / contain no-repeat;
}
.co-logo--rhyme { --logo: url("../img/logos/rhyme-wordmark.png?v=2"); aspect-ratio: 902 / 280; vertical-align: -5px; }
.co-logo--jeeves { --logo: url("../img/logos/jeeves-wordmark.svg?v=2"); aspect-ratio: 654.05 / 179.73; height: 17px; vertical-align: 0; }

/* smaller acronyms inside role tags */
.tag .abbr { font-size: .8em; letter-spacing: .1em; }

/* links inside running text */
.inline-link { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--mute); transition: text-decoration-color .3s var(--ease); }
.inline-link:hover, .inline-link:focus-visible { text-decoration-color: var(--fg); }


/* Splits grouped by company: logo + city once, roles underneath */
.co-head { display: flex; align-items: center; gap: 12px; margin: 0; padding: 30px 14px 8px; }
.co-head .co-logo + .tag { font-size: 10px; vertical-align: 2px; }
.co-roles .split-row { align-items: center; --dot-y: 50%; }
.co-roles .split-time { position: relative; padding-left: 20px; }
/* one career timeline: a thin line runs from the first role up to the current one */
.splits--track .split-row, .splits--track .co-head { position: relative; }
.splits--track .co-head { padding-left: 34px; }
.splits-head span:first-child { padding-left: 20px; }
.splits-head span:nth-child(4) { text-align: right; }
.splits--track .split-time::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg); transform: translateY(-50%);
}
.splits--track > .co-group:first-child > .co-roles > li:first-child .split-time::before {
  border-radius: 0; background: none;
  border-top: 1.5px solid var(--fg); border-left: 1.5px solid var(--fg);
  transform: translateY(-25%) rotate(45deg);
}
.splits--track .split-row::before,
.splits--track .split-row::after,
.splits--track .split-more::before,
.splits--track > .co-group:not(:first-child) > .co-head::before {
  content: ""; position: absolute; left: calc(14px + 3px); width: 1px; background: var(--mute); pointer-events: none;
}
.splits--track .split-row::before { top: -1px; height: calc(var(--dot-y) + 1px); }
.splits--track .split-row::after { top: var(--dot-y); bottom: 0; }
.splits--track .split-more { position: relative; }
.splits--track .split-more::before { top: 0; bottom: -1px; }
.splits--track > .co-group:not(:first-child) > .co-head::before { top: -1px; bottom: 0; }
/* the line starts at the current role and ends at the first one */
.splits--track > .co-group:first-child > .co-roles > li:first-child > .split-row::before,
.splits--track > .co-group:last-child > .co-roles > li:last-child > .split-row::after,
.splits--track > .co-group:last-child > .co-roles > li:last-child > .split-more::before { content: none; }
@media (max-width: 760px) {
  .co-roles .split-row { --dot-y: 31px; }
  .co-roles .split-role { padding-left: 20px; }
  .co-roles .split-more p { padding-left: 34px; }
}

/* each role's headline number and its split (time in the role) */
.split-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; white-space: nowrap; }
.split-stat { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.split-dur { font: 400 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 760px) {
  .split-meta { grid-column: 1; grid-row: 3; flex-direction: row; align-items: baseline; gap: 10px; padding-left: 20px; margin-top: 4px; }
  .split-meta .split-dur::before { content: "· "; }
}

/* team column */
.split-team { font-size: 10px; color: var(--mute); }
@media (max-width: 760px) {
  .split-team { grid-column: 1; grid-row: 3; padding-left: 20px; }
  .split-meta { grid-row: 4; }
}
@media (min-width: 761px) and (max-width: 1120px) {
  .splits-head, .split-row { grid-template-columns: 170px minmax(0, 1.4fr) minmax(0, 1fr) 150px 22px; gap: 18px; }
  .split-more p { padding-left: calc(170px + 18px + 14px); }
}

/* Footer: live status under the clock */

/* Race moments: the finish time */
.finish-base { flex-wrap: wrap; }
/* Finish time sits on the label row, at the far right */
.seg-time { margin-left: auto; }
.seg-time-f { display: none; }
.finish .seg-no .finish-time { color: var(--bg); }
@media (max-width: 760px) {
  .seg-time-you { display: none; }
  .seg-time-f { display: inline; }
  .finish .seg-no > span:first-child::after { width: 24px; }
}
.finish-time { opacity: 0; transition: opacity 1s var(--ease); }
.finish-time.is-in { opacity: 1; }

/* Hero: location line sits on the bib's bottom line, level with CADIO */
.start-top { align-items: flex-end; }
.start-top > .tag { padding-bottom: 6px; }

/* Strava: playable calendar */
.leg-btn { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--mute); background: none; border: 0; padding: 4px 0; cursor: pointer; border-bottom: 1px solid transparent; transition: color .3s var(--ease), border-color .3s var(--ease); }
.leg-btn:hover, .leg-btn:focus-visible { color: var(--fg); outline: none; }
.leg-btn[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.cal i:not(.pad) { cursor: pointer; transition: opacity .4s var(--ease); }
.cal[data-f] i:not(.pad) { opacity: .12; }
.cal[data-f="swim"] i[data-s~="swim"], .cal[data-f="bike"] i[data-s~="bike"], .cal[data-f="run"] i[data-s~="run"] { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .cal i:not(.pad):hover { transform: scale(1.8) !important; position: relative; z-index: 1; transition: transform .15s var(--ease), opacity .4s var(--ease); }
}
.cal-key { justify-content: space-between; }
.cal-scale { display: flex; align-items: center; gap: 5px; }
.cal-hint { color: var(--mute); }

/* Hero bib: a tap runs the number up */
.start .bib {
  width: 80px; height: 92px; min-width: 0; padding: 9px 8px 7px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--ease);
}
.start .bib:active { transform: scale(.96); }
.start .bib:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }
.start .bib .bib-no { font-variant-numeric: tabular-nums; }

/* Focus: expanding badge (+3 → Sales · Marketing · Branding) */
.school--wide:hover .school-full, .school--wide:focus-visible .school-full, .school--wide.is-peek .school-full { max-width: 28em; opacity: 1; }
.school.is-peek { border-color: var(--fg); color: var(--fg); }
.school.is-peek .school-short { max-width: 0; opacity: 0; }
.school.is-peek .school-full { max-width: 16em; opacity: 1; }
.school--wide.is-peek .school-full { max-width: 28em; }
.readout div:has(.school--wide) dd { white-space: nowrap; }
@media (max-width: 760px) { .school--wide .school-full { letter-spacing: .06em; } }

/* Based in: live Toronto weather badge (temperature → conditions) */
.school--wx .school-short { letter-spacing: .04em; }

/* Off the clock: VO2 max badge. The ring fills to the score, then breathes in and out */
.vo2-ring { width: 11px; height: 11px; flex: none; margin-right: 6px; transform: rotate(-90deg); overflow: visible; }
.vo2-ring circle { fill: none; stroke: currentColor; stroke-width: 3; }
.vo2-track { opacity: .25; }
.vo2-arc { stroke-linecap: round; stroke-dasharray: 70 100;
  animation: vo2-fill 1.8s cubic-bezier(.16,1,.3,1) .9s both, vo2-breathe 5s ease-in-out 2.7s infinite; }
@keyframes vo2-fill { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 70 100; } }
@keyframes vo2-breathe { 0%, 100% { stroke-dasharray: 70 100; } 45% { stroke-dasharray: 82 100; } }
.school--vo2 .school-short { max-width: 5em; }
.vo2-unit { text-transform: none; }
.school--vo2:hover .school-full, .school--vo2:focus-visible .school-full, .school--vo2.is-peek .school-full { max-width: 20em; }
@media (prefers-reduced-motion: reduce) { .vo2-arc { animation: none; } }

/* Badges on touch screens: ignore sticky hover; a tap opens them (JS adds .is-peek) */
@media (hover: none) {
  .school:hover:not(.is-peek) { border-color: var(--line); color: var(--mute); }
  .school:hover:not(.is-peek) .school-short { max-width: 5em; opacity: 1; }
  .school:hover:not(.is-peek) .school-full { max-width: 0; opacity: 0; }
}
/* Phones: one stat per row so an opened badge never wraps or overflows */
@media (max-width: 760px) {
  .readout { grid-template-columns: 1fr; gap: 18px; }
  .readout div:last-child { grid-column: auto; }
  .readout dd { white-space: nowrap; }
}

/* Phones: the bib and the location line, balanced */
@media (max-width: 760px) {
  .start-top { gap: 16px; }
  .start .bib { width: 72px; height: 84px; padding: 8px 6px 6px; }
  .start .bib .bib-no { font-size: 32px; }
  .loc { white-space: nowrap; }
}

/* Phones: tighter, even rhythm in the hero — Focus sits right under the button */
@media (max-width: 760px) {
  .start-top { margin-bottom: 20px; }
  .start-row { margin-top: 28px; }
  .readout { margin-top: 36px; padding-top: 18px; }
}
/* Phones: a smaller particle zone so the stats row fits on the first screen */
@media (max-width: 760px) { .start { padding-top: 36vh; } }

/* Location: GPS lock-on — hollow dot while seeking, solid with one ping once locked */
.loc { display: inline-flex; align-items: center; }
.loc-dot { position: relative; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; border: 1px solid var(--mute); flex: none; transition: background-color .3s, border-color .3s; }
.loc.is-seeking .loc-dot { animation: loc-blink .5s steps(2) infinite; }
.loc.is-locked .loc-dot { background: var(--fg); border-color: var(--fg); }
.loc.is-locked .loc-dot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--fg); opacity: 0; animation: loc-ping 2.6s var(--ease) .6s infinite; }
/* the dot glows softly like a live status light, and a ring keeps rippling out from it */
.loc.is-locked .loc-dot { animation: loc-glow 2.6s ease-in-out .6s infinite; }
@keyframes loc-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--fg-rgb), 0); } 15% { box-shadow: 0 0 8px 1px rgba(var(--fg-rgb), .55); } 60% { box-shadow: 0 0 0 0 rgba(var(--fg-rgb), 0); } }
@media (prefers-reduced-motion: reduce) { .loc.is-locked .loc-dot, .loc.is-locked .loc-dot::after { animation: none; } }
.loc-coords { font-variant-numeric: tabular-nums; }
@keyframes loc-blink { 50% { opacity: .2; } }
@keyframes loc-ping { from { transform: scale(1); opacity: .8; } to { transform: scale(3.2); opacity: 0; } }
@media (max-width: 760px) { .loc { display: flex; } }
.loc .loc-sep, .loc .loc-role { white-space: pre; }
.loc { flex-wrap: wrap; row-gap: 6px; }

/* Hero proof stat */
.go-stat { margin: 0; color: var(--mute); }
.go-stat-num { color: var(--fg); }

/* Hovering the particle cloud */
html.is-over-cloud, html.is-over-cloud body { cursor: pointer; }

/* Finish on phones: tidy grid and base */
@media (max-width: 760px) {
  .finish-grid { margin-top: 48px; row-gap: 28px; }
  .finish-base { display: grid; grid-template-columns: 1fr auto; row-gap: 10px; margin-top: 36px; }
  .finish-base a { grid-column: 2; grid-row: 1; justify-self: end; }
  /* fill the screen: a bigger sign-off and email, less dead space above */
  .finish-title { font-size: 14.2vw; }
  .finish { min-height: 100svh; justify-content: flex-start; padding-top: 100px; }
  .finish > .wrap { flex: 1; display: flex; flex-direction: column; }
  .finish-base { margin-top: auto; }
  .finish-grid { margin-bottom: 48px; }
  .finish > .wrap > .seg-no { margin-top: 0; }
  .finish-mail { font-size: 6.2vw; margin-top: clamp(32px, 7vh, 72px); align-self: flex-start; }
  .finish .tape { margin-bottom: clamp(40px, 8vh, 80px); }
  .finish-grid { margin-top: clamp(40px, 8vh, 80px); }
}

/* Finish time lives in the grid now */
.finish-time.is-in { opacity: 1; }

/* Finish fits one screen on desktop, so the label never jams under the nav */
@media (min-width: 761px) {
  .finish-title { font-size: clamp(52px, 7.4vw, 124px); }
  .finish-grid { margin-top: clamp(48px, 8vh, 88px); }
  .finish .tape { margin-bottom: clamp(40px, 7vh, 72px); }
}
@media (min-width: 761px) { .finish { padding-top: 96px; } }
@media (min-width: 761px) and (max-height: 820px) {
  .finish-title { font-size: clamp(48px, 6.4vw, 112px); }
  .finish-mail { margin-top: 28px; }
  .finish-grid { margin-top: 44px; }
  .finish .tape { margin-bottom: 36px; }
  .finish-base { margin-top: 32px; }
}

/* Start (desktop): the headline block sits centred between the nav and the readout, level with the form */
@media (min-width: 761px) {
  .start { align-items: stretch; }
  .start .wrap { display: flex; flex-direction: column; min-height: calc(100svh - 160px); }
  .start-top { margin-top: auto; }
  .start .readout { margin-top: auto; }
  .start-row { margin-bottom: clamp(32px, 5vh, 56px); }
}


/* Kit (desktop): the three groups sit side by side, each skill on its own line */
@media (min-width: 761px) {
  .kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
  .kit > div { align-content: start; gap: 14px; }
  .kit ul { flex-direction: column; row-gap: 8px; }
  .kit li:not(:last-child)::after { content: none; }
}

/* Phones: the five checkpoints become one slim progress line along the bottom of the bar,
   so the name, the theme switch and Contact get room to breathe */
@media (max-width: 760px) {
  .course-inner { justify-content: flex-start; }
  .course .theme { margin-left: auto; }
  .course-track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; max-width: none; margin: 0; flex: none; }
  .course-track ol { display: none; }
  .course-line { left: 0; right: 0; top: 0; height: 2px; opacity: .14; }
  .course-fill { left: 0; top: 0; height: 2px; }
  /* the button and "~1B organic views" always share one line */
  .start-row { flex-wrap: nowrap; gap: 16px; }
  .start-row .go { padding-left: 18px; padding-right: 18px; white-space: nowrap; flex: none; }
  .go-stat { white-space: nowrap; letter-spacing: .1em; }
  /* Jeeves' "MX · BR · CO" grows to fill its card like 4M+ and 140.6 do */
  .stat--word { font-size: clamp(56px, 17vw, 128px); }
  /* the headline uses the full width of the screen */
  .headline { font-size: clamp(42px, 12.4vw, 128px); }
}

/* Phones: the About section ends on the bio; Race rules are desktop only */
@media (max-width: 760px) {
  .rules-head, .rules { display: none; }
}

/* Phones: italic line endings (the period after "memorable.") get room past the line mask;
   the Ironman card drops the TT detail */
@media (max-width: 760px) {
  .ln { padding-right: .12em; margin-right: -.12em; }
  .finish-title { font-size: 13.8vw; }
  .desk-only { display: none; }
}

/* ==========================================================================
   Revamp: gloss and glass
   Same carbon and bone, Archivo and Plex Mono. Buttons become glossy pills,
   surfaces become soft glass, cards follow the cursor with light and tilt.
   ========================================================================== */
:root { --gloss-hi: rgba(255, 255, 255, .9); --glass: rgba(var(--fg-rgb), .07); --glass-line: rgba(var(--fg-rgb), .14); }

/* Primary: "See the work" is a glossy bone pill (glossy carbon in day mode). A glint sweeps
   across it every few seconds and a soft glow breathes with it, a quiet hint to press it;
   hovering sweeps the glint right away. */
.go {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 26px 17px 28px; border: 0; border-radius: 999px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: #141414;
  background: linear-gradient(180deg, #fdfcf8 0%, #ebe7de 48%, #d9d4c9 52%, #e7e3da 100%);
  box-shadow:
    inset 0 1px 0 var(--gloss-hi),
    inset 0 -1px 0 rgba(0, 0, 0, .18),
    0 1px 2px rgba(0, 0, 0, .45),
    0 10px 24px -12px rgba(237, 234, 227, .22);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), color .5s var(--ease);
  animation: go-glow 4.2s ease-in-out 1.6s infinite;
}
.go::before {
  content: ""; position: absolute; inset: -20% auto -20% -40%; width: 34%; z-index: 1; opacity: .9;
  transform: skewX(-20deg) translateX(-120%); transform-origin: center;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .07) 28%, rgba(255, 255, 255, 1) 50%, rgba(0, 0, 0, .07) 72%, transparent 100%);
  transition: transform .9s var(--ease);
  animation: go-gloss 4.2s cubic-bezier(.4, 0, .2, 1) 1.6s infinite;
}
.go:hover { color: #141414; transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--gloss-hi), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 2px 4px rgba(0, 0, 0, .4), 0 14px 32px -12px rgba(237, 234, 227, .32); animation: none; }
.go:hover::before { animation: none; transform: skewX(-20deg) translateX(420%); }
.go:active { transform: translateY(0) scale(.98); }
.go > * { position: relative; z-index: 2; }
.go-arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: -8px; border-radius: 50%; background: #141414; color: #f4f1ea; font-size: 12px; transition: transform .6s var(--ease); }
.go:hover .go-arrow { transform: translateX(4px); }
:root[data-theme="light"] .go {
  color: #f4f1ea;
  background: linear-gradient(180deg, #4a4946 0%, #262523 48%, #141414 52%, #1f1e1c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(0, 0, 0, .6), 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -12px rgba(0, 0, 0, .55);
  animation: none;
}
:root[data-theme="light"] .go:hover { color: #f4f1ea; }
:root[data-theme="light"] .go::before { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); }
:root[data-theme="light"] .go-arrow { background: #f4f1ea; color: #141414; }
@keyframes go-gloss {
  0%, 62% { transform: skewX(-20deg) translateX(-120%); }
  86%, 100% { transform: skewX(-20deg) translateX(420%); }
}
@keyframes go-glow {
  0%, 60%, 100% { box-shadow: inset 0 1px 0 var(--gloss-hi), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px -12px rgba(237, 234, 227, .22); }
  78% { box-shadow: inset 0 1px 0 var(--gloss-hi), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .45), 0 12px 34px -10px rgba(237, 234, 227, .42); }
}

/* Glass pills: nav contact, theme switch, card links, chips */
.course-cta, .theme-track, .visit, .chips li, .school {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 14%, transparent), color-mix(in srgb, currentColor 4%, transparent));
  box-shadow: inset 0 1px 0 color-mix(in srgb, currentColor 22%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.course-cta { padding: 10px 18px; transition: transform .4s var(--ease), background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease); }
.course-cta:hover, .course.is-finish .course-cta:hover {
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 28%, transparent), color-mix(in srgb, currentColor 10%, transparent));
  color: inherit; transform: translateY(-1px);
}
.chips li { padding: 8px 12px; }
.visit { padding: 7px 12px; }

/* Nav: frosted glass once scrolled */
.course.is-scrolled { background: rgba(var(--bg-rgb), .62); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-color: var(--glass-line); }

/* Work cards: glass with a soft light that follows the cursor, and a gentle tilt */
.result-stat {
  --mx: 50%; --my: 0%;
  border-radius: 18px; border: 1px solid var(--glass-line);
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(var(--fg-rgb), .09), transparent 55%),
    linear-gradient(180deg, rgba(var(--fg-rgb), .05), rgba(var(--fg-rgb), .015));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .12), 0 30px 60px -30px rgba(0, 0, 0, .6);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .8s var(--ease), border-color .6s var(--ease), box-shadow .6s var(--ease);
  will-change: transform;
}
.result:hover .result-stat { border-color: rgba(var(--fg-rgb), .28); }
.result-stat.is-tilting { transition: transform .15s linear, border-color .6s var(--ease); }
/* Lead cards: glossy bone */
.result--lead .result-stat {
  border-color: transparent;
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(180deg, #f6f3ec 0%, #e6e2d9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .12), 0 30px 60px -28px rgba(0, 0, 0, .7);
}
:root[data-theme="light"] .result--lead .result-stat {
  background:
    radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, .12), transparent 55%),
    linear-gradient(180deg, #2a2927 0%, #161615 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 30px 60px -28px rgba(0, 0, 0, .45);
}

/* Splits rows: rounder, glassier highlight */
.split-row { border-radius: 14px; }
.split-row:hover, .split.is-open .split-row { background: linear-gradient(180deg, rgba(var(--fg-rgb), .07), rgba(var(--fg-rgb), .025)); box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .08); }

/* Strava filter: glass segmented control */
#strava-legs { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); }
#strava-legs > span[aria-hidden] { display: none; }
.leg-btn { padding: 8px 14px; border: 0; border-radius: 999px; transition: color .3s var(--ease), background-color .4s var(--ease), box-shadow .4s var(--ease); }
.leg-btn[aria-pressed="true"] { color: var(--bg); background: linear-gradient(180deg, rgba(var(--fg-rgb), 1), rgba(var(--fg-rgb), .85)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 12px -4px rgba(0, 0, 0, .5); }

/* Finish: the email becomes a glossy carbon pill on the bone page */
.finish-mail {
  display: inline-flex; align-items: center; gap: 14px; padding: 18px 30px; border: 0; border-radius: 999px;
  color: var(--fg);
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .88) 0%, rgba(var(--bg-rgb), 1) 52%, rgba(var(--bg-rgb), .94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 18px 40px -18px rgba(0, 0, 0, .55);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.finish-mail:hover { opacity: 1; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 24px 50px -16px rgba(0, 0, 0, .6); }
@media (max-width: 760px) { .finish-mail { padding: 16px 22px; align-self: stretch; justify-content: space-between; } }


/* Portrait: while it's black and white, a soft sheen glides across it now and then
   (like light on a glossy print) and the hint dot flashes with it. It stops for
   good once someone has hovered or tapped. */
.bib-card-photo { position: relative; }
.bib-card-photo::after {
  content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 55%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .28) 50%, rgba(255, 255, 255, .05) 70%, transparent 100%);
  transform: translateX(-130%) skewX(-12deg); pointer-events: none; opacity: 0;
}
@keyframes photo-sheen {
  0% { transform: translateX(-130%) skewX(-12deg); opacity: 1; }
  22% { transform: translateX(240%) skewX(-12deg); opacity: 1; }
  23%, 100% { transform: translateX(240%) skewX(-12deg); opacity: 0; }
}
@keyframes hint-dot {
  0%, 26%, 100% { opacity: .35; transform: scale(1); }
  8% { opacity: 1; transform: scale(1.5); }
}
.bib-card.is-hinting:not(.is-color):not(.hint-done) .bib-card-photo::after { animation: photo-sheen 8s cubic-bezier(.4, 0, .2, 1) .4s infinite; }
.bib-card.is-hinting:not(.is-color):not(.hint-done) .bib-hint::before { animation: hint-dot 8s ease-in-out .4s infinite; }
@media (hover: hover) and (pointer: fine) { .bib-card:hover .bib-card-photo::after { animation: none !important; opacity: 0; } }

/* ==========================================================================
   About, revamped: a glass-framed portrait with floating pills, a portrait that
   stays in view beside the reading column (desktop), and Kit as glass pills.
   ========================================================================== */
.bib-card {
  position: relative; max-width: 440px; padding: 8px; border-radius: 22px; overflow: visible;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .07), rgba(var(--fg-rgb), .02));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .12), 0 40px 80px -40px rgba(0, 0, 0, .75);
}
.bib-card-photo { border-radius: 15px; }
/* the two strips become frosted pills floating on the photo */
.bib-card-strip {
  position: absolute; left: 20px; z-index: 2; display: inline-flex; padding: 9px 13px; border-radius: 999px;
  background: rgba(18, 18, 18, .42); color: #f4f1ea;
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  font: 500 10px/1 var(--mono); letter-spacing: .14em;
}
.bib-card > .bib-card-strip:first-child { top: 20px; }
.bib-card > figcaption.bib-card-strip { bottom: 20px; }
.bib-card-strip .live::before { background: #f4f1ea; }
/* desktop: the portrait stays in view while the bio, rules and kit scroll past */
@media (min-width: 861px) {
  .about { align-items: start; }
  .bib-card { position: sticky; top: 96px; }
}
/* phones: the full portrait (4:5, like desktop), shirt and shoulders included */
@media (max-width: 760px) {
  .bib-card { max-width: none; padding: 6px; border-radius: 20px; }
  .bib-card-photo { aspect-ratio: 4 / 5; border-radius: 15px; }
  .bib-card-photo img { object-position: 50% 60%; }
  .bib-card-strip { left: 16px; }
  .bib-card > .bib-card-strip:first-child { top: 16px; }
  .bib-card > figcaption.bib-card-strip { bottom: 16px; }
}
/* even line breaks: no lone "Kona" */
.about-copy > .tag, .lede { text-wrap: balance; }

/* Kit: each skill is a glass pill; columns on desktop, wrapping rows on phones */
.kit ul { display: flex; flex-wrap: wrap; gap: 8px; row-gap: 8px; }
.kit li:not(:last-child)::after { content: none; }
.kit li {
  padding: 9px 14px; border-radius: 999px; font-size: 14.5px; line-height: 1.1; white-space: nowrap;
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .08), rgba(var(--fg-rgb), .02));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .1);
  transition: border-color .4s var(--ease), background-color .4s var(--ease), transform .4s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .kit li:hover { border-color: rgba(var(--fg-rgb), .32); transform: translateY(-1px); } }
@media (min-width: 761px) { .kit ul { flex-direction: column; align-items: flex-start; } }


/* ==========================================================================
   Splits, revamped: the career list sits on one glass panel; the current role
   gets a live glowing dot; locations, results and the open buttons are glass.
   ========================================================================== */
.splits {
  padding: 6px 12px 8px; border-radius: 22px; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .045), rgba(var(--fg-rgb), .012));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .1), 0 40px 80px -50px rgba(0, 0, 0, .8);
}
.splits-head { padding: 0 27px 14px; border-bottom: 0; }
.splits > .co-group:last-child .split:last-child { border-bottom: 0; }
.co-head .co-logo + .tag {
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .08), rgba(var(--fg-rgb), .02));
  font-size: 9.5px; vertical-align: 0;
}
/* the current role: a live dot that pings, in place of the old chevron */
.splits--track > .co-group:first-child > .co-roles > li:first-child .split-time::before {
  left: -1px; width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--fg);
  transform: translateY(-50%); animation: now-ping 2.6s var(--ease) .6s infinite;
}
@keyframes now-ping {
  0% { box-shadow: 0 0 0 0 rgba(var(--fg-rgb), .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(var(--fg-rgb), 0); }
}
/* the result for each role: a small glass pill */
.split-stat {
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .08), rgba(var(--fg-rgb), .02));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .1);
}
/* open / close: a glass circle */
.split-icon {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .1), rgba(var(--fg-rgb), .02));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .14);
  transition: border-color .4s var(--ease), background-color .4s var(--ease), transform .5s var(--ease);
}
.split-icon::before, .split-icon::after { left: 9px; right: 9px; }
.split-row:hover .split-icon { border-color: rgba(var(--fg-rgb), .32); transform: scale(1.06); }
.split.is-open .split-icon { background: rgba(var(--fg-rgb), .9); color: var(--bg); border-color: transparent; }
.splits-head, .split-row { grid-template-columns: 200px minmax(0, 1.3fr) minmax(0, 1fr) 170px 30px; }
@media (max-width: 760px) {
  .splits { padding: 4px 6px 6px; border-radius: 18px; }
  .split-row { grid-template-columns: 1fr 30px; }
}
/* Hero row (desktop): one glass spec bar, three segments split by fixed hairlines */
@media (min-width: 761px) {
  .readout {
    --mx: 50%; --my: 0%;
    display: inline-flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0;
    align-self: flex-start; width: auto; max-width: 100%;
    padding: 0; border-radius: 18px; border: 1px solid rgba(var(--fg-rgb), .11);
    background:
      radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--fg-rgb), .08), transparent 60%),
      linear-gradient(180deg, rgba(var(--fg-rgb), .06), rgba(var(--fg-rgb), .015));
    box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .1), 0 24px 50px -30px rgba(0, 0, 0, .75);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: border-color .5s var(--ease);
  }
  .readout:hover { border-color: rgba(var(--fg-rgb), .2); }
  .readout > div { position: relative; flex: none; padding: 14px 28px 16px; }
  .readout > div + div::before {
    content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px;
    background: rgba(var(--fg-rgb), .12); pointer-events: none;
  }
  .readout dt { font-size: 10px; }
  .readout dd { margin-top: 6px; font-size: 15px; white-space: nowrap; }
}

/* ==========================================================================
   Final polish
   ========================================================================== */

/* Nav (desktop): the checkpoints become one glass capsule; the current section is a glossy pill */
@media (min-width: 821px) {
  .course-track {
    flex: none; max-width: none; margin: 0 auto; padding: 4px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, currentColor 9%, transparent), color-mix(in srgb, currentColor 3%, transparent));
    box-shadow: inset 0 1px 0 color-mix(in srgb, currentColor 14%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .course-line, .cp-dot { display: none; }
  .course-track ol { gap: 2px; justify-content: center; }
  .course-track a { gap: 0; padding: 8px 15px; border-radius: 999px; transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
  .cp-label, .course.is-finish .cp-label, .course.is-scrolled .cp-label { background: transparent; padding-right: 0; opacity: .6; transition: opacity .4s, color .4s; }
  .course-track a:hover .cp-label { opacity: 1; }
  .course-track a.is-here {
    background: linear-gradient(180deg, #fdfcf8 0%, #ebe7de 48%, #d9d4c9 52%, #e7e3da 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 14px -6px rgba(0, 0, 0, .6);
  }
  .course-track a.is-here .cp-label { color: #141414; opacity: 1; }
  :root[data-theme="light"] .course-track a.is-here,
  .course.is-finish .course-track a.is-here {
    background: linear-gradient(180deg, #4a4946 0%, #262523 48%, #141414 52%, #1f1e1c 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px -6px rgba(0, 0, 0, .4);
  }
  :root[data-theme="light"] .course-track a.is-here .cp-label,
  .course.is-finish .course-track a.is-here .cp-label { color: #f4f1ea; }
}

/* Hero (desktop): the whole block, title to spec bar, sits together in the middle */
@media (min-width: 761px) {
  .start .readout { margin-top: clamp(44px, 7vh, 72px); margin-bottom: auto; }
  .start-row { margin-bottom: 0; }
}

/* Race rules: glossy numbered pills */
.rule-no {
  padding: 7px 11px; border-radius: 999px; color: var(--fg);
  border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .1), rgba(var(--fg-rgb), .025));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .14);
}


/* Keyboard focus: a clear ring on every glass and glossy control */
.go:focus-visible, .course-cta:focus-visible, .theme:focus-visible, .course-track a:focus-visible,
.leg-btn:focus-visible, .split-row:focus-visible, .bib-card:focus-visible, .school:focus-visible, .finish-mail:focus-visible,
.finish-grid a:focus-visible, .finish-base a:focus-visible {
  outline: 2px solid rgba(var(--fg-rgb), .75); outline-offset: 3px;
}
.finish .finish-mail:focus-visible, .finish a:focus-visible, .course.is-finish a:focus-visible, .course.is-finish button:focus-visible { outline-color: rgba(var(--bg-rgb), .8); }
/* Day mode at the finish (the page turns carbon): the current-section pill goes bone */
@media (min-width: 821px) {
  :root[data-theme="light"] .course.is-finish .course-track a.is-here {
    background: linear-gradient(180deg, #fdfcf8 0%, #ebe7de 48%, #d9d4c9 52%, #e7e3da 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 14px -6px rgba(0, 0, 0, .6);
  }
  :root[data-theme="light"] .course.is-finish .course-track a.is-here .cp-label { color: #141414; }
}

/* Strava: the block sits on a glass panel; days you trained are tiny glossy tiles,
   rest days stay flat and matte */
.strava {
  padding: clamp(20px, 3vw, 36px); border-radius: 24px; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .045), rgba(var(--fg-rgb), .012));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .1), 0 40px 80px -50px rgba(0, 0, 0, .8);
}
.cal i { border-radius: 3px; }
.cal i[data-l="1"], .cal i[data-l="2"], .cal i[data-l="3"], .cal i[data-l="4"] {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .06) 45%, transparent 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
@media (max-width: 760px) { .strava { padding: 18px 14px; border-radius: 20px; } }
/* Strava on phones: one slim filter capsule (All · Swim · Bike · Run; the big number shows each
   sport's km when tapped), and the hint sits on its own line above the legend */
@media (max-width: 760px) {
  #strava-legs { display: inline-flex; width: auto; border-radius: 999px; gap: 2px; }
  #strava-legs .leg-btn { border-radius: 999px; text-align: center; padding: 8px 14px; }
  .leg-km { display: none; }
  .cal-key { justify-content: flex-start; flex-wrap: wrap; row-gap: 10px; }
  .cal-scale { display: inline-flex; align-items: center; gap: 5px; }
  .cal-hint { width: 100%; }
}
/* Strava calendar: more contrast between levels so long days pop, a little more air,
   and the legend squares match the glossy tiles */
@media (min-width: 761px) { .cal { gap: 4px; } }
.cal-key i { border-radius: 3px; }
.cal-key i[data-l="1"], .cal-key i[data-l="2"], .cal-key i[data-l="3"], .cal-key i[data-l="4"] {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .06) 45%, transparent 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
/* About: the "Race rules" and "Kit" headings sit on a soft hairline, not a solid line */
.about-copy > .minor { border-bottom: 1px solid var(--glass-line); }
/* Phones: About is headline, photo, Kit (the bio and the Ironman line are desktop only) */
@media (max-width: 760px) {
  .about-copy > .lede, .about-copy > p.tag { display: none; }
  .about-copy > .minor:first-of-type, .about-copy > .rules-head + .rules + .minor { margin-top: 40px; }
}

/* Finish: Instagram and LinkedIn as quiet glass pills (the circle arrow is reserved for the email) */
.finish-grid p:not(.tag) { margin-top: 10px; }
.finish-grid a {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 9%, transparent), color-mix(in srgb, currentColor 3%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 20px -14px rgba(0, 0, 0, .5);
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.finish-grid a:hover { background-size: auto; transform: translateY(-2px); border-color: color-mix(in srgb, currentColor 32%, transparent); }
@media (max-width: 760px) { .finish-grid a { padding: 12px 18px; } }

/* Work: the line under the intro is a soft hairline too */
.results { border-top: 1px solid var(--glass-line); }

/* Nav labels switch instantly, so a half-faded label is never seen */
@media (min-width: 821px) { .cp-label { transition: none; } }

/* One action symbol everywhere: the arrow sits in a small circle, like "See the work" */
.finish-mail > span[aria-hidden] {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; margin-right: -12px; border-radius: 50%;
  background: var(--fg); color: var(--bg); font: 500 16px/1 var(--sans);
}
.finish-mail:hover > span[aria-hidden] { transform: translate(1px, -1px); }
.finish-mail > span[aria-hidden] { transition: transform .4s var(--ease); }
@media (max-width: 760px) { .finish-mail > span[aria-hidden] { width: 30px; height: 30px; margin-right: -6px; font-size: 14px; } }

/* Finish (desktop): tighter spacing so the whole finish fits the screen and the tape
   sits below the nav with room, like on phones */
@media (min-width: 761px) {
  .finish { padding-top: 120px; }
  .finish .tape { margin-bottom: clamp(32px, 5vh, 56px); }
  .finish-grid { margin-top: clamp(36px, 6vh, 72px); }
  .finish-base { margin-top: 32px; }
}

/* 404: "DNF. Wrong turn." with a way back to the start */
.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 5vh, 48px); }
.lost .tape { margin: 0 0 clamp(16px, 4vh, 40px); background-image: repeating-conic-gradient(var(--fg) 0 25%, transparent 0 50%); }
.lost p:not(.tag) { max-width: 38ch; color: var(--soft); font-size: clamp(17px, 1.5vw, 20px); }
.lost .headline { font-size: clamp(56px, 11vw, 160px); }
.lost .go { align-self: flex-start; }
.bib-card-photo picture { display: contents; }

/* Finish socials: a matched pair — two equal pills that line up under the email button */
.finish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; max-width: 436px; }
.finish-grid > div { min-width: 0; }
.finish-grid p:not(.tag) { margin-top: 10px; }
.finish-grid a { display: flex; justify-content: center; width: 100%; padding: 13px 18px; }
@media (max-width: 760px) {
  .finish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; gap: 10px; }
  .finish-grid .tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Finish socials: one "Elsewhere" label over the matched pair */
.finish-grid, .finish-grid { display: block; }
.finish-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin-top: 12px; }
@media (max-width: 760px) { .finish-links { gap: 10px; } }
/* Finish socials: two small round glass buttons with the Instagram and LinkedIn marks */
.finish-links { display: flex; gap: 12px; }
.finish-grid a.soc { width: 52px; height: 52px; padding: 0; border-radius: 50%; justify-content: center; flex: none; }
.finish-grid a.soc svg { width: 21px; height: 21px; display: block; }
@media (max-width: 760px) { .finish-links { gap: 10px; } .finish-grid a.soc { width: 50px; height: 50px; } }
/* Finish socials: one slim glass capsule (Instagram · LinkedIn), like the nav and the Strava filter;
   a glossy highlight sits on the one you hover */
.finish-links {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, currentColor 8%, transparent), color-mix(in srgb, currentColor 2%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -18px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.finish-grid .finish-links a {
  display: inline-flex; width: auto; padding: 10px 20px; border: 0; border-radius: 999px;
  background: transparent; box-shadow: none; transform: none;
  font: 400 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: inherit;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.finish-grid .finish-links a:hover {
  transform: none; border: 0;
  background: color-mix(in srgb, currentColor 12%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
/* Finish on phones: the block (label → socials) sits centred between the tape and the footer,
   the headline fills the width, and the socials capsule matches the email button's width */
@media (max-width: 760px) {
  .finish > .wrap > .seg-no { margin-top: auto; }
  .finish-grid { margin-bottom: auto; }
  .finish-title { font-size: 14.6vw; }
  .finish-links { display: flex; width: 100%; }
  .finish-grid .finish-links a { flex: 1; justify-content: center; padding: 13px 12px; }
}
/* Finish on phones, final rhythm: tape → label → headline → email → socials travel together as one
   centred group; the tape sits right above the label like a finish line; the socials capsule is
   compact and tucked under the email */
@media (max-width: 760px) {
  .finish .tape { margin-top: auto; margin-bottom: 44px; }
  .finish > .wrap > .seg-no { margin-top: 0; }
  .finish .finish-mail { margin-top: 44px; }
  .finish .finish-grid { margin-top: 28px; margin-bottom: auto; }
  .finish .finish-links { display: inline-flex; width: auto; }
  .finish-grid .finish-links a { flex: none; padding: 11px 18px; }
}
/* Desktop finish: the socials capsule tucks under the email too, like on phones */
@media (min-width: 761px) { .finish .finish-grid { margin-top: 28px; } }

/* Email button, glass edition: a frosted pill in the page's text colour with a soft top
   highlight (light on glass), a fine bright edge and a gentle shadow; the arrow stays solid */
.finish-mail {
  position: relative; isolation: isolate; overflow: hidden;
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, currentColor 12%, transparent), color-mix(in srgb, currentColor 5%, transparent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -1px 0 color-mix(in srgb, currentColor 10%, transparent),
    0 20px 44px -24px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.finish-mail::before {
  content: ""; position: absolute; inset: 0 0 52% 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
}
.finish-mail:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, currentColor 34%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 color-mix(in srgb, currentColor 10%, transparent), 0 26px 50px -24px rgba(0, 0, 0, .5);
}
/* the arrow circle is solid in the text colour, the arrow in the page colour */
.finish-mail > span[aria-hidden] { background: var(--bg); color: var(--fg); }
/* day mode (the finish turns carbon): a softer highlight so the glass doesn't glare */
:root[data-theme="light"] .finish-mail { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 20px 44px -24px rgba(0, 0, 0, .6); }
:root[data-theme="light"] .finish-mail::before { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0)); }


/* Hero: "THE HYPE." stays solid; a single bright sheen sweeps through it once after the
   headline lands, and again when the headline is hovered (like the glint on "See the work") */
.headline .slant {
  padding-right: .12em; margin-right: -.12em;
  background-image: linear-gradient(100deg, var(--fg) 0%, var(--fg) 42%, #8a857d 45.5%, #ffffff 50%, #8a857d 54.5%, var(--fg) 58%, var(--fg) 100%);
  background-size: 320% 100%; background-position: 100% 50%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
:root[data-theme="light"] .headline .slant {
  background-image: linear-gradient(100deg, var(--fg) 0%, var(--fg) 42%, #6d6860 45.5%, #c9c4ba 50%, #6d6860 54.5%, var(--fg) 58%, var(--fg) 100%);
}
.headline .slant.is-sheen { animation: hype-sheen 1.5s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes hype-sheen { from { background-position: 100% 50%; } to { background-position: 0% 50%; } }

/* ==========================================================================
   Luxury layer: film grain, a crafted cursor, a nav that steps aside
   ========================================================================== */

/* Film grain: a barely-there texture over everything, like expensive print */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
:root[data-theme="light"] body::after { opacity: .07; }

/* Nav: slides away while you read down the page, glides back when you scroll up */
.course { transition: transform .7s var(--ease), background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease); }
.course.is-hidden { transform: translateY(-105%); }

/* Desktop cursor: dot + trailing ring, drawn in "difference" so it reads on any colour */
.cursor-ring, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; mix-blend-mode: difference; }
.cursor-on .cursor-ring, .cursor-on .cursor-dot { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; transition: opacity .3s; }
.cursor-ring {
  display: grid; place-items: center; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .7); color: #fff;
  font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease), opacity .3s;
}
.cursor-ring span { opacity: 0; transition: opacity .3s; }
.cursor-ring.is-hot { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-color: rgba(255, 255, 255, .9); }
.cursor-ring.is-label { width: 78px; height: 78px; margin: -39px 0 0 -39px; background: #fff; border-color: #fff; color: #000; }
.cursor-ring.is-label span { opacity: 1; }
.cursor-ring.is-down { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
/* the native cursor steps aside only where ours is active (desktop, motion allowed) */
.has-cursor, .has-cursor * { cursor: none !important; }
/* Desktop finish: a clean break between the contact group and the footer */
@media (min-width: 761px) { .finish .finish-base { margin-top: 56px; } }
/* Portrait: anchored to the top so the whole cap stays in frame (desktop and phone) */
.bib-card-photo img { object-position: 50% 0%; }
@media (max-width: 760px) { .bib-card-photo img { object-position: 50% 0%; } }

/* About portrait: a circle, centred in its column, with the hint pill sitting on its lower edge */
.bib-card { aspect-ratio: 1 / 1; width: 100%; max-width: 400px; padding: 8px; border-radius: 50%; justify-self: center; }
.bib-card-photo { aspect-ratio: 1 / 1; border-radius: 50%; }
.bib-card-photo img { object-position: 50% 50%; }
.bib-card > .bib-card-strip:first-child { top: auto; bottom: -15px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
@media (max-width: 760px) {
  .bib-card { max-width: 300px; margin: 0 auto 12px; padding: 6px; border-radius: 50%; }
  .bib-card-photo { aspect-ratio: 1 / 1; border-radius: 50%; }
  .bib-card-photo img { object-position: 50% 50%; }
  .bib-card > .bib-card-strip:first-child { top: auto; bottom: -15px; left: 50%; }
}
/* Desktop: the portrait lines up with the left margin, like the headline above it */
@media (min-width: 861px) { .bib-card { justify-self: start; } }

/* Night/Day switch: even padding around the knob, sun rays kept inside the track */
.theme-track { width: 48px; height: 26px; }
.theme-knob { top: 4px; left: 4px; width: 16px; height: 16px; box-shadow: inset -4.5px -2.5px 0 0 currentColor; }
.theme-knob::before { inset: -3px; -webkit-mask: radial-gradient(circle, transparent 9.5px, #000 10px); mask: radial-gradient(circle, transparent 9.5px, #000 10px); }
:root[data-theme="light"] .theme-knob { transform: translateX(22px) rotate(180deg); box-shadow: inset 0 0 0 0 currentColor; }
:root[data-theme="light"] .theme:hover .theme-knob { transform: translateX(22px) rotate(200deg); }

/* ==========================================================================
   One colour throughout: the finish keeps the page's own palette
   (dark in night mode, bone in day mode); no flip at the finish line
   ========================================================================== */
.finish { color: var(--fg); }
.finish .seg-no { color: var(--mute); }
.finish .seg-no > span:first-child, .finish .seg-no .finish-time { color: var(--fg); }
.finish .tag { color: var(--mute); }
.finish-base { border-top-color: var(--line); }
.finish .tape { background-image: repeating-conic-gradient(var(--fg) 0 25%, transparent 0 50%); }
/* the email arrow: a solid circle in the text colour with the arrow in the page colour */
.finish-mail > span[aria-hidden] { background: var(--fg); color: var(--bg); }
/* glass highlight tuned per mode now that the finish matches the page */
.finish-mail { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 20px 44px -24px rgba(0, 0, 0, .6); }
.finish-mail::before { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0)); }
:root[data-theme="light"] .finish-mail { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(0, 0, 0, .08), 0 20px 44px -24px rgba(0, 0, 0, .35); }
:root[data-theme="light"] .finish-mail::before { background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0)); }
.finish .finish-mail:focus-visible, .finish a:focus-visible { outline-color: rgba(var(--fg-rgb), .75); }
/* Theme switch: a smaller sun with slightly longer rays */
.theme-knob { top: 5.5px; left: 5.5px; width: 13px; height: 13px; box-shadow: inset -3.6px -2px 0 0 currentColor; }
.theme-knob::before { inset: -5px; -webkit-mask: radial-gradient(circle, transparent 8px, #000 8.5px); mask: radial-gradient(circle, transparent 8px, #000 8.5px); }
:root[data-theme="light"] .theme-knob { transform: translateX(22px) rotate(180deg); }
:root[data-theme="light"] .theme:hover .theme-knob { transform: translateX(22px) rotate(200deg); }
/* Theme switch: sun a touch bigger, rays a touch shorter */
.theme-knob { top: 4.75px; left: 4.75px; width: 14.5px; height: 14.5px; box-shadow: inset -4px -2.2px 0 0 currentColor; }
.theme-knob::before { inset: -3.5px; -webkit-mask: radial-gradient(circle, transparent 8.6px, #000 9.1px); mask: radial-gradient(circle, transparent 8.6px, #000 9.1px); }

/* Theme switch: crisp vector sun rays (eight rounded strokes) instead of the gradient wedges */
.theme-knob::before {
  background: currentColor; inset: -3.5px;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cline x1='21.60' y1='12.00' x2='23.40' y2='12.00'/%3E%3Cline x1='18.79' y1='18.79' x2='20.06' y2='20.06'/%3E%3Cline x1='12.00' y1='21.60' x2='12.00' y2='23.40'/%3E%3Cline x1='5.21' y1='18.79' x2='3.94' y2='20.06'/%3E%3Cline x1='2.40' y1='12.00' x2='0.60' y2='12.00'/%3E%3Cline x1='5.21' y1='5.21' x2='3.94' y2='3.94'/%3E%3Cline x1='12.00' y1='2.40' x2='12.00' y2='0.60'/%3E%3Cline x1='18.79' y1='5.21' x2='20.06' y2='3.94'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cline x1='21.60' y1='12.00' x2='23.40' y2='12.00'/%3E%3Cline x1='18.79' y1='18.79' x2='20.06' y2='20.06'/%3E%3Cline x1='12.00' y1='21.60' x2='12.00' y2='23.40'/%3E%3Cline x1='5.21' y1='18.79' x2='3.94' y2='20.06'/%3E%3Cline x1='2.40' y1='12.00' x2='0.60' y2='12.00'/%3E%3Cline x1='5.21' y1='5.21' x2='3.94' y2='3.94'/%3E%3Cline x1='12.00' y1='2.40' x2='12.00' y2='0.60'/%3E%3Cline x1='18.79' y1='5.21' x2='20.06' y2='3.94'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Theme switch, pixel-snapped: whole-pixel knob and ray box so the rays render crisp on every screen */
.theme-knob { top: 5px; left: 5px; width: 14px; height: 14px; box-shadow: inset -4px -2px 0 0 currentColor; }
.theme-knob::before {
  inset: -4px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' shape-rendering='geometricPrecision'%3E%3Cg stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cline x1='19.60' y1='11.00' x2='21.40' y2='11.00'/%3E%3Cline x1='17.08' y1='17.08' x2='18.35' y2='18.35'/%3E%3Cline x1='11.00' y1='19.60' x2='11.00' y2='21.40'/%3E%3Cline x1='4.92' y1='17.08' x2='3.65' y2='18.35'/%3E%3Cline x1='2.40' y1='11.00' x2='0.60' y2='11.00'/%3E%3Cline x1='4.92' y1='4.92' x2='3.65' y2='3.65'/%3E%3Cline x1='11.00' y1='2.40' x2='11.00' y2='0.60'/%3E%3Cline x1='17.08' y1='4.92' x2='18.35' y2='3.65'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' shape-rendering='geometricPrecision'%3E%3Cg stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cline x1='19.60' y1='11.00' x2='21.40' y2='11.00'/%3E%3Cline x1='17.08' y1='17.08' x2='18.35' y2='18.35'/%3E%3Cline x1='11.00' y1='19.60' x2='11.00' y2='21.40'/%3E%3Cline x1='4.92' y1='17.08' x2='3.65' y2='18.35'/%3E%3Cline x1='2.40' y1='11.00' x2='0.60' y2='11.00'/%3E%3Cline x1='4.92' y1='4.92' x2='3.65' y2='3.65'/%3E%3Cline x1='11.00' y1='2.40' x2='11.00' y2='0.60'/%3E%3Cline x1='17.08' y1='4.92' x2='18.35' y2='3.65'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
:root[data-theme="light"] .theme-knob { transform: translateX(22px) rotate(180deg); }
:root[data-theme="light"] .theme-knob::before { transform: none; }

/* Theme switch: eight identical dot rays on whole pixels, so the sun reads evenly at every angle */
.theme-knob::before { -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg fill='black'%3E%3Ccircle cx='11' cy='2' r='1.15'/%3E%3Ccircle cx='11' cy='20' r='1.15'/%3E%3Ccircle cx='2' cy='11' r='1.15'/%3E%3Ccircle cx='20' cy='11' r='1.15'/%3E%3Ccircle cx='5' cy='5' r='1.15'/%3E%3Ccircle cx='17' cy='5' r='1.15'/%3E%3Ccircle cx='5' cy='17' r='1.15'/%3E%3Ccircle cx='17' cy='17' r='1.15'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg fill='black'%3E%3Ccircle cx='11' cy='2' r='1.15'/%3E%3Ccircle cx='11' cy='20' r='1.15'/%3E%3Ccircle cx='2' cy='11' r='1.15'/%3E%3Ccircle cx='20' cy='11' r='1.15'/%3E%3Ccircle cx='5' cy='5' r='1.15'/%3E%3Ccircle cx='17' cy='5' r='1.15'/%3E%3Ccircle cx='5' cy='17' r='1.15'/%3E%3Ccircle cx='17' cy='17' r='1.15'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; }

/* Theme switch: eight even 2px line rays (straight ones on the pixel grid, diagonals at the same weight) */
.theme-knob::before { -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='19.40' y1='11.00' x2='21.20' y2='11.00'/%3E%3Cline x1='16.94' y1='16.94' x2='18.21' y2='18.21'/%3E%3Cline x1='11.00' y1='19.40' x2='11.00' y2='21.20'/%3E%3Cline x1='5.06' y1='16.94' x2='3.79' y2='18.21'/%3E%3Cline x1='2.60' y1='11.00' x2='0.80' y2='11.00'/%3E%3Cline x1='5.06' y1='5.06' x2='3.79' y2='3.79'/%3E%3Cline x1='11.00' y1='2.60' x2='11.00' y2='0.80'/%3E%3Cline x1='16.94' y1='5.06' x2='18.21' y2='3.79'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='19.40' y1='11.00' x2='21.20' y2='11.00'/%3E%3Cline x1='16.94' y1='16.94' x2='18.21' y2='18.21'/%3E%3Cline x1='11.00' y1='19.40' x2='11.00' y2='21.20'/%3E%3Cline x1='5.06' y1='16.94' x2='3.79' y2='18.21'/%3E%3Cline x1='2.60' y1='11.00' x2='0.80' y2='11.00'/%3E%3Cline x1='5.06' y1='5.06' x2='3.79' y2='3.79'/%3E%3Cline x1='11.00' y1='2.60' x2='11.00' y2='0.80'/%3E%3Cline x1='16.94' y1='5.06' x2='18.21' y2='3.79'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; }

/* Theme switch, day: one clean sun icon (solid centre, eight even rays) that slides in; no spin */
:root[data-theme="light"] .theme-knob { transform: translateX(22px); background: transparent; box-shadow: none; }
:root[data-theme="light"] .theme:hover .theme-knob { transform: translateX(22px); }
.theme-knob::before {
  inset: -4px; background: currentColor; transform: none;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='4.6' fill='black'/%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18.40' y1='11.00' x2='20.80' y2='11.00'/%3E%3Cline x1='16.23' y1='16.23' x2='17.93' y2='17.93'/%3E%3Cline x1='11.00' y1='18.40' x2='11.00' y2='20.80'/%3E%3Cline x1='5.77' y1='16.23' x2='4.07' y2='17.93'/%3E%3Cline x1='3.60' y1='11.00' x2='1.20' y2='11.00'/%3E%3Cline x1='5.77' y1='5.77' x2='4.07' y2='4.07'/%3E%3Cline x1='11.00' y1='3.60' x2='11.00' y2='1.20'/%3E%3Cline x1='16.23' y1='5.77' x2='17.93' y2='4.07'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat; mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='4.6' fill='black'/%3E%3Cg stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18.40' y1='11.00' x2='20.80' y2='11.00'/%3E%3Cline x1='16.23' y1='16.23' x2='17.93' y2='17.93'/%3E%3Cline x1='11.00' y1='18.40' x2='11.00' y2='20.80'/%3E%3Cline x1='5.77' y1='16.23' x2='4.07' y2='17.93'/%3E%3Cline x1='3.60' y1='11.00' x2='1.20' y2='11.00'/%3E%3Cline x1='5.77' y1='5.77' x2='4.07' y2='4.07'/%3E%3Cline x1='11.00' y1='3.60' x2='11.00' y2='1.20'/%3E%3Cline x1='16.23' y1='5.77' x2='17.93' y2='4.07'/%3E%3C/g%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
:root[data-theme="light"] .theme-knob::before { opacity: 1; transform: none; }
:root[data-theme="light"] .theme:hover .theme-knob::before { transform: rotate(45deg); }
.theme-knob::before { transition: opacity .5s var(--ease), transform .8s var(--ease); }

/* Finish line: one bright glint sweeps across the checkered tape as you cross it
   (the same slanted shine as "See the work") */
.finish .tape { position: relative; overflow: hidden; }
.finish .tape::after {
  content: ""; position: absolute; top: -4px; bottom: -4px; left: 0; width: 18%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .15) 30%, rgba(255, 255, 255, .95) 50%, rgba(255, 255, 255, .15) 70%, transparent 100%);
  transform: translateX(-120%) skewX(-20deg); opacity: 0; pointer-events: none;
}
.finish .tape.is-crossed::after { animation: tape-glint 1.5s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes tape-glint {
  0% { transform: translateX(-120%) skewX(-20deg); opacity: 1; }
  100% { transform: translateX(680%) skewX(-20deg); opacity: 1; }
}

/* "You finished in": a glass pill with the time set like a race result; it flashes as the clock stops */
.finish .seg-time {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 5px 5px 14px; border-radius: 999px; border: 1px solid var(--glass-line);
  background: linear-gradient(180deg, rgba(var(--fg-rgb), .08), rgba(var(--fg-rgb), .02));
  box-shadow: inset 0 1px 0 rgba(var(--fg-rgb), .12);
}
.finish .seg-no .finish-time {
  display: inline-block; min-width: 4.4em; padding: 7px 11px; border-radius: 999px; text-align: center;
  font: 600 13px/1 var(--mono); letter-spacing: .06em; font-variant-numeric: tabular-nums;
  color: var(--bg); background: var(--fg);
  transition: opacity 1s var(--ease), transform .5s var(--ease);
}
.finish .seg-time.is-stamped .finish-time { animation: time-pop .6s var(--ease); }
@keyframes time-pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
.finish .seg-time::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-130%) skewX(-20deg); opacity: 0; pointer-events: none;
}
.finish .seg-time.is-stamped::after { animation: pill-glint .9s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes pill-glint { 0% { transform: translateX(-130%) skewX(-20deg); opacity: 1; } 100% { transform: translateX(330%) skewX(-20deg); opacity: 1; } }
@media (max-width: 760px) { .finish .seg-time { gap: 8px; padding: 4px 4px 4px 11px; } .finish .seg-no .finish-time { font-size: 12px; padding: 6px 9px; } }
.finish .seg-time-label { white-space: nowrap; }
.finish .seg-time { white-space: nowrap; flex: none; }
/* "You finished in", luxury rhythm: it arrives like every other reveal on the site (a soft blur
   drifting up into focus on the shared easing), with no bounce, and a slow faint shine when the clock stops */
.finish .seg-time {
  opacity: 0; transform: translateY(14px); filter: blur(8px);
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease), filter 1.6s var(--ease);
}
.finish .seg-time.is-shown { opacity: 1; transform: none; filter: none; }
.finish .seg-no .finish-time { opacity: 1; transition: none; }
.finish .seg-time.is-stamped .finish-time { animation: none; }
.finish .seg-time::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent); }
.finish .seg-time.is-stamped::after { animation: pill-glint 1.6s var(--ease) both; }
