:root {
  --ink: #172033;
  --muted: #657087;
  --line: #dfe4ed;
  --soft: #f6f7fb;
  --white: #ffffff;
  --indigo: #6874f8;
  --cyan: #31c4d8;
  --pink: #f071a1;
  --navy: #10182c;
  --shadow: 0 18px 48px rgba(25, 35, 67, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 28%, rgba(49, 196, 216, 0.25), transparent 30%),
    radial-gradient(circle at 22% 78%, rgba(240, 113, 161, 0.2), transparent 29%),
    linear-gradient(125deg, #11192f 0%, #323d98 50%, #137d91 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -48% 48%;
  width: 680px;
  height: 680px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.035),
    0 0 0 140px rgba(255, 255, 255, 0.025);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.65) 0.8px, transparent 0.8px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.brand {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand span {
  color: #86e7ef;
}

.nav-links {
  display: flex;
  gap: 28px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--white);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 76px 0 116px;
}

.eyebrows {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
}

.eyebrows span {
  padding: 6px 11px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 14px;
  font-size: clamp(52px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.hero-lead {
  max-width: 800px;
  margin-bottom: 14px;
  font-size: clamp(21px, 2.8vw, 30px);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.025em;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.authors {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  font-size: 14px;
}

.authors span {
  color: rgba(255, 255, 255, 0.65);
}

.authors span::before {
  content: "·";
  margin-right: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.button {
  display: inline-flex;
  min-width: 112px;
  height: 45px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-light {
  color: #253065;
  background: var(--white);
}

.button-outline {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.stats-wrap {
  position: relative;
  z-index: 4;
  height: 58px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  transform: translateY(-50%);
  overflow: hidden;
  border: 1px solid rgba(222, 227, 237, 0.8);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.stats article {
  min-width: 0;
  padding: 22px 18px 20px;
  text-align: center;
}

.stats article + article {
  border-left: 1px solid var(--line);
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  color: #303c91;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.section {
  padding-top: 88px;
  padding-bottom: 88px;
  scroll-margin-top: 24px;
}

.section-tint {
  background: var(--soft);
}

.section-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 42px;
}

.section-number {
  padding-top: 5px;
  color: var(--indigo);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}

.kicker {
  margin-bottom: 7px;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.14;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.overview-grid,
.construction-grid,
.results-grid,
.composition-grid,
.start-grid {
  display: grid;
  gap: 44px;
  align-items: center;
}

.overview-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.prose {
  color: #4e596f;
  font-size: 16px;
}

.prose p {
  margin-bottom: 18px;
}

.callout {
  display: grid;
  gap: 5px;
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 10px 10px 0;
  background: var(--soft);
}

.callout strong {
  color: #303b8f;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.callout span {
  color: var(--ink);
  font-weight: 600;
}

.figure-card {
  overflow: hidden;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(25, 35, 67, 0.08);
}

.figure-card img {
  width: 100%;
  border-radius: 9px;
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.surface-card {
  min-height: 280px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(25, 35, 67, 0.055);
}

.surface-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.surface-label {
  margin: 23px 0 8px;
  color: var(--indigo);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surface-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  background: #edf0ff;
}

.document-icon {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 12px;
}

.document-icon span {
  display: block;
  height: 3px;
  border-radius: 4px;
  background: #6470e9;
}

.document-icon span:last-child {
  width: 68%;
}

.table-icon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 12px;
  background: #e8f9fb;
}

.table-icon span {
  border: 2px solid #25a9bb;
  border-radius: 2px;
}

.graph-icon {
  background:
    linear-gradient(34deg, transparent 47%, #e46b9a 48%, #e46b9a 52%, transparent 53%),
    linear-gradient(146deg, transparent 47%, #e46b9a 48%, #e46b9a 52%, transparent 53%),
    #fcecf3;
}

.graph-icon i {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 3px solid #dd5e90;
  border-radius: 50%;
  background: var(--white);
}

.graph-icon i:nth-child(1) { top: 9px; left: 22px; }
.graph-icon i:nth-child(2) { bottom: 9px; left: 8px; }
.graph-icon i:nth-child(3) { right: 8px; bottom: 9px; }

.construction-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.steps {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.steps li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #414da8;
  border-radius: 50%;
  background: #edf0ff;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.steps strong {
  font-size: 14px;
}

.steps p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.section-dark {
  color: var(--white);
  background:
    radial-gradient(circle at 8% 10%, rgba(104, 116, 248, 0.24), transparent 30%),
    linear-gradient(135deg, #11182b, #18223b);
}

.section-heading-light .section-number,
.section-heading-light .kicker {
  color: #83dfe9;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-grid article {
  min-height: 210px;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
}

.metric-grid article > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 23px;
  place-items: center;
  color: #18223b;
  border-radius: 11px;
  background: linear-gradient(135deg, #9ba4ff, #68d9e6);
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
}

.metric-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 13px;
}

.formula {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 21px 25px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.04);
}

.formula span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.formula code {
  color: #9ce7ef;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(14px, 2vw, 18px);
}

.results-grid {
  grid-template-columns: 1.3fr 0.7fr;
}

.results-figure {
  padding: 11px;
}

.finding-list {
  display: grid;
  gap: 12px;
}

.finding-list article {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 13px;
  align-items: start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.finding-list strong {
  color: #424eae;
  font-family: "JetBrains Mono", monospace;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.finding-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.composition-grid {
  grid-template-columns: 1.08fr 0.92fr;
}

.distribution-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.distribution-list div {
  display: flex;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: 13px;
}

.distribution-list div + div {
  border-top: 1px solid var(--line);
}

.distribution-list span {
  color: var(--muted);
}

.distribution-list strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.audit-note {
  display: flex;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 13px;
  background: #ebf8f5;
}

.audit-note p {
  margin: 0;
  color: #3e5e59;
  font-size: 13px;
}

.audit-mark {
  display: grid;
  flex: 0 0 27px;
  height: 27px;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: #38a98e;
  font-weight: 800;
}

.start-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.code-card {
  overflow: hidden;
  border-radius: 16px;
  color: #e9edff;
  background: #151d33;
  box-shadow: var(--shadow);
}

.code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 47px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #98a5c8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-top button {
  padding: 6px 9px;
  color: #aeb9d8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 27px 25px 31px;
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.resource-card {
  padding: 8px 0;
}

.resource-card h3 {
  margin-bottom: 16px;
}

.resource-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  color: #465067;
  font-size: 14px;
  font-weight: 600;
}

.resource-card b {
  color: var(--indigo);
  font-size: 17px;
}

footer {
  padding: 33px 0;
  color: rgba(255, 255, 255, 0.56);
  background: #11182b;
  font-size: 12px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

footer strong {
  color: var(--white);
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .stats-wrap {
    height: auto;
    padding: 24px 0 0;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    transform: none;
  }

  .stats article + article {
    border-left: 0;
  }

  .stats article:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--line);
  }

  .stats article:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .overview-grid,
  .construction-grid,
  .results-grid,
  .composition-grid,
  .start-grid {
    grid-template-columns: 1fr;
  }

  .surface-grid,
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 30px, 1100px);
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    padding: 58px 0 94px;
  }

  h1 {
    font-size: clamp(43px, 13vw, 58px);
  }

  .hero-lead {
    font-size: 20px;
  }

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

  .stats article:not(:nth-child(3n + 1)) {
    border-left: 0;
  }

  .stats article:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .stats article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .section-heading {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 30px;
  }

  h2 {
    font-size: 31px;
  }

  .surface-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .surface-card {
    min-height: auto;
  }

  .formula,
  footer .container {
    align-items: flex-start;
    flex-direction: column;
  }

  .formula {
    gap: 8px;
  }

  .finding-list article {
    grid-template-columns: 82px 1fr;
  }
}
