/* gcorzo.dev — Editorial Hydroinformatics (Light & Night Cosmos)
   Zero third-party CDNs, zero tracking cookies, progressive enhancement. */

:root {
  color-scheme: light dark;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, Cambria, serif;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Default: Light ("Daylight Cosmos") palette */
  --bg-top: #f7fafe;
  --bg-mid: #edf4fb;
  --bg-bot: #e4eef7;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-subtle: rgba(240, 246, 252, 0.82);
  --header-bg: rgba(248, 251, 255, 0.82);
  --border: rgba(21, 56, 92, 0.12);
  --border-strong: rgba(21, 56, 92, 0.22);
  --ink: #0f2236;
  --ink-muted: #3d5268;
  --ink-soft: #5c7086;
  --accent: #185e63;
  --accent-hover: #11474b;
  --accent-soft: rgba(24, 94, 99, 0.1);
  --primary: #102a45;
  --primary-ink: #ffffff;
  --primary-hover: #1b3f66;
  --badge-bg: rgba(16, 42, 69, 0.08);
  --badge-ink: #163a5c;
  --shadow-sm: 0 2px 10px rgba(15, 34, 54, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 34, 54, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 34, 54, 0.11);
  --focus: #1d6f75;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --max-w: 1080px;
}

/* Night ("Night Cosmos") palette when toggled via <meta name="color-scheme" content="dark"> */
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
  --bg-top: #091525;
  --bg-mid: #0e2036;
  --bg-bot: #132a44;
  --surface: rgba(16, 35, 58, 0.78);
  --surface-strong: rgba(13, 29, 49, 0.9);
  --surface-subtle: rgba(10, 23, 40, 0.72);
  --header-bg: rgba(9, 21, 37, 0.84);
  --border: rgba(168, 201, 232, 0.18);
  --border-strong: rgba(168, 201, 232, 0.34);
  --ink: #f4f7fb;
  --ink-muted: #c8dcf0;
  --ink-soft: #96b3cf;
  --accent: #6ed0d2;
  --accent-hover: #96e3e5;
  --accent-soft: rgba(110, 208, 210, 0.14);
  --primary: #f4f7fb;
  --primary-ink: #0c1f35;
  --primary-hover: #d8e8f8;
  --badge-bg: rgba(168, 201, 232, 0.14);
  --badge-ink: #d4e6f7;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.42);
  --focus: #8cd3ea;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}

/* Fallback class for browsers without :has() */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg-top: #091525;
  --bg-mid: #0e2036;
  --bg-bot: #132a44;
  --surface: rgba(16, 35, 58, 0.78);
  --surface-strong: rgba(13, 29, 49, 0.9);
  --surface-subtle: rgba(10, 23, 40, 0.72);
  --header-bg: rgba(9, 21, 37, 0.84);
  --border: rgba(168, 201, 232, 0.18);
  --border-strong: rgba(168, 201, 232, 0.34);
  --ink: #f4f7fb;
  --ink-muted: #c8dcf0;
  --ink-soft: #96b3cf;
  --accent: #6ed0d2;
  --accent-hover: #96e3e5;
  --accent-soft: rgba(110, 208, 210, 0.14);
  --primary: #f4f7fb;
  --primary-ink: #0c1f35;
  --primary-hover: #d8e8f8;
  --badge-bg: rgba(168, 201, 232, 0.14);
  --badge-ink: #d4e6f7;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.42);
  --focus: #8cd3ea;
}

/* Smooth cross-document navigation transitions */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bot) 100%);
  background-attachment: fixed;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* Skip link for keyboard accessibility */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-ink);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  inset-block-start: 0.75rem;
}

/* Fullscreen interactive cosmos backdrop */
#cosmos-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--badge-bg);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Theme toggle & mobile menu button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  min-width: 38px;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Theme icon visibility driven purely by theme state */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-flex; align-items: center; gap: 0.35rem; }

html[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; align-items: center; gap: 0.35rem; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-btn {
  display: none;
}

@media (max-width: 780px) {
  .menu-btn {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 1rem;
    inset-block-start: calc(100% + 0.5rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
  }
  .theme-label {
    display: none;
  }
}

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Layout Containers */
main {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.25rem);
  line-height: 1.13;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin: 0;
  color: var(--ink-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 62ch;
}

/* Hero & Page Headers */
.hero {
  padding: clamp(2.5rem, 7vh, 4.5rem) 0 2.5rem;
}

.hero-card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-lg);
}

.hero-card h1 {
  margin-top: 0.85rem;
  margin-bottom: 1.1rem;
  max-width: 22ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.hero-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  font-weight: 500;
}
.hero-meta a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.page-header {
  margin-bottom: 2.25rem;
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.page-header h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
}

/* Buttons & Chips */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.45rem 0.15rem;
  border-radius: 6px;
}
.btn-ghost:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
  transform: none;
}

.btn-sm {
  padding: 0.48rem 0.95rem;
  font-size: 0.84rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Sections & Cards */
.section {
  margin-top: 2.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-link-wrap {
  text-decoration: none;
  color: inherit;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.card p {
  margin-top: 0.55rem;
  font-size: 0.94rem;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Book Cards with visual cover spine */
.book-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1.35rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.book-cover {
  position: relative;
  width: 112px;
  aspect-ratio: 2 / 3;
  border-radius: 6px 10px 10px 6px;
  padding: 0.85rem 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f8fbff;
  box-shadow: inset 6px 0 0 rgba(255, 255, 255, 0.16), 4px 10px 22px rgba(10, 24, 42, 0.22);
  overflow: hidden;
  flex-shrink: 0;
}

.book-cover.tone-navy { background: linear-gradient(155deg, #0d233a 0%, #1d466d 100%); }
.book-cover.tone-teal { background: linear-gradient(155deg, #0f3a40 0%, #246869 100%); }
.book-cover.tone-slate { background: linear-gradient(155deg, #1b3148 0%, #3a5d7c 100%); }
.book-cover.tone-amber { background: linear-gradient(155deg, #2d2011 0%, #6d4c24 100%); }
.book-cover.tone-porcelain { background: linear-gradient(155deg, #21405e 0%, #4b7499 100%); }

.book-cover-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.82;
}

.book-cover-title {
  font-family: var(--font-serif);
  font-size: 0.84rem;
  line-height: 1.22;
  font-weight: 500;
}

.book-cover-author {
  font-size: 0.65rem;
  opacity: 0.78;
}

.book-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.book-subtitle {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 0.25rem;
}

.book-desc {
  font-size: 0.94rem;
  margin-top: 0.55rem;
}

@media (max-width: 560px) {
  .book-card {
    grid-template-columns: 1fr;
  }
  .book-cover {
    width: 96px;
  }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: var(--primary);
}

/* Friendly Directory List */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.link-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.link-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.link-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.link-tile-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.link-tile-domain {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent);
}

/* Bio / Split Grid */
.split-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

.prose p + p {
  margin-top: 1rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}
.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-note {
  width: 100%;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.privacy-note a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Helper icons */
.arrow-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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


/* =====================================================================
   Interactive Planetary Orrery Hero (words printed directly ON planets)
   ===================================================================== */
.orrery-hero {
  padding: 1.5rem 0 2rem;
}

.orrery-stage {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.orrery-tracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.orrery-tracks ellipse {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.1;
  stroke-dasharray: 4 7;
  opacity: 0.65;
}

.orrery-core {
  position: relative;
  z-index: 15;
  max-width: 470px;
  text-align: center;
  background: var(--surface-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 2rem 2.1rem;
  box-shadow: var(--shadow-lg);
}

.orrery-core h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0.55rem 0 0.75rem;
}

.orrery-core .lead {
  font-size: 0.98rem;
  margin: 0 auto;
}

.orrery-core .hero-meta {
  justify-content: center;
  margin-top: 1.1rem;
  padding-top: 1rem;
  font-size: 0.82rem;
  gap: 0.35rem 0.9rem;
}

/* Clickable Planet Orbs — words sit ON the sphere itself */
.planet-orb {
  position: absolute;
  width: var(--orb-size, 118px);
  height: var(--orb-size, 118px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    inset -12px -14px 24px rgba(4, 15, 30, 0.42),
    inset 8px 8px 18px rgba(255, 255, 255, 0.25),
    0 12px 28px rgba(10, 30, 54, 0.22);
  transition: box-shadow 0.22s ease, filter 0.22s ease;
  user-select: none;
  overflow: visible;
}

.planet-orb:hover,
.planet-orb:focus-visible {
  filter: brightness(1.08);
  box-shadow:
    inset -10px -12px 22px rgba(4, 15, 30, 0.34),
    inset 10px 10px 22px rgba(255, 255, 255, 0.38),
    0 0 0 4px var(--accent-soft),
    0 18px 38px rgba(10, 30, 54, 0.32);
  z-index: 25 !important;
}

.planet-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.planet-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.4rem;
  text-shadow: 0 1px 6px rgba(5, 16, 30, 0.72);
}

.planet-icon {
  width: 18px;
  height: 18px;
  opacity: 0.95;
  margin-bottom: 0.05rem;
}

.planet-word {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.planet-god {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.86;
}

/* Individual planetary sphere palettes (Daylight-friendly celestial Delft & mineral tones) */
.planet-mercury {
  --orb-size: 112px;
  background: radial-gradient(circle at 32% 28%, #8bbbe6 0%, #316496 58%, #163457 100%);
}
.planet-terra {
  --orb-size: 132px;
  background: radial-gradient(circle at 32% 28%, #6fb3e8 0%, #245f94 60%, #0f2f52 100%);
}
.planet-neptune {
  --orb-size: 136px;
  background: radial-gradient(circle at 32% 28%, #6ec5ce 0%, #1c6a7a 60%, #0c3242 100%);
}
.planet-mars {
  --orb-size: 110px;
  background: radial-gradient(circle at 32% 28%, #d29c76 0%, #8c4d32 60%, #4a2315 100%);
}
.planet-jupiter {
  --orb-size: 122px;
  background:
    repeating-linear-gradient(
      -12deg,
      rgba(255, 255, 255, 0.10) 0px,
      rgba(255, 255, 255, 0.10) 6px,
      rgba(15, 42, 72, 0.12) 6px,
      rgba(15, 42, 72, 0.12) 13px
    ),
    radial-gradient(circle at 30% 28%, #85a9cc 0%, #345c85 58%, #153150 100%);
}
.planet-saturn {
  --orb-size: 112px;
  background: radial-gradient(circle at 32% 28%, #c9b58f 0%, #7d6847 60%, #3d301d 100%);
}

/* Saturn orbital ring */
.planet-saturn::before {
  content: "";
  position: absolute;
  width: 170%;
  height: 40%;
  border-radius: 50%;
  border: 5px solid rgba(212, 194, 158, 0.62);
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 1;
}

.orrery-whisper {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  min-height: 1.5em;
}

.myth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.myth-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  font-size: 0.8rem;
  transition: border-color 0.18s ease, transform 0.16s ease;
}

.myth-pill:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.myth-pill strong {
  font-family: var(--font-serif);
  font-size: 0.94rem;
  color: var(--ink);
}

.myth-pill span {
  color: var(--ink-soft);
}

/* Responsive mobile fallback: crisp planetary grid with live 3D DEM & Globe */
@media (max-width: 820px) {
  .orrery-stage {
    min-height: auto;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;
  }
  .orrery-tracks {
    display: none;
  }
  .orrery-core {
    max-width: 100%;
    padding: 1.65rem 1.35rem;
  }
  .orrery-planets-wrap {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    justify-items: center;
    gap: 1.15rem;
    width: 100%;
  }
  .planet-orb {
    position: relative;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 106px;
    height: 106px;
  }
  .planet-word {
    font-size: 0.95rem;
  }
}

@media (max-width: 440px) {
  .orrery-planets-wrap {
    grid-template-columns: repeat(2, minmax(112px, 1fr));
  }
}

/* Medium Articles List */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.article-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.article-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.article-date {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.article-title {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.32;
  color: var(--ink);
  font-weight: 500;
}
