/* styles.css */
:root {
  --bg: #0b0c10;
  --fg: #f4f5f7;
  --muted: color-mix(in oklab, var(--fg) 72%, transparent);
  --faint: color-mix(in oklab, var(--fg) 55%, transparent);
  --border: color-mix(in oklab, var(--fg) 14%, transparent);
  --card: color-mix(in oklab, var(--fg) 6%, var(--bg));
  --accent: #c9ff5b;

  --max: 72ch;
  --pad: clamp(1rem, 3vw, 2rem);
  --radius: 14px;
  --focus: 2px solid color-mix(in oklab, var(--accent) 80%, white 20%);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfc;
    --fg: #101217;
    --muted: color-mix(in oklab, var(--fg) 72%, transparent);
    --faint: color-mix(in oklab, var(--fg) 55%, transparent);
    --border: color-mix(in oklab, var(--fg) 14%, transparent);
    --card: #ffffff;
    --accent: #2b6cff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
}

.wrap {
  max-width: var(--max);
  padding: var(--pad);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  background: var(--card);
  color: var(--fg);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.skip-link:focus {
  left: 0.75rem;
  outline: var(--focus);
  outline-offset: 3px;
}

.hero {
  padding: 1.25rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
}

h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.9rem;
}

.tagline {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.lede {
  color: var(--muted);
  max-width: 70ch;
}

.toc {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.9rem 0 1.1rem;
  border-bottom: 1px solid var(--border);
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  text-underline-offset: 0.2em;
}

.toc a:hover {
  color: var(--fg);
  border-bottom-color: color-mix(in oklab, var(--fg) 22%, transparent);
}

.section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.subsection {
  padding-top: 0.25rem;
}

.kicker {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

ul {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

li {
  margin: 0.25rem 0;
}

.quote {
  margin: 0 0 1.25rem;
  padding: 1rem 1rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--card) 88%, transparent);
}

blockquote {
  margin: 0;
  color: var(--fg);
}

blockquote p:last-child {
  margin-bottom: 0;
}

figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
}

.contact-form {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--card) 88%, transparent);
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

label {
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 92%, transparent);
  color: var(--fg);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 88%, transparent);
  color: var(--fg);
  text-decoration: none;
}

.btn:hover {
  border-color: color-mix(in oklab, var(--fg) 22%, transparent);
}

.form-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.footer {
  padding: 1.25rem 0 2.25rem;
  border-bottom: none;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--fg);
  border-bottom-color: color-mix(in oklab, var(--fg) 22%, transparent);
}
