/* The same three destinations remain within reach on every landing page. */
.masthead,.academic-header{position:sticky;top:0;z-index:15;background:#f4f1e9f2;backdrop-filter:blur(14px)}
.masthead .story-page-switch,.page-switch{flex-shrink:0}
.masthead .story-page-switch a,.page-switch a{min-height:32px;display:flex;align-items:center;justify-content:center}
@media(max-width:1000px){.signature span{display:none}.masthead .story-header-cv{margin-left:18px}}
@media(max-width:760px){.masthead{padding:20px 24px}.masthead .story-page-switch,.page-switch{font-size:10px;gap:2px}.masthead .story-page-switch a,.page-switch a{padding:5px 10px}.masthead nav a:nth-child(2){display:flex}.academic-header .header-cv{display:none}html{scroll-padding-top:110px}.profile{top:115px}}
@media(min-width:761px){html{scroll-padding-top:125px}.profile{top:125px}}
@media(max-width:370px){.signature{font-size:23px}.masthead .story-page-switch a,.page-switch a{padding-inline:8px}}
/* A quiet, persistent language control, independent of page navigation. */
.language-switch{position:fixed;right:22px;bottom:22px;z-index:50;display:flex;gap:2px;padding:4px;border:1px solid #cbd0c0;border-radius:24px;background:#f8f5eef5;box-shadow:0 3px 14px #303c3214;backdrop-filter:blur(12px)}
.language-switch button{appearance:none;border:0;background:none;color:#66705f;font:11px/1.4 'Avenir Next',-apple-system,sans-serif;padding:8px 12px;border-radius:20px;cursor:pointer;min-height:32px}
.language-switch button[aria-pressed=true]{background:#303c32;color:#fffdf6}
.language-switch button:focus-visible{outline:2px solid #647857;outline-offset:2px}
html[lang=zh-CN]{--serif:'Songti SC',STSong,'Noto Serif CJK SC',serif}
html[lang=zh-CN] .welcome h1{font-family:var(--serif);font-size:56px;letter-spacing:0}
html[lang=zh-CN] .welcome h1 em{font-style:normal}
html[lang=zh-CN] .introduction{font-size:21px;line-height:1.7}
html[lang=zh-CN] .about-section h2{line-height:1.4}
html[lang=zh-CN] .chapter h2{line-height:1.55}
@media(max-width:760px){.language-switch{right:14px;bottom:76px}.language-switch button{padding:7px 10px}html[lang=zh-CN] .welcome h1{font-size:40px}html[lang=zh-CN] .signature{font-size:24px}html[lang=zh-CN] .page-switch a,html[lang=zh-CN] .story-page-switch a{white-space:nowrap}}
/* Four primary destinations, including the notebook. */
.blog-categories{display:flex;flex-wrap:wrap;gap:10px 20px;margin:25px 0;font-size:12px}.blog-categories a{border-bottom:1px solid #c9d0bf;padding-bottom:3px}
@media(max-width:480px){.academic-header,.masthead{flex-wrap:wrap;gap:12px}.page-switch,.story-page-switch{margin-left:auto}.academic-header .signature,.masthead .signature{font-size:23px}.page-switch a,.story-page-switch a{padding-inline:7px!important}.page-switch,.story-page-switch{font-size:10px!important}}
.section-breadcrumb{max-width:1100px;margin:22px auto 0;padding:0 28px;display:flex;gap:12px;color:#737b6d;font-size:11px}.section-breadcrumb a{color:#52674a}.blog-categories button{font:inherit;color:#647857;background:transparent;border:1px solid #c9d0bf;border-radius:20px;padding:6px 15px;cursor:pointer}.blog-categories button[aria-pressed=true]{background:#303c32;color:#fffdf6}.note-entry[hidden]{display:none!important}.article-tags span{font-size:10px;color:#737b6d;margin-right:12px}
.note-category{display:block;font-size:10px;color:#647857;letter-spacing:.8px;margin-bottom:9px}.notes-list .note-entry time{font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:760px){
 .language-switch{position:relative;right:auto;bottom:auto;float:right;margin:10px 20px 5px;box-shadow:none;z-index:16;width:max-content}
 body>.academic-header,body>.masthead{clear:both}
 .language-switch button{min-width:44px;min-height:44px}
 .page-switch a,.story-page-switch a{min-height:44px!important;min-width:44px}
 .blog-categories button{min-height:44px}
 .year-nav a{min-height:36px;display:flex;align-items:center}
}
/* Shared header geometry prevents movement between the four sections. */
html{scrollbar-gutter:stable}
body>.academic-header,body>.masthead{box-sizing:border-box;width:100%;max-width:1180px;margin:0 auto;padding:27px 36px;min-height:98px;display:flex;align-items:center;gap:20px;border-bottom:1px solid #d8dacd}
body>.academic-header .signature,body>.masthead .signature{flex-shrink:0;font-size:28px;line-height:1.2}
body>.academic-header .page-switch,body>.masthead .story-page-switch{box-sizing:border-box;margin:0 0 0 auto;display:grid;grid-template-columns:repeat(4,66px);gap:4px;padding:4px;border:1px solid #d8dacd;border-radius:30px;font:11px/1.4 'Avenir Next',-apple-system,sans-serif;flex-shrink:0}
body>.academic-header .page-switch a,body>.masthead .story-page-switch a{box-sizing:border-box;display:flex!important;align-items:center;justify-content:center;padding:6px 0!important;margin:0;min-width:0;min-height:32px;height:32px;white-space:nowrap;border-radius:24px}
@media(max-width:760px){body>.academic-header,body>.masthead{padding:16px 20px;min-height:86px;gap:12px}body>.academic-header .signature,body>.masthead .signature{font-size:24px}body>.academic-header .page-switch,body>.masthead .story-page-switch{grid-template-columns:repeat(4,58px)}body>.academic-header .page-switch a,body>.masthead .story-page-switch a{height:44px;min-height:44px}}
@media(max-width:480px){body>.academic-header,body>.masthead{display:grid;grid-template-columns:1fr;gap:12px;padding:14px 20px}body>.academic-header .page-switch,body>.masthead .story-page-switch{width:100%;grid-template-columns:repeat(4,minmax(0,1fr));margin:0}body>.masthead .signature span{display:none}}
.page-switch a.active,.story-page-switch a.active{background:#303c32;color:#fffdf6}

/* Keep the Latin signature consistent across pages and language settings. */
html .signature{font-family:Baskerville,Georgia,'Times New Roman',serif;font-style:italic;font-weight:400;letter-spacing:-1px}

/* Small character vignettes; one shared image, no script or animation. */
.margin-character{display:block;width:112px;height:112px;flex:none;background-image:url('/img/identity/jiaju-character-sheet.webp');background-size:300% 200%;background-repeat:no-repeat;pointer-events:none}
.margin-character--reading{background-position:0 0}
.margin-character--camera{background-position:0 100%}

/* Omit repeated metadata in the Chinese presentation. */
html[lang="zh-CN"] .zh-omit{display:none}

html[lang="en"] .zh-only,html[lang="zh-CN"] .en-only{display:none}
html[lang="en"] .zh-omit{display:none}
html[lang="en"] .eyebrow,html[lang="en"] .overline{letter-spacing:1px}
