/* jacobhan.me typography policy: Source Han Serif (본명조), 2026-09-08.
 * Adobe's original 2.003 variable fonts, pinned to a release commit.
 * The Korean subset loads first; the complete Pan-CJK face supplies other glyphs.
 * Copyright 2017-2022 Adobe. SIL Open Font License 1.1:
 * https://github.com/adobe-fonts/source-han-serif/blob/7889f11bf31170b5d092a083b357c8c8130f89e0/LICENSE.txt
 * This is NOT a renamed Noto Serif or Source Serif 4 font.
 */
@font-face {
  font-family: 'Source Han Serif';
  src:
    url('https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-serif@7889f11bf31170b5d092a083b357c8c8130f89e0/Variable/WOFF2/OTF/Subset/SourceHanSerifKR-VF.otf.woff2') format('woff2'),
    url('https://raw.githubusercontent.com/adobe-fonts/source-han-serif/7889f11bf31170b5d092a083b357c8c8130f89e0/Variable/WOFF2/OTF/Subset/SourceHanSerifKR-VF.otf.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Han Serif Pan-CJK';
  src:
    url('https://cdn.jsdelivr.net/gh/adobe-fonts/source-han-serif@7889f11bf31170b5d092a083b357c8c8130f89e0/Variable/WOFF2/OTF/SourceHanSerifK-VF.otf.woff2') format('woff2'),
    url('https://raw.githubusercontent.com/adobe-fonts/source-han-serif/7889f11bf31170b5d092a083b357c8c8130f89e0/Variable/WOFF2/OTF/SourceHanSerifK-VF.otf.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme],
[data-jh-mode] {
  --jh-font-serif: 'Source Han Serif', 'Source Han Serif Pan-CJK', serif;
  --ff-serif-en: var(--jh-font-serif) !important;
  --ff-serif-ko: var(--jh-font-serif) !important;
  --ff-display: var(--jh-font-serif) !important;
  --ff-ui: var(--jh-font-serif) !important;
}

/* Use the complete face for explicitly marked Japanese / Chinese passages. */
:lang(ja),
:lang(zh) {
  --jh-font-serif: 'Source Han Serif Pan-CJK', 'Source Han Serif', serif;
}

/* Standalone reports have their own font rules. This shared policy covers
 * prose, titles, navigation, tables, captions and forms without changing
 * their sizes, weights, colors, layout, or theme behavior.
 * Keep code, math renderers and icon fonts intact: their glyph metrics matter.
 */
html:root body,
html:root body :where(
  h1, h2, h3, h4, h5, h6, p, blockquote, ul, ol, li, dl, dt, dd,
  table, thead, tbody, tfoot, tr, th, td, caption, figcaption,
  header, footer, nav, main, article, section, aside, div, span, a,
  strong, b, em, i, small, label, button, input, select, option, textarea,
  summary, details, time, sup, sub, svg text, svg tspan
):not(:where(
  pre, pre *, code, code *, kbd, kbd *, samp, samp *,
  .code, .code *, .hljs, .hljs *, [class*='language-'], [class*='language-'] *,
  math, math *, .math, .math *, .katex, .katex *, .MathJax, .MathJax *,
  mjx-container, mjx-container *, .icon, .icon *, [class*='icon-'],
  .fa, .fas, .far, .fab, .material-icons, .material-symbols-outlined
)) {
  font-family: var(--jh-font-serif) !important;
}
