:root {
  color-scheme: dark;
  --ink: #090e16;
  --ink-raised: #101824;
  --ink-soft: #172231;
  --line: rgba(187, 208, 227, 0.18);
  --line-bright: rgba(205, 227, 242, 0.36);
  --text: #e7edf1;
  --text-soft: #9eafbd;
  --gold: #f2bf68;
  --gold-soft: #f5d69d;
  --blue: #8fc3dc;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 83% 8%, rgba(56, 104, 133, 0.19), transparent 28rem),
    radial-gradient(circle at 14% 47%, rgba(56, 88, 125, 0.12), transparent 22rem),
    var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.5px, transparent 0.7px);
  background-size: 73px 73px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.65rem 0.85rem;
  border-radius: 0.45rem;
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1280px, calc(100% - 3rem));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6rem;
  border-bottom: 1px solid var(--line);
}

.wordmark,
.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.wordmark-copy {
  display: grid;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.08;
  text-transform: uppercase;
}

.wordmark-mark {
  position: relative;
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.wordmark-mark::before,
.wordmark-mark::after,
.wordmark-mark span {
  position: absolute;
  display: block;
  border-radius: 50%;
  content: "";
}

.wordmark-mark::before {
  width: 0.27rem;
  height: 0.27rem;
  background: var(--gold);
  transform: translate(-0.42rem, -0.3rem);
}

.wordmark-mark::after {
  width: 0.16rem;
  height: 0.16rem;
  background: var(--blue);
  transform: translate(0.47rem, 0.34rem);
}

.wordmark-mark span {
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--blue);
}

.wordmark-mark-small {
  width: 1.45rem;
  height: 1.45rem;
}

.wordmark-mark-small::before {
  width: 0.18rem;
  height: 0.18rem;
}

.wordmark-mark-small::after {
  width: 0.12rem;
  height: 0.12rem;
}

.wordmark-mark-small span {
  width: 0.48rem;
  height: 0.48rem;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.6rem);
  color: var(--text-soft);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-nav a,
.source-link,
.site-footer a {
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.source-link:hover,
.source-link:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(2.5rem, 7vw, 7.5rem);
  align-items: center;
  min-height: min(790px, calc(100vh - 6rem));
  padding: clamp(3.5rem, 8vw, 7.4rem) 0 clamp(4.2rem, 9vw, 8.5rem);
}

.hero-copy {
  max-width: 31rem;
}

.eyebrow,
.section-label,
.caption-kicker,
.apod-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

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

.eyebrow-dot,
.live-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0.28rem rgba(242, 191, 104, 0.11);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 9ch;
  margin: 1.35rem 0 1.35rem;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(4.5rem, 10.3vw, 8.9rem);
  font-weight: 400;
  letter-spacing: -0.075em;
  line-height: 0.81;
}

h1 em {
  color: var(--gold-soft);
  font-style: italic;
}

.hero-intro {
  max-width: 25rem;
  margin-bottom: 2.1rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
}

.hero-facts {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.55rem;
  color: var(--text);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.hero-facts small {
  display: block;
  margin-top: 0.05rem;
  color: var(--text-soft);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-divider {
  width: 1px;
  height: 2.2rem;
  background: var(--line-bright);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}

.text-link span {
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 180ms ease;
}

.text-link:hover span,
.text-link:focus-visible span {
  transform: translate(0.18rem, 0.18rem);
}

.hero-figure {
  position: relative;
  min-width: 0;
  margin: 0;
}

.image-frame {
  position: relative;
  overflow: hidden;
  background: #0e1520;
}

.image-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(217, 232, 239, 0.25);
  content: "";
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-frame-hero {
  height: clamp(480px, 65vw, 730px);
  max-height: 75vh;
}

.image-frame-hero img {
  object-position: center;
}

.image-index,
.card-index {
  position: absolute;
  z-index: 1;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
}

.image-index {
  top: 1.1rem;
  left: 1.15rem;
}

.image-corner {
  position: absolute;
  right: 1.15rem;
  bottom: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-right: 1px solid rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.74);
}

.hero-caption {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.8rem;
  padding: 1.1rem 0.15rem 0;
  border-top: 1px solid var(--line-bright);
}

.caption-kicker {
  margin-bottom: 0.35rem;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.caption-text {
  max-width: 28rem;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 0.83rem;
  line-height: 1.55;
}

.source-link {
  flex-shrink: 0;
  color: var(--gold-soft);
  font-size: 0.67rem;
  letter-spacing: 0.07em;
  line-height: 1.45;
  text-transform: uppercase;
}

.source-link span {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.9rem;
}

.gallery-section {
  padding: 1.5rem 0 clamp(5rem, 10vw, 9rem);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}

.section-label {
  margin-bottom: 0.9rem;
  color: var(--text-soft);
}

h2 {
  margin-bottom: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

h2 span {
  color: var(--gold-soft);
  font-style: italic;
}

.section-note {
  max-width: 18rem;
  margin-bottom: 0.15rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4.3rem);
  padding-top: 2.7rem;
}

.gallery-card {
  min-width: 0;
}

.gallery-card-eagle {
  padding-top: clamp(2.5rem, 7vw, 6.5rem);
}

.image-frame-square {
  aspect-ratio: 1;
}

.image-frame-square img {
  transition: transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.gallery-card:hover .image-frame-square img {
  transform: scale(1.035);
}

.card-index {
  right: 1rem;
  bottom: 0.85rem;
}

.gallery-card figcaption {
  padding-top: 1.1rem;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

h3 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.card-year {
  flex-shrink: 0;
  color: var(--text-soft);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-card figcaption > p {
  max-width: 33rem;
  margin-bottom: 0.85rem;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.apod-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(3rem, 7vw, 6.2rem) 0;
  border-top: 1px solid var(--line);
}

.apod-header h2 {
  margin-top: 0.8rem;
}

.apod-header .section-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gold);
}

.live-dot {
  width: 0.36rem;
  height: 0.36rem;
}

.apod-card {
  min-height: 10.5rem;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(27, 41, 55, 0.66), rgba(10, 16, 25, 0.76));
}

.apod-placeholder,
.apod-result {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 10.5rem;
  padding: 1.5rem 1.7rem;
}

.apod-orbit {
  display: block;
  width: 3.2rem;
  height: 3.2rem;
  flex: 0 0 3.2rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.apod-orbit::after {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0.15rem 0 0 0.32rem;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.apod-loading {
  margin: 0.4rem 0 0;
  color: var(--text-soft);
}

.apod-loading span {
  color: var(--gold-soft);
}

.apod-fallback-link {
  position: absolute;
  inset: 0;
}

.apod-result {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 1.4rem;
}

.apod-result-media {
  position: relative;
  align-self: stretch;
  min-height: 8rem;
  overflow: hidden;
  background: #0a1019;
}

.apod-result-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 8rem;
  object-fit: cover;
}

.apod-result-copy {
  min-width: 0;
}

.apod-result-title {
  margin: 0.35rem 0 0.25rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.03;
}

.apod-result-date,
.apod-credit {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.apod-credit {
  margin-top: 0.55rem;
  color: var(--gold-soft);
}

.apod-result-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.apod-result-link:hover,
.apod-result-link:focus-visible {
  color: var(--text);
}

.apod-video {
  grid-template-columns: auto minmax(0, 1fr);
}

.apod-video .apod-orbit {
  border-style: dashed;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.footer-mark {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer p {
  max-width: 26rem;
  margin-bottom: 0;
}

.site-footer a {
  color: var(--gold-soft);
  text-align: right;
}

@media (max-width: 800px) {
  .page-shell {
    width: min(100% - 2rem, 42rem);
  }

  .site-header {
    min-height: 5rem;
  }

  .site-nav {
    gap: 0.85rem;
    font-size: 0.65rem;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 4rem 0 5rem;
  }

  .hero-copy {
    max-width: 38rem;
    padding-bottom: 3rem;
  }

  h1 {
    font-size: clamp(4.4rem, 19vw, 7.2rem);
  }

  .image-frame-hero {
    height: min(125vw, 650px);
    max-height: none;
  }

  .hero-caption {
    display: block;
  }

  .hero-caption .source-link {
    display: inline-block;
    margin-top: 0.75rem;
  }

  .section-heading {
    display: block;
  }

  .section-note {
    max-width: 30rem;
    margin-top: 1.2rem;
  }

  .apod-section {
    display: block;
  }

  .apod-header {
    margin-bottom: 1.6rem;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer a {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    padding: 1.15rem 0;
  }

  .site-nav {
    display: grid;
    gap: 0.2rem;
    text-align: right;
  }

  .gallery-grid {
    display: block;
  }

  .gallery-card-eagle {
    padding-top: 3.5rem;
  }

  .apod-result {
    grid-template-columns: 1fr;
  }

  .apod-result-media {
    min-height: 11rem;
    max-height: 15rem;
  }

  .apod-result-media img {
    min-height: 11rem;
  }

  .apod-placeholder,
  .apod-result {
    padding: 1.2rem;
  }

  .site-footer {
    display: block;
  }

  .site-footer p,
  .site-footer a {
    display: block;
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
