/*
  Endure site shell. Shared by every static page under public/ (about,
  bibliography, resources, and the pages still to come). Only what every page
  needs lives here; page-specific rules stay inline in each page.
  Plain CSS, no build step, no third-party requests: the fonts are served
  from /fonts/ on this domain (license note in /fonts/LICENSE.txt).
*/

/* Fonts. Each file is the latin subset of a variable font, so one rule per
   family covers every weight the pages use. Text shows in the fallback face
   until the file arrives (font-display: swap). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/public-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens. Light first; dark follows the device setting. */
:root {
  --paper: #F7F9F8; --surface: #FFFFFF; --ink: #1C282A; --muted: #55686B;
  --faint: #8AA0A0; --line: #DCE4E3; --accent: #35707A; --green: #3E8465;
  --accent-ink: #F7F9F8;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A0F14; --surface: #121A20; --ink: #E8EEEC; --muted: #9AABA8;
    --faint: #64787A; --line: #223038; --accent: #6FA8B0; --green: #7CB894;
    --accent-ink: #0A0F14;
  }
}

/* Base type and layout */
* { box-sizing: border-box; }
body {
  background: var(--paper); color: var(--ink); margin: 0;
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 780px; margin: 0 auto; padding: 26px 22px 64px; }

/* Nav: brand on the left, page links on the right; wraps onto two lines on
   narrow phones. The current page carries aria-current="page". */
nav.site {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  border-bottom: 2px solid var(--ink); padding-bottom: 14px; flex-wrap: wrap;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.brand small { font-family: var(--font-body); font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 8px; letter-spacing: .02em; }
nav.site .links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; font-weight: 500; }
nav.site .links a { color: var(--muted); text-decoration: none; }
nav.site .links a:hover { color: var(--accent); }
nav.site .links a[aria-current] { color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* Page opening */
.hero { padding: 46px 0 8px; }
h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 5.6vw, 42px); line-height: 1.12; letter-spacing: -0.015em;
  margin: 0 0 16px; text-wrap: balance;
}

/* Footer */
footer { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 16px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--faint); }
footer .mark-line { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; }
footer a { color: var(--faint); }
footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
