/* Self-hosted fonts for optimal performance */
/* Font files should be placed in /fonts/ directory */
/* Temporary: Using Google Fonts as fallback until local fonts are downloaded */

/* Inter Font Family - Try local first, fallback to Google Fonts */
/* Download from: https://github.com/rsms/inter/releases */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Inter Regular'),
       url('../fonts/inter/inter-regular.woff2') format('woff2'),
       url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('Inter Medium'),
       url('../fonts/inter/inter-medium.woff2') format('woff2'),
       url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Inter Bold'),
       url('../fonts/inter/inter-bold.woff2') format('woff2'),
       url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: local('Inter Black'),
       url('../fonts/inter/inter-black.woff2') format('woff2'),
       url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Material Symbols Outlined — subset of the icons used by the static site.
   The full variable font is ~3 MB; this file only contains those ligatures. */

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Material Symbols Outlined'),
       url('../fonts/material-symbols/material-symbols-outlined.woff2?v=202609261430') format('woff2');
}

/* Material Symbols Outlined class */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'liga';
}

/* Fallback for browsers that don't support woff2 */
@supports not (font-variation-settings: normal) {
  .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  }
}

/* Vazirmatn — self-hosted Persian/Arabic webfont (variable, SIL OFL 1.1, see fonts/vazirmatn/OFL.txt).
   unicode-range limits it to Arabic-script glyphs so Latin text keeps using Inter. */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/vazirmatn/Vazirmatn-variable.woff2') format('woff2-variations'),
       url('../fonts/vazirmatn/Vazirmatn-variable.woff2') format('woff2 supports variations');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                 U+200C-200F, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74;
}

/* Multilingual font stack: Latin/Vietnamese, Cyrillic, CJK via system fallbacks */
:root {
  --font-sans-multilang:
    "Inter",
    "Vazirmatn",
    "Segoe UI",
    "Roboto",
    "Noto Sans",
    "Noto Sans Arabic",
    "Noto Naskh Arabic",
    "Tahoma",
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans TC",
    "PingFang TC",
    "Microsoft JhengHei",
    "Noto Sans",
    "Arial",
    sans-serif;
}

body,
.font-display {
  font-family: var(--font-sans-multilang);
}

html[lang^="zh"] body,
html[lang^="zh"] .font-display {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Inter", sans-serif;
}

html[lang="zh-Hant"] body,
html[lang="zh-Hant"] .font-display {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Noto Sans SC", "Inter", sans-serif;
}

html[lang="ru"] body,
html[lang="ru"] .font-display {
  font-family: "Inter", "Noto Sans", "Segoe UI", "Roboto", "Arial", sans-serif;
}

/* Persian: dedicated Vazirmatn stack (Arabic-script glyphs from Vazirmatn, Latin falls through to Inter) */
html[lang="fa"] body,
html[lang="fa"] .font-display {
  font-family: "Vazirmatn", "Inter", "Noto Sans Arabic", "Noto Naskh Arabic", "Tahoma", sans-serif;
}

html[lang="vi"] body,
html[lang="vi"] .font-display {
  font-family: "Inter", "Noto Sans", "Segoe UI", "Roboto", "Arial", sans-serif;
}
