/* ==========================================================================
   Vraj — vraj.pro, homepage
   Offworld: blue, white, orange, Unbounded at
   full weight, mono HUD, canvas everywhere a still image would do less.
   The score table at /72-hours-in/ still runs on styles.css + script.js.
   ========================================================================== */

:root {
  /* blue, white, orange: deep cobalt night, white type, orange heat.
     Navy text on orange / sky / apricot / ice / white; white text on blue. */
  --night: #071330;
  --night-2: #0c1d47;
  --night-3: #13295e;
  --moon: #f7f9ff;
  --blue: #2a5cff;
  --sky: #7fb2ff;
  --ice: #d6e4ff;
  --orange: #ff7a1a;
  --apricot: #ffb36b;
  --spectrum: linear-gradient(90deg, var(--blue), var(--sky), var(--moon), var(--apricot), var(--orange));
  --dim: rgb(247 249 255 / 0.72);
  --line: rgb(247 249 255 / 0.14);

  --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-mono: clamp(0.72rem, 0.68rem + 0.15vw, 0.8rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --t-h3: clamp(1.4rem, 1.1rem + 1.4vw, 2.4rem);
  --t-h2: clamp(2.2rem, 1.2rem + 5vw, 6rem);
  --t-h1: clamp(2.3rem, 1rem + 5.6vw, 6.4rem);
  --t-giant: clamp(5rem, 22vw, 22rem);

  --shell: min(100% - 2rem, 1320px);
  --gap: clamp(5rem, 11vw, 10rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--night);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--moon);
  /* html paints the night; body stays clear so the aurora (z-index -1) shows */
  font-family: var(--font-mono);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, dl, dd, blockquote {
  margin: 0;
}

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

img, svg, canvas {
  display: block;
}

a {
  color: inherit;
}

::selection {
  color: var(--night);
  background: var(--orange);
}

:focus-visible {
  /* two-tone so it shows on navy, white and orange alike */
  outline: 3px solid var(--night);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--orange);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  color: var(--night);
  background: var(--orange);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

/* --- film: grain + vignette --------------------------------------------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.5s steps(4) infinite;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(40vw 30vw at 12% 8%, rgb(42 92 255 / 0.22), transparent 70%),
    radial-gradient(36vw 28vw at 92% 30%, rgb(255 122 26 / 0.1), transparent 70%),
    radial-gradient(44vw 30vw at 50% 105%, rgb(127 178 255 / 0.1), transparent 70%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at center, transparent 45%, rgb(0 0 0 / 0.45) 100%);
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-7%, 4%); }
  50% { transform: translate(5%, -6%); }
  75% { transform: translate(-3%, -9%); }
  100% { transform: translate(8%, 3%); }
}

/* --- cursor ring (fine pointers only, native cursor stays) --------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 2.2rem;
  height: 2.2rem;
  margin: -1.1rem 0 0 -1.1rem;
  pointer-events: none;
  border: 2px solid #fff;
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width 0.35s var(--ease-back), height 0.35s var(--ease-back),
    margin 0.35s var(--ease-back), background-color 0.2s, opacity 0.3s;
}

.has-cursor .cursor {
  opacity: 1;
}

.cursor.is-hot {
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  background: #fff;
}

/* --- HUD ----------------------------------------------------------------- */

.hud {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  padding: clamp(0.9rem, 2vw, 1.6rem) clamp(1rem, 3vw, 2.4rem);
  color: #fff;
  font-size: var(--t-mono);
  letter-spacing: 0.08em;
  pointer-events: none;
  mix-blend-mode: difference;
}

.hud a {
  pointer-events: auto;
  text-decoration: none;
}

.hud-mark {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.hud-mark img {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  transition: transform 0.6s var(--ease-back);
}

.hud-mark:hover img {
  transform: rotate(-360deg) scale(1.1);
}

.hud-nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 2.4rem);
  align-self: center;
  justify-self: center;
}

.hud-nav a {
  position: relative;
  padding: 0.3rem 0;
}

.hud-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.hud-nav a:hover::after,
.hud-nav a[aria-current="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hud-links {
  display: flex;
  gap: 0.5rem;
  align-self: center;
}

.pill {
  padding: 0.45rem 0.9rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s;
}

.pill:hover {
  color: #000;
  background: #fff;
}

.hud-scene,
.hud-clock {
  align-self: end;
  grid-row: 3;
}

.hud-scene {
  grid-column: 1;
}

.hud-clock {
  grid-column: 3;
  font-variant-numeric: tabular-nums;
}

.hud-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #fff;
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

@media (max-width: 52rem) {
  .hud {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto 1fr auto;
    row-gap: 0.6rem;
  }

  .hud-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .hud-scene,
  .hud-clock {
    grid-row: 4;
  }

  .hud-clock {
    grid-column: 2;
  }
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0 1.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  transition: transform 0.4s var(--ease-out), background-color 0.25s, color 0.25s;
}

.btn-orange {
  color: var(--night);
  background: var(--orange);
}

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

.btn-line {
  border-color: currentColor;
}

.btn-line:hover {
  color: var(--night);
  background: var(--moon);
  border-color: var(--moon);
}

.btn-ink {
  color: var(--moon);
  background: var(--night);
}

.btn-ink:hover {
  color: var(--moon);
  background: var(--blue);
}

/* --- split type ---------------------------------------------------------- */

.word {
  display: inline-block;
  padding-bottom: 0.08em;
  overflow: clip;
  vertical-align: top;
  white-space: nowrap;
}

.char {
  display: inline-block;
  transition: transform 0.7s var(--ease-out);
  transition-delay: calc(min(var(--i, 0), 14) * 20ms);
}

.motion [data-split]:not(.is-in) .char {
  transform: translateY(115%) rotate(14deg);
}

/* --- reveals ------------------------------------------------------------- */

.motion .reveal {
  opacity: 0;
  transform: translateY(3rem) scale(0.97);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* --- boot overlay (created by world.js) ---------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.shake {
  animation: shake 0.35s linear;
}

@keyframes shake {
  0% { transform: translate(8px, -6px); }
  20% { transform: translate(-7px, 5px); }
  40% { transform: translate(5px, 4px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: none; }
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 100svh;
  padding: 8rem 0 clamp(4.5rem, 9vh, 6rem);
  overflow: clip;
}

.hero-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy {
  position: relative;
  width: var(--shell);
  margin: 0 auto;
  pointer-events: none;
}

.hero-copy a {
  pointer-events: auto;
}

.hero-kicker {
  margin-bottom: 1.2rem;
  color: var(--orange);
  font-size: var(--t-mono);
  letter-spacing: 0.08em;
}

.hero-title {
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: var(--t-h1);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-lower {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: end;
  justify-content: space-between;
  margin-top: 2rem;
}

.hero-intro {
  max-width: 46ch;
  color: var(--dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  font-size: var(--t-mono);
  letter-spacing: 0.08em;
  transform: translateX(-50%);
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  50% { transform: translate(-50%, 0.5rem); }
}

.motion .hero-copy > * {
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
}

.motion .hero:not(.is-in) .hero-kicker,
.motion .hero:not(.is-in) .hero-lower {
  opacity: 0;
  transform: translateY(1.5rem);
}

.hero-lower {
  transition-delay: 0.5s;
}

/* --- bands --------------------------------------------------------------- */

.bands {
  position: relative;
  z-index: 2;
  padding: 3rem 0;
  overflow: clip;
}

.band {
  width: 110vw;
  margin-left: -5vw;
  padding: 1rem 0;
  overflow: clip;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 2.4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.band-orange {
  color: var(--night);
  background: var(--orange);
  transform: rotate(-3deg);
}

.band-blue {
  margin-top: -1.2rem;
  color: var(--moon);
  background: var(--blue);
  transform: rotate(2deg);
}

.band-track {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  width: max-content;
  transform: translateX(var(--band-x, 0));
  will-change: transform;
}

.band b {
  font-size: 0.7em;
}

.band-orange b {
  color: var(--moon);
}

.band-blue b {
  color: var(--orange);
}

/* --- sections ------------------------------------------------------------ */

.section {
  width: var(--shell);
  margin: 0 auto;
  padding-top: var(--gap);
}

.section-head {
  display: grid;
  gap: 1.2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-title {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.section-lede {
  max-width: 48ch;
  color: var(--dim);
}

/* --- work panels --------------------------------------------------------- */

.panel {
  position: relative;
  margin-bottom: 1.5rem;
  padding: clamp(1.6rem, 5vw, 4.5rem);
  overflow: clip;
  color: var(--night);
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
  transform: perspective(1400px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.6s var(--ease-out);
}

.motion .panel.reveal.is-in {
  transform: perspective(1400px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
}

.panel-white {
  background: var(--moon);
}

.panel-orange {
  background: var(--orange);
}

.panel-ghost {
  position: absolute;
  top: 50%;
  right: -0.05em;
  font-family: var(--font-display);
  font-size: var(--t-giant);
  font-weight: 900;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px rgb(7 19 48 / 0.22);
  letter-spacing: -0.05em;
  white-space: nowrap;
  transform: translate(var(--drift, 0), -50%);
  pointer-events: none;
}

.panel-body {
  position: relative;
  display: grid;
  gap: 1.3rem;
  justify-items: start;
  max-width: 40rem;
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--t-mono);
}

.panel-tags span {
  padding: 0.3rem 0.8rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.panel-tags .tag-live::before {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  content: "";
  background: currentColor;
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.2; }
}

.panel-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.4rem + 6vw, 6.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.panel-copy {
  max-width: 50ch;
}

.panel-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  width: 100%;
  padding-top: 1rem;
  border-top: 2px solid var(--night);
  font-size: 0.88rem;
}

.panel-meta dt {
  opacity: 0.7;
}

.panel-stat {
  display: grid;
  gap: 0.2rem;
}

.panel-stat-num {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 2rem + 8vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.panel-stat-label {
  font-size: 0.88rem;
}

/* --- repo list ----------------------------------------------------------- */

.repo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin: clamp(4rem, 8vw, 6rem) 0 1rem;
}

.repo-title {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 900;
}

.repo-count {
  color: var(--orange);
}

.repo-list {
  border-top: 2px solid var(--moon);
  counter-reset: repo;
}

.repo-row a {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 2rem;
  align-items: baseline;
  padding: 1.3rem 0.4rem;
  overflow: clip;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.repo-row a::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: var(--row-color, var(--orange));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
}

.repo-row a:hover,
.repo-row a:focus-visible {
  color: var(--row-ink, var(--night));
}

.repo-row a:hover::before,
.repo-row a:focus-visible::before {
  transform: scaleY(1);
}

.repo-name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 1.4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  transition: transform 0.45s var(--ease-out);
}

.repo-row a:hover .repo-name {
  transform: translateX(0.8rem);
}

.repo-meta {
  font-size: var(--t-mono);
  white-space: nowrap;
}

.repo-desc {
  grid-column: 1 / -1;
  max-width: 70ch;
  font-size: 0.9rem;
  opacity: 0.75;
}

.repo-skeleton {
  height: 5.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgb(247 249 255 / 0.06), transparent) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.repo-note {
  margin-top: 1rem;
  color: var(--dim);
  font-size: var(--t-mono);
}

/* --- method triptych ----------------------------------------------------- */

.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tri {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 1rem;
  padding: clamp(1.4rem, 2.5vw, 2.2rem);
  border-radius: 1.5rem;
}

.tri-orange {
  color: var(--night);
  background: var(--orange);
}

.tri-white {
  color: var(--night);
  background: var(--moon);
}

.tri-blue {
  color: var(--moon);
  background: var(--blue);
}

.tri-art {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.tri h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 0.9vw, 1.9rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tri p {
  font-size: 0.92rem;
}

.motion .tri.reveal:nth-child(1) { transform: translateY(40%) rotate(-4deg); }
.motion .tri.reveal:nth-child(2) { transform: translateY(-40%); }
.motion .tri.reveal:nth-child(3) { transform: translateY(40%) rotate(4deg); }
.motion .tri.reveal.is-in { transform: none; }

@media (max-width: 60rem) {
  .triptych {
    grid-template-columns: 1fr;
  }

  .motion .tri.reveal:nth-child(n) {
    transform: translateY(3rem);
  }

  .motion .tri.reveal.is-in {
    transform: none;
  }
}

/* --- now: warp tunnel ---------------------------------------------------- */

.now {
  position: relative;
  margin-top: var(--gap);
}

.now-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 6rem 1rem;
  overflow: clip;
  text-align: center;
}

.now-tunnel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.now-title {
  position: relative;
  margin-bottom: 2rem;
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: 0.3em;
}

.now-list {
  position: relative;
  display: grid;
  gap: 3rem;
}

.now-list h3 {
  max-width: 18ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 0.8rem + 4.6vw, 5.2rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-shadow: 0 0 2.5rem var(--night);
}

.now-list li:last-child h3 {
  color: var(--orange);
}

.now-list p {
  margin-top: 1rem;
  color: var(--dim);
}

/* scroll-driven: the stage pins and the three lines replace each other */
.motion .now {
  height: 380vh;
}

.motion .now-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 0 1rem;
}

.motion .now-title {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
}

.motion .now-list {
  position: absolute;
  inset: 0;
}

.motion .now-list li {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100% - 2rem, 70rem);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.5s, transform 0.8s var(--ease-out);
}

.motion .now-list li.is-active {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.motion .now-list li.is-past {
  transform: translate(-50%, -50%) scale(2.2);
}

/* --- about --------------------------------------------------------------- */

.about {
  padding-bottom: var(--gap);
}

.quote p {
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 0.9rem + 3.4vw, 4.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.quote footer {
  margin-top: 1.5rem;
  color: var(--orange);
  font-size: var(--t-mono);
}

.ident {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  align-items: center;
  margin: clamp(5rem, 10vw, 9rem) 0 3rem;
}

.ident-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(9rem, 20vw, 16rem);
}

.ident-arcs {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ident-avatar {
  position: absolute;
  width: 34%;
  height: auto;
  border-radius: 50%;
}

.arc {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transform-origin: 130px 130px;
  transition: stroke-dashoffset 1.4s var(--ease-out), transform 2s var(--ease-out);
}

.arc-orange { stroke: var(--orange); }
.arc-white { stroke: var(--moon); transition-delay: 0.1s; }
.arc-blue { stroke: var(--blue); transition-delay: 0.2s; }

.motion .ident:not(.is-in) .arc {
  stroke-dashoffset: 1;
}

.motion .ident:not(.is-in) .arc-orange { transform: rotate(-200deg); }
.motion .ident:not(.is-in) .arc-white { transform: rotate(220deg); }
.motion .ident:not(.is-in) .arc-blue { transform: rotate(-260deg); }

.ident-name {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--t-giant);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.ident-name::after {
  position: absolute;
  right: 0.05em;
  bottom: -0.12em;
  left: 0.03em;
  height: 0.07em;
  content: "";
  background: var(--spectrum);
  transform-origin: left;
  transition: transform 1s var(--ease-out) 0.5s;
}

.motion .ident:not(.is-in) .ident-name::after {
  transform: scaleX(0);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- score table (/72-hours-in/) ----------------------------------------- */

.scores-intro {
  padding-top: clamp(9rem, 16vw, 12rem);
}

.scores-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 1rem + 11vw, 11rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.05em;
}

.scores-title .word:nth-child(1) { color: var(--orange); }
.scores-title .word:nth-child(2) { color: var(--moon); }
.scores-title .word:nth-child(3) { color: var(--sky); }

.scores-intro .section-lede {
  margin-top: 1.6rem;
}

.suite-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.suite-jump-note,
.scores-footnote {
  margin-top: 1rem;
  color: var(--dim);
  font-size: var(--t-mono);
}

.suite-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.suite-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 4vw, 4.4rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.scores-leader {
  --tint: var(--orange);
  position: relative;
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  overflow: clip;
  color: var(--night);
  background: var(--tint);
  border-radius: clamp(1.25rem, 3vw, 2.5rem);
}

.scores-leader::after {
  position: absolute;
  right: -0.04em;
  bottom: -0.2em;
  content: "#1";
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(8rem, 30vw, 26rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 2px rgb(7 19 48 / 0.22);
  pointer-events: none;
}

.scores-leader > * {
  position: relative;
  z-index: 1;
}

.scores-leader-label {
  font-size: var(--t-mono);
}

.scores-leader-name {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.scores-leader-score {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 2rem + 13vw, 13rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.scores-leader-of {
  font-family: var(--font-mono);
  font-size: var(--t-body);
  font-weight: 700;
  letter-spacing: 0;
}

/* charts */

.scores-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.scores-chart {
  padding: 1.4rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
}

.scores-chart-title {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
}

.scores-chart-swatch {
  width: 0.9rem;
  height: 0.9rem;
  background: var(--spectrum);
  border-radius: 50%;
}

.scores-chart-caption {
  margin: 0.4rem 0 1.4rem;
  color: var(--dim);
  font-size: var(--t-mono);
}

.scores-cols {
  display: flex;
  align-items: flex-end;
  padding-left: 3.5rem;
  overflow: hidden;
}

.scores-col {
  display: flex;
  flex: 0 1 4.5rem;
  flex-direction: column;
  min-width: 3rem;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
}

.scores-col-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 10rem;
  padding: 0 0.3rem;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 6px 25%;
  border-bottom: 2px solid var(--line);
}

.scores-col-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 3px;
  background: var(--tint, var(--orange));
  border-radius: 0.6rem 0.6rem 0 0;
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-back);
}

.motion .scores-charts:not(.is-in) .scores-col-bar {
  transform: scaleY(0);
}

.scores-col-bar:has(.scores-col-value) {
  min-height: 2rem;
}

.scores-col-value {
  font-size: var(--t-mono);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scores-col-bar .scores-col-value {
  padding-top: 0.5rem;
  color: var(--night);
}

.scores-col-slot > .scores-col-value {
  margin-bottom: 0.3rem;
}

.scores-col-label {
  position: relative;
  display: block;
  height: 5.5rem;
}

.scores-col-label > span {
  position: absolute;
  top: 0.55rem;
  right: 50%;
  max-width: 8rem;
  overflow: hidden;
  color: var(--dim);
  font-size: var(--t-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: right top;
}

.scores-col:hover .scores-col-bar,
.scores-col:focus-visible .scores-col-bar {
  transform: scaleY(1.04);
}

.scores-col[aria-pressed="true"] .scores-col-label > span {
  color: var(--moon);
}

.scores-col.is-provisional .scores-col-bar {
  background-image: repeating-linear-gradient(-45deg, transparent 0 4px, rgb(7 19 48 / 0.22) 4px 6px);
}

/* table */

.scores-wrap {
  overflow-x: auto;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
}

.scores-table {
  width: 100%;
  border-spacing: 0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.scores-table th,
.scores-table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.scores-table thead th {
  color: var(--dim);
  font-size: var(--t-mono);
  font-weight: 500;
  vertical-align: bottom;
  background: var(--night-3);
}

.scores-table thead th.scores-group {
  color: var(--ice);
  text-align: center;
}

.scores-table .is-group-start {
  border-left: 1px solid var(--line);
}

.scores-table tbody tr:last-child > * {
  border-bottom: none;
}

.scores-table tbody tr > * {
  transition: background-color 0.2s;
}

.scores-table tbody tr:hover > * {
  background-color: var(--night-3);
}

.scores-table .scores-model {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 12rem;
  background-color: var(--night-2);
  border-right: 1px solid var(--line);
}

.scores-table thead .scores-model {
  z-index: 2;
  background-color: var(--night-3);
}

.scores-table tbody .scores-model {
  font-family: var(--font-display);
  font-weight: 600;
}

.scores-rank {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  margin-right: 0.6rem;
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--ice);
  border-radius: 50%;
}

.scores-meta {
  display: block;
  margin-top: 0.2rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
}

.scores-model .scores-meta {
  padding-left: 2.4rem;
}

.scores-leader .scores-meta {
  color: var(--night);
}

.scores-table .scores-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.scores-quiet,
.scores-date,
.scores-dash {
  color: var(--dim);
}

.scores-table td.scores-headline {
  min-width: 8rem;
}

.scores-headline-value {
  display: block;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.1;
}

.scores-meter {
  display: block;
  height: 0.3rem;
  margin-top: 0.4rem;
  overflow: hidden;
  background: var(--line);
  border-radius: 999px;
}

.scores-meter span {
  display: block;
  height: 100%;
  background: var(--spectrum);
  border-radius: inherit;
}

.scores-review a,
.scores-specs a {
  color: var(--sky);
}

.scores-name {
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px dashed transparent;
}

.scores-name:hover,
.scores-name[aria-pressed="true"] {
  border-bottom-color: var(--orange);
}

.scores-table tr.is-linked {
  cursor: pointer;
}

.scores-table tr.is-linked:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: -3px;
}

.scores-table tr.is-provisional > * {
  background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgb(127 178 255 / 0.12) 6px 7px);
}

.scores-table tr.is-provisional .scores-name::after {
  content: " ~";
  color: var(--dim);
}

.scores-cell.is-provisional-cell {
  opacity: 0.72;
}

/* selected model */

.scores-detail {
  margin-top: 2.5rem;
}

.scores-detail .section-index {
  color: var(--dim);
  font-size: var(--t-mono);
}

.scores-detail-name {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
  margin: 0.4rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 900;
}

.scores-rank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
}

.scores-rank-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: space-between;
  padding: 1.1rem 1.2rem;
  color: var(--night);
  background: var(--orange);
  border-radius: 1.25rem;
}

.scores-rank-card:nth-child(2) { background: var(--moon); }
.scores-rank-card:nth-child(3) { color: var(--moon); background: var(--blue); }

.scores-rank-top,
.scores-specs > div {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.scores-pill {
  padding: 0.2rem 0.7rem;
  font-size: var(--t-mono);
  border: 1.5px solid currentColor;
  border-radius: 999px;
}

.scores-rank-of {
  font-size: var(--t-mono);
}

.scores-rank-bottom {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: var(--t-mono);
}

.scores-rank-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.scores-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(1.25rem, 4vw, 3.5rem);
  margin-top: 2rem;
}

.scores-detail-block h4 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  border-bottom: 2px solid var(--line);
}

.scores-detail-block p {
  margin-bottom: 0.6rem;
  color: var(--dim);
  font-size: 0.9rem;
}

.scores-specs > div {
  padding: 0.45rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--line);
}

.scores-specs dt {
  color: var(--dim);
}

.scores-specs dd {
  text-align: right;
}

.suite + .suite {
  padding-bottom: var(--gap);
}

@media (max-width: 40rem) {
  .scores-table .scores-model {
    min-width: 0;
  }

  .scores-model .scores-meta {
    display: none;
  }
}

/* --- footer -------------------------------------------------------------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  width: var(--shell);
  margin: 0 auto;
  padding: 2rem 0 5rem;
  color: var(--dim);
  font-size: var(--t-mono);
  border-top: 1px solid var(--line);
}

.footer a:hover {
  color: var(--orange);
}

/* --- reduced motion: everything lands in place --------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .cursor {
    display: none;
  }
}

@media (max-width: 52rem) {
  .hero-hint {
    display: none;
  }
}
