/* 字体样式在模板 head 中通过 <link> 直接加载，避免 @import 级联延迟 */

/* --- English Serif (for body text) --- */
@font-face {
    font-family: "Crimson Pro";
    src: url("/assets/fonts/CrimsonPro-VariableFont_wght.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: "Crimson Pro";
    src: url("/assets/fonts/CrimsonPro-Italic-VariableFont_wght.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: optional;
}

/* --- Code Font --- */
@font-face {
    font-family: "JetBrains Mono";
    src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

/*******************************************************************************
FONT APPLICATION
*******************************************************************************/

/* 正文: 英文用 Crimson Pro，中文用朱雀仿宋 */
body {
    font-family: "Crimson Pro", "Zhuque Fangsong (technical preview)", Georgia, serif !important;
    font-weight: 400 !important;
    font-variant-ligatures: none !important;
    font-feature-settings: "liga" 0, "clig" 0 !important;
    opacity: 0;
    transition: opacity 0.08s ease;
}

body.font-loaded {
    opacity: 1;
}

/* 标题: 英文用 Crimson Pro，中文用朱雀仿宋 */
h1, h2, h3, h4, h5 {
    font-family: "Crimson Pro", "Zhuque Fangsong (technical preview)", serif !important;
}

/* 侧栏/边注: 思源屏显臻宋 */
.marginnote, .sidenote {
    font-family: "Source Han Serif CN for Display", "Crimson Pro", serif !important;
    color: #858580 !important;
}

/* 保留原有 heading-en 样式覆盖 */
.heading-en {
    font-style: normal !important;
}

/* 代码: JetBrains Mono */
code, pre, kbd, tt {
    font-family: "JetBrains Mono", monospace !important;
}
