/*
 * Global blog typography.
 *
 * Body copy: LXGW WenKai (SIL OFL 1.1)
 * Display and UI: Inter (SIL OFL 1.1)
 * Code: JetBrains Mono (SIL OFL 1.1)
 *
 * License texts are stored beside each self-hosted font under /fonts/.
 */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono/JetBrainsMono-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --blog-font-body: "LXGW WenKai", "PingFang SC", "Microsoft YaHei", sans-serif;
    --blog-font-title: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    --blog-font-code: "JetBrains Mono", "Fira Code", Consolas, "LXGW WenKai", monospace;

    /* Compatibility aliases used by the existing theme and standalone pages. */
    --blog-font-sans: var(--blog-font-body);
    --air-font: var(--blog-font-body);
    --font-chinese: var(--blog-font-body);
    --font-display: var(--blog-font-title);
    --font-en: var(--blog-font-title);
}

html,
html body {
    font-family: var(--blog-font-body) !important;
}

/* Long-form reading surfaces keep the warmer WenKai voice. */
html body .post-content,
html body .home-post-content,
html body .archive-index-entry-title,
html body .comment-content,
html body .ui.comments .text,
html body .ui.comments .text p,
html body .comment-input-div,
html body #comment-editable,
html body textarea {
    font-family: var(--blog-font-body) !important;
}

/* Headings, navigation and compact interface text use the sharper Inter layer. */
html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body .post-title,
html body .home-post-title,
html body .ui.header,
html body .navbar-logo,
html body .navbar-menu,
html body .navbar-menu a,
html body .navbar-mobile-menu,
html body .navbar-mobile-menu a,
html body .post-toc-left,
html body .archive-index-year-summary,
html body .archive-index-month-head,
html body .post-meta,
html body .home-post-meta,
html body .ui.comments .author,
html body .ui.comments .metadata,
html body .ui.comments .actions,
html body .ui,
html body .ui.menu .item,
html body .ui.list .item,
html body .ui.form .field > label,
html body .ui.button,
html body button,
html body input,
html body select,
html body time {
    font-family: var(--blog-font-title) !important;
}

html body .post-title,
html body .home-post-title,
html body h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

html body h2,
html body h3,
html body h4,
html body h5,
html body h6 {
    letter-spacing: -0.012em;
}

code,
pre,
kbd,
samp,
.hljs,
.hljs * {
    font-family: var(--blog-font-code) !important;
    font-variant-ligatures: contextual;
}
