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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--text-4) var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-1);
  background: var(--page);
  overflow-x: hidden;
  font-feature-settings: "cv05", "cv08", "ss01", "tnum";
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
}

body[data-mode="academic"] {
  font-family: var(--font-sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(110% 80% at 50% 8%, #000 0%, transparent 74%);
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--mode-accent);
  outline-offset: 3px;
}

::selection { background: color-mix(in srgb, var(--mode-accent) 34%, transparent); color: var(--text-1); }

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.05; letter-spacing: -0.035em; color: var(--text-1); }
h2 { font-size: var(--fs-h1); }
h3 { font-size: var(--fs-h3); }
code, pre, kbd, samp { font-family: var(--font-mono); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: clamp(78px, 10vw, 136px);
}

.section-head {
  max-width: 780px;
  margin-bottom: 42px;
}

.section-head.center {
  text-align: center;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--brand-grad);
}

.eyebrow.center::before { display: none; }

.lede {
  margin-top: 18px;
  max-width: 64ch;
  color: var(--text-2);
  font-size: 1.15rem;
}

.section-head.center .lede { margin-inline: auto; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

[id] { scroll-margin-top: 92px; }

@media (max-width: 760px) {
  .container { padding-inline: 18px; }
  .section { padding-block: 72px; }
  .section-head { margin-bottom: 30px; }
  .lede { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
