{
  "id": 91,
  "slug": "kurzgesagt-cosmic-vector",
  "name": "Kurzgesagt Cosmic Vector",
  "kind": "style",
  "family": "Playful & Hand-Drawn",
  "sourceSite": {
    "name": "Kurzgesagt",
    "url": "https://kurzgesagt.org/",
    "verifiedStatus": 200
  },
  "tagline": "Flat-vector cosmic illustration and playful science storytelling in deep-space indigo, luminous coral, and geometric planets.",
  "whyUnique": "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.",
  "theme": "dark",
  "mobileStrength": "high",
  "tags": [
    "flat-vector",
    "cosmic-illustration",
    "science-storytelling",
    "deep-indigo",
    "playful-diagrams",
    "luminous-dark"
  ],
  "bestFor": [
    "Science communication & educational media",
    "Interactive data essays & explainers",
    "Podcast, YouTube & creator storefronts",
    "Playful astronomy & STEM web apps"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#0B1026",
      "name": "Deep Space Indigo"
    },
    {
      "role": "surface",
      "hex": "#151D42",
      "name": "Nebula Twilight"
    },
    {
      "role": "ink",
      "hex": "#F4F7FF",
      "name": "Starlight White"
    },
    {
      "role": "accent",
      "hex": "#FF5E7E",
      "name": "Supernova Coral"
    },
    {
      "role": "muted",
      "hex": "#8E9CC7",
      "name": "Orbit Periwinkle"
    }
  ],
  "typography": {
    "display": "Baloo 2, sans-serif",
    "body": "Plus Jakarta Sans, -apple-system, sans-serif",
    "mono": "JetBrains Mono, ui-monospace, monospace",
    "googleFontsUrl": "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",
    "scaleNotes": "Chunky geometric Baloo 2 display titles (34–56px) paired with crisp 15px explainer copy and monospace scientific scale notation (10^-18m to 10^26m)."
  },
  "layoutNotes": "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.",
  "interactionNotes": "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.",
  "mobileNotes": "Vector diorama scales cleanly to 390px with a chunky >=44px range slider and quick-jump scale pills underneath.",
  "agentGuardrails": {
    "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."
    ],
    "dont": [
      "Do not fall into generic purple-blue SaaS glassmorphism.",
      "Do not use photorealistic stock space backgrounds behind flat geometric vectors."
    ]
  },
  "demoFile": "demos/kurzgesagt-cosmic-vector.html",
  "thumbDesktop": "thumbs/kurzgesagt-cosmic-vector-desktop.webp",
  "thumbMobile": "thumbs/kurzgesagt-cosmic-vector-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/kurzgesagt-cosmic-vector",
    "markdown": "https://templates.michaelpitts.net/t/kurzgesagt-cosmic-vector.md",
    "api": "https://templates.michaelpitts.net/api/templates/kurzgesagt-cosmic-vector",
    "demo": "https://templates.michaelpitts.net/demos/kurzgesagt-cosmic-vector.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/kurzgesagt-cosmic-vector-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/kurzgesagt-cosmic-vector-mobile.webp"
  },
  "agentPrompt": "Design & build using template #091 \"Kurzgesagt Cosmic Vector\" (style / Playful & Hand-Drawn, dark theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/kurzgesagt-cosmic-vector.md\nLive demo: https://templates.michaelpitts.net/demos/kurzgesagt-cosmic-vector.html\nReal-world inspiration: Kurzgesagt (https://kurzgesagt.org/)\n\nCore aesthetic: 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.\nPalette: canvas: #0B1026 (Deep Space Indigo), surface: #151D42 (Nebula Twilight), ink: #F4F7FF (Starlight White), accent: #FF5E7E (Supernova Coral), muted: #8E9CC7 (Orbit Periwinkle)\nTypography: Display=\"Baloo 2, sans-serif\", Body=\"Plus Jakarta Sans, -apple-system, sans-serif\", Mono=\"JetBrains Mono, ui-monospace, monospace\"\nLayout: 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.\nInteractions: 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.\nMobile: Vector diorama scales cleanly to 390px with a chunky >=44px range slider and quick-jump scale pills underneath.\n\nGuardrails:\n- DO: Build illustrations from crisp geometric flat-vector shapes with clean layered shadows rather than muddy blurs.\n- DO: Use deep indigo (#0B1026) instead of flat #000000 so luminous coral, cyan, and gold vectors pop.\n- DO: Pair playful visual whimsy with genuinely informative, structured micro-facts.\n- DON'T: Do not fall into generic purple-blue SaaS glassmorphism.\n- DON'T: Do not use photorealistic stock space backgrounds behind flat geometric vectors.",
  "sourceCode": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>Nutshell Cosmos — Playful Vector Science &amp; Cosmic Scale</title>\n  <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n  <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n  <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\">\n  <style>\n    :root {\n      --bg: #0B1026;\n      --surface: #151D42;\n      --surface-hi: #1D2859;\n      --ink: #F4F7FF;\n      --accent: #FF5E7E;\n      --cyan: #38E4FF;\n      --gold: #FFD15C;\n      --violet: #9B72FF;\n      --muted: #8E9CC7;\n    }\n\n    *, *::before, *::after {\n      box-sizing: border-box;\n    }\n\n    html, body {\n      margin: 0;\n      padding: 0;\n      background-color: var(--bg);\n      color: var(--ink);\n      font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;\n      line-height: 1.55;\n      overflow-x: hidden;\n    }\n\n    body {\n      background-image:\n        radial-gradient(2px 2px at 14% 18%, rgba(255, 255, 255, 0.7), transparent),\n        radial-gradient(2px 2px at 82% 12%, rgba(56, 228, 255, 0.7), transparent),\n        radial-gradient(1.5px 1.5px at 42% 32%, rgba(255, 209, 92, 0.6), transparent),\n        radial-gradient(2px 2px at 74% 58%, rgba(255, 94, 126, 0.55), transparent),\n        radial-gradient(600px 420px at 85% 8%, rgba(155, 114, 255, 0.22), transparent 65%),\n        radial-gradient(520px 360px at 10% 24%, rgba(56, 228, 255, 0.14), transparent 65%);\n      background-repeat: no-repeat;\n    }\n\n    h1, h2, h3, .baloo {\n      font-family: 'Baloo 2', system-ui, sans-serif;\n      margin: 0;\n      line-height: 1.08;\n    }\n\n    .mono {\n      font-family: 'JetBrains Mono', ui-monospace, monospace;\n    }\n\n    a {\n      color: inherit;\n      text-decoration: none;\n    }\n\n    button {\n      font-family: inherit;\n      cursor: pointer;\n      border: none;\n      background: transparent;\n      color: inherit;\n    }\n\n    .container {\n      width: 100%;\n      max-width: 1120px;\n      margin: 0 auto;\n      padding: 0 20px;\n    }\n\n    /* Header */\n    header {\n      position: sticky;\n      top: 0;\n      z-index: 50;\n      background: rgba(11, 16, 38, 0.88);\n      backdrop-filter: blur(10px);\n      border-bottom: 1px solid rgba(142, 156, 199, 0.2);\n    }\n\n    .nav-bar {\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n      min-height: 74px;\n      gap: 16px;\n    }\n\n    .brand {\n      display: inline-flex;\n      align-items: center;\n      gap: 12px;\n      font-family: 'Baloo 2', sans-serif;\n      font-size: 1.55rem;\n      font-weight: 800;\n    }\n\n    .nav-links {\n      display: flex;\n      align-items: center;\n      gap: 24px;\n    }\n\n    .nav-links a {\n      color: var(--muted);\n      font-weight: 700;\n      min-height: 44px;\n      display: inline-flex;\n      align-items: center;\n      transition: color 0.18s;\n    }\n\n    .nav-links a:hover {\n      color: var(--cyan);\n    }\n\n    .cosmic-btn {\n      display: inline-flex;\n      align-items: center;\n      justify-content: center;\n      gap: 8px;\n      min-height: 46px;\n      min-width: 46px;\n      padding: 10px 22px;\n      border-radius: 999px;\n      font-weight: 700;\n      background: linear-gradient(135deg, var(--accent), #FF8A5B);\n      color: #FFF;\n      box-shadow: 0 8px 24px rgba(255, 94, 126, 0.35);\n      transition: transform 0.16s, box-shadow 0.16s;\n    }\n\n    .cosmic-btn:hover {\n      transform: translateY(-2px);\n      box-shadow: 0 12px 28px rgba(255, 94, 126, 0.45);\n    }\n\n    .cosmic-btn.ghost {\n      background: var(--surface);\n      border: 2px solid rgba(56, 228, 255, 0.35);\n      box-shadow: none;\n    }\n\n    .menu-btn {\n      display: none;\n      width: 44px;\n      height: 44px;\n      border-radius: 12px;\n      background: var(--surface);\n      border: 1.5px solid rgba(142, 156, 199, 0.3);\n      align-items: center;\n      justify-content: center;\n    }\n\n    .mobile-drawer {\n      display: none;\n      flex-direction: column;\n      gap: 10px;\n      padding: 14px 20px 20px;\n      background: var(--surface);\n      border-bottom: 1px solid rgba(142, 156, 199, 0.25);\n    }\n\n    .mobile-drawer.open {\n      display: flex;\n    }\n\n    .mobile-drawer a {\n      min-height: 44px;\n      display: flex;\n      align-items: center;\n      padding: 8px 14px;\n      border-radius: 12px;\n      background: rgba(11, 16, 38, 0.5);\n      font-weight: 700;\n    }\n\n    /* Hero */\n    .hero {\n      padding: 46px 0 42px;\n    }\n\n    .hero-grid {\n      display: grid;\n      grid-template-columns: 1.05fr 0.95fr;\n      gap: 36px;\n      align-items: center;\n    }\n\n    .eyebrow {\n      display: inline-flex;\n      align-items: center;\n      gap: 8px;\n      padding: 6px 14px;\n      border-radius: 999px;\n      background: rgba(56, 228, 255, 0.12);\n      border: 1px solid rgba(56, 228, 255, 0.35);\n      color: var(--cyan);\n      font-family: 'JetBrains Mono', monospace;\n      font-size: 0.78rem;\n      font-weight: 700;\n      margin-bottom: 16px;\n    }\n\n    .hero h1 {\n      font-size: clamp(2.4rem, 5.4vw, 4rem);\n      margin-bottom: 16px;\n    }\n\n    .grad-text {\n      background: linear-gradient(90deg, var(--cyan), var(--accent), var(--gold));\n      -webkit-background-clip: text;\n      background-clip: text;\n      color: transparent;\n    }\n\n    .hero p {\n      color: var(--muted);\n      font-size: 1.1rem;\n      margin: 0 0 26px;\n      max-width: 50ch;\n    }\n\n    .hero-btns {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 12px;\n    }\n\n    .planet-stage {\n      display: flex;\n      justify-content: center;\n      align-items: center;\n    }\n\n    /* Interactive Scale of the Universe Widget */\n    .section {\n      padding: 44px 0;\n    }\n\n    .scale-lab {\n      background: var(--surface);\n      border: 2px solid rgba(142, 156, 199, 0.25);\n      border-radius: 30px;\n      padding: 32px;\n      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);\n    }\n\n    .scale-top {\n      display: flex;\n      flex-wrap: wrap;\n      justify-content: space-between;\n      align-items: flex-end;\n      gap: 16px;\n      margin-bottom: 24px;\n    }\n\n    .scale-readout {\n      background: var(--bg);\n      border: 1.5px solid rgba(56, 228, 255, 0.4);\n      border-radius: 14px;\n      padding: 10px 16px;\n      color: var(--cyan);\n      font-family: 'JetBrains Mono', monospace;\n      font-size: 0.95rem;\n      font-weight: 700;\n    }\n\n    .scale-grid {\n      display: grid;\n      grid-template-columns: 0.95fr 1.05fr;\n      gap: 28px;\n      align-items: center;\n    }\n\n    .scale-viewport {\n      background: radial-gradient(circle at 50% 50%, #1E2A5E 0%, #0B1026 75%);\n      border-radius: 24px;\n      border: 2px solid rgba(142, 156, 199, 0.22);\n      height: 270px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      overflow: hidden;\n      position: relative;\n    }\n\n    .scale-info h3 {\n      font-size: 2rem;\n      margin-bottom: 8px;\n    }\n\n    .scale-tag {\n      display: inline-block;\n      background: rgba(255, 94, 126, 0.16);\n      color: var(--accent);\n      border-radius: 999px;\n      padding: 4px 12px;\n      font-family: 'JetBrains Mono', monospace;\n      font-size: 0.78rem;\n      font-weight: 700;\n      margin-bottom: 12px;\n    }\n\n    .scale-info p {\n      color: var(--muted);\n      margin: 0 0 18px;\n    }\n\n    .fact-callout {\n      background: rgba(11, 16, 38, 0.65);\n      border-left: 4px solid var(--gold);\n      border-radius: 0 14px 14px 0;\n      padding: 12px 16px;\n      font-size: 0.94rem;\n    }\n\n    .slider-controls {\n      margin-top: 26px;\n      background: rgba(11, 16, 38, 0.55);\n      border-radius: 20px;\n      padding: 18px 20px;\n    }\n\n    input[type=\"range\"] {\n      width: 100%;\n      accent-color: var(--accent);\n      height: 12px;\n      cursor: pointer;\n    }\n\n    .stop-buttons {\n      display: grid;\n      grid-template-columns: repeat(5, 1fr);\n      gap: 8px;\n      margin-top: 14px;\n    }\n\n    .stop-btn {\n      min-height: 44px;\n      padding: 6px 8px;\n      border-radius: 12px;\n      background: var(--surface);\n      border: 1.5px solid rgba(142, 156, 199, 0.25);\n      color: var(--muted);\n      font-size: 0.82rem;\n      font-weight: 700;\n      transition: all 0.15s;\n    }\n\n    .stop-btn.active {\n      background: var(--accent);\n      border-color: var(--accent);\n      color: #FFF;\n    }\n\n    /* Episode Deck */\n    .deck-head {\n      display: flex;\n      flex-wrap: wrap;\n      justify-content: space-between;\n      align-items: center;\n      gap: 16px;\n      margin-bottom: 24px;\n    }\n\n    .filter-row {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 8px;\n    }\n\n    .filter-pill {\n      min-height: 44px;\n      padding: 8px 16px;\n      border-radius: 999px;\n      background: var(--surface);\n      color: var(--muted);\n      font-weight: 700;\n      border: 1.5px solid rgba(142, 156, 199, 0.25);\n    }\n\n    .filter-pill.active {\n      background: var(--cyan);\n      color: #0B1026;\n      border-color: var(--cyan);\n    }\n\n    .episodes-grid {\n      display: grid;\n      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n      gap: 22px;\n    }\n\n    .ep-card {\n      background: var(--surface);\n      border-radius: 24px;\n      overflow: hidden;\n      border: 1.5px solid rgba(142, 156, 199, 0.22);\n      display: flex;\n      flex-direction: column;\n      transition: transform 0.18s ease, border-color 0.18s ease;\n    }\n\n    .ep-card:hover {\n      transform: translateY(-4px);\n      border-color: var(--cyan);\n    }\n\n    .ep-art {\n      height: 158px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      padding: 16px;\n    }\n\n    .ep-body {\n      padding: 20px;\n      display: flex;\n      flex-direction: column;\n      gap: 8px;\n      flex: 1;\n    }\n\n    .ep-meta {\n      display: flex;\n      justify-content: space-between;\n      font-family: 'JetBrains Mono', monospace;\n      font-size: 0.74rem;\n      color: var(--cyan);\n    }\n\n    .ep-body h3 {\n      font-size: 1.38rem;\n    }\n\n    .ep-body p {\n      margin: 0;\n      color: var(--muted);\n      font-size: 0.94rem;\n    }\n\n    footer {\n      margin-top: 48px;\n      border-top: 1px solid rgba(142, 156, 199, 0.2);\n      padding: 34px 0 46px;\n      color: var(--muted);\n    }\n\n    .footer-inner {\n      display: flex;\n      flex-wrap: wrap;\n      justify-content: space-between;\n      align-items: center;\n      gap: 16px;\n    }\n\n    @media (max-width: 820px) {\n      .hero-grid, .scale-grid {\n        grid-template-columns: 1fr;\n      }\n      .nav-links, .nav-cta {\n        display: none;\n      }\n      .menu-btn {\n        display: inline-flex;\n      }\n      .stop-buttons {\n        grid-template-columns: repeat(2, 1fr);\n      }\n      .scale-lab {\n        padding: 22px 18px;\n      }\n    }\n  </style>\n</head>\n<body>\n  <header>\n    <div class=\"container nav-bar\">\n      <a href=\"#top\" class=\"brand\">\n        <svg width=\"36\" height=\"36\" viewBox=\"0 0 40 40\" fill=\"none\" aria-hidden=\"true\">\n          <circle cx=\"20\" cy=\"20\" r=\"16\" fill=\"#1D2859\" stroke=\"#38E4FF\" stroke-width=\"2.5\"/>\n          <circle cx=\"20\" cy=\"20\" r=\"9\" fill=\"#FF5E7E\"/>\n          <ellipse cx=\"20\" cy=\"20\" rx=\"18\" ry=\"6\" transform=\"rotate(-22 20 20)\" stroke=\"#FFD15C\" stroke-width=\"2.5\"/>\n        </svg>\n        <span>Nutshell Cosmos</span>\n      </a>\n\n      <nav class=\"nav-links\" aria-label=\"Main\">\n        <a href=\"#scale\">Scale Explorer</a>\n        <a href=\"#episodes\">Episodes</a>\n      </nav>\n\n      <div class=\"nav-cta\">\n        <a href=\"#scale\" class=\"cosmic-btn\">Zoom The Universe</a>\n      </div>\n\n      <button class=\"menu-btn\" id=\"menuBtn\" aria-expanded=\"false\" aria-controls=\"mobileDrawer\" aria-label=\"Open menu\">\n        <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#F4F7FF\" stroke-width=\"2.4\" stroke-linecap=\"round\">\n          <path d=\"M4 7h16M4 12h16M4 17h16\"/>\n        </svg>\n      </button>\n    </div>\n\n    <div class=\"mobile-drawer\" id=\"mobileDrawer\">\n      <a href=\"#scale\">Scale Explorer</a>\n      <a href=\"#episodes\">Episodes</a>\n    </div>\n  </header>\n\n  <main id=\"top\">\n    <section class=\"hero\">\n      <div class=\"container hero-grid\">\n        <div>\n          <span class=\"eyebrow\">● EPISODE 184 &bull; OPTIMISTIC SCIENCE</span>\n          <h1>Big cosmic questions explained with <span class=\"grad-text\">flat vectors &amp; ducks.</span></h1>\n          <p>\n            From subatomic quarks to supermassive black holes, we turn existential astrophysics and cellular biology into colorful, bite-sized visual stories.\n          </p>\n          <div class=\"hero-btns\">\n            <a href=\"#scale\" class=\"cosmic-btn\">Launch Scale Slider</a>\n            <a href=\"#episodes\" class=\"cosmic-btn ghost\">Browse Episodes</a>\n          </div>\n        </div>\n\n        <div class=\"planet-stage\">\n          <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\">\n            <!-- Nebula glow -->\n            <circle cx=\"160\" cy=\"130\" r=\"106\" fill=\"#9B72FF\" opacity=\"0.16\"/>\n            <circle cx=\"160\" cy=\"130\" r=\"82\" fill=\"#38E4FF\" opacity=\"0.14\"/>\n            <!-- Back Ring -->\n            <ellipse cx=\"160\" cy=\"138\" rx=\"126\" ry=\"30\" transform=\"rotate(-16 160 138)\" stroke=\"#FFD15C\" stroke-width=\"8\" stroke-dasharray=\"14 8\"/>\n            <!-- Planet Core -->\n            <circle cx=\"160\" cy=\"130\" r=\"64\" fill=\"#FF5E7E\"/>\n            <!-- Layered Geometric Continent Bands -->\n            <path d=\"M104 108h68a10 10 0 010 20h-74c1-7 3-14 6-20z\" fill=\"#FF8A5B\"/>\n            <path d=\"M126 144h88a9 9 0 01-2 18h-86a9 9 0 010-18z\" fill=\"#9B72FF\" opacity=\"0.7\"/>\n            <circle cx=\"186\" cy=\"104\" r=\"11\" fill=\"#FFD15C\"/>\n            <!-- Space Duck Mascot Perched on Top -->\n            <g transform=\"translate(132, 34)\">\n              <circle cx=\"28\" cy=\"24\" r=\"22\" fill=\"#38E4FF\" opacity=\"0.28\" stroke=\"#38E4FF\" stroke-width=\"2\"/>\n              <ellipse cx=\"26\" cy=\"31\" rx=\"14\" ry=\"10\" fill=\"#FFD15C\"/>\n              <circle cx=\"32\" cy=\"19\" r=\"9\" fill=\"#FFD15C\"/>\n              <polygon points=\"40,18 49,21 40,24\" fill=\"#FF5E7E\"/>\n              <circle cx=\"34\" cy=\"17\" r=\"2\" fill=\"#0B1026\"/>\n            </g>\n            <!-- Orbiting Mini Moon -->\n            <circle cx=\"52\" cy=\"84\" r=\"12\" fill=\"#38E4FF\"/>\n            <circle cx=\"266\" cy=\"178\" r=\"8\" fill=\"#FFD15C\"/>\n          </svg>\n        </div>\n      </div>\n    </section>\n\n    <section class=\"section\" id=\"scale\">\n      <div class=\"container\">\n        <div class=\"scale-lab\">\n          <div class=\"scale-top\">\n            <div>\n              <span class=\"mono\" style=\"color:var(--accent); font-size:0.8rem; font-weight:700;\">INTERACTIVE ZOOM</span>\n              <h2 style=\"font-size:clamp(1.8rem, 4vw, 2.7rem);\">Scale of the Universe</h2>\n            </div>\n            <div class=\"scale-readout\" id=\"scaleMetric\">0.45 meters</div>\n          </div>\n\n          <div class=\"scale-grid\">\n            <div class=\"scale-viewport\" id=\"scaleViewport\" aria-live=\"polite\">\n              <!-- Dynamic SVG injected by JS -->\n            </div>\n\n            <div class=\"scale-info\">\n              <span class=\"scale-tag\" id=\"scaleCategory\">EVERYDAY SCALE</span>\n              <h3 id=\"scaleTitle\">Curious Duck</h3>\n              <p id=\"scaleDesc\">\n                Our standard scientific unit of measurement. Roughly 45 centimeters tall and completely unbothered by quantum mechanics.\n              </p>\n              <div class=\"fact-callout\" id=\"scaleFact\">\n                <strong>Cosmic Note:</strong> You would need about 28 million ducks stacked beak-to-tail to span Earth's diameter.\n              </div>\n            </div>\n          </div>\n\n          <div class=\"slider-controls\">\n            <label for=\"scaleSlider\" class=\"mono\" style=\"display:block; font-size:0.8rem; color:var(--muted); margin-bottom:8px;\">\n              DRAG TO ZOOM ACROSS 28 ORDERS OF MAGNITUDE\n            </label>\n            <input type=\"range\" id=\"scaleSlider\" min=\"0\" max=\"4\" step=\"1\" value=\"2\" aria-label=\"Scale of the Universe zoom level\">\n            <div class=\"stop-buttons\">\n              <button class=\"stop-btn\" data-stop=\"0\">Quark</button>\n              <button class=\"stop-btn\" data-stop=\"1\">Cell</button>\n              <button class=\"stop-btn active\" data-stop=\"2\">Duck</button>\n              <button class=\"stop-btn\" data-stop=\"3\">Earth</button>\n              <button class=\"stop-btn\" data-stop=\"4\">Black Hole</button>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n\n    <section class=\"section\" id=\"episodes\">\n      <div class=\"container\">\n        <div class=\"deck-head\">\n          <div>\n            <span class=\"mono\" style=\"color:var(--cyan); font-size:0.8rem; font-weight:700;\">FEATURED EXPLAINERS</span>\n            <h2 style=\"font-size:clamp(1.8rem, 4vw, 2.6rem);\">Episode Deck</h2>\n          </div>\n          <div class=\"filter-row\" role=\"tablist\" aria-label=\"Filter episodes\">\n            <button class=\"filter-pill active\" data-filter=\"all\">All</button>\n            <button class=\"filter-pill\" data-filter=\"space\">Space</button>\n            <button class=\"filter-pill\" data-filter=\"biology\">Biology</button>\n            <button class=\"filter-pill\" data-filter=\"philosophy\">Philosophy</button>\n          </div>\n        </div>\n\n        <div class=\"episodes-grid\" id=\"episodesGrid\">\n          <article class=\"ep-card\" data-topic=\"space\">\n            <div class=\"ep-art\" style=\"background:linear-gradient(135deg, #1B144A, #3C1E70);\">\n              <svg width=\"160\" height=\"120\" viewBox=\"0 0 160 120\" fill=\"none\">\n                <circle cx=\"80\" cy=\"60\" r=\"24\" fill=\"#FFD15C\"/>\n                <ellipse cx=\"80\" cy=\"60\" rx=\"58\" ry=\"18\" transform=\"rotate(24 80 60)\" stroke=\"#38E4FF\" stroke-width=\"5\" stroke-dasharray=\"10 6\"/>\n                <ellipse cx=\"80\" cy=\"60\" rx=\"58\" ry=\"18\" transform=\"rotate(-24 80 60)\" stroke=\"#FF5E7E\" stroke-width=\"5\" stroke-dasharray=\"10 6\"/>\n              </svg>\n            </div>\n            <div class=\"ep-body\">\n              <div class=\"ep-meta\"><span>SPACE</span><span>11:24</span></div>\n              <h3>How to Build a Dyson Swarm</h3>\n              <p>Harvesting the energy of an entire star by disassembling Mercury into orbiting solar mirrors.</p>\n            </div>\n          </article>\n\n          <article class=\"ep-card\" data-topic=\"biology\">\n            <div class=\"ep-art\" style=\"background:linear-gradient(135deg, #102B4A, #1B5A7A);\">\n              <svg width=\"160\" height=\"120\" viewBox=\"0 0 160 120\" fill=\"none\">\n                <circle cx=\"72\" cy=\"60\" r=\"34\" fill=\"#38E4FF\" opacity=\"0.28\"/>\n                <circle cx=\"72\" cy=\"60\" r=\"22\" fill=\"#38E4FF\"/>\n                <circle cx=\"66\" cy=\"56\" r=\"4\" fill=\"#0B1026\"/>\n                <circle cx=\"79\" cy=\"56\" r=\"4\" fill=\"#0B1026\"/>\n                <circle cx=\"118\" cy=\"46\" r=\"12\" fill=\"#FF5E7E\"/>\n                <circle cx=\"122\" cy=\"78\" r=\"9\" fill=\"#FFD15C\"/>\n              </svg>\n            </div>\n            <div class=\"ep-body\">\n              <div class=\"ep-meta\"><span>BIOLOGY</span><span>09:48</span></div>\n              <h3>The Microscopic Battlefield Inside You</h3>\n              <p>Meet the macrophage patrol squad defending trillions of cells every single second.</p>\n            </div>\n          </article>\n\n          <article class=\"ep-card\" data-topic=\"philosophy\">\n            <div class=\"ep-art\" style=\"background:linear-gradient(135deg, #2A123D, #5E1D4B);\">\n              <svg width=\"160\" height=\"120\" viewBox=\"0 0 160 120\" fill=\"none\">\n                <circle cx=\"80\" cy=\"66\" r=\"36\" fill=\"#FF5E7E\"/>\n                <circle cx=\"80\" cy=\"66\" r=\"22\" fill=\"#FFD15C\"/>\n                <circle cx=\"40\" cy=\"34\" r=\"5\" fill=\"#38E4FF\"/>\n                <circle cx=\"124\" cy=\"30\" r=\"7\" fill=\"#9B72FF\"/>\n                <circle cx=\"132\" cy=\"86\" r=\"4\" fill=\"#F4F7FF\"/>\n              </svg>\n            </div>\n            <div class=\"ep-body\">\n              <div class=\"ep-meta\"><span>PHILOSOPHY</span><span>06:32</span></div>\n              <h3>Optimistic Nihilism in 6 Minutes</h3>\n              <p>If the universe has no built-in script, every laugh, curiosity, and kindness is yours to invent.</p>\n            </div>\n          </article>\n        </div>\n      </div>\n    </section>\n  </main>\n\n  <footer>\n    <div class=\"container footer-inner\">\n      <strong class=\"baloo\" style=\"font-size:1.35rem; color:var(--ink);\">Nutshell Cosmos</strong>\n      <div class=\"mono\" style=\"font-size:0.8rem;\">Flat-vector science storytelling &bull; Zero existential dread guaranteed</div>\n    </div>\n  </footer>\n\n  <script>\n    // Mobile nav\n    const menuBtn = document.getElementById('menuBtn');\n    const mobileDrawer = document.getElementById('mobileDrawer');\n    menuBtn.addEventListener('click', () => {\n      const open = mobileDrawer.classList.toggle('open');\n      menuBtn.setAttribute('aria-expanded', String(open));\n    });\n    mobileDrawer.querySelectorAll('a').forEach(a => {\n      a.addEventListener('click', () => {\n        mobileDrawer.classList.remove('open');\n        menuBtn.setAttribute('aria-expanded', 'false');\n      });\n    });\n\n    // Interactive Scale of the Universe\n    const scales = [\n      {\n        name: 'Up & Down Quarks',\n        category: 'QUANTUM REALM',\n        metric: '10⁻¹⁸ meters',\n        desc: 'Point-like fundamental building blocks locked inside protons and neutrons by elastic gluon fields.',\n        fact: '<strong>Cosmic Note:</strong> Pull two quarks apart and the energy snaps into brand-new quarks instead of freeing them.',\n        svg: `<svg width=\"210\" height=\"210\" viewBox=\"0 0 210 210\" fill=\"none\">\n          <circle cx=\"105\" cy=\"105\" r=\"78\" stroke=\"#9B72FF\" stroke-width=\"3\" stroke-dasharray=\"8 8\"/>\n          <path d=\"M105 56 L148 134 L62 134 Z\" stroke=\"#38E4FF\" stroke-width=\"4\" fill=\"rgba(56,228,255,0.12)\"/>\n          <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>\n          <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>\n          <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>\n        </svg>`\n      },\n      {\n        name: 'Human Cell',\n        category: 'MICROSCOPIC CITY',\n        metric: '10⁻⁵ meters (20 µm)',\n        desc: 'A bustling walled metropolis packed with ribosomes, protein highways, and mitochondria power plants.',\n        fact: '<strong>Cosmic Note:</strong> Your body runs roughly 37 trillion of these glowing factories in parallel right now.',\n        svg: `<svg width=\"210\" height=\"210\" viewBox=\"0 0 210 210\" fill=\"none\">\n          <circle cx=\"105\" cy=\"105\" r=\"82\" fill=\"#38E4FF\" opacity=\"0.2\" stroke=\"#38E4FF\" stroke-width=\"5\"/>\n          <circle cx=\"105\" cy=\"105\" r=\"34\" fill=\"#9B72FF\"/>\n          <circle cx=\"105\" cy=\"105\" r=\"15\" fill=\"#FF5E7E\"/>\n          <ellipse cx=\"62\" cy=\"70\" rx=\"14\" ry=\"8\" transform=\"rotate(-35 62 70)\" fill=\"#FFD15C\"/>\n          <ellipse cx=\"152\" cy=\"132\" rx=\"16\" ry=\"8\" transform=\"rotate(28 152 132)\" fill=\"#FFD15C\"/>\n          <circle cx=\"148\" cy=\"68\" r=\"7\" fill=\"#38E4FF\"/>\n          <circle cx=\"68\" cy=\"144\" r=\"8\" fill=\"#FF5E7E\"/>\n        </svg>`\n      },\n      {\n        name: 'Curious Duck',\n        category: 'EVERYDAY SCALE',\n        metric: '0.45 meters',\n        desc: 'Our standard scientific unit of measurement. Roughly 45 centimeters tall and completely unbothered by quantum mechanics.',\n        fact: '<strong>Cosmic Note:</strong> You would need about 28 million ducks stacked beak-to-tail to span Earth\\'s diameter.',\n        svg: `<svg width=\"210\" height=\"210\" viewBox=\"0 0 210 210\" fill=\"none\">\n          <circle cx=\"105\" cy=\"105\" r=\"76\" fill=\"#1D2859\"/>\n          <ellipse cx=\"98\" cy=\"130\" rx=\"46\" ry=\"30\" fill=\"#FFD15C\"/>\n          <circle cx=\"122\" cy=\"84\" r=\"28\" fill=\"#FFD15C\"/>\n          <polygon points=\"146,80 176,88 146,96\" fill=\"#FF5E7E\"/>\n          <circle cx=\"131\" cy=\"78\" r=\"5\" fill=\"#0B1026\"/>\n          <path d=\"M84 128c10-10 26-10 34 2\" stroke=\"#FF8A5B\" stroke-width=\"6\" stroke-linecap=\"round\"/>\n          <rect x=\"86\" y=\"158\" width=\"6\" height=\"16\" fill=\"#FF5E7E\"/>\n          <rect x=\"108\" y=\"158\" width=\"6\" height=\"16\" fill=\"#FF5E7E\"/>\n        </svg>`\n      },\n      {\n        name: 'Planet Earth',\n        category: 'PLANETARY SCALE',\n        metric: '1.27 × 10⁷ meters',\n        desc: 'A thin blue shell of liquid oceans and nitrogen air spinning at 1,670 km/h around an ordinary yellow star.',\n        fact: '<strong>Cosmic Note:</strong> Every human conversation, sandwich, and symphony in history has happened on this dot.',\n        svg: `<svg width=\"210\" height=\"210\" viewBox=\"0 0 210 210\" fill=\"none\">\n          <circle cx=\"105\" cy=\"105\" r=\"84\" fill=\"#38E4FF\" opacity=\"0.18\"/>\n          <circle cx=\"105\" cy=\"105\" r=\"68\" fill=\"#2A7BFF\"/>\n          <path d=\"M64 74h44a12 12 0 010 24H78a10 10 0 000 20h26a12 12 0 010 24H68\" fill=\"#4ADE80\"/>\n          <rect x=\"116\" y=\"114\" width=\"38\" height=\"22\" rx=\"11\" fill=\"#4ADE80\"/>\n          <rect x=\"52\" y=\"136\" width=\"44\" height=\"10\" rx=\"5\" fill=\"#F4F7FF\" opacity=\"0.85\"/>\n          <rect x=\"112\" y=\"64\" width=\"36\" height=\"9\" rx=\"4.5\" fill=\"#F4F7FF\" opacity=\"0.85\"/>\n        </svg>`\n      },\n      {\n        name: 'Supermassive Black Hole',\n        category: 'GALACTIC TITAN',\n        metric: '4 × 10¹⁰ meters',\n        desc: 'A gravitational abyss heavier than millions of suns, wrapped in a glowing ring of superheated accretion plasma.',\n        fact: '<strong>Cosmic Note:</strong> Even light cannot escape past its event horizon — yet it anchors the orbit of an entire galaxy.',\n        svg: `<svg width=\"210\" height=\"210\" viewBox=\"0 0 210 210\" fill=\"none\">\n          <ellipse cx=\"105\" cy=\"108\" rx=\"92\" ry=\"26\" transform=\"rotate(-14 105 108)\" fill=\"#FF5E7E\" opacity=\"0.35\"/>\n          <ellipse cx=\"105\" cy=\"108\" rx=\"82\" ry=\"18\" transform=\"rotate(-14 105 108)\" stroke=\"#FFD15C\" stroke-width=\"8\"/>\n          <circle cx=\"105\" cy=\"105\" r=\"46\" fill=\"#04060F\" stroke=\"#FF5E7E\" stroke-width=\"4\"/>\n          <path d=\"M52 120c32 10 74 4 106-14\" stroke=\"#FFD15C\" stroke-width=\"7\" stroke-linecap=\"round\"/>\n        </svg>`\n      }\n    ];\n\n    const slider = document.getElementById('scaleSlider');\n    const viewport = document.getElementById('scaleViewport');\n    const metricEl = document.getElementById('scaleMetric');\n    const catEl = document.getElementById('scaleCategory');\n    const titleEl = document.getElementById('scaleTitle');\n    const descEl = document.getElementById('scaleDesc');\n    const factEl = document.getElementById('scaleFact');\n    const stopBtns = Array.from(document.querySelectorAll('.stop-btn'));\n\n    function setScale(idx) {\n      const s = scales[idx];\n      slider.value = String(idx);\n      viewport.innerHTML = s.svg;\n      metricEl.textContent = s.metric;\n      catEl.textContent = s.category;\n      titleEl.textContent = s.name;\n      descEl.textContent = s.desc;\n      factEl.innerHTML = s.fact;\n      stopBtns.forEach(b => b.classList.toggle('active', Number(b.dataset.stop) === idx));\n    }\n\n    slider.addEventListener('input', (e) => setScale(Number(e.target.value)));\n    stopBtns.forEach(btn => btn.addEventListener('click', () => setScale(Number(btn.dataset.stop))));\n    setScale(2);\n\n    // Episode filters\n    const filterPills = document.querySelectorAll('.filter-pill');\n    const epCards = document.querySelectorAll('.ep-card');\n    filterPills.forEach(pill => {\n      pill.addEventListener('click', () => {\n        const topic = pill.dataset.filter;\n        filterPills.forEach(p => p.classList.toggle('active', p === pill));\n        epCards.forEach(card => {\n          card.style.display = (topic === 'all' || card.dataset.topic === topic) ? 'flex' : 'none';\n        });\n      });\n    });\n  </script>\n</body>\n</html>\n"
}
