@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Palette pulled from the spaceman avatar: ink, steel blue, newsprint highlight. */
  --ink: #0b1217;
  --ink-2: #111c24;
  --ink-3: #172631;
  --line: #22394a;
  --blue: #5badd2;
  --blue-hi: #86c6e3;
  --blue-deep: #1d4b66;
  --paper: #e9f0f3;
  --muted: #9db3c0;
  --shadow: 0 10px 28px -12px rgb(2 8 12 / 0.75), 0 2px 6px -2px rgb(2 8 12 / 0.6);
  --radius: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --z-glint: 2;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--ink); }

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--ink);
  /* Halftone print dots, the comic's own texture, fading in from the top corner. */
  background-image:
    radial-gradient(circle at 1px 1px, rgb(91 173 210 / 0.16) 1.1px, transparent 1.6px),
    radial-gradient(120% 70% at 85% -10%, rgb(91 173 210 / 0.14), transparent 60%);
  background-size: 7px 7px, 100% 100%;
  background-attachment: fixed;
  color: var(--paper);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
body::before {
  /* Mask the halftone so it only sits in the upper part of the page. */
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgb(11 18 23 / 0.55) 45%, var(--ink) 85%);
  pointer-events: none;
  z-index: -1;
}

::selection { background: var(--blue); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--ink); }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

.page {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  min-height: calc(100dvh - 2.75rem);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 2rem;
}

/* Hero */
.hero { display: grid; justify-items: center; text-align: center; padding-top: 1.5rem; }

.avatar {
  position: relative;
  width: min(58vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--blue-deep), 0 22px 44px -18px rgb(0 0 0 / 0.8);
}
.avatar img { display: block; width: 100%; height: 100%; }

/* The one authored moment: a light glint sweeping across the visor on arrival. */
.glint {
  position: absolute;
  inset: -20%;
  z-index: var(--z-glint);
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.0) 42%, rgb(214 238 250 / 0.55) 49%, rgb(255 255 255 / 0.85) 50%, rgb(214 238 250 / 0.5) 51.5%, transparent 58%);
  mix-blend-mode: screen;
  transform: translateX(-75%);
  animation: glint 1.6s var(--ease-out) 0.35s 1 both;
  pointer-events: none;
}
@keyframes glint {
  from { transform: translateX(-75%); }
  to { transform: translateX(75%); }
}

.name {
  margin: 1.4rem 0 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(4.25rem, 19vw, 7.5rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--paper);
  text-shadow: 0 4px 0 var(--blue-deep), 0 14px 30px rgb(0 0 0 / 0.5);
}
.handle {
  margin: 0.85rem 0 0;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.bio {
  margin: 0.9rem 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

/* Links */
.links { display: grid; gap: 0.75rem; width: 100%; max-width: 34rem; margin: 0 auto; align-content: start; }
.pair { display: grid; gap: 0.75rem; }

.tile {
  --tile-bg: var(--ink-2);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.95rem;
  min-height: 4.25rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--tile-bg);
  color: var(--paper);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease-out), border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.35s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tile__icon { width: 1.6rem; height: 1.6rem; fill: currentColor; color: var(--blue); flex: none; }
.tile__text { display: grid; gap: 0.1rem; min-width: 0; }
.tile__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.tile__sub { color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.tile__go {
  width: 1.15rem; height: 1.15rem; color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.25s ease;
}

.tile:hover { transform: translateY(-2px); border-color: var(--blue); background-color: var(--ink-3); box-shadow: 0 16px 34px -14px rgb(2 8 12 / 0.85), 0 3px 8px -3px rgb(2 8 12 / 0.6); }
.tile:hover .tile__go { transform: translate(2px, -2px); color: var(--blue-hi); }
.tile:active { transform: translateY(0) scale(0.99); transition-duration: 0.08s; }

/* YouTube leads: the one drenched tile. */
.tile--lead {
  --tile-bg: var(--blue);
  border-color: var(--blue);
  color: var(--ink);
  min-height: 5.25rem;
}
.tile--lead .tile__icon { color: var(--ink); width: 1.9rem; height: 1.9rem; }
.tile--lead .tile__title { font-size: 2rem; }
.tile--lead .tile__sub { color: #0f2a3a; font-weight: 500; }
.tile--lead .tile__go { color: var(--ink); }
.tile--lead:hover { background-color: var(--blue-hi); border-color: var(--blue-hi); }
.tile--lead:hover .tile__go { color: var(--ink); }

.live {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem 0.3rem 0.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.live__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #ff4d5e; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.chip--twitch[data-live="true"] .live { display: inline-flex; }
.chip--twitch[data-live="true"] .chip__note { display: none; }
.chip__note { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.chip .live { padding: 0.2rem 0.5rem 0.2rem 0.4rem; background: var(--ink-3); }

/* Socials */
.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.05rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.3s var(--ease-out);
}
.chip svg { width: 1.1rem; height: 1.1rem; fill: var(--blue); }
.chip:hover { border-color: var(--blue); background: var(--ink-2); }
.chip:active { transform: scale(0.97); }

/* Footer */
.foot { align-self: end; text-align: center; color: #7f97a5; font-size: 0.8rem; padding-bottom: 0.25rem; }
.foot p { margin: 0.3rem auto; max-width: 52ch; }

/* Desktop: logo and name on the left, links on the right. */
@media (min-width: 900px) {
  body { padding-top: max(2rem, env(safe-area-inset-top)); }
  .page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    grid-template-rows: 1fr auto;
    column-gap: clamp(3rem, 7vw, 6.5rem);
    align-items: center;
    min-height: calc(100dvh - 3.5rem);
  }
  .hero { justify-items: start; text-align: left; padding-top: 0; }
  .avatar { width: 300px; }
  .name { font-size: clamp(7rem, 11vw, 10rem); }
  .handle { margin-top: 1.25rem; }
  .bio { font-size: 1.15rem; }
  .links { max-width: none; margin: 0; }
  .pair { grid-template-columns: 1fr 1fr; }
  .pair .tile { grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: start; min-height: 9.5rem; padding: 1.1rem; }
  .pair .tile__icon { grid-column: 1; }
  .pair .tile__go { grid-column: 2; grid-row: 1; }
  .pair .tile__text { grid-column: 1 / -1; align-self: end; }
  .pair .tile__sub { min-height: 2.7em; }
  .socials { justify-content: flex-start; }
  .foot { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .glint { animation: none; opacity: 0; }
  .live__dot { animation: none; }
  .tile, .tile__go, .chip { transition: none; }
}
