:root {
  --bg: #04040c;
  --panel: rgba(8, 10, 30, 0.62);
  --panel-solid: rgba(6, 7, 22, 0.9);
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --purple: #c084fc;
  --mint: #34d399;
  --text: #eef2ff;
  --dim: #8b97b8;
  --line: rgba(129, 140, 248, 0.3);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 2px 30px rgba(0, 0, 0, 0.75);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono, .hud, .layer-tag, .cue, .meters, .hero-links, .hero-rule, .loader-word, .loader-sub, #layerNav, .legend, #tooltip {
  font-family: "Cascadia Code", Consolas, "SF Mono", monospace;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

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

/* ---------- cursor glow + grain ---------- */
#cursorGlow {
  position: fixed;
  z-index: 6;
  left: 0; top: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 245, 255, 0.3) 0%, rgba(56, 189, 248, 0.18) 26%, rgba(99, 102, 241, 0.09) 50%, transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
}
@media (pointer: coarse) { #cursorGlow { display: none; } }

#grain {
  position: fixed;
  inset: -60px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-18px, 12px); }
  50% { transform: translate(14px, -16px); }
  75% { transform: translate(-10px, -8px); }
  100% { transform: translate(0, 0); }
}

/* ---------- loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 1s var(--expo), visibility 1s;
}
#loader.done { opacity: 0; visibility: hidden; }

.loader-core { position: relative; width: 84px; height: 84px; }
.loader-core i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid transparent;
  animation: coreSpin 1.6s linear infinite;
}
.loader-core i:nth-child(1) { border-top-color: var(--cyan); border-right-color: rgba(34, 211, 238, 0.3); }
.loader-core i:nth-child(2) { inset: 12px; animation-duration: 1.1s; animation-direction: reverse; border-bottom-color: var(--purple); }
.loader-core i:nth-child(3) { inset: 24px; animation-duration: 2s; border-left-color: var(--indigo); }
@keyframes coreSpin { to { transform: rotate(360deg); } }

.loader-word { display: flex; gap: 4px; font-size: 17px; letter-spacing: 10px; padding-left: 10px; }
.loader-word span { animation: loaderBreathe 1.4s ease-in-out infinite; color: var(--text); }
.loader-word span:nth-child(2n) { color: var(--cyan); }
.loader-word span:nth-child(3n) { color: var(--purple); }
.loader-word span:nth-child(1) { animation-delay: 0s; }
.loader-word span:nth-child(2) { animation-delay: 0.08s; }
.loader-word span:nth-child(3) { animation-delay: 0.16s; }
.loader-word span:nth-child(4) { animation-delay: 0.24s; }
.loader-word span:nth-child(5) { animation-delay: 0.32s; }
.loader-word span:nth-child(6) { animation-delay: 0.4s; }
.loader-word span:nth-child(7) { animation-delay: 0.48s; }
.loader-word span:nth-child(8) { animation-delay: 0.56s; }
@keyframes loaderBreathe { 0%, 100% { opacity: 0.25; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }

.loader-bar {
  width: 220px; height: 2px;
  background: rgba(129, 140, 248, 0.16);
  overflow: hidden;
  border-radius: 2px;
}
.loader-bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--indigo), var(--purple));
  animation: loadBar 1.1s var(--expo) forwards;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
}
@keyframes loadBar { to { transform: scaleX(1); } }

.loader-sub { font-size: 12px; color: var(--dim); letter-spacing: 3px; }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  z-index: 20;
  font-size: 13px;
  letter-spacing: 1.6px;
  line-height: 1.8;
  pointer-events: none;
  user-select: none;
  text-shadow: var(--shadow);
  opacity: 0;
  padding: 9px 15px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(12, 15, 40, 0.55), rgba(5, 6, 18, 0.42));
  border: 1px solid rgba(129, 140, 248, 0.16);
  backdrop-filter: blur(10px) saturate(1.35);
  -webkit-backdrop-filter: blur(10px) saturate(1.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
body.booted .hud { animation: hudIn 1.1s var(--expo) forwards; }
@keyframes hudIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hud.tl { top: 22px; left: 26px; animation-delay: 0.15s !important; }
.hud.tr { top: 22px; right: 26px; text-align: right; max-width: 46vw; animation-delay: 0.3s !important; }
.hud.br { bottom: 24px; right: 26px; animation-delay: 0.45s !important; }
.hud-brand { color: var(--text); font-weight: 700; letter-spacing: 5px; font-size: 14px; }
.hud .theta { font-size: 11.5px; }
.dim { color: var(--dim); }
.ok { color: var(--mint); font-weight: 600; }
#fps, #logp, #hent { color: var(--cyan); }

/* ---------- rail nav ---------- */
#layerNav {
  position: fixed;
  z-index: 22;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  pointer-events: auto;
  user-select: none;
  opacity: 0;
}
body.booted #layerNav { animation: railIn 1.2s var(--expo) 0.5s forwards; }
@keyframes railIn { from { opacity: 0; transform: translateY(-50%) translateX(-16px); } to { opacity: 1; transform: translateY(-50%); } }

#layerNav .rail {
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(129, 140, 248, 0.18);
  border-radius: 2px;
  overflow: hidden;
}
#layerNav .rail i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: top;
  transform: scaleY(0);
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}
#layerNav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  color: var(--dim);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 2.5px;
  cursor: pointer;
  padding: 3px 0;
  transition: color 0.4s var(--expo), transform 0.4s var(--expo);
  text-shadow: var(--shadow);
}
#layerNav .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(129, 140, 248, 0.45);
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.26), rgba(10, 12, 34, 0.9) 62%);
  transition: all 0.4s var(--expo);
  flex: none;
  margin-left: -1px;
}
#layerNav button:hover { color: var(--text); transform: translateX(6px); }
#layerNav button:hover .dot { border-color: var(--cyan); }
#layerNav button.active { color: var(--cyan); }
#layerNav button.active .dot {
  border-color: var(--cyan);
  background: radial-gradient(circle at 32% 28%, #ffffff, var(--cyan) 45%, #0e7490);
  box-shadow: 0 0 14px var(--cyan), 0 0 4px var(--cyan);
  transform: scale(1.25);
}

#hint { animation: hintPulse 2.6s ease-in-out infinite !important; }
@keyframes hintPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ---------- shell legend ---------- */
.legend {
  right: 26px;
  bottom: 74px;
  text-align: right;
  font-size: 11px;
  letter-spacing: 1.2px;
  line-height: 2;
  animation-delay: 0.6s !important;
}
.lg-title { color: var(--dim); font-size: 10px; letter-spacing: 4px; margin-bottom: 4px; opacity: 0.8; }
.lg-row {
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  transition: color 0.5s var(--expo), transform 0.5s var(--expo), opacity 0.5s;
  opacity: 0.55;
}
.lg-row i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c, #818cf8);
  box-shadow: 0 0 0 0 var(--c, #818cf8);
  transition: all 0.5s var(--expo);
}
.lg-row.active { color: var(--text); opacity: 1; transform: translateX(-6px); font-weight: 700; }
.lg-row.active i { box-shadow: 0 0 12px 2px var(--c, #818cf8); transform: scale(1.3); }

/* ---------- sections ---------- */
main { position: fixed; inset: 0; z-index: 10; pointer-events: none; }

section {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(960px, calc(100vw - 48px));
  transform: translate(-50%, -46%);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: visibility 0s linear 0.2s;
}
section.on { visibility: visible; transition-delay: 0s; }
section.on a,
section.on li,
section.on .chips span,
section.on button { pointer-events: auto; }

/* readability scrim behind every section */
section::before {
  content: "";
  position: absolute;
  inset: -12% -18%;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(2, 2, 10, 0.8) 0%, rgba(3, 3, 12, 0.42) 55%, transparent 78%);
  z-index: -1;
  pointer-events: none;
}

/* staggered reveal system */
.stagger {
  opacity: 0;
  transform: translateY(42px);
  filter: blur(10px);
  transition: opacity 0.9s var(--expo), transform 0.9s var(--expo), filter 0.9s var(--expo);
}
section.on .stagger { opacity: 1; transform: none; filter: blur(0); }
body.snap .stagger, body.snap .hud, body.snap #layerNav, body.snap .hero-title span, body.snap #loader { transition: none !important; animation-duration: 0.01s !important; animation-delay: 0s !important; transition-delay: 0s !important; }
body.snap section .stagger { opacity: 1 !important; transform: none !important; filter: none !important; }
section.on .stagger:nth-child(1) { transition-delay: 0.05s; }
section.on .stagger:nth-child(2) { transition-delay: 0.14s; }
section.on .stagger:nth-child(3) { transition-delay: 0.23s; }
section.on .stagger:nth-child(4) { transition-delay: 0.32s; }
section.on .stagger:nth-child(5) { transition-delay: 0.41s; }
section.on .stagger:nth-child(6) { transition-delay: 0.5s; }

/* glass card for dense content — polished slab with top reflection */
.card {
  position: relative;
  padding: clamp(22px, 3.4vw, 44px) clamp(20px, 3.6vw, 52px);
  background: linear-gradient(160deg, rgba(14, 17, 46, 0.68), rgba(6, 7, 20, 0.6));
  border: 1px solid rgba(129, 140, 248, 0.24);
  border-radius: 20px;
  backdrop-filter: blur(22px) saturate(1.55) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.55) brightness(1.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 70px rgba(99, 102, 241, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.55), transparent 35%, transparent 65%, rgba(192, 132, 252, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 16%, transparent 36%);
  pointer-events: none;
}

/* ---------- hero ---------- */
#s0 { padding-top: 14vh; }

.hero-kicker {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: clamp(12px, 1.7vw, 16px);
  letter-spacing: 7px;
  color: var(--cyan);
  margin-bottom: 2.2vh;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.6), var(--shadow);
}

.hero-title {
  font-size: clamp(58px, 13.5vw, 176px);
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 0.95;
  display: flex;
  justify-content: center;
  gap: 0.01em;
  background: linear-gradient(100deg, #22d3ee 0%, #a5f3fc 15%, #818cf8 32%, #c084fc 48%, #ffffff 57%, #818cf8 70%, #22d3ee 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 42px rgba(99, 102, 241, 0.5)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
  animation: titleSheen 7s linear infinite;
  margin-bottom: 3vh;
  user-select: none;
}
@keyframes titleSheen { to { background-position: 300% 0; } }
.hero-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotateX(80deg);
}
body.booted .hero-title span {
  animation: letterIn 1s var(--expo) forwards;
}
body.booted .hero-title span:nth-child(1) { animation-delay: 0.25s; }
body.booted .hero-title span:nth-child(2) { animation-delay: 0.32s; }
body.booted .hero-title span:nth-child(3) { animation-delay: 0.39s; }
body.booted .hero-title span:nth-child(4) { animation-delay: 0.46s; }
body.booted .hero-title span:nth-child(5) { animation-delay: 0.53s; }
body.booted .hero-title span:nth-child(6) { animation-delay: 0.6s; }
body.booted .hero-title span:nth-child(7) { animation-delay: 0.67s; }
body.booted .hero-title span:nth-child(8) { animation-delay: 0.74s; }
@keyframes letterIn { to { opacity: 1; transform: none; } }

.hero-rule {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 3vh;
}
.hero-rule b {
  font-size: clamp(12px, 1.4vw, 15px);
  letter-spacing: 3px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 255, 0.38);
  background: linear-gradient(180deg, rgba(30, 35, 80, 0.8), rgba(8, 10, 28, 0.82));
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 18px rgba(99, 102, 241, 0.25), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.hero-rule em {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--dim);
}

.hero-line {
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 2;
  max-width: 720px;
  margin: 0 auto 4vh;
  color: #c9d4f0;
  text-shadow: var(--shadow);
}
.hero-line .ok { color: var(--mint); text-shadow: 0 0 16px rgba(52, 211, 153, 0.6); }

.hero-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.hero-links a {
  position: relative;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 3.5px;
  padding: 13px 26px;
  border: 1px solid rgba(148, 163, 255, 0.38);
  background: linear-gradient(180deg, rgba(30, 35, 80, 0.78), rgba(8, 10, 28, 0.82));
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.45s var(--expo), background 0.45s var(--expo), color 0.45s var(--expo), box-shadow 0.45s var(--expo), border-color 0.45s var(--expo);
  backdrop-filter: none;
}
.hero-links a::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--expo);
}
.hero-links a:hover {
  color: #03030c;
  background: linear-gradient(100deg, var(--cyan), var(--indigo));
  border-color: transparent;
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.55), 0 0 90px rgba(99, 102, 241, 0.35);
  transform: translateY(-3px) scale(1.04);
}
.hero-links a:hover::after { left: 130%; }
.hero-links.big a { font-size: 14.5px; padding: 16px 32px; }

.cue {
  margin-top: 2.5vh;
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--dim);
  animation: cueFloat 2.2s ease-in-out infinite !important;
}
section.on .cue.stagger { transition-delay: 0.6s; }
@keyframes cueFloat { 0%, 100% { transform: translateY(0); opacity: 0.45; } 50% { transform: translateY(9px); opacity: 1; } }

/* ---------- headings ---------- */
.layer-tag {
  font-size: clamp(12px, 1.4vw, 14px);
  letter-spacing: 7px;
  color: var(--cyan);
  margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.55);
}
.layer-tag::before { content: "—— "; color: var(--dim); letter-spacing: 0; }
.layer-tag::after { content: " ——"; color: var(--dim); letter-spacing: 0; }

section h2 {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
  background: linear-gradient(90deg, var(--cyan), #a5f3fc 20%, var(--indigo) 38%, var(--purple) 54%, #ffffff 63%, var(--cyan) 88%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleSheen 5s linear infinite;
  filter: drop-shadow(0 4px 30px rgba(99, 102, 241, 0.45)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
  margin-bottom: 18px;
}

.lede {
  font-size: clamp(14px, 1.6vw, 16.5px);
  line-height: 2;
  margin-bottom: 26px;
  color: #c9d4f0;
  text-shadow: var(--shadow);
}
.lede sup { font-size: 0.7em; color: var(--cyan); }
.lede .ok { color: var(--mint); }

/* ---------- skill chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 22px; }
.chips span {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: #c7d2fe;
  border: 1px solid rgba(148, 163, 255, 0.32);
  background: linear-gradient(180deg, rgba(26, 30, 70, 0.8), rgba(8, 10, 28, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  padding: 7px 15px;
  border-radius: 999px;
  transition: transform 0.35s var(--expo), border-color 0.35s var(--expo), color 0.35s var(--expo), background 0.35s var(--expo), box-shadow 0.35s var(--expo);
  cursor: default;
}
.chips span:hover { border-color: var(--cyan); transform: translateY(-2px); }
.chips span.hot {
  color: #03030c;
  background: linear-gradient(100deg, var(--cyan), #67e8f9);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.7);
  transform: translateY(-3px) scale(1.06);
  font-weight: 700;
}

/* ---------- live attention meters ---------- */
.meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 26px;
  text-align: left;
  font-size: 12.5px;
}
.meters .row {
  display: grid;
  grid-template-columns: 130px 1fr 56px;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  transition: opacity 0.5s var(--expo);
}
.meters .row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.5px; }
.meters .track {
  height: 7px;
  background: rgba(129, 140, 248, 0.14);
  position: relative;
  overflow: hidden;
  border-radius: 99px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(129, 140, 248, 0.14);
}
.meters .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--indigo), var(--cyan), #67e8f9);
  background-size: 200% 100%;
  animation: fillShimmer 2.4s linear infinite;
  border-radius: 99px;
  transition: width 0.5s var(--expo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 12px rgba(34, 211, 238, 0.55);
}
@keyframes fillShimmer { to { background-position: 200% 0; } }
.meters .val { text-align: right; color: var(--mint); font-size: 11px; font-weight: 700; }

.meters.repo { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; gap: 8px; }
.meters.repo .row {
  grid-template-columns: 250px 1fr 64px;
  padding: 9px 14px;
  border: 1px solid rgba(129, 140, 248, 0.16);
  background: linear-gradient(180deg, rgba(16, 20, 52, 0.78), rgba(8, 10, 28, 0.78));
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--expo), border-color 0.4s var(--expo), background 0.4s var(--expo), box-shadow 0.4s var(--expo), opacity 0.5s var(--expo);
}
.meters.repo .row:hover {
  border-color: var(--cyan);
  transform: translateX(10px) scale(1.015);
  background: rgba(12, 16, 42, 0.9);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.28), 0 10px 30px rgba(0, 0, 0, 0.5);
}
.meters.repo .row .name { color: var(--text); font-weight: 600; }

/* ---------- awards ---------- */
.awards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 44vh;
  overflow-y: auto;
  padding: 4px 6px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--indigo) transparent;
  text-align: left;
}
.award {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 13px 18px;
  background: linear-gradient(180deg, rgba(15, 17, 46, 0.78), rgba(8, 10, 28, 0.78));
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-left: 3px solid var(--purple);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--expo), border-color 0.4s var(--expo), background 0.4s var(--expo), box-shadow 0.4s var(--expo);
}
.award b {
  color: var(--purple);
  font-size: 14.5px;
  letter-spacing: 1px;
  min-width: 165px;
  text-shadow: 0 0 18px rgba(192, 132, 252, 0.5);
}
.award span { color: var(--dim); font-size: 13.5px; }
.award:hover {
  border-color: var(--purple);
  transform: translateX(10px);
  background: rgba(16, 14, 44, 0.92);
  box-shadow: 0 0 26px rgba(192, 132, 252, 0.3);
}

.tiny { font-size: 11.5px; letter-spacing: 1.6px; margin-top: 36px; line-height: 2; color: var(--dim); }

/* ---------- tooltip ---------- */
#tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  max-width: 320px;
  padding: 13px 17px;
  background: var(--panel-solid);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.4), 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.25s var(--expo), transform 0.25s var(--expo);
}
#tooltip.show { opacity: 1; transform: none; }
#tooltip b { color: var(--cyan); display: block; margin-bottom: 4px; letter-spacing: 1.5px; font-size: 13px; }
#tooltip span { color: var(--dim); display: block; }
#tooltip span:last-child { color: var(--mint); margin-top: 5px; }

/* ---------- fallback ---------- */
#fallback {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  padding: 30px;
}
#fallback a { color: var(--cyan); }
#fallback[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .legend { display: none; }
}
@media (max-width: 720px) {
  .hud { font-size: 11px; }
  .hud.tl { top: 12px; left: 14px; }
  .hud.tr { top: 12px; right: 14px; max-width: 56vw; }
  .hud.br { display: none; }

  #layerNav {
    left: 14px; right: 14px;
    top: auto; bottom: 16px;
    transform: none;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }
  body.booted #layerNav { animation: hudIn 1s var(--expo) 0.4s forwards; }
  #layerNav .rail { display: none; }
  #layerNav button { font-size: 9.5px; letter-spacing: 1px; gap: 6px; }
  #layerNav .dot { width: 8px; height: 8px; }

  section { transform: translate(-50%, -50%); width: calc(100vw - 24px); }
  #s0 { padding-top: 6vh; }
  .hero-rule { gap: 8px; }
  .card { padding: 18px 14px; border-radius: 16px; }
  .award { flex-direction: column; gap: 4px; padding: 10px 13px; }
  .award b { min-width: 0; }
  .meters .row { grid-template-columns: 96px 1fr 48px; }
  .meters.repo .row { grid-template-columns: 140px 1fr 56px; padding: 7px 10px; }
  .stagger { transform: translateY(26px); filter: blur(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .stagger, .hud, #layerNav { transition: none !important; animation-duration: 0.01s !important; }
  #grain, .loader-core i { animation: none !important; }
}
