/* Self-hosted variable fonts. Latin subset only (~163 KB total).
   Replaces fonts.googleapis.com — 2 fewer DNS lookups, 1 fewer CSS roundtrip. */

/* === Metric-matched fallbacks ===
   These adjusted local fonts have the same vertical metrics as our web fonts,
   so the swap from fallback → web font causes ~0 CLS. */

@font-face {
  font-family: "EBGaramondFallback";
  src: local("Georgia"), local("Times New Roman"), local("Times");
  size-adjust: 85%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "InterFallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 96%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "JetBrainsMonoFallback";
  src: local("Menlo"), local("Consolas"), local("Courier New");
  size-adjust: 92%;
  ascent-override: 90%;
  descent-override: 28%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: optional;
  src: url("/assets/fonts/eb-garamond.woff2") format("woff2-variations"),
       url("/assets/fonts/eb-garamond.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2-variations"),
       url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: optional;
  src: url("/assets/fonts/inter.woff2") format("woff2-variations"),
       url("/assets/fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: optional;
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2-variations"),
       url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
}
