/* ─ Reset ─ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }

/* ─ Body ─ */
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-hi);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─ Headings ─ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-hi);
  letter-spacing: -0.02em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; margin-bottom: var(--sp-5); }
h3 { font-size: 1.125rem; margin-bottom: var(--sp-3); }
h4 { font-size: 0.9375rem; margin-bottom: var(--sp-2); }
h5 { font-size: 0.875rem; }
h6 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--text-lo); }

p { color: var(--text-mid); line-height: 1.7; margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); transition: opacity var(--t-fast); }
a:hover { opacity: 0.8; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--r-sm); }

::selection { background: var(--blue); color: #fff; }

/* ─ Scrollbar ─ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-lo); }

/* ─ Code ─ */
code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--blue);
  padding: 1px 6px;
  border-radius: var(--r-sm);
}
pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  overflow-x: auto;
  color: var(--text-hi);
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ─ Utilities ─ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); }

/* ─ Animations (subtle) ─ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.35s ease both; }
.delay-1 { animation-delay: 60ms; }
.delay-2 { animation-delay: 120ms; }
.delay-3 { animation-delay: 180ms; }
.delay-4 { animation-delay: 240ms; }