:root {
  --bg: #06131f;
  --bg-soft: #10263d;
  --panel: rgba(8, 21, 34, 0.82);
  --panel-strong: rgba(7, 18, 30, 0.95);
  --line: rgba(148, 191, 255, 0.18);
  --text: #ecf6ff;
  --muted: #a9bfd3;
  --accent: #77e0ff;
  --accent-strong: #1db7ff;
  --energy: #ffd166;
  --proton: #ff7b72;
  --neutron: #8fd3ff;
  --fragment: #92ffbd;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(35, 138, 255, 0.25), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(255, 209, 102, 0.16), transparent 22%),
    linear-gradient(160deg, #020910 0%, #08131f 38%, #0c1f34 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.page {
  width: min(1200px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.site-nav {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(8, 21, 34, 0.68);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  padding: 0.3rem 0.35rem 0.3rem 0.1rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-block;
}

.brand-core,
.brand-orbit {
  position: absolute;
  inset: 0;
}

.brand-core {
  width: 8px;
  height: 8px;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--energy), var(--accent));
  box-shadow: 0 0 18px rgba(119, 224, 255, 0.45);
  animation: core-pulse 2.8s ease-in-out infinite;
}

.brand-orbit {
  border: 2px solid rgba(119, 224, 255, 0.72);
  border-radius: 50%;
}

.orbit-a {
  transform: rotate(28deg) scaleX(1.18) scaleY(0.58);
  animation: orbit-spin-a 7s linear infinite;
}

.orbit-b {
  transform: rotate(-28deg) scaleX(1.18) scaleY(0.58);
  animation: orbit-spin-b 9s linear infinite;
}

.brand-text {
  font-size: 0.95rem;
}

@keyframes orbit-spin-a {
  from {
    transform: rotate(28deg) scaleX(1.18) scaleY(0.58);
  }
  to {
    transform: rotate(388deg) scaleX(1.18) scaleY(0.58);
  }
}

@keyframes orbit-spin-b {
  from {
    transform: rotate(-28deg) scaleX(1.18) scaleY(0.58);
  }
  to {
    transform: rotate(-388deg) scaleX(1.18) scaleY(0.58);
  }
}

@keyframes core-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 18px rgba(119, 224, 255, 0.45);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 24px rgba(255, 209, 102, 0.55);
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 191, 255, 0.1);
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.nav-link.is-active {
  color: #022234;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
  gap: 1.4rem;
  align-items: start;
}

.hero-copy,
.simulation-card,
.info-card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 28px;
  padding: 2rem;
}

.eyebrow,
.panel-label,
.card-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

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

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.95;
  margin: 0.45rem 0 1rem;
  max-width: 8ch;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.facts {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.fact-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(119, 224, 255, 0.06);
  border: 1px solid rgba(119, 224, 255, 0.12);
}

.fact-label {
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.fact-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.simulation-card {
  border-radius: 30px;
  padding: 1.25rem;
}

.sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sim-topbar h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
}

.primary {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #022234;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 10px 30px rgba(29, 183, 255, 0.28);
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 191, 255, 0.12);
  transition: transform 180ms ease, background-color 180ms ease;
}

.primary:hover,
.secondary:hover {
  transform: translateY(-2px);
}

.primary:hover {
  box-shadow: 0 16px 36px rgba(29, 183, 255, 0.36);
}

.simulation {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  border-radius: 24px;
  border: 1px solid rgba(143, 211, 255, 0.14);
  background:
    radial-gradient(circle at center, rgba(30, 122, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(6, 18, 30, 0.86), rgba(5, 12, 24, 0.96));
}

.particle-canvas,
.simulation-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
}

.particle-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.simulation-svg {
  position: relative;
  z-index: 1;
}

.trail {
  fill: none;
  stroke: rgba(119, 224, 255, 0.35);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 8 12;
}

.shell {
  fill: none;
}

.shell-outer {
  stroke: rgba(119, 224, 255, 0.26);
  stroke-width: 3;
}

.shell-inner {
  stroke: rgba(255, 209, 102, 0.26);
  stroke-width: 2;
}

.nucleus-body {
  filter: drop-shadow(0 0 24px rgba(119, 224, 255, 0.35));
}

.proton-dot {
  fill: var(--proton);
}

.neutron-dot,
.neutron-particle {
  fill: var(--neutron);
}

.svg-label,
.fragment-text {
  fill: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.svg-label {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.neutron-label {
  fill: var(--muted);
  font-size: 18px;
}

.fragment-group,
.free-neutron,
.energy-ring {
  opacity: 0;
}

.fragment-shape {
  filter: drop-shadow(0 0 26px rgba(146, 255, 189, 0.35));
}

.fragment-text {
  font-size: 22px;
  font-weight: 700;
}

.energy-ring {
  fill: none;
  stroke: rgba(255, 209, 102, 0.7);
  stroke-width: 3;
}

.status-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.85rem;
  margin-top: 0.8rem;
}

.status-card {
  border-radius: 18px;
  padding: 0.62rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 191, 255, 0.1);
}

.status-value {
  margin: 0.22rem 0 0;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.05;
}

.status-text {
  margin: 0.22rem 0 0;
  color: var(--muted);
  line-height: 1.3;
  font-size: 0.88rem;
}

.timeline-card {
  margin-top: 1rem;
  padding: 0.58rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 191, 255, 0.1);
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.timeline-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  max-width: 46ch;
}

.timeline-time {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-track {
  position: relative;
  height: 4px;
  margin: 0.45rem 0 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(119, 224, 255, 0.12);
}

.timeline-progress {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--energy));
  box-shadow: 0 0 20px rgba(119, 224, 255, 0.35);
}

.timeline-scale {
  position: relative;
  height: 1.55rem;
  margin: -0.08rem 0 0.4rem;
}

.timeline-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.2rem;
}

.timeline-tick-line {
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: rgba(236, 246, 255, 0.42);
}

.timeline-tick-guide {
  width: 1px;
  height: 7px;
  background:
    linear-gradient(
      to bottom,
      rgba(119, 224, 255, 0.34),
      rgba(119, 224, 255, 0.08)
    );
}

.timeline-tick-label {
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.timeline-tick-line,
.timeline-tick-guide {
  transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.timeline-tick.is-passed .timeline-tick-line {
  background: rgba(255, 209, 102, 0.85);
}

.timeline-tick.is-passed .timeline-tick-guide {
  background:
    linear-gradient(
      to bottom,
      rgba(255, 209, 102, 0.34),
      rgba(255, 209, 102, 0.08)
    );
}

.timeline-tick.is-passed .timeline-tick-label {
  color: rgba(255, 209, 102, 0.95);
}

.timeline-tick.is-active .timeline-tick-line {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(119, 224, 255, 0.55);
}

.timeline-tick.is-active .timeline-tick-guide {
  background:
    linear-gradient(
      to bottom,
      rgba(119, 224, 255, 0.8),
      rgba(119, 224, 255, 0.18)
    );
}

.timeline-tick.is-active .timeline-tick-label {
  color: var(--text);
  text-shadow: 0 0 12px rgba(119, 224, 255, 0.32);
}

.tick-start {
  transform: translateX(0);
  align-items: start;
}

.tick-end {
  transform: translateX(-100%);
  align-items: end;
}

.tick-micro-a {
  top: -0.06rem;
}

.tick-micro-b {
  top: 0.34rem;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.timeline-step {
  padding: 0.42rem 0.46rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 191, 255, 0.08);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.timeline-step.is-active {
  transform: translateY(-2px);
  background: rgba(119, 224, 255, 0.08);
  border-color: rgba(119, 224, 255, 0.35);
}

.timeline-step.is-complete {
  border-color: rgba(255, 209, 102, 0.28);
}

.timeline-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-bottom: 0.3rem;
  background: rgba(169, 191, 211, 0.5);
  box-shadow: 0 0 0 0 rgba(119, 224, 255, 0);
}

.timeline-step.is-active .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(119, 224, 255, 0.12);
}

.timeline-step.is-complete .timeline-dot {
  background: var(--energy);
}

.timeline-title {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.78rem;
}

.timeline-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.18;
  font-size: 0.68rem;
}

.legend-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 191, 255, 0.1);
}

.legend-overlay {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  width: min(320px, calc(100% - 1.8rem));
  margin-top: 0;
  padding: 0.7rem;
  border-radius: 16px;
  background: rgba(5, 16, 28, 0.74);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 191, 255, 0.08);
}

.legend-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.proton-marker {
  background: var(--proton);
  box-shadow: 0 0 16px rgba(255, 123, 114, 0.4);
}

.neutron-marker {
  background: var(--neutron);
  box-shadow: 0 0 16px rgba(143, 211, 255, 0.45);
}

.fragment-marker {
  background: var(--fragment);
  box-shadow: 0 0 16px rgba(146, 255, 189, 0.4);
}

.energy-marker {
  border-radius: 999px;
  background: linear-gradient(90deg, #ffdf8d, var(--energy));
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.45);
}

.legend-title {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.78rem;
}

.legend-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.2;
  font-size: 0.68rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-card {
  border-radius: 24px;
  padding: 1.35rem;
}

.info-card h3 {
  margin: 0.5rem 0 0.7rem;
  font-size: 1.15rem;
}

.info-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100vw - 1rem, 100%);
    padding-top: 0.75rem;
  }

  .hero-copy,
  .simulation-card,
  .info-card {
    border-radius: 22px;
  }

  .hero-copy,
  .simulation-card {
    padding: 1rem;
  }

  .sim-topbar,
  .status-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sim-topbar {
    justify-content: start;
  }

  .primary {
    width: 100%;
  }

  .secondary {
    width: 100%;
  }

  .nav-link {
    width: 100%;
  }

  .nav-brand {
    width: 100%;
    justify-content: center;
    margin-right: 0;
    padding-bottom: 0.55rem;
  }

  .simulation {
    min-height: 410px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .timeline-steps {
    grid-template-columns: 1fr;
  }

  .timeline-scale {
    height: 2.2rem;
  }

  .timeline-tick-label {
    font-size: 0.58rem;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }

  .legend-overlay {
    right: 0.55rem;
    left: 0.55rem;
    bottom: 0.55rem;
    width: auto;
    padding: 0.6rem;
  }
}
