/* ─────────────────────────────────────────────────────────────
   NotTerra — bio page
   Editorial layout: corner-anchored chrome, one big headline,
   an indexed list of links. Monochrome; the only colour on the
   page is the headlight in the canvas behind it.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg:    #000;
  --text:  #ededed;
  --dim:   #a3a3a3;
  --faint: #8a8a8a;   /* micro-type stays quiet but clears 4.5:1 over the arms */
  --line:  rgba(255, 255, 255, 0.13);
  --line-2:rgba(255, 255, 255, 0.28);

  --display: "Inter Tight", "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --pad: clamp(1.25rem, 3.2vw, 2.75rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  z-index: 0;
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── night drive scene ──────────────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── shell ──────────────────────────────────────────────────── */

.shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--pad);
  gap: clamp(2rem, 5vh, 3.5rem);
}

/* ── top / bottom rails ─────────────────────────────────────── */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  letter-spacing: 0.14em;
}

.mark__glyph {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.mark sup {
  font-size: 0.62em;
  letter-spacing: 0;
  vertical-align: super;
  color: var(--faint);
}

.tag { color: var(--faint); }

.pill {
  padding: 0.52rem 1.05rem 0.46rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.16em;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.pill:hover,
.pill:focus-visible {
  background: var(--text);
  border-color: var(--text);
  color: #000;
}

.controls {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.sound {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.sound:hover,
.sound:focus-visible {
  color: var(--text);
  border-color: var(--line-2);
}

.sound svg {
  width: 15px;
  height: 15px;
  grid-area: 1 / 1;
}

.sound[aria-pressed="true"] .sound__off,
.sound[aria-pressed="false"] .sound__on { display: none; }

/* ── stage ──────────────────────────────────────────────────── */

.stage {
  flex: 1 1 auto;
  display: grid;
  align-content: center;
  align-items: center;
  gap: clamp(2.5rem, 7vh, 4.5rem);
}

@media (min-width: 60rem) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    column-gap: clamp(3rem, 8vw, 8rem);
  }
}

/* ── headline ───────────────────────────────────────────────── */

.display {
  margin: 0;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.caption {
  margin: clamp(1.5rem, 4vh, 2.25rem) 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  max-width: 22ch;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--dim);
}

/* ── link index ─────────────────────────────────────────────── */

.index { display: block; }

.row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: clamp(0.85rem, 2vh, 1.15rem) 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s var(--ease);
}

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

.row__no {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--faint);
  transition: color 0.3s var(--ease);
}

.row__icon {
  width: 17px;
  height: 17px;
  fill: var(--faint);
  transition: fill 0.3s var(--ease);
}

.row__name {
  font-size: clamp(1.3rem, 2.1vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  transition: transform 0.35s var(--ease);
}

.row__out {
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}

@media (hover: hover) {
  .row:hover { border-color: var(--line-2); }
  .row:hover + .row { border-top-color: var(--line-2); }
  .row:hover .row__no { color: var(--text); }
  .row:hover .row__icon { fill: var(--brand); }
  .row:hover .row__name { transform: translateX(7px); }
  .row:hover .row__out { color: var(--text); transform: translate(3px, -3px); }
}

.row:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

/* ── small screens ──────────────────────────────────────────── */

@media (max-width: 30rem) {
  .bar { font-size: 0.6rem; letter-spacing: 0.12em; }
  .pill { padding: 0.45rem 0.85rem 0.4rem; }
  .row { gap: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; }
  .row:hover .row__name,
  .row:hover .row__out { transform: none; }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.35);
    --line-2: rgba(255, 255, 255, 0.6);
    --dim: #cfcfcf;
    --faint: #b0b0b0;
  }
}
