:root {
  --bg: #080810;
  --bg-elevated: #0d0d18;
  --text: #e8e8f0;
  --text-muted: #8a8a9a;
  --accent: #4fc3f7;
  --accent-2: #4fc3f7;
  --border: rgba(255, 255, 255, 0.08);
  --overlay-glow: 0 0 0 rgba(0, 0, 0, 0);
  --noise-opacity: 0;
  --heading-font: "Space Grotesk";
}

:root[data-theme="amber"] {
  --bg: #0a0806;
  --bg-elevated: #120e09;
  --text: #ece6dc;
  --text-muted: #9c9082;
  --accent: #d4a843;
  --accent-2: #d4a843;
  --border: rgba(212, 168, 67, 0.14);
  --noise-opacity: 0.05;
}

:root[data-theme="neon"] {
  --bg: #09060f;
  --bg-elevated: #0f0a1a;
  --text: #ece8f5;
  --text-muted: #948fae;
  --accent: #a855f7;
  --accent-2: #2dd4bf;
  --border: rgba(168, 85, 247, 0.16);
  --overlay-glow: 0 0 24px rgba(168, 85, 247, 0.35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-weight: 300;
  min-height: 100vh;
  position: relative;
  transition: background 0.4s ease, color 0.4s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  transition: opacity 0.4s ease;
}

:root[data-theme="amber"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

h1,
h2,
h3 {
  font-family: var(--heading-font), "Space Grotesk", sans-serif;
  font-weight: 500;
  margin: 0;
}

/* ---------- Background graphics ---------- */
.bg-graphics {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  color: var(--accent);
}

.bg-graphics svg {
  position: absolute;
  opacity: 0.06;
  transition: color 0.4s ease;
}

.bg-graphics .bg-aperture {
  top: -8vw;
  right: -8vw;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
}

.bg-graphics .bg-rings {
  bottom: -12vw;
  left: -10vw;
  width: min(40vw, 500px);
  height: min(40vw, 500px);
}

/* ---------- Header ---------- */
header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
  gap: 16px;
}

header h1 {
  display: inline-block;
  line-height: 0;
  margin: 0;
}

header .logo {
  width: clamp(140px, 16vw, 200px);
  height: auto;
  display: block;
}

header p.tagline {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 300;
}

/* ---------- Section headings (videos page, home text block) ---------- */
.block-heading {
  text-align: center;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: 0.12em;
  padding: 56px 24px 8px;
}

/* ---------- Category nav ---------- */
nav.category-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 24px 56px;
}

.pill {
  display: inline-block;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.pill:hover {
  color: var(--text);
  border-color: var(--accent);
}

.pill.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--overlay-glow);
}

/* ---------- Footer ---------- */
footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 24px 48px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
}

.disclaimer {
  max-width: 56ch;
  margin: 14px auto 0;
  font-size: 0.68rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  opacity: 0.7;
}

.footer-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-connect a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.footer-connect a:hover {
  color: var(--accent);
}

.footer-connect svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 480px) {
  header {
    padding: 18px 16px;
  }
  header p.tagline {
    display: none;
  }
}