/* Self-hosted webfonts.
 *
 * Previously these came from fonts.googleapis.com, which cost a render-blocking
 * stylesheet on a third-party origin, then a second origin (fonts.gstatic.com)
 * for the files themselves — two extra DNS + TLS handshakes before any text
 * could paint in its real font.
 *
 * These are the *variable* latin subsets: one file per family covers every
 * weight the site uses, so all three families together are ~100KB.
 *
 * font-display: swap is deliberate. It shows fallback text immediately rather
 * than blocking paint. The layout shift that normally causes is avoided by
 * preloading these files in the page <head> — see the <link rel="preload">
 * tags — so the real font is usually in hand before first paint.
 *
 * Fonts are OFL-licensed (Inter, Space Grotesk, JetBrains Mono), which permits
 * self-hosting. Files are unmodified Google Fonts latin subsets.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-var.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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-var.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: 100 800;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-var.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;
}

/* Inter Tight — the display face used across the 2026 site build.
   Self-hosted for the same reason as the others: loading it from Google Fonts
   produced a 0.298 CLS failure on the previous site. font-display:swap keeps
   text visible during load; the metrics are close enough to the fallback that
   the swap does not shift layout meaningfully. */
@font-face {
  font-family: 'Inter Tight';
  src: url('/assets/fonts/inter-tight-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
