/* ---------- tokens ----------
   One sans (Inter Tight) for everything; Xanh Mono only for labels, dates, tech, clock, court;
   Instrument Serif italic only for the "(eyebrow)" labels.
   Two palettes: "page" (bone) and "ink" (black chapters). Orange lives in the court only. */
:root {
  --page-bg: #eae8e1;
  --page-fg: #0f0f0e;
  --page-muted: #5d5a53;
  --page-line: rgba(15, 15, 14, 0.16);
  --page-hover: #d8d5ce;
  --page-dim: #7c7970;

  --ink-bg: #0b0b0b;
  --ink-fg: #ecebe6;
  --ink-muted: #9d9a91;
  --ink-line: rgba(236, 235, 230, 0.16);
  --ink-hover: #252523;
  --ink-dim: #666666;

  --accent: #c2410c;
  --on-accent: #ffffff;

  --wood: #d9ab72;
  --wood-2: #d3a46a;
  --seam: rgba(90, 55, 20, 0.16);
  --apron: #b5834d;
  --court-line: #fbf6ec;
  --paint: rgba(194, 65, 12, 0.3);
  --center-fill: rgba(194, 65, 12, 0.18);
  --seat: #3a3833;
  --bench: #8b6339;
  --pole: #a59d90;
  --board: rgba(255, 255, 255, 0.6);
  --chip-bg: rgba(11, 11, 11, 0.88);
  --chip-fg: #ecebe6;
  --chip-line: rgba(236, 235, 230, 0.24);

  --sans: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--sans);
  --copy-font: var(--sans);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "Xanh Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* safe-area insets are 0 except on notched / rounded screens (needs viewport-fit=cover) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: max(clamp(18px, 2.2vw, 32px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --pad-y: clamp(36px, 4vw, 60px);
  --island-top: calc(var(--safe-top) + 10px);
  --header-h: calc(var(--island-top) + 60px);
  --col-gap: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: #131312;
    --page-fg: #ecebe6;
    --page-muted: #a3a097;
    --page-line: rgba(236, 235, 230, 0.13);
    --page-hover: #272725;
    --page-dim: #6e6c66;
    --ink-bg: #000000;
    --ink-muted: #a3a097;
    --ink-line: rgba(236, 235, 230, 0.14);
    --ink-hover: #1d1d1c;
    --accent: #fb923c;
    --on-accent: #15130f;
    --wood: #8f7151;
    --wood-2: #8a6c4c;
    --seam: rgba(0, 0, 0, 0.2);
    --apron: #6b523a;
    --court-line: #e9e1d2;
    --paint: rgba(251, 146, 60, 0.22);
    --center-fill: rgba(251, 146, 60, 0.14);
    --seat: #24221e;
    --bench: #4d3b29;
    --board: rgba(255, 255, 255, 0.22);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page-bg: #131312;
  --page-fg: #ecebe6;
  --page-muted: #a3a097;
  --page-line: rgba(236, 235, 230, 0.13);
  --page-hover: #272725;
  --page-dim: #6e6c66;
  --ink-bg: #000000;
  --ink-muted: #a3a097;
  --ink-line: rgba(236, 235, 230, 0.14);
  --ink-hover: #1d1d1c;
  --accent: #fb923c;
  --on-accent: #15130f;
  --wood: #8f7151;
  --wood-2: #8a6c4c;
  --seam: rgba(0, 0, 0, 0.2);
  --apron: #6b523a;
  --court-line: #e9e1d2;
  --paint: rgba(251, 146, 60, 0.22);
  --center-fill: rgba(251, 146, 60, 0.14);
  --seat: #24221e;
  --bench: #4d3b29;
  --board: rgba(255, 255, 255, 0.22);
  color-scheme: dark;
}

:root {
  --bg: var(--page-bg);
  --fg: var(--page-fg);
  --muted: var(--page-muted);
  --line: var(--page-line);
  --hover: var(--page-hover);
  --dim: var(--page-dim);
  --chapter: light;
}

.ink,
.site-header[data-tone="dark"] {
  --bg: var(--ink-bg);
  --fg: var(--ink-fg);
  --muted: var(--ink-muted);
  --line: var(--ink-line);
  --hover: var(--ink-hover);
  --dim: var(--ink-dim);
  --chapter: dark;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 18px/1.4 var(--sans);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* film grain over everything; one static tiled SVG, no JS */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.ink {
  background: var(--bg);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 150ms;
}

a:hover {
  text-decoration-color: currentColor;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

h2:focus,
h3:focus {
  outline: none;
}

p {
  margin: 0;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.sep {
  color: var(--muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

html:not(.js) .js-only {
  display: none;
}

/* ---------- type ---------- */
.display {
  font-family: var(--display);
  font-size: clamp(42px, 6.2vw, 92px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.display-sm {
  font-size: clamp(32px, 4vw, 56px);
}

.eyebrow {
  margin: 0;
  font: italic 400 18px/1.2 var(--serif);
  letter-spacing: 0.005em;
  color: var(--muted);
}

.lead {
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  gap: 3px;
  text-decoration: none;
  font: 500 15px/1 var(--sans);
  letter-spacing: -0.005em;
}

.btn-label,
.btn-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 4px;
  transition: background-color 200ms, transform 250ms var(--ease);
}

.btn-label {
  padding: 0 20px;
}

.btn-tile {
  width: 48px;
  font-size: 17px;
}

.btn:hover :is(.btn-label, .btn-tile) {
  background: color-mix(in srgb, var(--fg) 82%, var(--bg));
}

.btn:hover .btn-tile {
  transform: translateX(2px);
}

/* view switch: Court / Recruiter view, the pressed side filled */
.view-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background-color 200ms, color 200ms;
}

.view-switch button:hover {
  color: var(--fg);
}

.view-switch button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  cursor: default;
}

.view-switch .icon {
  width: 15px;
  height: 15px;
}

/* bare round icon buttons: GitHub / LinkedIn / Resume / Email / copy */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 150ms, color 150ms;
}

.icon-btn:hover {
  background: var(--hover);
}

.icon-btn .icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.copy-email .icon-check,
.copy-email.is-copied .icon-copy {
  display: none;
}

.copy-email.is-copied .icon-check {
  display: block;
}

.text-btn,
.reset-view {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 9px;
  font: 500 12px/1.6 var(--mono);
  color: inherit;
  cursor: pointer;
  vertical-align: 1px;
  transition: border-color 150ms, background-color 150ms;
}

.text-btn:hover,
.reset-view:hover {
  border-color: var(--fg);
}

.text-btn {
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}

/* ---------- header: a floating island below the notch / status bar; tone flips over black chapters ---------- */
.site-header {
  position: fixed;
  top: var(--island-top);
  left: 50%;
  z-index: 100;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  color: var(--fg);
  translate: -50% 0;
  transition: color 300ms, background-color 300ms, border-color 300ms;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms;
}

.primary-nav a:hover {
  background: var(--hover);
}

.clock-time {
  display: inline-block;
  min-width: 7.2ch;
  color: var(--fg);
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: var(--col-gap);
  padding: calc(var(--header-h) + clamp(20px, 3vw, 40px)) var(--gutter) clamp(24px, 3vw, 40px);
}

/* name + portrait share one row; the portrait's flat crop rests on the line under the hero */
.hero-id {
  grid-column: 5 / 13;
  grid-row: 1 / 3;
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}

.hero-name {
  align-self: flex-start;
  font-size: clamp(52px, 8.4vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.hero-name span {
  display: block;
}

/* main.js builds it up block by block; the CSS animation is the no-JS / failed-JS fallback */
.hero-portrait {
  position: relative;
  flex: none;
  align-self: flex-end;
  /* the art is on a 6px grid: 1/3 scale = 2 screen px per art pixel, so the dither stays crisp */
  height: calc(1024px / 3);
  aspect-ratio: 724 / 1024;
  margin-bottom: calc(-1 * clamp(24px, 3vw, 40px));
  /* pulls pure white / neutral grey onto the warm bone palette (white lands on ~#ece9e2) */
  filter: brightness(0.9) sepia(0.1);
}

.hero-portrait :is(img, canvas) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .hero-portrait img {
    opacity: 0;
    animation: portrait-fallback 0s 3s forwards;
  }

  html.js .hero-portrait.is-building img {
    animation: none;
  }

  html.js .hero-portrait.is-done img {
    animation: none;
    opacity: 1;
  }
}

@keyframes portrait-fallback {
  to {
    opacity: 1;
  }
}

.hero-side {
  grid-column: 1 / 5;
  grid-row: 1;
  align-self: start;
  padding-top: calc(clamp(52px, 8.4vw, 104px) * 0.08);
}

.hero-intro {
  max-width: 30ch;
  margin-bottom: 20px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* the -10px lines the first icon (not its hover circle) up with the text above */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 20px 0 0 -10px;
}

.hero-eyebrow {
  grid-column: 1 / 5;
  grid-row: 2;
  align-self: end;
  margin-top: 20px;
}

/* ---------- where I've been: one static row of cells split by hairlines ---------- */
.affiliations {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 28px;
  padding: 0 var(--gutter);
  border-block: 1px solid var(--line);
}

.aff-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.aff-list li {
  display: grid;
  gap: 4px;
  padding: 16px 16px 16px 18px;
  border-left: 1px solid var(--line);
}

.aff-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.aff-note {
  font: 13px/1.2 var(--mono);
  color: var(--muted);
}

/* ---------- sections ---------- */
.section {
  padding: var(--pad-y) var(--gutter);
  border-top: 1px solid var(--line);
}

.section.ink {
  border-top: 0;
}

.section-sm {
  padding-block: clamp(28px, 3vw, 44px);
}

.sec-head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(20px, 2.4vw, 36px);
}

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 16px;
  margin-top: clamp(20px, 2.4vw, 32px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rows + .split,
.projects + .split {
  margin-top: 0;
  border-top: 0;
}

/* the section already draws the top rule */
.section > .split:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.split > :first-child {
  grid-column: 1 / 5;
}

.split > :last-child {
  grid-column: 5 / 13;
}

.lines li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(16px, 1.3vw, 18px);
}

.lines li:first-child {
  padding-top: 0;
}

.lines li:last-child {
  border-bottom: 0;
}

/* editorial rows (work, school) */
.rows {
  border-bottom: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(200px, 0.45fr) 96px;
  column-gap: var(--col-gap);
  align-items: start;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line);
}

.row-index {
  padding-top: 0.9em;
  font-size: 13px;
  color: var(--muted);
}

.row-title {
  font-size: clamp(26px, 3.1vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.row-scope {
  max-width: 52ch;
  margin-top: 10px;
  font-size: clamp(15px, 1.25vw, 17px);
  color: var(--muted);
}

.work-details,
.project-details {
  margin-top: 10px;
}

.work-details summary,
.project-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font: 500 12px/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-details summary:hover,
.project-details summary:hover {
  color: var(--fg);
}

.work-details p {
  max-width: 68ch;
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.project-details[open] {
  margin-top: 10px;
}

.project-details > :not(summary) {
  margin-top: 12px;
}

.row-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 0.9em;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.row-meta span:last-child {
  color: var(--fg);
}

/* logos have dark wordmarks, so they sit on white in both themes */
.row-logo {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 10px;
  background: #fff;
}

.row-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.course-details {
  margin-top: 0;
}

.course-details .course-grid {
  margin-top: 16px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  font-size: 14px;
}

.course-grid li {
  display: grid;
  grid-template-columns: 9ch 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.course-grid li:nth-child(-n + 2) {
  padding-top: 0;
}

.course-grid .code {
  color: var(--muted);
}

/* projects */
.projects {
  border-bottom: 1px solid var(--line);
}

.project {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: 18px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
}

.project-lead {
  grid-column: 1 / 7;
}

.project-facts {
  grid-column: 8 / 13;
}

.project-name {
  margin: 10px 0 12px;
  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.project.is-featured .project-name {
  font-size: clamp(42px, 6.8vw, 100px);
}

.project-oneliner {
  max-width: 30ch;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.3;
}

.project-date {
  margin-bottom: 16px;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.facts {
  margin: 0;
}

.facts > div {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  font: 500 11.5px/1.7 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.lessons > div {
  grid-template-columns: 1fr;
  gap: 4px;
}

.lessons > div:last-child {
  border-bottom: 1px solid var(--line);
}

.lessons dd {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
}

.project-links {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.project-links a {
  color: var(--fg);
}

/* skills (services-list interaction) */
.skill-list {
  border-top: 1px solid var(--line);
}

.skill-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  cursor: default;
  transition: color 250ms var(--ease);
}

.skill-list li:focus-visible {
  outline-offset: -2px;
}

.skill-name {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.skill-note {
  flex: none;
  white-space: nowrap;
  font-size: 13px;
  text-align: right;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease);
}

.skill-list li:is(:hover, :focus),
.skill-list:not(:hover, :focus-within) li:first-child {
  color: var(--fg);
}

.skill-list li:is(:hover, :focus) .skill-note,
.skill-list:not(:hover, :focus-within) li:first-child .skill-note {
  opacity: 1;
  transform: none;
}

.skill-foot {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* timeline: plain rows (no JS, recruiter view, print); main.js adds .is-live for the pinned panel */
.tl-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.tl-item {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.tl-copy {
  display: contents;
}

.tl-rail,
.tl-pill,
.tl-year,
.tl-card-top,
.tl-card-num {
  display: none;
}

.tl-date {
  grid-column: 1 / 6;
  grid-row: 1 / span 3;
  margin: 0;
  font-size: clamp(32px, 4.4vw, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.tl-title {
  grid-column: 6 / 13;
  margin: 0;
  font-size: clamp(16px, 1.4vw, 21px);
  font-weight: 400;
  line-height: 1.3;
}

.tl-note {
  grid-column: 6 / 13;
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.tl-card {
  grid-column: 6 / 13;
  justify-self: start;
  margin-top: 6px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-item.is-future .tl-title {
  color: var(--muted);
}

@media screen {
  :root:not(.recruiter) .tl.is-live {
    --step: 24vh;
    height: calc(100vh - var(--header-h) + (var(--n) - 1) * var(--step));
  }

  :root:not(.recruiter) .tl.is-live .tl-stage {
    position: sticky;
    top: var(--header-h);
    display: flex;
    align-items: center;
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    padding-block: clamp(8px, 1.4vh, 16px);
  }

  :root:not(.recruiter) .tl.is-live .tl-panel {
    --dot: clamp(34px, 5vh, 46px);
    --dot-gap: clamp(4px, 1.1vh, 10px);
    --cols: clamp(24px, 4vw, 64px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--cols);
    width: 100%;
    height: min(100%, 820px);
    padding: clamp(20px, 3vw, 44px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg);
    color: var(--fg);
    overflow: hidden;
  }

  :root:not(.recruiter) .tl.is-live .tl-rail {
    display: grid;
    grid-template-columns: 3px auto;
    column-gap: 16px;
    align-self: center;
  }

  .tl.is-live .tl-bar {
    position: relative;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
  }

  .tl.is-live .tl-bar-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--fg) 20%, transparent), var(--fg));
    transform: scaleY(var(--fill, 0));
    transform-origin: top;
  }

  .tl.is-live .tl-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--dot-gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .tl.is-live .tl-step {
    display: grid;
    place-content: center;
    width: var(--dot);
    height: var(--dot);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--fg) 4%, var(--bg));
    color: var(--muted);
    font: 500 10px/1.1 var(--mono);
    letter-spacing: 0.02em;
    text-align: center;
    cursor: pointer;
    transition:
      background-color 250ms var(--ease),
      border-color 250ms var(--ease),
      color 250ms var(--ease),
      transform 350ms var(--ease);
  }

  .tl.is-live .tl-step.is-future {
    border-style: dashed;
  }

  .tl.is-live .tl-step.is-past {
    border-color: color-mix(in srgb, var(--fg) 45%, transparent);
    color: var(--fg);
  }

  .tl.is-live .tl-step:hover {
    border-color: var(--fg);
    color: var(--fg);
  }

  .tl.is-live .tl-step.is-active {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
    transform: scale(1.1);
  }

  :root:not(.recruiter) .tl.is-live .tl-list {
    display: grid;
    min-height: 0;
    border: 0;
  }

  :root:not(.recruiter) .tl.is-live .tl-item {
    grid-area: 1 / 1;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 28vw, 420px);
    column-gap: var(--cols);
    align-items: center;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 450ms var(--ease);
  }

  :root:not(.recruiter) .tl.is-live .tl-item.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  :root:not(.recruiter) .tl.is-live .tl-copy {
    display: block;
  }

  /* the incoming entry rises in, the outgoing one keeps rising out; staggered per line */
  :root:not(.recruiter) .tl.is-live :is(.tl-copy > *, .tl-card) {
    transform: translateY(32px);
    transition: transform 700ms var(--ease);
  }

  .tl.is-live .tl-item.is-past :is(.tl-copy > *, .tl-card) {
    transform: translateY(-32px);
  }

  :root:not(.recruiter) .tl.is-live .tl-item.is-active :is(.tl-copy > *, .tl-card) {
    transform: none;
  }

  .tl.is-live .tl-item.is-active .tl-year {
    transition-delay: 40ms;
  }

  .tl.is-live .tl-item.is-active :is(.tl-date, .tl-card) {
    transition-delay: 80ms;
  }

  .tl.is-live .tl-item.is-active .tl-title {
    transition-delay: 120ms;
  }

  .tl.is-live .tl-item.is-active .tl-note {
    transition-delay: 160ms;
  }

  :root:not(.recruiter) .tl.is-live .tl-pill {
    display: inline-block;
    margin: 0 0 clamp(12px, 2.4vh, 28px);
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  :root:not(.recruiter) .tl.is-live .tl-year {
    display: block;
    margin: 0;
    font-size: clamp(64px, 10vw, 152px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.82;
  }

  :root:not(.recruiter) .tl.is-live .tl-date {
    margin: clamp(14px, 2.6vh, 28px) 0 8px;
    font: 500 12px/1.4 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }

  :root:not(.recruiter) .tl.is-live .tl-date.is-year {
    display: none;
  }

  :root:not(.recruiter) .tl.is-live .tl-date.is-year + .tl-title {
    margin-top: clamp(14px, 2.6vh, 28px);
  }

  :root:not(.recruiter) .tl.is-live .tl-title {
    max-width: 24ch;
    font-size: clamp(22px, 2.3vw, 34px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--fg);
  }

  :root:not(.recruiter) .tl.is-live .tl-note {
    max-width: 46ch;
    margin-top: 12px;
    font-size: clamp(15px, 1.15vw, 17px);
  }

  :root:not(.recruiter) .tl.is-live .tl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    grid-column: auto;
    justify-self: stretch;
    align-self: stretch;
    margin: 0;
    padding: clamp(16px, 2vw, 24px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--hover);
    color: var(--fg);
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    overflow: hidden;
  }

  /* two arcs off the corner, the circles from the rail echoed */
  .tl.is-live .tl-card::before,
  .tl.is-live .tl-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 50%;
    translate: 50% 50%;
    pointer-events: none;
  }

  .tl.is-live .tl-card::before {
    width: 150%;
  }

  .tl.is-live .tl-card::after {
    width: 80%;
  }

  :root:not(.recruiter) .tl.is-live .tl-card:hover {
    border-color: color-mix(in srgb, var(--fg) 40%, transparent);
  }

  :root:not(.recruiter) .tl.is-live .tl-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
  }

  :root:not(.recruiter) .tl.is-live .tl-card-num {
    display: block;
    font-size: clamp(96px, 12vw, 200px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.8;
    color: var(--line);
  }

  :root:not(.recruiter) .tl.is-live .tl-card-cta {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    display: inline-flex;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    background: var(--fg);
    color: var(--bg);
    font: 600 14px/1 var(--sans);
  }

  .tl.is-live .tl-card-cta > [aria-hidden] {
    transition: translate 250ms var(--ease);
  }

  .tl.is-live .tl-card:hover .tl-card-cta > [aria-hidden] {
    translate: 4px 0;
  }

  :root:not(.recruiter) .tl.is-live .tl-item.is-future .tl-date {
    color: var(--muted);
    -webkit-text-stroke: 0;
  }
}

@media screen and (prefers-reduced-motion: reduce) {
  :root:not(.recruiter) .tl.is-live :is(.tl-copy > *, .tl-card) {
    transform: none !important;
  }
}

/* phones: the rail turns into a scrolling row of circles over the entry */
@media screen and (max-width: 760px) {
  :root:not(.recruiter) .tl.is-live {
    --step: 22vh;
  }

  :root:not(.recruiter) .tl.is-live .tl-panel {
    --dot: 42px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    row-gap: 24px;
    height: auto;
    max-height: 100%;
    padding: 18px;
    border-radius: 14px;
  }

  :root:not(.recruiter) .tl.is-live .tl-rail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 3px;
    row-gap: 12px;
    align-self: start;
    margin-inline: -18px;
  }

  .tl.is-live .tl-bar {
    grid-row: 2;
    margin-inline: 18px;
  }

  .tl.is-live .tl-bar-fill {
    background: linear-gradient(to right, color-mix(in srgb, var(--fg) 20%, transparent), var(--fg));
    transform: scaleX(var(--fill, 0));
    transform-origin: left;
  }

  .tl.is-live .tl-steps {
    grid-row: 1;
    flex-direction: row;
    gap: 8px;
    padding: 4px 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tl.is-live .tl-steps::-webkit-scrollbar {
    display: none;
  }

  .tl.is-live .tl-steps > li {
    flex: none;
  }

  :root:not(.recruiter) .tl.is-live .tl-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    align-content: start;
    row-gap: 20px;
  }

  :root:not(.recruiter) .tl.is-live .tl-year {
    font-size: clamp(64px, 22vw, 96px);
  }

  :root:not(.recruiter) .tl.is-live .tl-title {
    font-size: 22px;
  }

  :root:not(.recruiter) .tl.is-live .tl-card {
    align-self: start;
    padding: 0;
    border: 0;
    background: none;
  }

  .tl.is-live .tl-card::before,
  .tl.is-live .tl-card::after,
  :root:not(.recruiter) .tl.is-live :is(.tl-card-top, .tl-card-num) {
    display: none;
  }
}

/* fill in the chapter colour over a double-width stroke hides the variable font's overlapping contours */
@supports (-webkit-text-stroke: 1px black) and (paint-order: stroke fill) {
  .tl-item.is-future .tl-date,
  .tl-item.is-future .tl-year,
  .court-title .outline {
    color: var(--bg);
    -webkit-text-stroke: 3px var(--fg);
    paint-order: stroke fill;
  }

  :root:not(.recruiter) .tl.is-live .tl-card-num {
    color: var(--hover);
    -webkit-text-stroke: 3px color-mix(in srgb, var(--fg) 30%, transparent);
    paint-order: stroke fill;
  }
}

@supports (-webkit-text-stroke: 1px black) and (not (paint-order: stroke fill)) {
  .tl-item.is-future .tl-date,
  .tl-item.is-future .tl-year,
  .court-title .outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--fg);
  }
}

@supports not (-webkit-text-stroke: 1px black) {
  .tl-item.is-future .tl-date,
  .tl-item.is-future .tl-year,
  .court-title .outline {
    color: var(--muted);
  }
}

/* about */
.about-lead {
  max-width: 36ch;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.defs {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  margin: clamp(28px, 3.2vw, 44px) 0 0;
  border-top: 1px solid var(--line);
}

.defs > div {
  padding: 20px var(--col-gap) 20px 0;
}

.defs > div + div {
  padding-left: var(--col-gap);
  border-left: 1px solid var(--line);
}

.defs dt {
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.defs dd {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.55;
}

/* faq */
.split-faq {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 300ms var(--ease);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq details[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq details p {
  max-width: 48ch;
  padding: 0 0 16px;
  font-size: 16px;
  color: var(--muted);
}

@supports (interpolate-size: allow-keywords) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 350ms var(--ease), content-visibility 350ms allow-discrete;
  }

  .faq details[open]::details-content {
    block-size: auto;
  }
}

/* ---------- footer (black, CTA + contact + footer in one block) ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--pad-y) var(--gutter) calc(20px + var(--safe-bottom));
  touch-action: pan-y;
}

/* grey-white pixel court sits behind the CTA; pickup.js draws it */
.footer-cta-wrap {
  position: relative;
}

.footer-court {
  position: absolute;
  left: 0;
  top: 50%;
  z-index: 0;
  display: block;
  width: min(125%, 1200px);
  height: auto;
  aspect-ratio: 362 / 240;
  translate: -18% -50%;
  opacity: 0.5;
  image-rendering: pixelated;
  pointer-events: none;
}

html.recruiter .footer-court {
  display: none;
}

.footer-cta {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: clamp(44px, 6.5vw, 104px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-shadow: 0 0 22px #0b0b0b, 0 0 48px #0b0b0b;
}

.footer-cta a {
  display: inline-block;
  text-decoration: none;
}

.footer-cta a > span {
  display: block;
}

/* main.js sets translate on each letter and the arrow as the pointer closes in */
.cta-ch,
.cta-arrow {
  display: inline-block;
}

.cta-arrow {
  transition: transform 300ms var(--ease);
}

.footer-cta a:hover .cta-arrow {
  transform: translateX(0.12em);
}

.footer-contact {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: clamp(24px, 3vw, 40px);
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 18px/1 var(--mono);
}

.footer-socials {
  display: flex;
  gap: 2px;
  margin-right: -10px;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 15px;
  font-weight: 500;
}

.footer-nav a,
.footer-util a {
  text-decoration-color: transparent;
}

.footer-nav a:hover,
.footer-util a:hover {
  text-decoration-color: currentColor;
}

.footer-util {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 14px;
  color: var(--muted);
}

.footer-util a,
.footer-util .text-btn {
  color: var(--fg);
}

.footer-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- scroll reveal (only when main.js opts in and motion is allowed) ---------- */
html.motion .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

html.motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- court ---------- */
.court-band {
  padding: clamp(32px, 3.5vw, 52px) var(--gutter) clamp(32px, 4vw, 56px);
  overflow-x: clip;
}

.court-band .sec-head {
  margin-bottom: clamp(20px, 2.4vw, 32px);
}

.court-title {
  font-size: clamp(44px, 7.2vw, 112px);
  line-height: 0.9;
}

.court-title span {
  display: block;
}

.court-stage[data-mode="flat"] {
  padding-top: 30px;
}

@media (min-width: 761px) {
  .court-stage[data-mode="auto"] {
    padding-top: 30px;
  }
}

.court-hint {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.court-hint a {
  color: var(--fg);
}

.hint-3d {
  display: none;
}

.reset-view {
  margin-left: 6px;
  padding: 0 8px;
  font-size: 11px;
}

.court-stage {
  --tilt: 0deg;
  --az: 0deg;
  --zoom: 1;
  --fx: 530;
  --fy: 390;
  --td-opacity: 1;
  position: relative;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
}

.court-plane {
  position: relative;
  margin-inline: auto;
  font-size: calc(min(100cqw, 1180px) / 1060);
  width: 1060em;
  height: 780em;
}

.court-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.wood {
  fill: var(--wood);
}

.wood-2 {
  fill: var(--wood-2);
}

.seam {
  stroke: var(--seam);
  stroke-width: 1;
  fill: none;
}

.apron {
  fill: var(--apron);
}

.ln {
  fill: none;
  stroke: var(--court-line);
  stroke-width: 3;
}

.ln.thin {
  stroke-width: 2;
}

.ln.dash {
  stroke-dasharray: 10 8;
}

.ln.center-fill {
  fill: var(--center-fill);
}

.paint {
  fill: var(--paint);
}

.td-hoop {
  opacity: var(--td-opacity);
}

.board-td {
  stroke: var(--court-line);
  stroke-width: 6;
  stroke-linecap: round;
}

.rim-td {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
}

.bench-base {
  fill: var(--bench);
}

.seat {
  fill: var(--seat);
}

.strip-base {
  fill: var(--apron);
  opacity: 0.55;
}

.strip-line {
  stroke: var(--court-line);
  stroke-width: 2;
}

.tl-dot {
  fill: var(--accent);
  stroke: var(--court-line);
  stroke-width: 2;
}

.tl-dot.is-future {
  fill: var(--apron);
  stroke: var(--accent);
  stroke-width: 3;
}

.zone {
  cursor: pointer;
}

.zone:focus {
  outline: none;
}

.zone-shape {
  fill: transparent;
  stroke: transparent;
  stroke-width: 4;
  transition: stroke 150ms;
}

.zone:hover .zone-shape,
.zone:focus-visible .zone-shape,
.zone.is-hot .zone-shape {
  stroke: var(--accent);
}

.zone:focus-visible .zone-shape {
  stroke-dasharray: 10 6;
  stroke-width: 6;
}

.zone.is-active .zone-shape {
  stroke: var(--accent);
  stroke-width: 6;
}

.shot-ring {
  fill: color-mix(in srgb, var(--court-line) 18%, transparent);
  stroke: var(--court-line);
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
  transition: stroke 150ms;
}

.shot-dot {
  fill: var(--court-line);
}

.shot-dot.is-featured {
  fill: var(--accent);
}

.shot:hover .shot-ring,
.shot:focus-visible .shot-ring,
.shot.is-hot .shot-ring,
.shot.is-active .shot-ring {
  stroke: var(--accent);
  stroke-width: 4;
  stroke-dasharray: none;
}

/* chips: billboards that always face the camera */
.chip-anchor,
.ball-anchor {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.chip-anchor,
.ball {
  transform: translateZ(var(--lift, 0em)) rotateZ(calc(var(--az) * -1)) rotateX(calc(var(--tilt) * -1));
}

.ball-anchor,
.ball-lift {
  transform-style: preserve-3d;
}

.chip {
  position: absolute;
  left: 0;
  bottom: 5px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 2px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-line);
  font: 500 11px/1 var(--mono);
  color: var(--chip-fg);
  transition: border-color 150ms, opacity 150ms;
}

.chip b {
  font-weight: 500;
}

.chip .hint {
  display: none;
  color: color-mix(in srgb, var(--chip-fg) 70%, transparent);
}

.chip-anchor.is-hot .chip,
.chip-anchor.is-active .chip {
  border-color: var(--accent);
}

.chip-anchor.is-hot .hint {
  display: inline;
}

.chip-shot .chip {
  opacity: 0;
}

.chip-shot.is-hot .chip,
.court-stage[data-hot="arc"] .chip-shot .chip {
  opacity: 1;
}

.upright,
.rim,
.ball-shadow {
  display: none;
}

.ball-lift {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}

.ball {
  position: absolute;
  left: -14em;
  bottom: -14em;
  width: 28em;
  height: 28em;
  transform-origin: 50% 100%;
}

.ball svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ball-body {
  fill: #e8702a;
  stroke: #7a3510;
  stroke-width: 1;
}

.ball-seam {
  fill: none;
  stroke: #3d1c08;
  stroke-width: 1.4;
}

.zone-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.zone-legend a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms;
}

.zone-legend a:hover,
.zone-legend a.is-active {
  color: var(--fg);
}

.zone-legend a.is-active kbd {
  border-color: var(--accent);
}

kbd {
  display: inline-block;
  min-width: 18px;
  margin-right: 4px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  font: 500 10.5px/16px var(--mono);
  text-align: center;
  color: var(--fg);
}

/* enhanced modes (set by court.js) */
.court-stage:is([data-mode="3d"], [data-mode="portrait"]) .court-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: 0 0;
  transform: rotateX(var(--tilt)) rotateZ(var(--az)) scale(var(--zoom)) translate(calc(var(--fx) * -1em), calc(var(--fy) * -1em));
}

.court-stage[data-mode="3d"] {
  height: clamp(440px, 72vh, 720px);
  perspective: 1600px;
  perspective-origin: 50% 20%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  --tilt: 56deg;
  --td-opacity: 0.25;
}

.court-stage[data-mode="3d"].is-dragging {
  cursor: grabbing;
}

.court-stage[data-mode="3d"] .court-plane {
  font-size: calc(min(90cqw, 1280px) / 1060);
  top: 47%;
  transform-style: preserve-3d;
  transition: transform 600ms var(--ease), opacity 600ms var(--ease);
}

.court-stage[data-mode="3d"] :is(.chip-anchor, .ball) {
  transition: transform 600ms var(--ease);
}

.court-stage[data-mode="3d"]:is(.is-dragging, .no-anim) :is(.court-plane, .chip-anchor, .ball) {
  transition: none;
}

.court-stage[data-mode="3d"] .court-plane.is-revealing,
.court-stage[data-mode="3d"] .court-plane.is-revealing :is(.chip-anchor, .ball) {
  transition-duration: 900ms;
}

.court-stage[data-mode="3d"] .court-plane.is-pre {
  opacity: 0;
  --tilt: 80deg;
  --zoom: 0.8;
}

.court-stage[data-mode="3d"] :is(.upright, .rim, .ball-shadow) {
  display: block;
  position: absolute;
}

.court-stage[data-mode="3d"] .ball {
  bottom: 0;
}

.court-band.is-3d .hint-3d {
  display: inline;
}

.upright {
  pointer-events: auto;
  cursor: pointer;
}

.upright svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.profile {
  transform-origin: 50% 100%;
  transform: rotateX(-90deg);
}

.board {
  transform-origin: 0 50%;
  transform: rotateY(-90deg);
}

.rim {
  width: 40em;
  height: 40em;
  margin: -20em 0 0 -20em;
  border: 3.5em solid var(--accent);
  border-radius: 50%;
  transform: translateZ(100em);
  pointer-events: auto;
  cursor: pointer;
}

.rim.is-swish {
  border-color: var(--court-line);
}

.pole,
.pole-base {
  stroke: var(--pole);
  stroke-width: 6;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.pole-base {
  fill: var(--pole);
  stroke-width: 0;
}

.board-edge {
  stroke: var(--court-line);
  stroke-width: 4;
}

.board-face {
  fill: var(--board);
  stroke: var(--court-line);
  stroke-width: 3;
}

.board-square {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
}

.rim-line {
  stroke: var(--accent);
  stroke-width: 4;
}

.net {
  fill: none;
  stroke: var(--court-line);
  stroke-width: 1.5;
}

.ball-shadow {
  width: 30em;
  height: 30em;
  margin: -15em 0 0 -15em;
  border-radius: 50%;
  background: radial-gradient(rgba(0, 0, 0, 0.38), transparent 68%);
}

.court-stage[data-mode="portrait"] {
  height: calc(100cqw * 1060 / 780);
  --az: 90deg;
}

.court-stage[data-mode="portrait"] .court-plane {
  font-size: calc(100cqw / 780);
}

.court-stage[data-mode="portrait"] :is(.chip-zone, .hint) {
  display: none !important;
}

.court-stage[data-mode="portrait"] [data-chip="bench"] .chip {
  transform: translateX(-100%);
}

.court-stage[data-mode="portrait"] [data-chip="sideline"] .chip {
  transform: none;
}

/* same portrait court before (or without) JS on phones */
@media (max-width: 760px) {
  .court-stage[data-mode="auto"] {
    height: calc(100cqw * 1060 / 780);
    --az: 90deg;
  }

  .court-stage[data-mode="auto"] .court-plane {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 0 0;
    font-size: calc(100cqw / 780);
    transform: rotateZ(var(--az)) translate(calc(var(--fx) * -1em), calc(var(--fy) * -1em));
  }

  .court-stage[data-mode="auto"] :is(.chip-zone, .hint) {
    display: none !important;
  }

  .court-stage[data-mode="auto"] [data-chip="bench"] .chip {
    transform: translateX(-100%);
  }

  .court-stage[data-mode="auto"] [data-chip="sideline"] .chip {
    transform: none;
  }
}

/* ---------- WebGL court (court3d.js): pinned scroll track, first-person stage ---------- */
.court-band.is-webgl {
  padding: 0;
}

.court-band.is-webgl > :is(.court-stage, .court-hint) {
  display: none;
}

.court-band.is-webgl .zone-legend {
  margin: 0;
  padding: 16px var(--gutter) clamp(24px, 3vw, 40px);
}

.c3-track {
  --c3-run: 140vh;
  position: relative;
  height: calc(100vh + var(--c3-run));
}

.is-calm .c3-track {
  --c3-run: 90vh;
}

@supports (height: 100svh) {
  .c3-track {
    --c3-run: 140svh;
    height: calc(100svh + var(--c3-run));
  }

  .is-calm .c3-track {
    --c3-run: 90svh;
  }
}

.c3-sticky {
  --c3-green: #3ee07a;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #050505;
  user-select: none;
  -webkit-user-select: none;
}

.c3-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: default;
  outline: none;
}

.c3-sticky.is-live .c3-canvas {
  cursor: grab;
}

.c3-sticky.is-live .c3-canvas[data-cursor="pointer"] {
  cursor: pointer;
}

.c3-sticky.is-live .c3-canvas[data-cursor="walk"] {
  cursor: crosshair;
}

.c3-sticky.is-live .c3-canvas.is-dragging {
  cursor: grabbing;
}

.c3-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.c3-intro {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(var(--header-h) + clamp(16px, 5vh, 64px));
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform, opacity;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

.c3-intro .sec-head {
  margin: 0;
}

.c3-cue {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(20px, 4vh, 40px);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  border: 1px solid var(--chip-line);
  border-radius: 2px;
  background: var(--chip-bg);
  font-size: 12px;
  color: var(--chip-fg);
  pointer-events: none;
}

.c3-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 48%, transparent 55%, rgba(0, 0, 0, 0.5));
}

.c3-bar {
  position: relative;
  width: 140px;
  height: 1px;
  background: var(--line);
}

.c3-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

.c3-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.c3-tag {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: -34px 0 0;
  padding: 6px 9px;
  translate: -50% 0;
  border: 1px solid var(--chip-line);
  border-radius: 2px;
  background: var(--chip-bg);
  font: 500 11px/1 var(--mono);
  color: var(--chip-fg);
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  will-change: transform, opacity;
  transition: border-color 150ms;
}

.c3-tag::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 10px;
  background: var(--chip-line);
}

.c3-tag kbd {
  min-width: 16px;
  margin: 0;
  line-height: 14px;
  border-color: var(--chip-line);
  color: var(--chip-fg);
}

.c3-tag b {
  font-weight: 500;
  color: var(--accent);
}

.c3-tag.is-hot,
.c3-tag:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.c3-tag.is-off {
  visibility: hidden;
}

.c3-tag-shot {
  padding: 5px 8px;
  font-size: 10.5px;
}

.c3-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(251, 246, 236, 0.75);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms;
}

.c3-hud {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(14px, 3vh, 28px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms, visibility 0s 300ms;
}

.c3-sticky.is-live :is(.c3-hud, .c3-cross) {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms;
}

.c3-help {
  max-width: 52ch;
  padding: 7px 10px;
  border: 1px solid var(--chip-line);
  border-radius: 2px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  line-height: 1.5;
}

.c3-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.c3-btn,
.c3-link {
  padding: 7px 11px;
  border: 1px solid var(--chip-line);
  border-radius: 2px;
  background: var(--chip-bg);
  font: 500 11px/1 var(--mono);
  color: var(--chip-fg);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms;
}

.c3-btn:hover,
.c3-link:hover {
  border-color: var(--accent);
}

.c3-skip {
  padding: 7px 10px;
  border-radius: 2px;
  background: var(--chip-bg);
  font-size: 11px;
  color: var(--chip-fg);
}

.c3-toast {
  position: absolute;
  left: 50%;
  top: calc(var(--header-h) + 24px);
  translate: -50% 0;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  background: var(--chip-bg);
  font-size: 12px;
  color: var(--chip-fg);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 200ms, transform 300ms var(--ease);
}

.c3-toast.is-on {
  opacity: 1;
  transform: none;
}

.c3-toast.is-green {
  border-color: var(--c3-green);
  color: var(--c3-green);
}

/* shot meter: --x is the fill (0 → 1, bottom → top); the green zone is the top 2 × --green of the bar,
   and the good zone is the --good + --green just below it */
.c3-meter {
  position: absolute;
  left: calc(50% + 64px);
  top: 50%;
  width: 52px;
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms, visibility 0s 200ms;
}

.c3-meter.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 120ms;
}

.c3-meter-label {
  position: absolute;
  left: 50%;
  top: 100%;
  margin: 10px 0 0;
  translate: -50% 0;
  font-size: 12px;
  white-space: nowrap;
  color: var(--chip-fg);
  text-shadow: 0 1px 6px #000;
}

.c3-meter-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.7));
  transition: filter 160ms;
}

.c3-meter-svg rect {
  transform-box: view-box;
}

.c3-meter-track {
  fill: rgba(11, 11, 11, 0.55);
}

.c3-meter-good {
  fill: rgba(251, 246, 236, 0.16);
  transform-origin: 50% 0;
  transform: scaleY(calc(var(--green) + var(--good)));
}

.c3-meter-fill {
  fill: #fff;
  transform-origin: 50% 100%;
  transform: scaleY(var(--x));
}

.c3-meter-green {
  opacity: 0.85;
  transform-origin: 50% 0;
  transform: scaleY(calc(var(--green) * 2));
}

.c3-meter-edge {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2;
  stroke-linejoin: round;
}

.c3-meter.is-green .c3-meter-svg {
  filter: drop-shadow(0 0 14px rgba(62, 224, 122, 0.85));
}

.c3-meter.is-green .c3-meter-fill {
  fill: var(--c3-green);
}

.c3-meter.is-green .c3-meter-edge {
  stroke: var(--c3-green);
}

.c3-meter.is-off .c3-meter-fill {
  fill: rgba(251, 246, 236, 0.45);
}

.c3-meter.is-green .c3-meter-label {
  color: var(--c3-green);
}

.c3-meter.is-off .c3-meter-label {
  color: var(--muted);
}

.c3-card {
  position: absolute;
  left: 50%;
  bottom: clamp(56px, 9vh, 84px);
  width: min(440px, calc(100% - 2 * var(--gutter)));
  translate: -50% 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--chip-line);
  border-top: 2px solid var(--accent);
  background: rgba(11, 11, 11, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--chip-fg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 220ms, transform 320ms var(--ease), visibility 0s 220ms;
}

.c3-card.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 220ms, transform 320ms var(--ease);
}

.c3-card-title {
  margin: 8px 0 6px;
  font: 800 clamp(28px, 3vw, 40px)/1 var(--display);
  letter-spacing: -0.035em;
}

.c3-card-hint {
  font-size: 15px;
  line-height: 1.35;
  color: var(--muted);
}

.c3-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.c3-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 2px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 13px/1 var(--sans);
  text-decoration: none;
}

.c3-enter {
  font: 500 11px/1 var(--mono);
  color: var(--muted);
}

@media (max-width: 760px) {
  .court-band.is-webgl > :is(.zone-legend, .c3-track) {
    margin-inline: 0;
  }

  .c3-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .c3-card {
    bottom: 96px;
  }

  .c3-help {
    transition: opacity 200ms;
  }

  .c3-sticky:has(.c3-card.is-on) .c3-help {
    opacity: 0;
  }

  .c3-bar {
    width: 64px;
  }

  .c3-btn,
  .c3-link {
    padding: 12px 14px;
  }

  .c3-tag {
    padding: 9px 10px;
  }
}

/* ---------- recruiter view ---------- */
html.recruiter :is(.court-band, .affiliations, .hero-portrait, [data-recruiter-on]) {
  display: none;
}

html.recruiter .hero {
  padding-bottom: 24px;
}

@media (min-width: 1024px) {
  html.recruiter main {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    column-gap: 56px;
    padding: 0 var(--gutter);
  }

  html.recruiter .hero {
    position: sticky;
    top: var(--header-h);
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    display: block;
    padding: 48px 0 24px;
  }

  html.recruiter .hero-name {
    font-size: 44px;
    margin-bottom: 28px;
  }

  html.recruiter .hero-side {
    padding: 0;
  }

  html.recruiter .hero-intro {
    font-size: 18px;
  }

  html.recruiter .content {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  html.recruiter .section {
    padding: 48px 0;
  }

  html.recruiter .content > .section:first-child {
    border-top: 0;
  }

  html.recruiter .display:not(.visually-hidden) {
    font-size: clamp(32px, 3.6vw, 48px);
  }
}

/* ---------- mid widths ---------- */
@media (max-width: 1000px) {
  .row {
    grid-template-columns: 40px minmax(0, 1fr) minmax(180px, 0.5fr);
  }

  .row-logo {
    grid-column: 2;
    grid-row: 2;
    width: 72px;
    height: 72px;
    margin-top: 20px;
  }

  .project-lead,
  .project-facts {
    grid-column: 1 / -1;
  }

  .project-facts {
    max-width: 640px;
  }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root {
    --col-gap: 16px;
  }

  body {
    font-size: 17px;
  }

  .primary-nav a {
    padding: 0 12px;
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-id {
    justify-content: space-between;
  }

  .hero-portrait {
    height: calc(1024px / 6);
    margin: 0;
  }

  .hero-side {
    margin-top: 32px;
    padding-top: 0;
  }

  .affiliations {
    grid-template-columns: 1fr;
    padding-top: 16px;
  }

  .aff-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }

  .aff-list li {
    padding: 12px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .split > :first-child,
  .split > :last-child,
  .tl-date,
  .tl-title,
  .tl-note,
  .tl-card {
    grid-column: 1 / -1;
  }

  .tl-date {
    grid-row: auto;
  }

  .row {
    grid-template-columns: 1fr;
    row-gap: 12px;
    padding: 20px 0 24px;
  }

  .row-index,
  .row-meta {
    padding-top: 0;
  }

  .row-logo {
    grid-column: 1;
    grid-row: auto;
    margin-top: 4px;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-grid li:nth-child(2) {
    padding-top: 12px;
  }

  .project {
    padding: 20px 0 28px;
  }

  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .skill-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .skill-note {
    white-space: normal;
    text-align: left;
    transform: none;
  }

  .tl-item {
    row-gap: 8px;
    padding: 20px 0;
  }

  .defs {
    grid-template-columns: 1fr;
  }

  .defs > div + div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  /* court bleeds to the edge on phones so every zone stays ≥44px */
  .court-band {
    padding-inline: 6px;
  }

  .court-band > :not(.court-stage) {
    margin-inline: calc(var(--gutter) - 6px);
  }

  .zone-legend {
    gap: 0 14px;
  }

  .zone-legend a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .primary-nav a {
    padding: 0 9px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- print ---------- */
@media print {
  :root,
  .ink {
    --bg: #fff;
    --fg: #000;
    --muted: #444;
    --line: #ccc;
    --dim: #000;
    --accent: #000;
  }

  body,
  .ink {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  body::after,
  .site-header,
  .skip-link,
  .affiliations,
  .hero-portrait,
  .court-band,
  .footer-court,
  .hero-actions,
  .copy-email,
  .theme-toggle,
  [data-view-toggle] {
    display: none !important;
  }

  html.motion .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero,
  html.recruiter main {
    display: block !important;
    min-height: 0 !important;
    padding: 0 0 12pt !important;
    position: static !important;
  }

  .hero-name {
    font-size: 30pt !important;
    margin-bottom: 8pt;
  }

  .hero-name span {
    display: inline;
  }

  .hero-side {
    padding: 0;
  }

  .section,
  .site-footer {
    padding: 14pt 0 !important;
  }

  .display,
  .footer-cta,
  .project-name,
  .project.is-featured .project-name {
    font-size: 20pt !important;
  }

  .skill-name,
  .tl-date,
  .row-title,
  .project-date {
    font-size: 14pt !important;
  }

  .skill-note {
    opacity: 1 !important;
    transform: none !important;
  }

  .skill-list li {
    color: #000 !important;
  }

  .tl-item.is-future .tl-date {
    color: #000 !important;
    -webkit-text-stroke: 0;
  }

  .tl-card {
    display: none !important;
  }

  .row,
  .project,
  .tl-item {
    break-inside: avoid;
  }

  .sec-head {
    margin-bottom: 10pt;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #444;
  }
}
