:root {
  --bg: #031B33;
  --navy: #062B4F;
  --electric: #087DFF;
  --cyan: #16E8FF;
  --glow: #48FFD4;
  --purple: #875CFF;
  --coral: #FF5CA8;
  --text: #E9FCFF;
  --muted: #7AA8C4;
  --shadow: #0B426A;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(8, 125, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 30%, rgba(135, 92, 255, 0.22), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--navy) 45%, #021526 100%);
  line-height: 1.55;
}

.caustic {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(22, 232, 255, 0.08), transparent 35%),
    radial-gradient(circle at 80% 60%, rgba(72, 255, 212, 0.06), transparent 40%);
  mix-blend-mode: screen;
  z-index: 0;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2%, 1.5%, 0); }
}

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

.top-rail,
main,
.foot-rail {
  position: relative;
  z-index: 1;
}

.top-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(22, 232, 255, 0.18);
  backdrop-filter: blur(12px);
  background: rgba(3, 27, 51, 0.55);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(22, 232, 255, 0.45);
}

.rail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.rail-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.rail-links a:hover,
.rail-links a:focus-visible {
  color: var(--text);
}

.hero-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
  gap: 0;
  min-height: min(92vh, 820px);
  position: relative;
  overflow: hidden;
}

.hero-bleed {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 27, 51, 0.88) 0%, rgba(3, 27, 51, 0.45) 48%, rgba(3, 27, 51, 0.7) 100%),
    linear-gradient(180deg, transparent 35%, rgba(3, 27, 51, 0.85) 100%);
}

.hud-plate {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  max-width: 38rem;
  margin-bottom: 2rem;
}

.hud-coords {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--glow);
  opacity: 0.85;
}

.hud-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(22, 232, 255, 0.35);
}

.hud-tag {
  margin: 0 0 1.5rem;
  color: rgba(233, 252, 255, 0.86);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  max-width: 34rem;
}

.hud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filament-link {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--bg);
  background: linear-gradient(105deg, var(--electric), var(--cyan));
  box-shadow: 0 0 24px rgba(22, 232, 255, 0.35);
}

.filament-link.ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(22, 232, 255, 0.45);
  box-shadow: none;
}

.filament-timeline {
  position: relative;
  z-index: 2;
  padding: 2rem 1.25rem 2rem 0.75rem;
  border-left: 1px solid rgba(22, 232, 255, 0.25);
  background: rgba(3, 27, 51, 0.35);
  backdrop-filter: blur(8px);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filament-line {
  position: absolute;
  left: 1.55rem;
  top: 18%;
  bottom: 18%;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), var(--coral));
  box-shadow: 0 0 12px rgba(22, 232, 255, 0.55);
}

.filament-timeline ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.filament-timeline li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(233, 252, 255, 0.9);
}

.filament-timeline li::before {
  content: "";
  position: absolute;
  left: -0.15rem;
  top: 0.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.filament-timeline span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.modules-band,
.specimen-band,
.plaque-band,
.support-band {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.band-head {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.band-head h2,
.plaque-band h2,
.support-band h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.band-head p {
  margin: 0;
  color: var(--muted);
}

.module-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(22, 232, 255, 0.35);
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(6, 43, 79, 0.45);
  box-shadow: 0 0 40px rgba(8, 125, 255, 0.12);
}

.module-pane {
  padding: 1.35rem 1.2rem 1.5rem;
  border-right: 1px solid rgba(22, 232, 255, 0.22);
  background:
    linear-gradient(160deg, rgba(22, 232, 255, 0.08), transparent 55%);
}

.module-pane:last-child {
  border-right: none;
}

.module-pane h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--cyan);
}

.module-pane p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(233, 252, 255, 0.82);
}

.filmstrip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.filmstrip figure {
  margin: 0;
  flex: 0 0 min(72vw, 280px);
  scroll-snap-align: start;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(22, 232, 255, 0.3);
  background: var(--navy);
}

.filmstrip img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.filmstrip figcaption {
  padding: 0.55rem 0.75rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.plaque-band {
  display: flex;
  justify-content: center;
}

.etched-plaque {
  width: min(720px, 100%);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(22, 232, 255, 0.4);
  background:
    linear-gradient(145deg, rgba(233, 252, 255, 0.08), rgba(6, 43, 79, 0.65));
  box-shadow:
    inset 0 1px 0 rgba(233, 252, 255, 0.2),
    0 0 50px rgba(22, 232, 255, 0.12);
}

.plaque-body p {
  color: rgba(233, 252, 255, 0.86);
  font-size: 0.98rem;
}

.plaque-updated {
  color: var(--muted) !important;
  font-size: 0.85rem !important;
}

.support-band {
  text-align: center;
  border-top: 1px solid rgba(22, 232, 255, 0.15);
}

.support-band p {
  color: var(--muted);
  margin: 0.35rem 0 0.85rem;
}

.mail-glow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(22, 232, 255, 0.4);
}

.mail-glow:hover,
.mail-glow:focus-visible {
  color: var(--glow);
}

.foot-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(22, 232, 255, 0.12);
}

.foot-rail a {
  color: var(--muted);
  text-decoration: none;
}

.foot-rail a:hover {
  color: var(--cyan);
}

@media (max-width: 900px) {
  .hero-console {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .filament-timeline {
    border-left: none;
    border-top: 1px solid rgba(22, 232, 255, 0.25);
    padding: 1.25rem 1rem 1.75rem;
  }

  .filament-line {
    display: none;
  }

  .filament-timeline ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding-left: 0;
  }

  .filament-timeline li {
    padding-left: 0;
  }

  .filament-timeline li::before {
    display: none;
  }

  .module-ribbon {
    grid-template-columns: 1fr;
  }

  .module-pane {
    border-right: none;
    border-bottom: 1px solid rgba(22, 232, 255, 0.22);
  }

  .module-pane:last-child {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .rail-links {
    display: none;
  }
}
