/* ============================================
   FACTONIZATION DISCOVERY HUB
   Dark Space Theme + Glassmorphism
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(15, 15, 35, 0.65);
  --bg-card-hover: rgba(25, 25, 55, 0.75);
  --border-card: rgba(100, 120, 255, 0.12);
  --border-card-hover: rgba(100, 120, 255, 0.3);
  --text-primary: #e8e8f0;
  --text-secondary: #8888a8;
  --text-dim: #555570;
  --accent-blue: #4d6dff;
  --accent-purple: #8855ff;
  --accent-cyan: #22d3ee;
  --accent-glow: rgba(77, 109, 255, 0.15);
  --gradient-main: linear-gradient(135deg, #4d6dff, #8855ff);
  --gradient-subtle: linear-gradient(135deg, rgba(77,109,255,0.1), rgba(136,85,255,0.1));
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(77, 109, 255, 0.08);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-main);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1280px;

  /* Category colors */
  --cat-space: #4d6dff;
  --cat-ocean: #06b6d4;
  --cat-ancient: #f59e0b;
  --cat-physics: #a855f7;
  --cat-geology: #ef4444;
  --cat-evolution: #22c55e;
  --cat-quantum: #ec4899;
  --cat-biology: #10b981;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-cyan); }

/* --- Starfield Canvas --- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Layout --- */
.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(6, 6, 15, 0.8);
  border-bottom: 1px solid rgba(100, 120, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.btn-rss {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  border: 1px solid var(--border-card);
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-rss:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(77, 109, 255, 0.15);
}

.btn-ambient {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ambient:hover, .btn-ambient.active {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-card);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,211,238,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34,211,238,0); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0c0 50%, #4d6dff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* --- Daily Briefing --- */
.briefing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.briefing-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.briefing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity var(--transition);
}

.briefing-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.briefing-card:hover::before { opacity: 1; }

.briefing-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: 8px;
}

.briefing-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.briefing-card .summary {
  font-size: 0.825rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- View Toggle + Category Filters --- */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.view-toggles {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.view-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.view-btn.active {
  background: var(--accent-glow);
  color: var(--text-primary);
}

.view-btn:hover:not(.active) { color: var(--text-primary); }

.category-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.cat-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.cat-btn.active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(77, 109, 255, 0.08);
  box-shadow: 0 0 12px rgba(77, 109, 255, 0.1);
}

.cat-btn[data-cat="space"].active { border-color: var(--cat-space); color: var(--cat-space); }
.cat-btn[data-cat="ocean"].active { border-color: var(--cat-ocean); color: var(--cat-ocean); }
.cat-btn[data-cat="ancient"].active { border-color: var(--cat-ancient); color: var(--cat-ancient); }
.cat-btn[data-cat="physics"].active { border-color: var(--cat-physics); color: var(--cat-physics); }
.cat-btn[data-cat="geology"].active { border-color: var(--cat-geology); color: var(--cat-geology); }
.cat-btn[data-cat="evolution"].active { border-color: var(--cat-evolution); color: var(--cat-evolution); }
.cat-btn[data-cat="quantum"].active { border-color: var(--cat-quantum); color: var(--cat-quantum); }
.cat-btn[data-cat="biology"].active { border-color: var(--cat-biology); color: var(--cat-biology); }

/* --- Rabbit Hole Button (Animated Black Hole) --- */
.rabbit-hole-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px 14px 18px;
  border-radius: 100px;
  border: 1px solid rgba(136, 85, 255, 0.3);
  background: rgba(10, 10, 30, 0.8);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.rabbit-hole-trigger::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 100px;
  padding: 1px;
  background: conic-gradient(from var(--hole-angle, 0deg), #4d6dff, #8855ff, #ec4899, #8855ff, #4d6dff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateBorder 3s linear infinite;
  opacity: 0.6;
  transition: opacity 0.4s;
}

.rabbit-hole-trigger:hover::before {
  opacity: 1;
}

@property --hole-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateBorder {
  to { --hole-angle: 360deg; }
}

.black-hole-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

/* Event horizon (dark center) */
.black-hole-icon::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #000 40%, rgba(10, 0, 30, 0.9) 70%, transparent 100%);
  z-index: 3;
  box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.8);
}

/* Accretion disk */
.accretion-disk {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: spinDisk 4s linear infinite;
}

.accretion-disk::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #4d6dff00,
    #4d6dff,
    #8855ff,
    #ec4899,
    #8855ff,
    #4d6dff,
    #4d6dff00
  );
  -webkit-mask: radial-gradient(circle, transparent 30%, #000 35%, #000 70%, transparent 75%);
  mask: radial-gradient(circle, transparent 30%, #000 35%, #000 70%, transparent 75%);
  filter: blur(1px);
}

/* Outer glow ring */
.accretion-disk::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    transparent,
    rgba(77, 109, 255, 0.3),
    rgba(136, 85, 255, 0.2),
    transparent
  );
  filter: blur(3px);
  animation: spinDisk 6s linear infinite reverse;
}

@keyframes spinDisk {
  to { transform: rotate(360deg); }
}

/* Particle being sucked in */
.hole-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8855ff;
  box-shadow: 0 0 4px #8855ff;
}

.hole-particle:nth-child(1) {
  animation: suckIn 2.5s ease-in infinite;
  animation-delay: 0s;
  top: -2px; left: 50%;
}
.hole-particle:nth-child(2) {
  animation: suckIn 2.5s ease-in infinite;
  animation-delay: 0.8s;
  top: 50%; right: -2px;
  background: #4d6dff;
  box-shadow: 0 0 4px #4d6dff;
}
.hole-particle:nth-child(3) {
  animation: suckIn 2.5s ease-in infinite;
  animation-delay: 1.6s;
  bottom: -2px; left: 50%;
  background: #ec4899;
  box-shadow: 0 0 4px #ec4899;
}

@keyframes suckIn {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  80% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(calc(50% - 18px), calc(50% - 18px)) scale(0); }
}

.rabbit-hole-trigger:hover {
  transform: scale(1.04);
  box-shadow: 0 0 40px rgba(136, 85, 255, 0.3), 0 0 80px rgba(77, 109, 255, 0.15);
  border-color: rgba(136, 85, 255, 0.5);
}

.rabbit-hole-trigger:hover .accretion-disk {
  animation-duration: 2s;
}

.rabbit-hole-trigger .rh-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.rabbit-hole-trigger .rh-text-main {
  font-size: 0.9rem;
  font-weight: 700;
}

.rabbit-hole-trigger .rh-text-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* --- Story Cards Grid --- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.story-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.story-card:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.story-card .card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.story-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card .card-thumb .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity var(--transition);
  font-size: 2.5rem;
  color: #fff;
}

.story-card:hover .play-icon { opacity: 1; }

.story-card .card-body {
  padding: 16px;
}

.story-card .card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-category[data-cat="space"] { background: rgba(77,109,255,0.15); color: var(--cat-space); }
.card-category[data-cat="ocean"] { background: rgba(6,182,212,0.15); color: var(--cat-ocean); }
.card-category[data-cat="ancient"] { background: rgba(245,158,11,0.15); color: var(--cat-ancient); }
.card-category[data-cat="physics"] { background: rgba(168,85,247,0.15); color: var(--cat-physics); }
.card-category[data-cat="geology"] { background: rgba(239,68,68,0.15); color: var(--cat-geology); }
.card-category[data-cat="evolution"] { background: rgba(34,197,94,0.15); color: var(--cat-evolution); }
.card-category[data-cat="quantum"] { background: rgba(236,72,153,0.15); color: var(--cat-quantum); }
.card-category[data-cat="biology"] { background: rgba(16,185,129,0.15); color: var(--cat-biology); }

.card-date {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.story-card h3 {
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.story-card .card-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card .card-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.story-card:hover .card-source { color: var(--accent-blue); }

/* --- Constellation View --- */
#constellation-container {
  width: 100%;
  height: 600px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  display: none;
  margin-bottom: 60px;
}

#constellation-container.active { display: block; }

#constellation-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

#constellation-canvas:active { cursor: grabbing; }

.constellation-tooltip {
  position: absolute;
  padding: 10px 14px;
  background: rgba(13, 13, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card-hover);
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 260px;
  z-index: 10;
}

.constellation-tooltip.visible { opacity: 1; }

.constellation-tooltip h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.constellation-tooltip p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* --- Rabbit Hole Overlay --- */
.rabbit-hole-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rabbit-hole-overlay.active { display: flex; }

.rabbit-hole-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
}

.rabbit-hole-close:hover { border-color: #fff; }

.rabbit-hole-player {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.rabbit-hole-player .rh-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 6px;
}

.rabbit-hole-player .rh-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.rabbit-hole-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.rh-nav-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.rh-nav-btn:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

.rh-nav-btn.next {
  background: var(--gradient-main);
  border: none;
  color: #fff;
}

/* --- Individual Story Page --- */
.story-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.story-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.story-page .back-link:hover { color: var(--text-primary); }

.story-page .story-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.story-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.story-page .story-date {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.video-embed-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
}

.video-embed-container iframe {
  width: 100%;
  aspect-ratio: 9 / 16;
  border: none;
  display: block;
}

.platform-toggles {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.platform-btn {
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.platform-btn.active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(77, 109, 255, 0.08);
}

.story-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  border: 1px solid var(--border-card);
  color: var(--accent-blue);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  margin-bottom: 40px;
}

.source-link:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(77, 109, 255, 0.15);
}

.next-discovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  transition: all var(--transition);
  margin-bottom: 40px;
}

.next-discovery:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-glow);
}

.next-discovery .nd-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.next-discovery h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.next-discovery .nd-arrow {
  font-size: 1.5rem;
  color: var(--accent-blue);
}

/* Related Stories */
.related-section h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

/* --- Share Buttons --- */
.share-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.share-btn {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }

/* --- Footer --- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-card);
  text-align: center;
}

.site-footer p {
  color: var(--text-dim);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: color var(--transition);
}

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

/* --- Load More --- */
.load-more-container {
  text-align: center;
  margin-bottom: 60px;
}

.btn-load-more {
  padding: 10px 28px;
  border-radius: 100px;
  border: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-load-more:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }
.fade-in:nth-child(6) { animation-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 24px; }
  .briefing { grid-template-columns: 1fr; }
  .stories-grid { grid-template-columns: 1fr; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .category-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .cat-btn { flex-shrink: 0; }
  #constellation-container { height: 400px; }
  .rabbit-hole-player { max-width: 90vw; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .story-page { padding: 24px 16px 60px; }
  .video-embed-container { max-width: 100%; }
}
