/* Fonts are self-hosted (no requests to Google servers). */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/newsreader-300.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/newsreader-300-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root {
  --bg: #121116;
  --text: #ECEBF0;
  --text-body: #D4D2DC;
  --text-soft: #C9C7D1;
  --text-muted: #B8B6C2;
  --meta: #A1A1AA;
  --line: #34303F;
  --rule: #2A2732;
  --link-underline: #5B4B8A;
  --accent: #A78BFA;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #7C3AED; color: #fff; }

a {
  color: var(--text);
  text-decoration-color: var(--link-underline);
  text-underline-offset: 4px;
}
a:hover { color: #C4B5FD; }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(64px, 12vw, 140px) 0 64px;
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--meta);
}

/* Header */
.masthead { text-align: center; }
.masthead p { margin: 0; }
.masthead h1 {
  margin: 40px 0 28px;
  font-size: clamp(48px, 9vw, 92px);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.masthead h1 em { color: var(--accent); }

/* Illustrations */
svg { display: block; width: 100%; height: auto; }
.hero-visual { margin: 72px 0; }
.divider { margin: 96px 0 56px; }
.divider--tight { margin-bottom: 48px; }
.divider--wide { margin-top: 112px; margin-bottom: 48px; }

/* Sections */
.lead {
  margin: 0;
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1.55;
}

h2 {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 21px;
  line-height: 1.75;
  color: var(--text-body);
}
.prose p { margin: 0; }

sup a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

/* Theses */
.theses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.theses li { display: flex; gap: 24px; }
.theses .num {
  flex: 0 0 40px;
  font-size: 22px;
  font-style: italic;
  color: var(--accent);
}
.theses .body { flex: 1 1 auto; min-width: 0; }
.theses .claim { margin: 0; font-size: 26px; line-height: 1.4; }
.theses .note {
  margin: 12px 0 0;
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-muted);
}

.closing {
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.5;
  font-style: italic;
}

/* Sources */
.sources h2, .further h2 { margin-bottom: 24px; }
.sources ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
}
.sources li { display: flex; gap: 16px; }
.sources .ref {
  flex: 0 0 24px;
  padding-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

/* Further reading */
.further ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 18px;
}
.further a { display: inline-flex; align-items: center; min-height: 44px; }

/* Footer */
footer {
  max-width: 680px;
  margin: 32px auto 0;
  padding: 24px 0 64px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--meta);
}
footer nav { display: flex; gap: 24px; }
footer a { color: var(--meta); }

/* Legal pages */
.legal h1 {
  margin: 0 0 40px;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 300;
  line-height: 1.1;
}
.legal h2 { text-align: left; margin: 48px 0 16px; }
.legal p { margin: 0 0 16px; font-size: 19px; line-height: 1.7; color: var(--text-body); }
.back { display: inline-block; margin-bottom: 48px; }
