/* Stellar Events — Objects In Space */

body.stellar-page {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.stellar-page #stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.stellar-page .nebula {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 15% 20%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(167, 139, 250, 0.1), transparent 55%);
}

.stellar-page .topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.75rem;
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.92), rgba(5, 6, 15, 0.55) 70%, transparent);
  backdrop-filter: blur(8px);
}

.stellar-page .topbar .brand {
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
}

.stellar-page .topbar nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stellar-page .topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.stellar-page .topbar nav a:hover,
.stellar-page .topbar nav a.active {
  color: var(--accent);
}

.se-main {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.se-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.se-hero .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.se-hero h1 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  font-weight: 700;
  text-shadow: 0 0 28px var(--glow);
  margin: 0 0 0.75rem;
}

.se-hero .tagline {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.55;
}

/* Location */
.loc-bar {
  margin: 0 auto 2.25rem;
  max-width: 420px;
}

.loc-form label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.loc-row {
  display: flex;
  gap: 0.55rem;
}

.loc-row input {
  flex: 1;
  min-width: 0;
  font: 400 1rem "Outfit", sans-serif;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 236, 255, 0.28);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  outline: none;
}

.loc-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.18);
}

.loc-btn {
  flex: none;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
}

.loc-resolved {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.loc-error {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #fca5a5;
}

/* Featured */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 1.4rem;
  border-radius: 20px;
  background: rgba(8, 10, 24, 0.55);
  border: 1px solid rgba(232, 236, 255, 0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.08);
  margin-bottom: 2.75rem;
}

.featured-visual {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(30, 40, 80, 0.6), rgba(5, 6, 15, 0.9));
  aspect-ratio: 640 / 420;
}

.featured-visual canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.featured-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.featured-copy h2 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  letter-spacing: 0.06em;
  font-weight: 700;
  margin: 0 0 0.45rem;
  line-height: 1.25;
}

.featured-when {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

.countdown {
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.9rem;
  text-shadow: 0 0 18px var(--glow);
}

.featured-desc {
  color: var(--text);
  font-weight: 300;
  line-height: 1.65;
  font-size: 0.95rem;
  margin: 0 0 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(125, 211, 252, 0.06);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-left: 3px solid var(--accent);
}

.featured-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.88rem;
  margin: 0;
}

.featured-meta dt {
  color: var(--muted);
  font-weight: 300;
}

.featured-meta dd {
  color: var(--text);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* Timeline */
.timeline h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  margin: 0 0 1.25rem;
  font-weight: 500;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.event-card {
  border-radius: 14px;
  background: rgba(8, 10, 24, 0.5);
  border: 1px solid rgba(232, 236, 255, 0.12);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.25s;
  overflow: hidden;
}

.event-card:hover,
.event-card.is-open {
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(12, 16, 36, 0.7);
}

.event-card.is-open {
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.12);
}

.event-card.past {
  opacity: 0.45;
}

.event-card.past.is-open {
  opacity: 0.85;
}

.card-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.95rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 14px;
}

.card-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.card-summary {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.85rem;
  align-items: start;
}

.card-art {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  background: radial-gradient(circle at 40% 35%, rgba(40, 50, 90, 0.7), rgba(5, 6, 15, 0.95));
  overflow: hidden;
  flex: none;
}

.card-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-type {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-body h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
  color: var(--text);
}

.card-date {
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card-note {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.card-chevron {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  border: 1px solid rgba(232, 236, 255, 0.28);
  position: relative;
  flex: none;
  transition: transform 0.28s ease, border-color 0.2s, background 0.2s;
  background: rgba(255, 255, 255, 0.03);
}

.card-chevron::before {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translate(-50%, -60%) rotate(45deg);
}

.event-card.is-open .card-chevron {
  transform: rotate(180deg);
  border-color: var(--accent);
  background: rgba(125, 211, 252, 0.12);
}

.card-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.event-card.is-open .card-panel {
  grid-template-rows: 1fr;
}

.card-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.card-science {
  margin: 0;
  padding: 0 1rem 0.85rem;
  color: var(--text);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 1px solid rgba(232, 236, 255, 0.1);
  padding-top: 0.85rem;
}

.card-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.85rem;
  margin: 0 1rem 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(5, 6, 15, 0.45);
  font-size: 0.82rem;
}

.card-meta dt {
  color: var(--muted);
  font-weight: 300;
}

.card-meta dd {
  color: var(--text);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: var(--accent);
  margin-top: 0.25rem;
  width: fit-content;
}

.badge.warn {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.badge.dim {
  border-color: rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
}

.se-credits {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(232, 236, 255, 0.1);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 300;
}

.se-credits p {
  margin: 0;
  max-width: 48rem;
}

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

@media (max-width: 520px) {
  .se-main {
    padding: 1rem 1rem 3rem;
  }

  .stellar-page .topbar {
    padding: 0.9rem 1rem;
  }

  .stellar-page .topbar nav {
    gap: 0.7rem;
  }

  .stellar-page .topbar nav a {
    font-size: 0.85rem;
  }

  .card-summary {
    grid-template-columns: 72px 1fr auto;
    gap: 0.7rem;
  }

  .card-toggle {
    padding: 0.8rem;
  }

  .card-art {
    width: 72px;
    height: 72px;
  }

  .card-science {
    font-size: 0.86rem;
    padding: 0.75rem 0.85rem 0.75rem;
  }

  .card-meta {
    margin: 0 0.85rem 0.85rem;
  }

  .countdown {
    font-size: 1rem;
  }
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
