/* ═══════════════════════════════════════════════════════
   BOBBYBOOM9 · LINK HUB
   Layer 0: WebGL video shader (behind everything)
   Layer 1: VCR on-screen display chrome
   Layer 2: glass link stack
═══════════════════════════════════════════════════════ */

:root {
  --phosphor: #b7ff5c;        /* VCR OSD green            */
  --split-r:  #ff3d5a;        /* RGB-split red            */
  --split-b:  #3dc8ff;        /* RGB-split cyan           */
  --ink:      #f2f0ea;        /* primary text             */
  --dim:      rgba(242, 240, 234, 0.55);
  --glass:    rgba(10, 10, 14, 0.42);
  --glass-hi: rgba(10, 10, 14, 0.60);
  --edge:     rgba(255, 255, 255, 0.14);

  --font-osd:  "VT323", monospace;
  --font-body: "Archivo", system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  background: #050507;
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}

/* ── Layer 0 · WebGL canvas ───────────────────────────── */
#gl {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#gl canvas { display: block; }

/* ── Layer 1 · VCR OSD chrome ─────────────────────────── */
.osd {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-osd);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--phosphor);
  text-shadow: 0 0 6px rgba(183, 255, 92, 0.55);
  letter-spacing: 0.08em;
}

.osd__corner { position: absolute; padding: 1.4rem 1.6rem; }
.osd__corner--tl { top: 0;    left: 0; }
.osd__corner--tr { top: 0;    right: 0; }
.osd__corner--bl { bottom: 0; left: 0; }
.osd__corner--br { bottom: 0; right: 0; }

.osd__play { animation: blink 1.2s steps(1) infinite; }

.osd__rec {
  display: inline-block;
  width: 0.6em; height: 0.6em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--split-r);
  box-shadow: 0 0 8px var(--split-r);
  animation: blink 1.2s steps(1) infinite;
  vertical-align: baseline;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── Layer 2 · hub ────────────────────────────────────── */
.hub {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  padding: 5rem 1.25rem;
}

.hub__head { text-align: center; }

.hub__handle {
  font-family: var(--font-osd);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  /* faux chromatic aberration on the title — echoes the shader */
  text-shadow:
    -3px 0 0 rgba(255, 61, 90, 0.65),
     3px 0 0 rgba(61, 200, 255, 0.65),
     0 0 24px rgba(242, 240, 234, 0.25);
}

.hub__tag {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--dim);
}

.hub__badge {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.15em 0.55em;
  font-family: var(--font-osd);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #050507;
  background: var(--phosphor);
  border-radius: 2px;
}

/* ── Link stack ───────────────────────────────────────── */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: min(420px, 100%);
}

.stack__link {
  --tx: 0px; /* driven by the magnetic JS */
  --ty: 0px;

  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.4rem;

  color: var(--ink);
  text-decoration: none;

  background: var(--glass);
  border: 1px solid var(--edge);
  border-radius: 10px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);

  transform: translate(var(--tx), var(--ty));
  transition: background 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.stack__link:hover,
.stack__link:focus-visible {
  background: var(--glass-hi);
  border-color: var(--phosphor);
}

.stack__link:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
}

.stack__label {
  font-weight: 900;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stack__meta {
  font-family: var(--font-osd);
  font-size: 1rem;
  color: var(--dim);
  white-space: nowrap;
}

.hub__foot {
  font-family: var(--font-osd);
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

/* ── Mobile / a11y ────────────────────────────────────── */
@media (max-width: 560px) {
  .osd__corner { padding: 0.9rem 1rem; }
  .hub { gap: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .osd__play, .osd__rec { animation: none; }
  .stack__link { transform: none !important; transition: none; }
}
