/* ============================================================
   Cosmic Herald — "Observatory at night"
   Deep-space editorial theme
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #070b14;
  --bg-2:      #0a1020;
  --surface:   #0e1626;
  --surface-2: #121b30;
  --border:    rgba(125, 158, 214, 0.14);
  --border-2:  rgba(125, 158, 214, 0.24);

  /* Ink */
  --text:   #e9edf6;
  --text-2: #b6c0d4;
  --muted:  #7f8aa3;

  /* Accent — electron blue */
  --accent:      #4da3ff;
  --accent-soft: #8cc4ff;
  --accent-deep: #2f7be0;
  --glow: 0 0 0 1px rgba(77,163,255,.4), 0 0 24px -4px rgba(77,163,255,.55);

  /* Category spectrum */
  --c-missions:   #4da3ff;
  --c-astronomy:  #b58cff;
  --c-commercial: #34d6c8;
  --c-agencies:   #ffb454;
  --c-science:    #5fd47a;
  --c-stargazing: #ff6fb5;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1180px;
  --radius: 14px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.75);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Starfield + nebula atmosphere, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, rgba(77,163,255,.16), transparent 60%),
    radial-gradient(900px 620px at 8% 4%, rgba(181,140,255,.13), transparent 58%),
    radial-gradient(1200px 800px at 50% 120%, rgba(52,214,200,.07), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,.9), transparent),
    radial-gradient(1.2px 1.2px at 75% 22%, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 42% 62%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.6px 1.6px at 88% 70%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 12% 80%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.3px 1.3px at 60% 88%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 33% 14%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.1px 1.1px at 95% 40%, rgba(255,255,255,.6), transparent);
  background-repeat: no-repeat;
  opacity: .55;
  animation: twinkle 7s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity:.4 } 50% { opacity:.7 } }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }

::selection { background: rgba(77,163,255,.3); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  padding: .68rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #04101f;
  box-shadow: 0 8px 24px -10px rgba(77,163,255,.8);
}
.btn-primary:hover { transform: translateY(-2px); color: #04101f; box-shadow: 0 14px 34px -10px rgba(77,163,255,.95); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,11,20,.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 1.25rem;
  height: 70px;
}
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display); white-space: nowrap; flex: none; }
.logo-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  color: var(--accent);
}
.logo-mark svg { width: 30px; height: 30px; filter: drop-shadow(0 0 8px rgba(77,163,255,.5)); }
.logo-text {
  font-size: 1.32rem; font-weight: 600; letter-spacing: -.01em; color: var(--text);
  font-optical-sizing: auto;
}
.logo-accent { color: var(--accent); }
.logo-mark-img { height: 36px; width: auto; filter: drop-shadow(0 0 10px rgba(120,160,255,.35)); }
.footer-brand .logo-mark-img { height: 40px; }

.site-nav { display: flex; gap: .35rem; margin-left: .75rem; }
.site-nav a {
  color: var(--text-2); font-weight: 500; font-size: .9rem;
  padding: .45rem .7rem; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: rgba(125,158,214,.08); }

.header-search {
  margin-left: auto; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 .35rem 0 .6rem; height: 40px;
  transition: border-color .2s, box-shadow .2s;
}
.header-search:focus-within { border-color: var(--border-2); box-shadow: var(--glow); }
.header-search-btn { background: none; border: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0 .25rem; }
.header-search input {
  background: none; border: none; outline: none; color: var(--text);
  font-family: var(--font-body); font-size: .88rem; width: 130px; padding: 0 .4rem;
}
.header-search input::placeholder { color: var(--muted); }

.nav-cta { font-size: .85rem; padding: .55rem 1.05rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; padding: 1rem 24px 1.5rem; gap: .25rem; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.mobile-menu a { color: var(--text-2); padding: .65rem .25rem; border-bottom: 1px solid var(--border); }
.mobile-menu a:hover { color: var(--text); }
.mobile-menu-cta { color: var(--accent) !important; font-weight: 600; }
.mobile-search { display: flex; gap: .5rem; margin-bottom: .75rem; }
.mobile-search input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: .6rem .8rem; outline: none; }

/* ---------- Flash ---------- */
.flash-wrap { max-width: var(--maxw); margin: 1rem auto 0; padding: 0 24px; }
.flash { padding: .8rem 1.1rem; border-radius: 10px; margin-bottom: .5rem; font-size: .92rem; border: 1px solid var(--border-2); }
.flash-success { background: rgba(95,212,122,.1); border-color: rgba(95,212,122,.35); color: #b9f0c6; }
.flash-error { background: rgba(255,111,181,.1); border-color: rgba(255,111,181,.35); color: #ffc4e0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -180px; width: 900px; height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(77,163,255,.18), rgba(181,140,255,.07) 40%, transparent 70%);
  filter: blur(20px); pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 3.5rem; align-items: center; }
.kicker {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-soft); display: inline-block; margin-bottom: 1.1rem;
  padding: .35rem .7rem; border: 1px solid var(--border-2); border-radius: 999px;
  background: rgba(77,163,255,.06);
}
.hero-left h1 {
  font-family: var(--font-display); font-optical-sizing: auto;
  font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02;
  letter-spacing: -.025em; margin: 0 0 1.2rem;
  background: linear-gradient(180deg, #fff 35%, #b9cdf0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.18rem; color: var(--text-2); max-width: 36ch; margin: 0 0 1.8rem; line-height: 1.6; }

.signup-form { display: flex; gap: .6rem; flex-wrap: wrap; max-width: 440px; }
.signup-form input[type=email] {
  flex: 1 1 220px; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 999px; color: var(--text); padding: .72rem 1.1rem; font-size: .95rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.signup-form input[type=email]:focus { border-color: var(--accent); box-shadow: var(--glow); }
.signup-form input::placeholder { color: var(--muted); }
.hero-meta { font-size: .85rem; margin: .9rem 0 1.6rem; font-family: var(--font-mono); letter-spacing: .02em; }

.hero-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  font-size: .82rem; color: var(--text-2); padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(125,158,214,.05); transition: .2s;
}
.pill:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }

/* Hero latest panel */
.hero-right { position: relative; z-index: 1; }
.hero-latest-panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow);
}
.hero-latest-label {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem;
}
.hero-latest-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.3 } }
.hero-latest-list { list-style: none; margin: 0; padding: 0; }
.hero-latest-item { padding: .85rem 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .25rem; }
.hero-latest-item:first-child { border-top: none; padding-top: 0; }
.hero-latest-cat { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); }
.hero-latest-title { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; color: var(--text); font-weight: 500; }
.hero-latest-title:hover { color: var(--accent-soft); }
.hero-latest-time { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.hero-latest-more { display: inline-block; margin-top: 1rem; font-size: .85rem; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, rgba(14,22,38,.5), transparent); }
.section-eyebrow {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 1.25rem;
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.02em; margin: 0; color: var(--text); }
.link-arrow { font-size: .88rem; font-weight: 600; color: var(--accent); white-space: nowrap; transition: transform .2s; }
.link-arrow:hover { transform: translateX(3px); }

/* ---------- Featured ---------- */
.featured-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); transition: border-color .3s, transform .3s;
}
.featured-card:hover { border-color: var(--border-2); }
.featured-image-link, .featured-art { display: block; min-height: 340px; position: relative; overflow: hidden; }
.featured-image { width: 100%; height: 100%; object-fit: cover; }
.featured-content { padding: clamp(1.75rem, 3vw, 2.75rem); display: flex; flex-direction: column; }
.featured-headline { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 1rem 0 .85rem; font-weight: 600; }
.featured-headline a { color: var(--text); }
.featured-headline a:hover { color: var(--accent-soft); }
.featured-summary { color: var(--text-2); font-size: 1.05rem; margin: 0 0 1.5rem; }
.featured-cta { align-self: flex-start; margin-top: auto; }

/* Category chip */
.card-cat, .article-cat {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500; padding: .32rem .65rem; border-radius: 999px;
  color: var(--cat, var(--accent));
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 40%, transparent);
  background: color-mix(in srgb, var(--cat, var(--accent)) 12%, transparent);
}
.card-cat::before, .article-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cat, var(--accent)); box-shadow: 0 0 8px var(--cat, var(--accent)); }

.card-meta, .article-meta { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-meta .dot, .article-meta .dot { color: var(--border-2); }

/* ---------- Card grid ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--cat, var(--accent)) 50%, var(--border)); box-shadow: 0 22px 48px -24px color-mix(in srgb, var(--cat, var(--accent)) 60%, black); }
.card-image-link, .card-art { display: block; aspect-ratio: 16/9; overflow: hidden; position: relative; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-image { transform: scale(1.05); }
.card > .card-cat { margin: 1.1rem 1.2rem 0; }
.card h3 { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.25; letter-spacing: -.01em; margin: .7rem 1.2rem .55rem; font-weight: 600; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--cat, var(--accent-soft)); }
.card-summary { color: var(--text-2); font-size: .92rem; margin: 0 1.2rem 1rem; flex: 1; }
.card .card-meta { margin: 0 1.2rem 1.2rem; }

/* Generated cosmic "art" for image-less cards */
.cosmic-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--cat, var(--accent)) 55%, transparent), transparent 55%),
    radial-gradient(circle at 78% 70%, color-mix(in srgb, var(--cat, var(--accent)) 35%, transparent), transparent 50%),
    linear-gradient(135deg, var(--bg-2), #05080f);
}
.cosmic-art::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.4px 1.4px at 80% 55%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 40% 75%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 15% 60%, rgba(255,255,255,.7), transparent);
  background-repeat: no-repeat;
}
.cosmic-art .planet {
  position: absolute; right: 14%; bottom: -18%; width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cat, var(--accent)) 90%, white 10%), color-mix(in srgb, var(--cat, var(--accent)) 60%, black) 60%, #05070d 100%);
  box-shadow: inset -10px -12px 30px rgba(0,0,0,.55), 0 0 50px -8px color-mix(in srgb, var(--cat, var(--accent)) 70%, transparent);
}

/* ---------- CTA ---------- */
.section-cta .cta-card {
  text-align: center; background: linear-gradient(135deg, rgba(77,163,255,.12), rgba(181,140,255,.08));
  border: 1px solid var(--border-2); border-radius: 20px; padding: clamp(2rem, 5vw, 3.5rem);
  position: relative; overflow: hidden;
}
.cta-card h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 .6rem; color: var(--text); }
.cta-card p { color: var(--text-2); margin: 0 auto 1.5rem; max-width: 46ch; }
.signup-form-inline { justify-content: center; margin: 0 auto; }

/* ---------- Article page ---------- */
.article-page { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-family: var(--font-display); font-optical-sizing: auto; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -.025em; margin: 1.1rem 0 .9rem; font-weight: 600; color: #fff; }
.article-summary { font-size: 1.25rem; line-height: 1.55; color: var(--text-2); margin: 0 0 1.25rem; font-family: var(--font-display); font-weight: 400; }
.article-meta { margin-bottom: 1rem; }
.article-meta a { color: var(--accent-soft); }
.article-hero-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin: 1rem 0 .4rem; }
.article-hero-art { width: 100%; aspect-ratio: 21/9; position: relative; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin: 1rem 0 1.5rem; }
.article-image-credit { font-size: .76rem; color: var(--muted); font-family: var(--font-mono); }

.share-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 1.5rem 0; }
.share-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .25rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .42rem .85rem; cursor: pointer; transition: .2s;
}
.share-btn:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
.share-btn.copied { color: var(--c-science); border-color: rgba(95,212,122,.4); }

.article-body { font-size: 1.1rem; line-height: 1.78; color: var(--text-2); }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display); float: left; font-size: 3.6rem; line-height: .82; font-weight: 600;
  padding: .35rem .55rem 0 0; color: var(--accent);
}
.article-body p { margin: 0 0 1.4rem; }
.article-body h2 { font-family: var(--font-display); color: var(--text); font-size: 1.55rem; letter-spacing: -.015em; margin: 2.4rem 0 .9rem; font-weight: 600; }
.article-body h3 { font-family: var(--font-display); color: var(--text); font-size: 1.2rem; margin: 2rem 0 .8rem; font-weight: 600; }
.article-body a { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(140,196,255,.4); }
.article-body a:hover { text-decoration-color: var(--accent-soft); }
.article-body ul, .article-body ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.article-body li { margin-bottom: .6rem; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  margin: 1.8rem 0; padding: .5rem 0 .5rem 1.4rem; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.45; color: var(--text); font-style: italic;
}

.article-signup {
  margin: 2.5rem 0; padding: 1.75rem; text-align: center;
  background: linear-gradient(135deg, rgba(77,163,255,.1), rgba(181,140,255,.06));
  border: 1px solid var(--border-2); border-radius: var(--radius);
}
.article-signup h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 .4rem; color: var(--text); }
.article-signup p { color: var(--text-2); margin: 0 0 1.1rem; }

.related { margin: 2.5rem 0; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.related h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 1rem; color: var(--text); }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.related-list a { color: var(--text); font-family: var(--font-display); font-size: 1.05rem; }
.related-list a:hover { color: var(--accent-soft); }
.related-list .muted { font-family: var(--font-mono); font-size: .74rem; white-space: nowrap; }

/* ---------- Archive / category / search shared ---------- */
.page-head { padding: clamp(2.5rem,6vw,4rem) 0 1rem; text-align: center; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2rem,5vw,3rem); letter-spacing: -.02em; margin: 0 0 .5rem; color: #fff; }
.page-head p { color: var(--text-2); margin: 0; }
.pagination { display: flex; justify-content: center; gap: .5rem; margin: 2.5rem 0; }
.pagination a, .pagination span { padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--border); color: var(--text-2); font-size: .9rem; }
.pagination a:hover { border-color: var(--border-2); color: var(--text); }
.pagination .current { background: var(--accent); color: #04101f; border-color: var(--accent); font-weight: 600; }

/* Static content pages (about/privacy/terms/etc.) */
.prose { max-width: 760px; margin: 0 auto; padding: clamp(2rem,5vw,3.5rem) 24px; }
.prose h1 { font-family: var(--font-display); font-size: clamp(2rem,4vw,2.8rem); letter-spacing: -.02em; color: #fff; margin: 0 0 1rem; }
.prose h2 { font-family: var(--font-display); color: var(--text); margin: 2rem 0 .8rem; }
.prose p, .prose li { color: var(--text-2); line-height: 1.75; }
.prose a { color: var(--accent-soft); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; background: linear-gradient(180deg, transparent, rgba(10,16,32,.6)); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2rem; padding: 3rem 24px 2rem; max-width: var(--maxw); margin: 0 auto; }
.footer-brand .logo { margin-bottom: .9rem; }
.footer-brand .muted { font-size: .9rem; max-width: 30ch; }
.footer-links h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-soft); margin: 0 0 1rem; }
.footer-links a { display: block; color: var(--text-2); font-size: .9rem; padding: .25rem 0; }
.footer-links a:hover { color: var(--text); }
.signup-mini { display: flex; gap: .4rem; }
.signup-mini input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: .5rem .7rem; outline: none; font-size: .85rem; }
.signup-mini input:focus { border-color: var(--accent); }
.signup-mini .btn { padding: .5rem .9rem; font-size: .85rem; }
.footer-bottom { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom .muted { font-size: .8rem; }

/* ---------- Entrance animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.hero-left > * { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) backwards; }
.hero-left > *:nth-child(1) { animation-delay: .05s; }
.hero-left > *:nth-child(2) { animation-delay: .12s; }
.hero-left > *:nth-child(3) { animation-delay: .19s; }
.hero-left > *:nth-child(4) { animation-delay: .26s; }
.hero-left > *:nth-child(5) { animation-delay: .33s; }
.hero-left > *:nth-child(6) { animation-delay: .40s; }
.hero-right { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) .3s backwards; }
.card { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) backwards; }
.article-grid .card:nth-child(2) { animation-delay: .06s; }
.article-grid .card:nth-child(3) { animation-delay: .12s; }
.article-grid .card:nth-child(4) { animation-delay: .18s; }
.article-grid .card:nth-child(5) { animation-delay: .24s; }
.article-grid .card:nth-child(6) { animation-delay: .30s; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .site-nav, .header-search, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .mobile-menu[hidden] { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right { order: -1; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-image-link, .featured-art { min-height: 220px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-body > p:first-of-type::first-letter { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Add-ons: homepage widgets, launches, APOD, ISS
   ============================================================ */
.nav-live { color: var(--accent-soft) !important; }
.nav-live::before { content: "🚀 "; }

/* Homepage widgets */
.widgets-section { padding-top: 0; padding-bottom: clamp(1.5rem,4vw,2.5rem); }
.widgets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.widget {
  display: block; padding: 1.4rem 1.5rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.widget:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: 0 18px 40px -22px rgba(77,163,255,.6); }
.widget-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .9rem; }
.widget-eyebrow { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.widget-go { font-size: .78rem; color: var(--muted); }
.widget:hover .widget-go { color: var(--accent-soft); }
.widget-countdown { font-family: var(--font-mono); font-size: clamp(1.6rem,4vw,2.3rem); font-weight: 500; color: #fff; letter-spacing: .02em; margin-bottom: .5rem; text-shadow: 0 0 18px rgba(77,163,255,.4); }
.widget-launch-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); font-weight: 600; }
.widget-launch-mission { color: var(--text-2); font-size: .95rem; margin-top: .15rem; }
.widget-launch-meta { color: var(--muted); font-family: var(--font-mono); font-size: .76rem; margin-top: .5rem; }
.widget-moon { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.widget-moon-icon { font-size: 2.2rem; color: #e8ecf4; line-height: 1; filter: drop-shadow(0 0 10px rgba(255,255,255,.3)); }
.widget-moon strong { color: var(--text); font-family: var(--font-display); font-size: 1.1rem; }
.widget-planets { display: flex; flex-wrap: wrap; gap: .4rem; }
.widget-planet { font-size: .8rem; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .6rem; }
.widget-planet em { color: var(--accent-soft); font-style: normal; font-family: var(--font-mono); font-size: .72rem; }

/* Launch schedule */
.launch-list { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: l; }
.launch-row { display: grid; grid-template-columns: 200px 1fr; gap: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--border); }
.launch-row:first-child { border-top: none; }
.launch-when { display: flex; flex-direction: column; gap: .35rem; }
.launch-time { font-family: var(--font-mono); font-size: .82rem; color: var(--text); }
.launch-countdown { font-family: var(--font-mono); font-size: 1.05rem; color: var(--accent); font-weight: 500; }
.launch-countdown.past { color: var(--muted); font-size: .82rem; }
.launch-mission { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 .2rem; color: var(--text); }
.launch-rocket { color: var(--accent-soft); font-size: .92rem; margin-bottom: .5rem; }
.launch-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.launch-status { border: 1px solid var(--border-2); border-radius: 999px; padding: .1rem .55rem; color: var(--text-2); }

/* APOD */
.apod-figure { margin: 1.5rem 0 1.5rem; }
.apod-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.apod-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.apod-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.apod-credit { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); margin-top: .6rem; text-align: center; }
.apod-explanation { font-size: 1.08rem; }

/* ISS tracker */
.iss-map { position: relative; width: 100%; max-width: 960px; margin: 1.5rem auto 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.iss-map-img { width: 100%; display: block; filter: brightness(.7) saturate(1.1); }
.iss-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(77,163,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(77,163,255,.12) 1px, transparent 1px);
  background-size: 8.333% 16.666%; }
.iss-dot { position: absolute; transform: translate(-50%,-50%); font-size: 1.5rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(77,163,255,.9)); transition: left 1s linear, top 1s linear; z-index: 2; }
.iss-ping { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%,-50%); border-radius: 50%; border: 2px solid var(--accent); animation: issping 2s ease-out infinite; }
@keyframes issping { 0% { transform: translate(-50%,-50%) scale(.4); opacity: .9; } 100% { transform: translate(-50%,-50%) scale(1.8); opacity: 0; } }
.iss-readout { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; max-width: 960px; margin: 1.25rem auto 0; }
.iss-stat { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem .5rem; }
.iss-num { display: block; font-family: var(--font-mono); font-size: 1.3rem; color: #fff; font-weight: 500; }
.iss-lbl { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 720px) {
  .widgets-grid { grid-template-columns: 1fr; }
  .launch-row { grid-template-columns: 1fr; gap: .4rem; }
  .iss-readout { grid-template-columns: 1fr 1fr; }
}
