/* ============================================================================
   PAPPUS NIGHT-GARDEN ARTICLE LAYOUT (inspired by Scrolltide templates/pappus)
   Shared by every /blog_posts/*.html article.
   - Animated canvas night garden: swaying wildflowers, drifting dandelion seeds,
     fireflies and a soft lamp glow behind the hero title.
   - Hero title with its second line set inside a glowing neon glass lamp pill.
   - Article body sits on a dark glass reading panel so long text stays readable.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

html { background: #04060a !important; }
body {
  /* Transparent so the fixed night-garden canvas (negative z-index) shows through */
  background: transparent !important;
  color: #cbd5e1;
}
body { overflow-x: hidden; }

#pp-garden {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: -5; pointer-events: none; display: block;
}

/* Hide the old stacked back buttons; replaced by the Pappus glass nav */
.back-btn { display: none !important; }

/* ── Glass top navigation ─────────────────────────────────────────────── */
.pp-nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 120;
  width: min(1120px, calc(100vw - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 14px 10px 20px;
  border-radius: 999px;
  background: rgba(8, 12, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-family: 'Inter', sans-serif;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.pp-nav.scrolled { background: rgba(6, 9, 13, 0.86); border-color: rgba(255, 255, 255, 0.14); }
.pp-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Instrument Serif', Georgia, serif; font-size: 22px; line-height: 1;
  color: #f5f2ea; text-decoration: none;
}
.pp-brand svg { width: 18px; height: 22px; }
.pp-links { display: flex; align-items: center; gap: 22px; }
.pp-links a {
  font-size: 13px; color: rgba(226, 232, 240, 0.72); text-decoration: none;
  transition: color 0.2s ease;
}
.pp-links a:hover, .pp-links a.on { color: #fff; }
.pp-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: #0b0f14 !important;
  font-size: 12.5px; font-weight: 600; text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pp-cta:hover { transform: translateY(-1px); background: #fff; }

/* ── Full-viewport hero ───────────────────────────────────────────────── */
body > main { padding-top: 0 !important; max-width: none !important; padding-left: 0 !important; padding-right: 0 !important; }

body > main > header.article-section {
  min-height: 100vh; min-height: 100dvh;
  max-width: 1040px; margin: 0 auto !important;
  padding: 104px 24px 26dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
body > main > header.article-section > .flex { justify-content: center; }
body > main > header .tag-pill {
  background: rgba(6, 10, 14, 0.55) !important;
  backdrop-filter: blur(6px);
}

body > main > header h1 {
  font-family: 'Instrument Serif', Georgia, serif !important;
  font-weight: 400 !important;
  font-size: clamp(38px, 5.2vw, 72px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.01em;
  color: #f8f6ef !important;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.75);
  margin-bottom: 22px !important;
}
body > main > header h1 br { display: block !important; }

/* Neon glass lamp pill around the second title line */
.pp-lamp {
  position: relative;
  display: inline-block;
  margin-top: 12px;
  padding: 0.04em 0.5em 0.12em;
  border-radius: 0.5em;
  font-size: 0.82em;
  white-space: nowrap;
  max-width: 100%;
  font-style: italic;
  color: #fffdf5;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -14px 30px rgba(180, 230, 220, 0.08),
    0 0 40px rgba(190, 240, 225, 0.22),
    0 0 120px rgba(160, 220, 210, 0.16);
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(205, 255, 240, 0.8),
    0 0 42px rgba(140, 230, 210, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: pp-flicker 6s infinite;
}
.pp-lamp::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(220, 255, 245, 0.9), transparent);
  filter: blur(1px);
}
@keyframes pp-flicker {
  0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; }
  20% { opacity: 0.72; }
  63% { opacity: 0.84; }
}

body > main > header .article-intro-line {
  color: rgba(210, 225, 222, 0.7) !important;
  text-align: center;
}
body > main > header p {
  max-width: 640px; margin-left: auto; margin-right: auto;
  color: rgba(226, 232, 240, 0.82) !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
body > main > header .font-mono { justify-content: center; color: rgba(203, 213, 225, 0.72) !important; }
body > main > header .mt-8.h-px { display: none; }

.pp-scroll-cue {
  margin-top: 34px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase; color: rgba(220, 235, 230, 0.6);
}
.pp-scroll-cue i {
  width: 1px; height: 34px;
  background: linear-gradient(180deg, rgba(220, 255, 245, 0.8), transparent);
  animation: pp-cue 2.2s ease-in-out infinite;
}
@keyframes pp-cue {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Glass reading panel ──────────────────────────────────────────────── */
.pp-reading {
  position: relative;
  max-width: 860px;
  margin: 0 auto 60px;
  padding: 54px clamp(22px, 5vw, 60px) 48px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(6, 9, 13, 0.9), rgba(5, 8, 12, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.55), 0 40px 100px rgba(0, 0, 0, 0.6);
}
.pp-reading::before {
  content: ''; position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    repeating-conic-gradient(rgba(240, 250, 245, 0.55) 0 2deg, transparent 2deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0 60%, transparent 62%);
  mask: radial-gradient(circle, #000 0 60%, transparent 62%);
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(200, 255, 240, 0.5));
}

.prose-article h2 { border-bottom-color: rgba(190, 240, 225, 0.14) !important; }
.highlight { color: #bff5e6 !important; background: rgba(140, 230, 210, 0.08) !important; }

body > footer {
  position: relative;
  background: rgba(4, 6, 10, 0.86);
}

#progress-bar { background: linear-gradient(90deg, #d9f99d, #99f6e4, #e9d5ff) !important; box-shadow: 0 0 12px rgba(190, 245, 225, 0.6) !important; }

.pp-reading pre, .pp-reading table { max-width: 100%; overflow-x: auto; display: block; }
.pp-reading img, .pp-reading svg { max-width: 100%; height: auto; }

@media (max-width: 760px) {
  .pp-nav { width: calc(100vw - 24px); padding: 8px 10px 8px 14px; top: max(12px, env(safe-area-inset-top)); }
  .pp-brand { font-size: 19px; }
  .pp-links a:not(.pp-cta) { display: none; }
  body > main > header.article-section { padding: 92px 16px 18dvh; }
  body > main > header h1 { font-size: clamp(30px, 8.8vw, 48px) !important; }
  .pp-lamp { white-space: normal; padding: 0.08em 0.42em 0.16em; }
  .pp-reading { border-radius: 20px; width: calc(100vw - 20px); margin: 0 auto 44px; padding: 40px 18px 34px; }
}
