:root {
  --bg-deep: #05070f;
  --bg-surface: #0b1021;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(23, 34, 61, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(99, 102, 241, 0.45);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-card: 0 18px 40px -15px rgba(0, 0, 0, 0.65);
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hidden {
  display: none !important;
}

/* Starfield Canvas & Ambient Nebula Glows */
#starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

.cosmic-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -2;
  pointer-events: none;
  opacity: 0.35;
}

.glow-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #4f46e5, transparent 70%);
  top: -120px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0891b2, transparent 70%);
  bottom: -150px;
  right: -120px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.86rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.48);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: var(--accent-cyan);
}

.btn-ghost {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.32);
}

.btn-ghost:hover {
  background: rgba(99, 102, 241, 0.28);
  color: #ffffff;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 15, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #67e8f9;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.65rem);
  margin-bottom: 1.2rem;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: 1.15rem 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* Hero Orbit Animation */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.solar-orbit-widget {
  position: relative;
  width: 360px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-core {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fde68a, #f59e0b 60%, #b45309);
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.75);
  z-index: 2;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  animation: spin linear infinite;
}

.ring-1 { width: 145px; height: 145px; animation-duration: 12s; }
.ring-2 { width: 235px; height: 235px; animation-duration: 22s; }
.ring-3 { width: 330px; height: 330px; animation-duration: 34s; }

.planet {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}

.p-1 {
  width: 12px;
  height: 12px;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
}

.p-2 {
  width: 16px;
  height: 16px;
  background: #818cf8;
  box-shadow: 0 0 14px #818cf8;
}

.p-3 {
  width: 20px;
  height: 20px;
  background: #fbbf24;
  top: -10px;
}

.planet-ring {
  position: absolute;
  width: 34px;
  height: 10px;
  border: 2px solid rgba(253, 230, 138, 0.8);
  border-radius: 50%;
  top: 5px;
  left: -7px;
  transform: rotate(-20deg);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(99, 102, 241, 0.4);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  z-index: 4;
}

.floating-card strong {
  display: block;
  font-size: 0.84rem;
  font-family: var(--font-display);
}

.floating-card small {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.fc-icon {
  font-size: 1.4rem;
}

.card-top { top: 14px; right: -8px; }
.card-bottom { bottom: 18px; left: -10px; }

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(11, 16, 33, 0.45) 0%, rgba(15, 23, 42, 0.72) 50%, rgba(11, 16, 33, 0.45) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.75rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  margin-bottom: 0.6rem;
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  margin-bottom: 0.85rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.02rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

.search-box {
  position: relative;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 0.85rem 1.2rem 0.85rem 2.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.pill:hover {
  border-color: var(--accent-indigo);
  color: #ffffff;
}

.pill.active {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.reset-filter-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

/* Cosmic Object Cards Grid */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cosmic-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
  box-shadow: var(--shadow-card);
}

.cosmic-card:hover, .cosmic-card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 22px 45px -12px rgba(99, 102, 241, 0.28);
  outline: none;
}

.card-art {
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.85), #05070f);
  border-bottom: 1px solid var(--border-subtle);
}

.card-art svg {
  width: 124px;
  height: 124px;
  transition: transform 0.45s ease;
}

.cosmic-card:hover .card-art svg {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(5, 7, 15, 0.76);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  color: #bae6fd;
  backdrop-filter: blur(6px);
}

.card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-nickname {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  flex: 1;
}

.card-analogy-preview {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--accent-indigo);
  font-size: 0.82rem;
  color: #e0e7ff;
  margin-bottom: 1.1rem;
}

.card-footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Glass Panel */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
}

/* Scale Explorer */
.scale-controls {
  margin-bottom: 2rem;
}

.scale-step-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.scale-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.scale-btn.active {
  background: var(--accent-cyan);
  color: #05070f;
  border-color: var(--accent-cyan);
}

.scale-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
  height: 8px;
}

.scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.scale-display {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.scale-visual-box {
  height: 250px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, rgba(14, 116, 144, 0.22), #05070f);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.scale-circle {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: #ffffff;
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.35);
}

.scale-info h3 {
  font-size: 1.65rem;
  margin-bottom: 0.4rem;
}

.scale-diameter {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-bottom: 0.9rem;
}

.scale-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.scale-analogy-box {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.12);
  border-left: 3px solid var(--accent-cyan);
  font-size: 0.92rem;
  color: #cffafe;
}

/* Glossary Grid */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.glossary-card {
  padding: 1.4rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.25s;
}

.glossary-card:hover {
  border-color: var(--accent-cyan);
}

.glossary-term {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.glossary-term h3 {
  font-size: 1.15rem;
  color: #ffffff;
}

.glossary-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.glossary-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.glossary-example {
  font-size: 0.84rem;
  color: #a5f3fc;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

/* Quiz Section */
.quiz-container {
  max-width: 780px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.quiz-question {
  font-size: 1.3rem;
  margin-bottom: 1.35rem;
}

.quiz-options {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.quiz-option {
  width: 100%;
  text-align: left;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(30, 41, 59, 0.55);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--accent-indigo);
  background: rgba(51, 65, 85, 0.75);
}

.quiz-option.correct {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.2);
  color: #d1fae5;
}

.quiz-option.wrong {
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.2);
  color: #ffe4e6;
}

.quiz-feedback {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.14);
  border-left: 3px solid var(--accent-indigo);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  color: #e0e7ff;
}

.quiz-result {
  text-align: center;
  padding: 1rem 0;
}

.quiz-rank-badge {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-amber), #ea580c);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 10, 0.84);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0c1326;
  border: 1px solid rgba(99, 102, 241, 0.42);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
}

.modal-close {
  position: sticky;
  top: 14px;
  float: right;
  margin: 14px 14px 0 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  border-color: var(--accent-rose);
  color: #fda4af;
}

.modal-body {
  padding: 2rem 2rem 1.5rem;
  clear: both;
}

.modal-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.modal-art-box {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle, rgba(30, 41, 59, 0.95), #05070f);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-art-box svg {
  width: 145px;
  height: 145px;
}

.modal-category {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.modal-title {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin-bottom: 0.3rem;
}

.modal-subtitle {
  color: var(--accent-amber);
  font-weight: 600;
  font-size: 0.95rem;
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.65rem;
}

.metric-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
}

.metric-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.metric-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.modal-section {
  margin-bottom: 1.45rem;
}

.modal-section h4 {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.modal-section p {
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.analogy-callout {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.38);
  margin-bottom: 1.5rem;
}

.analogy-callout strong {
  display: block;
  color: #a5b4fc;
  font-family: var(--font-display);
  margin-bottom: 0.3rem;
}

.fun-facts-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.fun-facts-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.fun-facts-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-amber);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 7, 15, 0.7);
}

.modal-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(5, 7, 15, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p, .footer-note p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-links h4, .footer-note h4 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  color: #ffffff;
}

.footer-links ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .hero-grid, .scale-display, .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .solar-orbit-widget {
    width: 280px;
    height: 280px;
  }

  .ring-3 { width: 260px; height: 260px; }
  .ring-2 { width: 190px; height: 190px; }
  .ring-1 { width: 120px; height: 120px; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 7, 15, 0.97);
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .modal-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .modal-art-box {
    margin: 0 auto;
  }

  .modal-metrics {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 1.35rem;
  }

  .modal-footer {
    padding: 1rem 1.25rem;
  }
}
