/* Self-hosted fonts: one family for both scripts. Load right after tokens.css, before any other stylesheet.
   - DM Sans, Latin subset, variable axes opsz 9–40 and wght 100–1000 (62.7 KB), from Google Fonts
     (fonts.gstatic.com/s/dmsans/v17, 2026-11-23). Licence: /assets/fonts/DMSans-OFL.txt (SIL OFL 1.1).
   - Anuphan by Cadson Demak, Thai subset, variable wght 100–700 (18.9 KB, byte-identical to Google Fonts v6).
     Licence: /assets/fonts/Anuphan-OFL.txt (SIL OFL 1.1).
   English visitors download only DM Sans; the Thai file loads only when Thai text is on the page.

   Browsers (Chrome first) combine faces of one family only when their descriptors are IDENTICAL, so the Latin
   and Thai faces of each family below declare the same weight range, style and display (design-notes.md, Thai
   typography). The ranges also equal the older i18n.css aliases, so the two cannot split Thai from Latin while
   pages migrate. Use only weights 400, 500 and 600 in new CSS (tokens.css --fw-*).

   Preload on every page (home, academic, project pages, 404), in <head> before the stylesheets:
     <link rel="preload" href="/assets/fonts/dmsans-latin-var.woff2" as="font" type="font/woff2" crossorigin>
   and on Thai pages (/th/…, or when the page starts in Thai) also:
     <link rel="preload" href="/assets/fonts/anuphan-thai.woff2" as="font" type="font/woff2" crossorigin>
   Never overwrite these files in place (/assets/* is cached); add a new file name instead. */

/* DM Sans: Latin */
@font-face {
  font-family: 'DM Sans';
  src: url(/assets/fonts/dmsans-latin-var.woff2) format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  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;
}
/* DM Sans: Thai glyphs come from Anuphan */
@font-face {
  font-family: 'DM Sans';
  src: url(/assets/fonts/anuphan-thai.woff2) format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* Anuphan under its own name: the explicit Thai fallback in var(--font-sans) */
@font-face {
  font-family: 'Anuphan';
  src: url(/assets/fonts/anuphan-thai.woff2) format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
