:root {
  --bg1: #071a3a;
  --bg2: #020817;
  --text: #ffffff;
}

body.light {
  --bg1: #e4ecff;
  --bg2: #f8fbff;
  --text: #020817;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color: var(--text);
  overflow-x: hidden;
}

/* ===== STARS ===== */
canvas {
  position: fixed;
  inset: 0;
  z-index: -3;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
}

.nav img {
  height: 36px;
  border-radius: 8px;
}

.nav button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.85;
}

.nav button:hover {
  opacity: 1;
}

/* ===== PAGES ===== */
.page {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page.active {
  display: block;
}

.page.enter {
  opacity: 1;
  transform: translateY(0);
}

.section {
  max-width: 1000px;
  margin: 120px auto;
  padding: 0 20px;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  justify-content: center;
  padding: 80px 15px;
}

.hero img {
  width: min(1120px, 90%);
  border-radius: 30px;
  box-shadow: 0 0 45px rgba(120,180,255,0.45);
  opacity: 0.9;
}

/* ===== BOXES ===== */
.box {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 60px;
  box-shadow:
    0 0 35px rgba(120,170,255,0.25),
    inset 0 0 20px rgba(255,255,255,0.05);
}

/* ===== SPLIT ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.image-box {
  height: clamp(240px, 38vw, 420px);
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #9cc6ff, transparent);
}

.timeline .event {
  position: relative;
  border-left: 3px solid rgba(150,200,255,0.6);
  padding-left: 20px;
}

.timeline .event::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #b5d6ff;
  box-shadow: 0 0 12px rgba(160,210,255,0.8);
}

/* ===== 404 FLOAT ===== */
@keyframes floatUpDown {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.float-text {
  animation: floatUpDown 3s ease-in-out infinite;
}

/* ===== MOBILE ===== */
@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
  }
}

footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 0.85rem;
  opacity: 0.7;
}
