/* Computer Modern — the default LaTeX typeface (CM Unicode, OFL licensed).
   Self-hosted from site/fonts/, so there is no external dependency. */
@font-face {
  font-family: "Computer Modern Serif";
  src: url("fonts/CMUSerif-Roman.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Computer Modern Serif";
  src: url("fonts/CMUSerif-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Computer Modern Serif";
  src: url("fonts/CMUSerif-Italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Computer Modern Serif";
  src: url("fonts/CMUSerif-BoldItalic.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #5b626e;
  --line: #e4e7ec;
  --accent: #2f5eff;
  --card: #fafbfc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e9ecf1;
    --muted: #9aa3b2;
    --line: #262a33;
    --accent: #7d9bff;
    --card: #161a21;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  /* CM has a small x-height, so it needs a larger size than a UI font
     to read at the same apparent scale. 18px ≈ LaTeX's 10pt on paper. */
  font: 18px/1.7 "Computer Modern Serif", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

header.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--fg);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
}

nav a:hover { color: var(--fg); }

a { color: var(--accent); }

.hero { padding: 64px 0 8px; }

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0 0 28px;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

section { padding: 32px 0; }

section + section { border-top: 1px solid var(--line); }

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
}

.button:hover { filter: brightness(1.08); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.875em;
}

footer.wrap {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 0.875rem;
}
