:root {
  --bg: #07111b;
  --panel: rgba(9, 20, 34, 0.84);
  --panel-strong: rgba(11, 24, 39, 0.94);
  --line: rgba(150, 201, 255, 0.14);
  --text: #edf7ff;
  --muted: #adc3d8;
  --accent: #86e7ff;
  --accent-strong: #25bfff;
  --energy: #ffd16f;
  --decayed: #ff8f76;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 191, 255, 0.18), transparent 28%),
    radial-gradient(circle at 88% 15%, rgba(255, 209, 111, 0.14), transparent 22%),
    linear-gradient(165deg, #030910 0%, #091523 40%, #112740 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  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;
}

.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(9, 20, 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(134, 231, 255, 0.45);
  animation: core-pulse 2.8s ease-in-out infinite;
}

.brand-orbit {
  border: 2px solid rgba(134, 231, 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;
}

.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(150, 201, 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: #04111c;
  background: linear-gradient(135deg, var(--accent), #b4f8ff);
  border-color: transparent;
}

.hero,
.content-grid {
  display: grid;
  gap: 1rem;
}

.hero {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  margin-bottom: 1rem;
}

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

.hero-copy,
.panel {
  padding: 1.7rem;
}

.hero-visual {
  padding: 1.2rem;
}

.eyebrow,
.label,
.scene-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 {
  margin: 0.45rem 0 1rem;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.95;
  max-width: 9ch;
}

.lead,
.panel p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  margin: 1.35rem 0 1.1rem;
}

.primary {
  border: 0;
  border-radius: 999px;
  padding: 0.88rem 1.2rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  color: #04111c;
  background: linear-gradient(135deg, var(--energy), #fff0a6);
  box-shadow: 0 12px 24px rgba(255, 209, 111, 0.24);
  transition: transform 180ms ease;
}

.example-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(150, 201, 255, 0.12);
  transition: transform 180ms ease, background-color 180ms ease;
}

.primary:hover {
  transform: translateY(-1px);
}

.example-btn:hover {
  transform: translateY(-1px);
}

.example-btn.is-active {
  color: #04111c;
  background: linear-gradient(135deg, var(--accent), #b8f9ff);
  border-color: transparent;
}

.hero-facts,
.scene-stats,
.content-grid,
.facts-list {
  display: grid;
}

.hero-facts,
.scene-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-facts article,
.scene-stats article,
.step-table article,
.calculator-result article,
.facts-list article {
  padding: 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

.value {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
}

.decay-scene {
  height: 100%;
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 50%, rgba(134, 231, 255, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(10, 23, 38, 0.92), rgba(8, 18, 31, 0.84));
}

.scene-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.scene-head h2 {
  margin: 0.4rem 0 0;
}

.scene-time {
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
}

.particle-field {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
  min-height: 320px;
  padding: 0.7rem;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: calc(100% / 8) calc(100% / 8);
}

.particle {
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--accent));
  box-shadow: 0 0 16px rgba(134, 231, 255, 0.24);
  transition: transform 420ms ease, opacity 420ms ease, filter 420ms ease;
}

.particle.is-decayed {
  opacity: 0.2;
  filter: saturate(0.2);
  transform: scale(0.72);
  background: radial-gradient(circle at 30% 30%, #ffd4ce, var(--decayed));
  box-shadow: 0 0 12px rgba(255, 143, 118, 0.12);
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.chart-card,
.practice-graphic {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

.chart-card {
  padding: 1.1rem;
  background:
    linear-gradient(180deg, rgba(16, 30, 47, 0.98), rgba(12, 24, 39, 0.94));
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.chart-example-name,
.chart-example-meta,
.chart-percent-badge {
  margin: 0;
}

.chart-example-name {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
}

.chart-example-meta {
  margin-top: 0.25rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
}

.chart-percent-badge {
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 209, 111, 0.12);
  border: 1px solid rgba(255, 209, 111, 0.24);
  color: var(--energy);
  font-size: 0.94rem;
  font-weight: 800;
  white-space: nowrap;
}

.chart-range-strip {
  margin-bottom: 0.9rem;
  padding: 0.8rem 0.9rem 0.9rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

.chart-range-strip > span {
  display: inline-block;
  width: 32%;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.chart-range-bars {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.55rem;
  align-items: center;
}

.chart-range-bars span {
  display: block;
  height: 0.45rem;
  border-radius: 999px;
}

.range-short {
  width: 14%;
  background: rgba(255, 143, 118, 0.75);
}

.range-medium {
  width: 24%;
  background: rgba(255, 209, 111, 0.8);
}

.range-long {
  flex: 1;
  background: rgba(134, 231, 255, 0.82);
}

.example-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.example-card,
.timescale {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

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

.example-name,
.example-half-life {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.example-half-life {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.example-curve-card {
  margin-bottom: 0.9rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

.example-curve {
  width: 100%;
  height: auto;
}

.mini-axis,
.mini-grid line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.4;
}

.mini-curve {
  fill: none;
  stroke: url(#miniCurveGlow);
  stroke-width: 4;
  stroke-linecap: round;
}

.mini-curve-labels text {
  fill: var(--muted);
  font-size: 13px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.example-copy {
  color: var(--muted);
  line-height: 1.6;
}

.example-grid,
.timescale {
  display: grid;
  gap: 0.8rem;
}

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

.example-grid article,
.timescale article {
  padding: 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

.value.small {
  font-size: 1rem;
}

.time-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--energy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 800;
}

.timescale strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}

.decay-chart {
  width: 100%;
  height: auto;
  padding: 0.25rem 0;
}

.axis-line,
.grid-lines line {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5;
}

.curve-line {
  fill: none;
  stroke: url(#curveGlow);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 720ms ease, filter 260ms ease;
  filter: drop-shadow(0 0 10px rgba(134, 231, 255, 0.24));
}

.chart-points circle {
  fill: #ffd16f;
  stroke: rgba(8, 18, 32, 0.9);
  stroke-width: 3;
  opacity: 0.28;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease, fill 260ms ease;
}

.chart-points circle.is-active {
  opacity: 1;
  fill: #ffd16f;
  transform: scale(1.18);
  filter: drop-shadow(0 0 12px rgba(255, 209, 111, 0.75));
}

.chart-points circle.is-passed {
  opacity: 0.88;
  fill: #86e7ff;
  transform: scale(1.02);
  filter: drop-shadow(0 0 10px rgba(134, 231, 255, 0.48));
}

.chart-labels text {
  fill: var(--muted);
  font-size: 15px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.step-table {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.step-table article {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.step-table span {
  color: var(--muted);
  font-weight: 700;
}

.step-table strong {
  font-size: 1.25rem;
}

.facts-list {
  gap: 0.8rem;
  margin-top: 1rem;
}

.practice-scale {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.practice-track {
  display: grid;
  gap: 0.95rem;
}

.practice-row {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(150, 201, 255, 0.08);
}

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

.practice-head strong,
.practice-head span {
  color: var(--text);
}

.practice-head span {
  font-weight: 700;
}

.practice-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 0.7rem;
}

.practice-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.practice-row.short .practice-bar span {
  width: 8%;
  background: linear-gradient(90deg, #7ce8ff, #25bfff);
}

.practice-row.medium .practice-bar span {
  width: 48%;
  background: linear-gradient(90deg, #ffd16f, #ffad79);
}

.practice-row.long .practice-bar span {
  width: 100%;
  background: linear-gradient(90deg, #ff8f76, #ffd16f);
}

.practice-row p {
  margin-bottom: 0;
}

@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(134, 231, 255, 0.45);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 24px rgba(255, 209, 111, 0.55);
  }
}

@media (max-width: 980px) {
  .hero,
  .content-grid,
  .hero-facts,
  .scene-stats,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .particle-field {
    min-height: 280px;
  }

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

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

  .hero-copy,
  .hero-visual,
  .panel {
    padding: 1rem;
    border-radius: 22px;
  }

  .particle-field {
    gap: 0.35rem;
    min-height: 240px;
  }
}
