/*
  Font loading strategy:
  1) Try CDN via jsDelivr (@fontsource packages) for faster access inside China.
  2) Fallback to local files under /assets/webfonts if CDN is unavailable.
*/

/* Priority: jsDelivr @fontsource packages */
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-sans-sc/index.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc/index.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/oswald/index.css');
@import url('https://cdn.jsdelivr.net/npm/@fontsource/source-sans-pro/index.css');

/* Local fallbacks (used if CDN not reachable) */
@font-face {
  font-family: 'Noto Sans SC';
  src: url('/assets/webfonts/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG9_FnYw.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC';
  src: url('/assets/webfonts/k3kCo84MPvpLmixcA63oeAL7Iqp5IZJF9bmaG-3FnYw.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif SC';
  src: url('/assets/webfonts/H4cyBXePl9DZ0Xe7gG9cyOj7uK2-n-D2rd4FY7RlrCWv.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif SC';
  src: url('/assets/webfonts/H4cyBXePl9DZ0Xe7gG9cyOj7uK2-n-D2rd4FY7SCqyWv.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('/assets/webfonts/TK3_WkUHHAIjg75cFRf3bXL8LICs1_FvgUE.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans Pro';
  src: url('/assets/webfonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPw.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: 'Noto Sans SC', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --font-serif: 'Noto Serif SC', 'Times New Roman', serif;
}

html, body { font-family: var(--font-sans); }
