# #091 — Kurzgesagt Cosmic Vector

> Flat-vector cosmic illustration and playful science storytelling in deep-space indigo, luminous coral, and geometric planets.

## Metadata

- **Index**: #091
- **Slug**: `kurzgesagt-cosmic-vector`
- **Kind**: `style`
- **Family**: Playful & Hand-Drawn
- **Theme**: `dark`
- **Mobile Strength**: `high`
- **Tags**: `flat-vector`, `cosmic-illustration`, `science-storytelling`, `deep-indigo`, `playful-diagrams`, `luminous-dark`
- **Best For**: Science communication & educational media, Interactive data essays & explainers, Podcast, YouTube & creator storefronts, Playful astronomy & STEM web apps
- **Real-World Inspiration**: [Kurzgesagt](https://kurzgesagt.org/)
- **Detail Page**: https://templates.michaelpitts.net/t/kurzgesagt-cosmic-vector
- **Live Demo**: https://templates.michaelpitts.net/demos/kurzgesagt-cosmic-vector.html
- **JSON API**: https://templates.michaelpitts.net/api/templates/kurzgesagt-cosmic-vector

## Why This Aesthetic Is Unique

Transforms existential astrophysics and biology into joyful, razor-sharp flat-vector dioramas—pairing deep indigo night skies with luminous coral, cyan, and marigold geometric illustrations.

## Color Palette

| Role | Name | Hex |
|------|------|-----|
| `canvas` | Deep Space Indigo | `#0B1026` |
| `surface` | Nebula Twilight | `#151D42` |
| `ink` | Starlight White | `#F4F7FF` |
| `accent` | Supernova Coral | `#FF5E7E` |
| `muted` | Orbit Periwinkle | `#8E9CC7` |

## Typography

- **Display**: `Baloo 2, sans-serif`
- **Body**: `Plus Jakarta Sans, -apple-system, sans-serif`
- **Mono**: `JetBrains Mono, ui-monospace, monospace`
- **Scale Notes**: Chunky geometric Baloo 2 display titles (34–56px) paired with crisp 15px explainer copy and monospace scientific scale notation (10^-18m to 10^26m).
- **Google Fonts**: https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap
  ```html
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap">
  ```

## Layout Architecture

Starfield dark-indigo hero stage with layered flat-vector SVG planets and cosmic birds, anchored by an interactive 'Scale of the Universe' explorer and vibrant episode cards.

## Interaction & Micro-Motion Rules

Interactive cosmic scale slider scrubs smoothly across 5 orders of magnitude (Quark, Cell, Duck, Earth, Black Hole), dynamically updating the SVG vector diagram and science facts.

## Mobile & Responsive Rules

Vector diorama scales cleanly to 390px with a chunky >=44px range slider and quick-jump scale pills underneath.

## Agent Guardrails

### DO
- Build illustrations from crisp geometric flat-vector shapes with clean layered shadows rather than muddy blurs.
- Use deep indigo (#0B1026) instead of flat #000000 so luminous coral, cyan, and gold vectors pop.
- Pair playful visual whimsy with genuinely informative, structured micro-facts.

### DON'T
- Do not fall into generic purple-blue SaaS glassmorphism.
- Do not use photorealistic stock space backgrounds behind flat geometric vectors.

## Complete Standalone Starter Code

File: `demos/kurzgesagt-cosmic-vector.html`

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Nutshell Cosmos — Playful Vector Science &amp; Cosmic Scale</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=JetBrains+Mono:wght@500;700&family=Plus+Jakarta+Sans:wght@500;700&display=swap" rel="stylesheet">
  <style>
    :root {
      --bg: #0B1026;
      --surface: #151D42;
      --surface-hi: #1D2859;
      --ink: #F4F7FF;
      --accent: #FF5E7E;
      --cyan: #38E4FF;
      --gold: #FFD15C;
      --violet: #9B72FF;
      --muted: #8E9CC7;
    }

    *, *::before, *::after {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      background-color: var(--bg);
      color: var(--ink);
      font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
      line-height: 1.55;
      overflow-x: hidden;
    }

    body {
      background-image:
        radial-gradient(2px 2px at 14% 18%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 82% 12%, rgba(56, 228, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 42% 32%, rgba(255, 209, 92, 0.6), transparent),
        radial-gradient(2px 2px at 74% 58%, rgba(255, 94, 126, 0.55), transparent),
        radial-gradient(600px 420px at 85% 8%, rgba(155, 114, 255, 0.22), transparent 65%),
        radial-gradient(520px 360px at 10% 24%, rgba(56, 228, 255, 0.14), transparent 65%);
      background-repeat: no-repeat;
    }

    h1, h2, h3, .baloo {
      font-family: 'Baloo 2', system-ui, sans-serif;
      margin: 0;
      line-height: 1.08;
    }

    .mono {
      font-family: 'JetBrains Mono', ui-monospace, monospace;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font-family: inherit;
      cursor: pointer;
      border: none;
      background: transparent;
      color: inherit;
    }

    .container {
      width: 100%;
      max-width: 1120px;
      margin: 0 auto;
      padding: 0 20px;
    }

    /* Header */
    header {
      position: sticky;
      top: 0;
      z-index: 50;
      background: rgba(11, 16, 38, 0.88);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(142, 156, 199, 0.2);
    }

    .nav-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 74px;
      gap: 16px;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-family: 'Baloo 2', sans-serif;
      font-size: 1.55rem;
      font-weight: 800;
    }

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

    .nav-links a {
      color: var(--muted);
      font-weight: 700;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      transition: color 0.18s;
    }

    .nav-links a:hover {
      color: var(--cyan);
    }

    .cosmic-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 46px;
      min-width: 46px;
      padding: 10px 22px;
      border-radius: 999px;
      font-weight: 700;
      background: linear-gradient(135deg, var(--accent), #FF8A5B);
      color: #FFF;
      box-shadow: 0 8px 24px rgba(255, 94, 126, 0.35);
      transition: transform 0.16s, box-shadow 0.16s;
    }

    .cosmic-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 28px rgba(255, 94, 126, 0.45);
    }

    .cosmic-btn.ghost {
      background: var(--surface);
      border: 2px solid rgba(56, 228, 255, 0.35);
      box-shadow: none;
    }

    .menu-btn {
      display: none;
      width: 44px;
      height: 44px;
      border-radius: 12px;
      background: var(--surface);
      border: 1.5px solid rgba(142, 156, 199, 0.3);
      align-items: center;
      justify-content: center;
    }

    .mobile-drawer {
      display: none;
      flex-direction: column;
      gap: 10px;
      padding: 14px 20px 20px;
      background: var(--surface);
      border-bottom: 1px solid rgba(142, 156, 199, 0.25);
    }

    .mobile-drawer.open {
      display: flex;
    }

    .mobile-drawer a {
      min-height: 44px;
      display: flex;
      align-items: center;
      padding: 8px 14px;
      border-radius: 12px;
      background: rgba(11, 16, 38, 0.5);
      font-weight: 700;
    }

    /* Hero */
    .hero {
      padding: 46px 0 42px;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: 1.05fr 0.95fr;
      gap: 36px;
      align-items: center;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      border-radius: 999px;
      background: rgba(56, 228, 255, 0.12);
      border: 1px solid rgba(56, 228, 255, 0.35);
      color: var(--cyan);
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.78rem;
      font-weight: 700;
      margin-bottom: 16px;
    }

    .hero h1 {
      font-size: clamp(2.4rem, 5.4vw, 4rem);
      margin-bottom: 16px;
    }

    .grad-text {
      background: linear-gradient(90deg, var(--cyan), var(--accent), var(--gold));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    .hero p {
      color: var(--muted);
      font-size: 1.1rem;
      margin: 0 0 26px;
      max-width: 50ch;
    }

    .hero-btns {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }

    .planet-stage {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    /* Interactive Scale of the Universe Widget */
    .section {
      padding: 44px 0;
    }

    .scale-lab {
      background: var(--surface);
      border: 2px solid rgba(142, 156, 199, 0.25);
      border-radius: 30px;
      padding: 32px;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    }

    .scale-top {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;
      margin-bottom: 24px;
    }

    .scale-readout {
      background: var(--bg);
      border: 1.5px solid rgba(56, 228, 255, 0.4);
      border-radius: 14px;
      padding: 10px 16px;
      color: var(--cyan);
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.95rem;
      font-weight: 700;
    }

    .scale-grid {
      display: grid;
      grid-template-columns: 0.95fr 1.05fr;
      gap: 28px;
      align-items: center;
    }

    .scale-viewport {
      background: radial-gradient(circle at 50% 50%, #1E2A5E 0%, #0B1026 75%);
      border-radius: 24px;
      border: 2px solid rgba(142, 156, 199, 0.22);
      height: 270px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
    }

    .scale-info h3 {
      font-size: 2rem;
      margin-bottom: 8px;
    }

    .scale-tag {
      display: inline-block;
      background: rgba(255, 94, 126, 0.16);
      color: var(--accent);
      border-radius: 999px;
      padding: 4px 12px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.78rem;
      font-weight: 700;
      margin-bottom: 12px;
    }

    .scale-info p {
      color: var(--muted);
      margin: 0 0 18px;
    }

    .fact-callout {
      background: rgba(11, 16, 38, 0.65);
      border-left: 4px solid var(--gold);
      border-radius: 0 14px 14px 0;
      padding: 12px 16px;
      font-size: 0.94rem;
    }

    .slider-controls {
      margin-top: 26px;
      background: rgba(11, 16, 38, 0.55);
      border-radius: 20px;
      padding: 18px 20px;
    }

    input[type="range"] {
      width: 100%;
      accent-color: var(--accent);
      height: 12px;
      cursor: pointer;
    }

    .stop-buttons {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 8px;
      margin-top: 14px;
    }

    .stop-btn {
      min-height: 44px;
      padding: 6px 8px;
      border-radius: 12px;
      background: var(--surface);
      border: 1.5px solid rgba(142, 156, 199, 0.25);
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 700;
      transition: all 0.15s;
    }

    .stop-btn.active {
      background: var(--accent);
      border-color: var(--accent);
      color: #FFF;
    }

    /* Episode Deck */
    .deck-head {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      margin-bottom: 24px;
    }

    .filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .filter-pill {
      min-height: 44px;
      padding: 8px 16px;
      border-radius: 999px;
      background: var(--surface);
      color: var(--muted);
      font-weight: 700;
      border: 1.5px solid rgba(142, 156, 199, 0.25);
    }

    .filter-pill.active {
      background: var(--cyan);
      color: #0B1026;
      border-color: var(--cyan);
    }

    .episodes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 22px;
    }

    .ep-card {
      background: var(--surface);
      border-radius: 24px;
      overflow: hidden;
      border: 1.5px solid rgba(142, 156, 199, 0.22);
      display: flex;
      flex-direction: column;
      transition: transform 0.18s ease, border-color 0.18s ease;
    }

    .ep-card:hover {
      transform: translateY(-4px);
      border-color: var(--cyan);
    }

    .ep-art {
      height: 158px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .ep-body {
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }

    .ep-meta {
      display: flex;
      justify-content: space-between;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.74rem;
      color: var(--cyan);
    }

    .ep-body h3 {
      font-size: 1.38rem;
    }

    .ep-body p {
      margin: 0;
      color: var(--muted);
      font-size: 0.94rem;
    }

    footer {
      margin-top: 48px;
      border-top: 1px solid rgba(142, 156, 199, 0.2);
      padding: 34px 0 46px;
      color: var(--muted);
    }

    .footer-inner {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
    }

    @media (max-width: 820px) {
      .hero-grid, .scale-grid {
        grid-template-columns: 1fr;
      }
      .nav-links, .nav-cta {
        display: none;
      }
      .menu-btn {
        display: inline-flex;
      }
      .stop-buttons {
        grid-template-columns: repeat(2, 1fr);
      }
      .scale-lab {
        padding: 22px 18px;
      }
    }
  </style>
</head>
<body>
  <header>
    <div class="container nav-bar">
      <a href="#top" class="brand">
        <svg width="36" height="36" viewBox="0 0 40 40" fill="none" aria-hidden="true">
          <circle cx="20" cy="20" r="16" fill="#1D2859" stroke="#38E4FF" stroke-width="2.5"/>
          <circle cx="20" cy="20" r="9" fill="#FF5E7E"/>
          <ellipse cx="20" cy="20" rx="18" ry="6" transform="rotate(-22 20 20)" stroke="#FFD15C" stroke-width="2.5"/>
        </svg>
        <span>Nutshell Cosmos</span>
      </a>

      <nav class="nav-links" aria-label="Main">
        <a href="#scale">Scale Explorer</a>
        <a href="#episodes">Episodes</a>
      </nav>

      <div class="nav-cta">
        <a href="#scale" class="cosmic-btn">Zoom The Universe</a>
      </div>

      <button class="menu-btn" id="menuBtn" aria-expanded="false" aria-controls="mobileDrawer" aria-label="Open menu">
        <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#F4F7FF" stroke-width="2.4" stroke-linecap="round">
          <path d="M4 7h16M4 12h16M4 17h16"/>
        </svg>
      </button>
    </div>

    <div class="mobile-drawer" id="mobileDrawer">
      <a href="#scale">Scale Explorer</a>
      <a href="#episodes">Episodes</a>
    </div>
  </header>

  <main id="top">
    <section class="hero">
      <div class="container hero-grid">
        <div>
          <span class="eyebrow">● EPISODE 184 &bull; OPTIMISTIC SCIENCE</span>
          <h1>Big cosmic questions explained with <span class="grad-text">flat vectors &amp; ducks.</span></h1>
          <p>
            From subatomic quarks to supermassive black holes, we turn existential astrophysics and cellular biology into colorful, bite-sized visual stories.
          </p>
          <div class="hero-btns">
            <a href="#scale" class="cosmic-btn">Launch Scale Slider</a>
            <a href="#episodes" class="cosmic-btn ghost">Browse Episodes</a>
          </div>
        </div>

        <div class="planet-stage">
          <svg width="310" height="260" viewBox="0 0 310 260" fill="none" role="img" aria-label="Geometric flat-vector planet with space duck mascot and nebula rings">
            <!-- Nebula glow -->
            <circle cx="160" cy="130" r="106" fill="#9B72FF" opacity="0.16"/>
            <circle cx="160" cy="130" r="82" fill="#38E4FF" opacity="0.14"/>
            <!-- Back Ring -->
            <ellipse cx="160" cy="138" rx="126" ry="30" transform="rotate(-16 160 138)" stroke="#FFD15C" stroke-width="8" stroke-dasharray="14 8"/>
            <!-- Planet Core -->
            <circle cx="160" cy="130" r="64" fill="#FF5E7E"/>
            <!-- Layered Geometric Continent Bands -->
            <path d="M104 108h68a10 10 0 010 20h-74c1-7 3-14 6-20z" fill="#FF8A5B"/>
            <path d="M126 144h88a9 9 0 01-2 18h-86a9 9 0 010-18z" fill="#9B72FF" opacity="0.7"/>
            <circle cx="186" cy="104" r="11" fill="#FFD15C"/>
            <!-- Space Duck Mascot Perched on Top -->
            <g transform="translate(132, 34)">
              <circle cx="28" cy="24" r="22" fill="#38E4FF" opacity="0.28" stroke="#38E4FF" stroke-width="2"/>
              <ellipse cx="26" cy="31" rx="14" ry="10" fill="#FFD15C"/>
              <circle cx="32" cy="19" r="9" fill="#FFD15C"/>
              <polygon points="40,18 49,21 40,24" fill="#FF5E7E"/>
              <circle cx="34" cy="17" r="2" fill="#0B1026"/>
            </g>
            <!-- Orbiting Mini Moon -->
            <circle cx="52" cy="84" r="12" fill="#38E4FF"/>
            <circle cx="266" cy="178" r="8" fill="#FFD15C"/>
          </svg>
        </div>
      </div>
    </section>

    <section class="section" id="scale">
      <div class="container">
        <div class="scale-lab">
          <div class="scale-top">
            <div>
              <span class="mono" style="color:var(--accent); font-size:0.8rem; font-weight:700;">INTERACTIVE ZOOM</span>
              <h2 style="font-size:clamp(1.8rem, 4vw, 2.7rem);">Scale of the Universe</h2>
            </div>
            <div class="scale-readout" id="scaleMetric">0.45 meters</div>
          </div>

          <div class="scale-grid">
            <div class="scale-viewport" id="scaleViewport" aria-live="polite">
              <!-- Dynamic SVG injected by JS -->
            </div>

            <div class="scale-info">
              <span class="scale-tag" id="scaleCategory">EVERYDAY SCALE</span>
              <h3 id="scaleTitle">Curious Duck</h3>
              <p id="scaleDesc">
                Our standard scientific unit of measurement. Roughly 45 centimeters tall and completely unbothered by quantum mechanics.
              </p>
              <div class="fact-callout" id="scaleFact">
                <strong>Cosmic Note:</strong> You would need about 28 million ducks stacked beak-to-tail to span Earth's diameter.
              </div>
            </div>
          </div>

          <div class="slider-controls">
            <label for="scaleSlider" class="mono" style="display:block; font-size:0.8rem; color:var(--muted); margin-bottom:8px;">
              DRAG TO ZOOM ACROSS 28 ORDERS OF MAGNITUDE
            </label>
            <input type="range" id="scaleSlider" min="0" max="4" step="1" value="2" aria-label="Scale of the Universe zoom level">
            <div class="stop-buttons">
              <button class="stop-btn" data-stop="0">Quark</button>
              <button class="stop-btn" data-stop="1">Cell</button>
              <button class="stop-btn active" data-stop="2">Duck</button>
              <button class="stop-btn" data-stop="3">Earth</button>
              <button class="stop-btn" data-stop="4">Black Hole</button>
            </div>
          </div>
        </div>
      </div>
    </section>

    <section class="section" id="episodes">
      <div class="container">
        <div class="deck-head">
          <div>
            <span class="mono" style="color:var(--cyan); font-size:0.8rem; font-weight:700;">FEATURED EXPLAINERS</span>
            <h2 style="font-size:clamp(1.8rem, 4vw, 2.6rem);">Episode Deck</h2>
          </div>
          <div class="filter-row" role="tablist" aria-label="Filter episodes">
            <button class="filter-pill active" data-filter="all">All</button>
            <button class="filter-pill" data-filter="space">Space</button>
            <button class="filter-pill" data-filter="biology">Biology</button>
            <button class="filter-pill" data-filter="philosophy">Philosophy</button>
          </div>
        </div>

        <div class="episodes-grid" id="episodesGrid">
          <article class="ep-card" data-topic="space">
            <div class="ep-art" style="background:linear-gradient(135deg, #1B144A, #3C1E70);">
              <svg width="160" height="120" viewBox="0 0 160 120" fill="none">
                <circle cx="80" cy="60" r="24" fill="#FFD15C"/>
                <ellipse cx="80" cy="60" rx="58" ry="18" transform="rotate(24 80 60)" stroke="#38E4FF" stroke-width="5" stroke-dasharray="10 6"/>
                <ellipse cx="80" cy="60" rx="58" ry="18" transform="rotate(-24 80 60)" stroke="#FF5E7E" stroke-width="5" stroke-dasharray="10 6"/>
              </svg>
            </div>
            <div class="ep-body">
              <div class="ep-meta"><span>SPACE</span><span>11:24</span></div>
              <h3>How to Build a Dyson Swarm</h3>
              <p>Harvesting the energy of an entire star by disassembling Mercury into orbiting solar mirrors.</p>
            </div>
          </article>

          <article class="ep-card" data-topic="biology">
            <div class="ep-art" style="background:linear-gradient(135deg, #102B4A, #1B5A7A);">
              <svg width="160" height="120" viewBox="0 0 160 120" fill="none">
                <circle cx="72" cy="60" r="34" fill="#38E4FF" opacity="0.28"/>
                <circle cx="72" cy="60" r="22" fill="#38E4FF"/>
                <circle cx="66" cy="56" r="4" fill="#0B1026"/>
                <circle cx="79" cy="56" r="4" fill="#0B1026"/>
                <circle cx="118" cy="46" r="12" fill="#FF5E7E"/>
                <circle cx="122" cy="78" r="9" fill="#FFD15C"/>
              </svg>
            </div>
            <div class="ep-body">
              <div class="ep-meta"><span>BIOLOGY</span><span>09:48</span></div>
              <h3>The Microscopic Battlefield Inside You</h3>
              <p>Meet the macrophage patrol squad defending trillions of cells every single second.</p>
            </div>
          </article>

          <article class="ep-card" data-topic="philosophy">
            <div class="ep-art" style="background:linear-gradient(135deg, #2A123D, #5E1D4B);">
              <svg width="160" height="120" viewBox="0 0 160 120" fill="none">
                <circle cx="80" cy="66" r="36" fill="#FF5E7E"/>
                <circle cx="80" cy="66" r="22" fill="#FFD15C"/>
                <circle cx="40" cy="34" r="5" fill="#38E4FF"/>
                <circle cx="124" cy="30" r="7" fill="#9B72FF"/>
                <circle cx="132" cy="86" r="4" fill="#F4F7FF"/>
              </svg>
            </div>
            <div class="ep-body">
              <div class="ep-meta"><span>PHILOSOPHY</span><span>06:32</span></div>
              <h3>Optimistic Nihilism in 6 Minutes</h3>
              <p>If the universe has no built-in script, every laugh, curiosity, and kindness is yours to invent.</p>
            </div>
          </article>
        </div>
      </div>
    </section>
  </main>

  <footer>
    <div class="container footer-inner">
      <strong class="baloo" style="font-size:1.35rem; color:var(--ink);">Nutshell Cosmos</strong>
      <div class="mono" style="font-size:0.8rem;">Flat-vector science storytelling &bull; Zero existential dread guaranteed</div>
    </div>
  </footer>

  <script>
    // Mobile nav
    const menuBtn = document.getElementById('menuBtn');
    const mobileDrawer = document.getElementById('mobileDrawer');
    menuBtn.addEventListener('click', () => {
      const open = mobileDrawer.classList.toggle('open');
      menuBtn.setAttribute('aria-expanded', String(open));
    });
    mobileDrawer.querySelectorAll('a').forEach(a => {
      a.addEventListener('click', () => {
        mobileDrawer.classList.remove('open');
        menuBtn.setAttribute('aria-expanded', 'false');
      });
    });

    // Interactive Scale of the Universe
    const scales = [
      {
        name: 'Up & Down Quarks',
        category: 'QUANTUM REALM',
        metric: '10⁻¹⁸ meters',
        desc: 'Point-like fundamental building blocks locked inside protons and neutrons by elastic gluon fields.',
        fact: '<strong>Cosmic Note:</strong> Pull two quarks apart and the energy snaps into brand-new quarks instead of freeing them.',
        svg: `<svg width="210" height="210" viewBox="0 0 210 210" fill="none">
          <circle cx="105" cy="105" r="78" stroke="#9B72FF" stroke-width="3" stroke-dasharray="8 8"/>
          <path d="M105 56 L148 134 L62 134 Z" stroke="#38E4FF" stroke-width="4" fill="rgba(56,228,255,0.12)"/>
          <circle cx="105" cy="56" r="18" fill="#FF5E7E"/><text x="105" y="61" text-anchor="middle" fill="#FFF" font-family="JetBrains Mono" font-weight="700" font-size="13">u</text>
          <circle cx="148" cy="134" r="18" fill="#38E4FF"/><text x="148" y="139" text-anchor="middle" fill="#0B1026" font-family="JetBrains Mono" font-weight="700" font-size="13">u</text>
          <circle cx="62" cy="134" r="18" fill="#FFD15C"/><text x="62" y="139" text-anchor="middle" fill="#0B1026" font-family="JetBrains Mono" font-weight="700" font-size="13">d</text>
        </svg>`
      },
      {
        name: 'Human Cell',
        category: 'MICROSCOPIC CITY',
        metric: '10⁻⁵ meters (20 µm)',
        desc: 'A bustling walled metropolis packed with ribosomes, protein highways, and mitochondria power plants.',
        fact: '<strong>Cosmic Note:</strong> Your body runs roughly 37 trillion of these glowing factories in parallel right now.',
        svg: `<svg width="210" height="210" viewBox="0 0 210 210" fill="none">
          <circle cx="105" cy="105" r="82" fill="#38E4FF" opacity="0.2" stroke="#38E4FF" stroke-width="5"/>
          <circle cx="105" cy="105" r="34" fill="#9B72FF"/>
          <circle cx="105" cy="105" r="15" fill="#FF5E7E"/>
          <ellipse cx="62" cy="70" rx="14" ry="8" transform="rotate(-35 62 70)" fill="#FFD15C"/>
          <ellipse cx="152" cy="132" rx="16" ry="8" transform="rotate(28 152 132)" fill="#FFD15C"/>
          <circle cx="148" cy="68" r="7" fill="#38E4FF"/>
          <circle cx="68" cy="144" r="8" fill="#FF5E7E"/>
        </svg>`
      },
      {
        name: 'Curious Duck',
        category: 'EVERYDAY SCALE',
        metric: '0.45 meters',
        desc: 'Our standard scientific unit of measurement. Roughly 45 centimeters tall and completely unbothered by quantum mechanics.',
        fact: '<strong>Cosmic Note:</strong> You would need about 28 million ducks stacked beak-to-tail to span Earth\'s diameter.',
        svg: `<svg width="210" height="210" viewBox="0 0 210 210" fill="none">
          <circle cx="105" cy="105" r="76" fill="#1D2859"/>
          <ellipse cx="98" cy="130" rx="46" ry="30" fill="#FFD15C"/>
          <circle cx="122" cy="84" r="28" fill="#FFD15C"/>
          <polygon points="146,80 176,88 146,96" fill="#FF5E7E"/>
          <circle cx="131" cy="78" r="5" fill="#0B1026"/>
          <path d="M84 128c10-10 26-10 34 2" stroke="#FF8A5B" stroke-width="6" stroke-linecap="round"/>
          <rect x="86" y="158" width="6" height="16" fill="#FF5E7E"/>
          <rect x="108" y="158" width="6" height="16" fill="#FF5E7E"/>
        </svg>`
      },
      {
        name: 'Planet Earth',
        category: 'PLANETARY SCALE',
        metric: '1.27 × 10⁷ meters',
        desc: 'A thin blue shell of liquid oceans and nitrogen air spinning at 1,670 km/h around an ordinary yellow star.',
        fact: '<strong>Cosmic Note:</strong> Every human conversation, sandwich, and symphony in history has happened on this dot.',
        svg: `<svg width="210" height="210" viewBox="0 0 210 210" fill="none">
          <circle cx="105" cy="105" r="84" fill="#38E4FF" opacity="0.18"/>
          <circle cx="105" cy="105" r="68" fill="#2A7BFF"/>
          <path d="M64 74h44a12 12 0 010 24H78a10 10 0 000 20h26a12 12 0 010 24H68" fill="#4ADE80"/>
          <rect x="116" y="114" width="38" height="22" rx="11" fill="#4ADE80"/>
          <rect x="52" y="136" width="44" height="10" rx="5" fill="#F4F7FF" opacity="0.85"/>
          <rect x="112" y="64" width="36" height="9" rx="4.5" fill="#F4F7FF" opacity="0.85"/>
        </svg>`
      },
      {
        name: 'Supermassive Black Hole',
        category: 'GALACTIC TITAN',
        metric: '4 × 10¹⁰ meters',
        desc: 'A gravitational abyss heavier than millions of suns, wrapped in a glowing ring of superheated accretion plasma.',
        fact: '<strong>Cosmic Note:</strong> Even light cannot escape past its event horizon — yet it anchors the orbit of an entire galaxy.',
        svg: `<svg width="210" height="210" viewBox="0 0 210 210" fill="none">
          <ellipse cx="105" cy="108" rx="92" ry="26" transform="rotate(-14 105 108)" fill="#FF5E7E" opacity="0.35"/>
          <ellipse cx="105" cy="108" rx="82" ry="18" transform="rotate(-14 105 108)" stroke="#FFD15C" stroke-width="8"/>
          <circle cx="105" cy="105" r="46" fill="#04060F" stroke="#FF5E7E" stroke-width="4"/>
          <path d="M52 120c32 10 74 4 106-14" stroke="#FFD15C" stroke-width="7" stroke-linecap="round"/>
        </svg>`
      }
    ];

    const slider = document.getElementById('scaleSlider');
    const viewport = document.getElementById('scaleViewport');
    const metricEl = document.getElementById('scaleMetric');
    const catEl = document.getElementById('scaleCategory');
    const titleEl = document.getElementById('scaleTitle');
    const descEl = document.getElementById('scaleDesc');
    const factEl = document.getElementById('scaleFact');
    const stopBtns = Array.from(document.querySelectorAll('.stop-btn'));

    function setScale(idx) {
      const s = scales[idx];
      slider.value = String(idx);
      viewport.innerHTML = s.svg;
      metricEl.textContent = s.metric;
      catEl.textContent = s.category;
      titleEl.textContent = s.name;
      descEl.textContent = s.desc;
      factEl.innerHTML = s.fact;
      stopBtns.forEach(b => b.classList.toggle('active', Number(b.dataset.stop) === idx));
    }

    slider.addEventListener('input', (e) => setScale(Number(e.target.value)));
    stopBtns.forEach(btn => btn.addEventListener('click', () => setScale(Number(btn.dataset.stop))));
    setScale(2);

    // Episode filters
    const filterPills = document.querySelectorAll('.filter-pill');
    const epCards = document.querySelectorAll('.ep-card');
    filterPills.forEach(pill => {
      pill.addEventListener('click', () => {
        const topic = pill.dataset.filter;
        filterPills.forEach(p => p.classList.toggle('active', p === pill));
        epCards.forEach(card => {
          card.style.display = (topic === 'all' || card.dataset.topic === topic) ? 'flex' : 'none';
        });
      });
    });
  </script>
</body>
</html>
```
