.history-page {
  --history-glow: rgba(87, 174, 255, 0.24);
  background:
    radial-gradient(ellipse at 78% 4%, rgba(76, 83, 186, 0.2), transparent 31rem),
    radial-gradient(ellipse at 8% 28%, rgba(27, 109, 155, 0.12), transparent 32rem),
    #050815;
  color: #eef5ff;
}

.history-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent 100%),
    radial-gradient(2px 2px at 30% 60%, rgba(208, 229, 255, 0.8), transparent 100%),
    radial-gradient(1px 1px at 70% 24%, #fff, transparent 100%),
    radial-gradient(1px 1px at 90% 72%, rgba(208, 229, 255, 0.8), transparent 100%);
  background-size: 280px 280px, 390px 390px, 240px 240px, 350px 350px;
  content: "";
  pointer-events: none;
}

.history-wrap {
  width: min(1160px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.history-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 8, 21, 0.76);
  backdrop-filter: blur(18px);
}

.history-nav {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.history-brand,
.history-menu a {
  color: inherit;
  text-decoration: none;
}

.history-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.history-brand-mark {
  display: grid;
  width: 2.2rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(157, 209, 255, 0.42);
  border-radius: 50%;
  background: linear-gradient(145deg, #82dcff, #9381ff);
  box-shadow: 0 0 26px rgba(110, 160, 255, 0.45);
  color: #071122;
}

.history-menu {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.7rem, 2vw, 1.5rem);
  color: #b6c8e3;
  font-size: 0.82rem;
}

.history-menu a:hover,
.history-menu a[aria-current="page"] {
  color: #94ddff;
}

.history-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: #92dcff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.history-kicker::before {
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.history-hero {
  position: relative;
  display: grid;
  min-height: min(720px, calc(100svh - 74px));
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding-block: 5rem;
}

.history-hero::before,
.story-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 21, 0.97) 3%, rgba(5, 8, 21, 0.76) 47%, rgba(5, 8, 21, 0.12) 100%),
    linear-gradient(0deg, #050815 0%, transparent 43%, rgba(5, 8, 21, 0.12) 100%),
    url("./assets/crab-nebula.jpg") center 45% / cover;
  content: "";
}

.history-hero-content {
  position: relative;
  max-width: 700px;
  padding-block: 2rem;
}

.history-hero h1,
.story-hero h1 {
  max-width: 850px;
  margin: 1rem 0 1.1rem;
  font-size: clamp(3.2rem, 8vw, 7.8rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

.history-hero h1 span,
.story-hero h1 span {
  color: #98deff;
}

.history-hero-copy,
.story-hero-copy {
  max-width: 620px;
  margin: 0;
  color: #c1d1e8;
  font-size: clamp(1rem, 1.8vw, 1.23rem);
  line-height: 1.8;
}

.history-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-top: 1.7rem;
  color: #9db0cb;
  font-size: 0.75rem;
}

.history-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.history-hero-meta span::before {
  color: #96dfff;
  content: "✦";
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: clamp(-10rem, 2vw, 3rem);
  width: clamp(270px, 42vw, 600px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  inset: 4%;
  border: 1px solid rgba(171, 210, 255, 0.28);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(96, 142, 255, 0.09), 0 0 50px rgba(111, 156, 255, 0.08);
  content: "";
  transform: rotateX(68deg) rotate(-24deg);
}

.hero-orbit::after {
  inset: 17%;
  border-color: rgba(111, 193, 255, 0.25);
  transform: rotateX(68deg) rotate(48deg);
}

.hero-orbit-core {
  position: absolute;
  inset: 24%;
  border: 1px solid rgba(201, 226, 255, 0.45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 29%, rgba(255, 255, 255, 0.94), transparent 2%),
    radial-gradient(circle at 34% 31%, #92cfff 0, #387ccc 19%, #173867 47%, #07152f 71%);
  box-shadow: inset -27px -19px 52px rgba(0, 0, 0, 0.66), inset 11px 8px 24px rgba(198, 231, 255, 0.4), 0 0 74px rgba(51, 122, 238, 0.42);
  animation: hero-core-drift 15s ease-in-out infinite alternate;
}

.hero-orbit-core::after {
  position: absolute;
  inset: -4%;
  border: 1px solid rgba(126, 197, 255, 0.24);
  border-radius: 50%;
  content: "";
  filter: blur(4px);
}

@keyframes hero-core-drift {
  to {
    transform: translateY(-10px) rotate(8deg);
  }
}

.history-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.9rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(146, 220, 255, 0.35);
  border-radius: 999px;
  background: rgba(117, 188, 255, 0.12);
  color: #f0f8ff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.history-cta:hover {
  transform: translateY(-2px);
  background: rgba(117, 188, 255, 0.22);
}

.history-section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.history-alt-section {
  background: linear-gradient(180deg, rgba(15, 28, 51, 0.15), rgba(13, 27, 49, 0.5), rgba(15, 28, 51, 0.12));
}

.history-section-heading {
  max-width: 720px;
  margin-bottom: 2.2rem;
}

.history-section-heading h2 {
  margin: 0.8rem 0;
  font-size: clamp(2rem, 4.5vw, 3.7rem);
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.history-section-heading p:last-child {
  max-width: 620px;
  margin: 0;
  color: #aebfda;
}

.history-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.history-story-card {
  position: relative;
  display: grid;
  min-height: 390px;
  align-content: end;
  overflow: hidden;
  border: 1px solid rgba(204, 226, 255, 0.13);
  border-radius: 22px;
  background: #101b30;
  color: inherit;
  isolation: isolate;
  text-decoration: none;
}

.history-story-card img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.history-story-card::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 8, 18, 0.98), rgba(4, 8, 18, 0.55) 47%, rgba(4, 8, 18, 0.04));
  content: "";
}

.history-story-card:hover img {
  transform: scale(1.045);
}

.story-card-copy {
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.story-card-number {
  color: #98dfff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.story-card-copy h3 {
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.story-card-copy p {
  max-width: 530px;
  margin: 0;
  color: #c3d0e4;
  font-size: 0.88rem;
}

.story-card-link {
  display: inline-block;
  margin-top: 1rem;
  color: #a1e2ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.history-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.history-timeline::before {
  position: absolute;
  top: 1.15rem;
  right: 5%;
  left: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129, 202, 255, 0.5), transparent);
  content: "";
}

.history-milestone {
  position: relative;
  padding-top: 2.4rem;
}

.history-milestone::before {
  position: absolute;
  top: 0.82rem;
  left: 0;
  width: 0.62rem;
  aspect-ratio: 1;
  border: 2px solid #a2e3ff;
  border-radius: 50%;
  background: #0a1428;
  box-shadow: 0 0 18px rgba(128, 201, 255, 0.6);
  content: "";
}

.history-milestone time {
  color: #91dbff;
  font-size: 0.75rem;
  font-weight: 800;
}

.history-milestone h3 {
  margin: 0.3rem 0;
  font-size: 1rem;
}

.history-milestone p {
  margin: 0;
  color: #aebfda;
  font-size: 0.8rem;
}

.history-note {
  margin-top: 2rem;
  padding: 1.2rem 1.4rem;
  border-left: 2px solid #89d9ff;
  background: linear-gradient(90deg, rgba(80, 159, 231, 0.12), transparent);
  color: #b8c8df;
  font-size: 0.84rem;
}

.history-footer {
  padding-block: 1.7rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #91a5c1;
  font-size: 0.78rem;
}

.history-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
}

.history-footer a {
  color: #a6dfff;
  text-decoration: none;
}

.story-hero {
  position: relative;
  display: flex;
  min-height: min(680px, calc(100svh - 74px));
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  padding-block: 5rem;
}

.story-hero-apollo {
  --story-image: url("./assets/apollo-11-moon.jpg");
}

.story-hero::before {
  background-image:
    linear-gradient(90deg, rgba(5, 8, 21, 0.96) 3%, rgba(5, 8, 21, 0.68) 52%, rgba(5, 8, 21, 0.08) 100%),
    linear-gradient(0deg, #050815 0%, transparent 58%),
    var(--story-image);
  background-position: center, center, center 38%;
  background-size: cover;
}

.story-hero-content {
  max-width: 800px;
}

.story-hero h1 {
  font-size: clamp(3rem, 7vw, 6.5rem);
}

.story-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.story-facts span {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(204, 226, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 18, 37, 0.52);
  color: #d8e9fa;
  font-size: 0.73rem;
  backdrop-filter: blur(10px);
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  align-items: start;
  gap: clamp(2rem, 6vw, 5.5rem);
}

.story-article {
  min-width: 0;
}

.story-article > p,
.story-article li {
  color: #c0cee2;
  font-size: 1rem;
  line-height: 1.9;
}

.story-article > p:first-child {
  margin-top: 0;
  color: #eef5ff;
  font-size: 1.2rem;
  line-height: 1.75;
}

.story-article h2 {
  margin: 3rem 0 0.7rem;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: -0.045em;
  line-height: 1.2;
  scroll-margin-top: 100px;
}

.story-article h3 {
  margin: 1.8rem 0 0.3rem;
  font-size: 1.2rem;
}

.story-article a {
  color: #97deff;
  text-underline-offset: 3px;
}

.story-article ul {
  padding-left: 1.3rem;
}

.story-aside {
  position: sticky;
  top: 100px;
  padding: 1.2rem;
  border: 1px solid rgba(204, 226, 255, 0.13);
  border-radius: 18px;
  background: rgba(10, 18, 36, 0.72);
}

.story-aside h2 {
  margin: 0 0 0.9rem;
  color: #94dcff;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-aside a {
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #c0cee2;
  font-size: 0.8rem;
  text-decoration: none;
}

.story-aside a:last-child {
  border-bottom: 0;
}

.story-aside a:hover {
  color: #a3e2ff;
}

.story-image {
  margin: 2.4rem 0;
  overflow: hidden;
  border: 1px solid rgba(204, 226, 255, 0.14);
  border-radius: 18px;
  background: #101a2c;
}

.story-image img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
}

.story-image figcaption {
  padding: 0.75rem 1rem;
  color: #aebfda;
  font-size: 0.72rem;
}

.story-quote {
  margin: 2.5rem 0;
  padding: 1.3rem 1.5rem;
  border-left: 2px solid #8ddaff;
  background: linear-gradient(90deg, rgba(88, 154, 222, 0.13), transparent);
  color: #e6f2ff;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.65;
}

.story-quote cite {
  display: block;
  margin-top: 0.6rem;
  color: #9cb1cc;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 400;
}

.story-rail {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.story-rail-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.9rem;
  border: 1px solid rgba(204, 226, 255, 0.12);
  border-radius: 14px;
  background: rgba(15, 27, 49, 0.67);
}

.story-rail-item time {
  color: #93dfff;
  font-size: 0.75rem;
  font-weight: 800;
}

.story-rail-item p {
  margin: 0;
  color: #c1cee1;
  font-size: 0.83rem;
}

.story-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 3rem;
}

.story-related a {
  padding: 1.1rem;
  border: 1px solid rgba(204, 226, 255, 0.14);
  border-radius: 14px;
  background: rgba(13, 25, 47, 0.65);
  color: #e9f4ff;
  text-decoration: none;
}

.story-related a:hover {
  border-color: rgba(144, 214, 255, 0.45);
}

.story-related small {
  display: block;
  margin-bottom: 0.25rem;
  color: #95dfff;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-sources {
  margin-top: 3rem;
  padding: 1.2rem;
  border: 1px solid rgba(204, 226, 255, 0.12);
  border-radius: 14px;
  background: rgba(11, 20, 38, 0.55);
}

.story-sources h2 {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.story-sources ul {
  margin: 0;
}

.story-sources li,
.story-sources a {
  font-size: 0.76rem;
}

.story-sources li {
  margin: 0.3rem 0;
}

@media (max-width: 760px) {
  .history-nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding-block: 0.65rem;
  }

  .history-menu {
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .history-hero {
    min-height: 680px;
    align-items: end;
    padding-block: 3rem;
  }

  .history-hero::before {
    background-image:
      linear-gradient(0deg, rgba(5, 8, 21, 1) 4%, rgba(5, 8, 21, 0.83) 44%, rgba(5, 8, 21, 0.1) 100%),
      url("./assets/crab-nebula.jpg");
    background-position: center, 58% center;
  }

  .hero-orbit {
    top: 7%;
    right: 50%;
    width: min(95vw, 460px);
    transform: translateX(50%);
  }

  .history-story-grid,
  .story-layout {
    grid-template-columns: 1fr;
  }

  .history-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.2rem;
  }

  .history-timeline::before {
    display: none;
  }

  .story-hero {
    min-height: 630px;
    padding-block: 3rem;
  }

  .story-hero::before {
    background-image:
      linear-gradient(0deg, rgba(5, 8, 21, 1) 3%, rgba(5, 8, 21, 0.75) 47%, rgba(5, 8, 21, 0.1) 100%),
      var(--story-image);
  }

  .story-aside {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
  }

  .story-aside h2 {
    flex: 0 0 100%;
  }

  .story-aside a {
    border: 0;
  }
}

@media (max-width: 480px) {
  .history-wrap {
    width: min(100% - 1.4rem, 1160px);
  }

  .history-story-card {
    min-height: 340px;
  }

  .history-timeline,
  .story-related {
    grid-template-columns: 1fr;
  }

  .story-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit-core {
    animation: none;
  }

  .history-story-card img,
  .history-cta {
    transition: none;
  }
}
