/* ============================================================
   THE MULTIVERSE — Chris Clarke portfolio
   A fusion of clean (dsquared), whimsy (tami) & bold aesthetic
   (psychoactive): deep space, vivid per-world accents, play.
   ============================================================ */

/* self-hosted fonts (latin subset) — zero external requests */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/space-grotesk.woff2") format("woff2");
}

:root {
  --bg: #07070f;
  --bg-2: #0c0c1a;
  --ink: #eef0ff;
  --muted: #9aa0c6;
  --faint: #6a7099;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.028);
  --card-hover: rgba(255, 255, 255, 0.055);
  --accent: #7a5cff;
  --accent-2: #35c4ff;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;
  --radius: 20px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  /* reserve the scrollbar's width at all times so locking scroll
     (body.menu-open) doesn't remove the bar and shift the layout */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(122, 92, 255, 0.45); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  transition: top 0.25s;
}
.skip-link:focus { top: 12px; }

/* ============ ambient background ============ */

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  display: block;
}

.nebula { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.nebula-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}
.nb-1 {
  width: 55vw; height: 55vw;
  top: -18vw; right: -12vw;
  background: radial-gradient(circle, rgba(122, 92, 255, 0.32) 0%, transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.nb-2 {
  width: 44vw; height: 44vw;
  top: 30vh; left: -16vw;
  background: radial-gradient(circle, rgba(53, 196, 255, 0.22) 0%, transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
.nb-3 {
  width: 40vw; height: 40vw;
  bottom: -14vw; right: 8vw;
  background: radial-gradient(circle, rgba(247, 37, 133, 0.16) 0%, transparent 65%);
  animation: drift1 38s ease-in-out infinite alternate-reverse;
}

@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-6vw, 5vh, 0) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(7vw, -6vh, 0) scale(0.95); }
}

/* ============ custom cursor ============ */

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  display: none;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}
body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { display: block; }
body.has-cursor { cursor: none; }
body.has-cursor a, body.has-cursor button { cursor: none; }
.cursor-ring.is-hovering {
  width: 62px; height: 62px;
  border-color: rgba(53, 196, 255, 0.9);
  background: rgba(53, 196, 255, 0.08);
}

/* ============ rocket scroll progress ============ */

.rocket-track {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  height: 38vh;
  width: 2px;
  background: linear-gradient(to bottom, rgba(122, 92, 255, 0.5), rgba(53, 196, 255, 0.5));
  border-radius: 2px;
  z-index: 50;
}
.rocket-track-label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
}
#rocket {
  position: absolute;
  left: 50%;
  bottom: 0%;
  transform: translateX(-50%);
  font-size: 18px;
  transition: bottom 0.15s linear;
  filter: drop-shadow(0 0 6px rgba(53, 196, 255, 0.8));
}

/* ============ nav ============ */

#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
#site-nav.scrolled {
  background: rgba(7, 7, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.brand-orb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, #b3a1ff 0%, #7a5cff 42%, #1b1040 100%);
  position: relative;
  box-shadow: 0 0 18px rgba(122, 92, 255, 0.55);
  flex: none;
}
.brand-orb::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(122, 92, 255, 0.5);
  transform: rotate(-24deg) scaleY(0.42);
  animation: orbit 7s linear infinite;
}
@keyframes orbit {
  from { transform: rotate(0deg) scaleY(0.42); }
  to   { transform: rotate(360deg) scaleY(0.42); }
}

#nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
#nav-links > a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color 0.25s;
}
#nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
#nav-links > a:not(.btn):hover { color: var(--ink); }
#nav-links > a:not(.btn):hover::after { transform: scaleX(1); }

#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 110;
}
#nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
#nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle.open span:nth-child(2) { opacity: 0; }
#nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 24px rgba(122, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 34px rgba(53, 196, 255, 0.45); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.06); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ============ hero ============ */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  position: relative;
}

.hero-status {
  font-family: var(--font-mono);
  /* text = 17.761em wide + 56px fixed dot/gap/padding; shrinks on
     narrow screens so the pill never word-wraps */
  font-size: min(13px, calc((100vw - 132px) / 17.9));
  letter-spacing: 0.14em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 34px;
  white-space: nowrap;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2fd473;
  box-shadow: 0 0 0 0 rgba(47, 212, 115, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 212, 115, 0.55); }
  70%  { box-shadow: 0 0 0 11px rgba(47, 212, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 212, 115, 0); }
}

/* scramble line — each line is its own block so the decode
   never reflows the layout (no mid-scramble line wrapping) */
.tl-line { display: block; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 9.8vw, 7.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.hero-title .tl-line {
  background: linear-gradient(180deg, #ffffff 25%, #b9bfe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  /* two fixed lines — the <br> is always there; on narrow screens the
     font shrinks just enough for line one (21.24em wide) to fit.
     72px = hero padding (48) + scrollbar/rounding headroom (24) */
  font-size: min(clamp(1rem, 2.1vw, 1.22rem), calc((100vw - 72px) / 21.4));
  color: var(--muted);
  white-space: nowrap;
  margin-bottom: 40px;
}
.hero-sub em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
}
.hero-sub em:nth-of-type(1) { color: #35c4ff; }
.hero-sub em:nth-of-type(2) { color: #ffd23f; }
.hero-sub em:nth-of-type(3) { color: #f72585; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}


.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-hint span {
  width: 4px; height: 8px;
  border-radius: 4px;
  background: var(--accent-2);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ marquee ============ */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  padding: 16px 0;
  transform: rotate(-0.6deg) scale(1.01);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track i {
  font-style: normal;
  color: var(--accent);
  font-size: 13px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ sections ============ */

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 130px) clamp(20px, 4vw, 48px);
}

.sec-head { margin-bottom: 52px; max-width: 720px; }
.sec-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec-label::after {
  content: "";
  flex: 0 0 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-2), transparent);
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.sec-sub { color: var(--muted); font-size: 17px; max-width: 58ch; }

/* ============ project tiers ============ */

.tier { margin-top: 60px; }
.tier-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.tier-phase {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(53, 196, 255, 0.35);
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}
.tier-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.tier-sub {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 70ch;
}

/* ============ world cards ============ */

.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.world-card {
  --glow: color-mix(in srgb, var(--accent) 22%, transparent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: transform 0.16s ease-out, border-color 0.3s, background 0.3s;
  transform-style: preserve-3d;
  will-change: transform;
}
.world-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--card-hover);
}
/* cursor spotlight */
.world-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.world-card:hover::before { opacity: 1; }
/* top accent line */
.world-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--accent-2)), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.world-card:hover::after { opacity: 1; }

/* website peek — a live screenshot of what's inside */
.card-peek {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}
.card-peek img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s ease;
}
.world-card:hover .card-peek img { transform: scale(1.05); }

/* rainbow cards get a rainbow rim */
.world-card.rainbow .card-peek {
  border: 2px solid transparent;
  background:
    linear-gradient(color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.03)), color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.03))) padding-box,
    conic-gradient(from 180deg, #ff5d6c, #ffd23f, #7ed957, #35c4ff, #7a5cff, #f72585, #ff5d6c) border-box;
}

/* YouTube channel cards — avatar centred in the peek bubble */
.card-peek.avatar {
  display: grid;
  place-items: center;
  background:
    radial-gradient(130% 100% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.03));
}
.card-peek.avatar img {
  width: 60%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.35s ease;
}
.world-card:hover .card-peek.avatar img { transform: scale(1.08) rotate(-4deg); }

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.card-title small {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}
.card-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  flex: 1;
}
.card-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--accent, var(--accent-2));
  opacity: 0.9;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}
.card-tags li.card-tag-wip {
  color: #ffd23f;
  border-color: rgba(255, 210, 63, 0.4);
  background: rgba(255, 210, 63, 0.08);
}
.card-cta {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--accent, var(--accent-2));
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.world-card:hover .card-cta span { transform: translate(3px, -3px); }
.card-cta span { transition: transform 0.25s; display: inline-block; }

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}


/* ============ the ink / bookshelf ============ */

.bookshelf {
  overflow: hidden;
  padding: 34px 0;
}
/* the cover stream — same idea as the concept marquee up top:
   constant drift, pauses on hover/touch. Margin (not gap) after
   each book so the -50% loop point lands exactly on the clone set. */
.bookshelf-track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  animation: bookshelf 32s linear infinite;
}
.bookshelf:hover .bookshelf-track { animation-play-state: paused; }
@keyframes bookshelf {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.book {
  --glow: color-mix(in srgb, var(--accent) 30%, transparent);
  position: relative;
  flex: 0 0 auto;
  width: 168px;
  margin-right: clamp(16px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.16s ease-out;
  will-change: transform;
}
.book img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.35s, border-color 0.35s;
}
.book:hover { transform: translateY(-10px) rotateY(7deg) rotate(-1deg); }
.book:hover img {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6), 0 0 34px var(--glow);
}
.book-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  color: var(--muted);
  transition: color 0.3s;
}
.book:hover .book-title { color: var(--ink); }

.ink-cta { margin-top: 34px; }

/* ============ journey ============ */

.journey-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.journey-profile {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mugshot-wrap { position: relative; width: max-content; }
.mugshot {
  width: 148px; height: 148px;
  border-radius: 50%;
  padding: 4px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), #f72585, var(--accent));
  transition: transform 0.3s;
}
.mugshot img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}
.mugshot:hover { transform: scale(1.04) rotate(2deg); }
.mugshot.wiggle { animation: wiggle 0.5s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg) scale(1.05); }
  75% { transform: rotate(6deg) scale(1.05); }
}
.mugshot-bubble {
  position: absolute;
  top: 8px;
  left: calc(100% + 16px);
  width: max-content;
  max-width: 230px;
  background: #14142a;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-8px) scale(0.94);
  transform-origin: left center;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 5;
}
.mugshot-bubble.show { opacity: 1; transform: translateX(0) scale(1); }

.profile-bio { color: var(--muted); font-size: 15.5px; }

.profile-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.profile-facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  font-size: 14px;
}
.profile-facts dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 2px;
}
.profile-facts dd { color: var(--ink); }

/* timeline */

.timeline {
  position: relative;
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2) 55%, transparent);
  border-radius: 2px;
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: baseline;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--accent);
  box-shadow: 0 0 12px rgba(122, 92, 255, 0.7);
  transition: background 0.3s, transform 0.3s;
}
.tl-item:hover::before { background: var(--accent); transform: scale(1.25); }
.tl-year {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.04em;
}
.tl-item b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tl-item p { color: var(--muted); font-size: 14.5px; margin-top: 4px; max-width: 54ch; }
.tl-logo {
  width: 34px; height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  flex: none;
}
.tl-featured {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: rgba(122, 92, 255, 0.06);
  border-radius: 16px;
  padding: 18px 20px;
  margin-left: -20px;
}
.tl-featured::before { left: -12px; }

/* ============ contact ============ */

.contact { text-align: center; max-width: 860px; }
.contact .sec-label { justify-content: center; }
.contact .sec-label::before {
  content: "";
  flex: 0 0 56px;
  height: 1px;
  background: linear-gradient(270deg, var(--accent-2), transparent);
}
.contact-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 18px 0 20px;
}
.contact-title .tl-line {
  background: linear-gradient(100deg, #fff 20%, var(--accent) 65%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact-sub { color: var(--muted); font-size: 17px; max-width: 46ch; margin: 0 auto 40px; }
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 34px;
}
.contact-loc { font-family: var(--font-mono); font-size: 13px; color: var(--faint); }

/* ============ footer ============ */

.footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 14px;
  color: var(--faint);
  font-size: 13.5px;
}
.footer .footer-hint { justify-self: end; }
@media (max-width: 720px) {
  .footer { grid-template-columns: 1fr; justify-items: center; row-gap: 12px; }
  .footer .footer-hint { justify-self: center; }
}
.footer-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}
.footer-badge:hover {
  opacity: 1;
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 0 20px rgba(53, 196, 255, 0.3);
}
.footer-hint { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; }
.footer-hint kbd {
  display: inline-block;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 1px;
  color: var(--muted);
}

/* ============ toast & confetti ============ */

#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 24px);
  z-index: 1000;
  background: #14142a;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 14px;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 0 30px rgba(122, 92, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
  max-width: min(92vw, 520px);
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

#confetti {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
}

/* ============ reveal on scroll ============
   (animation, not transition — so tilt/hover transforms stay snappy) */

.reveal {
  opacity: 0;
  transform: translateY(26px);
}
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal.in-view {
    animation: rise 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 80ms);
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
}

/* ============ responsive ============ */

@media (max-width: 1100px) {
  .rocket-track { display: none; }
  .world-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .journey-grid { grid-template-columns: 1fr; }
  .journey-profile { position: static; }
  .mugshot-bubble { left: auto; right: 0; top: calc(100% + 12px); border-radius: 14px; border-bottom-right-radius: 4px; transform-origin: top right; }
}

@media (max-width: 720px) {
  .world-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }

  #nav-toggle { display: flex; }
  #nav-links {
    /* NOTE: #site-nav.scrolled's backdrop-filter makes the nav bar the
       containing block for fixed children, so we anchor to the viewport
       manually (nav bar sits at the viewport's top-left corner) instead
       of using inset: 0. */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    background: rgba(7, 7, 15, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  /* transition lives here (not on the base) so the menu never flash-fades
     when the viewport crosses this breakpoint */
  #nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s, visibility 0.3s;
  }
  #nav-links > a { font-size: 22px; font-family: var(--font-display); font-weight: 700; }
  body.menu-open { overflow: hidden; }

  .marquee { transform: none; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; }
  .tl-featured { margin-left: -12px; padding: 16px; }
  .tl-featured::before { left: -20px; }
}

/* ============ reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  /* covers stay reachable: static row, manual scroll */
  .bookshelf { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(122, 92, 255, 0.5) transparent; }
  .bookshelf::-webkit-scrollbar { height: 6px; }
  .bookshelf::-webkit-scrollbar-thumb { background: rgba(122, 92, 255, 0.5); border-radius: 6px; }
  .bookshelf-track { animation: none; }
  .cursor-dot, .cursor-ring { display: none !important; }
}
