/* Language controls share the glass switch design, independently of theme. */
.header-settings{display:flex;align-items:center;gap:16px;flex-shrink:0}
.site-header{gap:18px}
.locale-control{display:flex;align-items:center;flex-shrink:0}
/* Hidden from sight and accessibility, but its slot remains reserved. */
.script-control{width:96px;height:40px}
.script-control[hidden]{display:flex;visibility:hidden;pointer-events:none}
.script-control:not([hidden]){animation:script-control-in 240ms ease-out}
@keyframes script-control-in{from{opacity:0;transform:translateX(6px)}to{opacity:1;transform:none}}
.locale-switch{position:relative;isolation:isolate;display:grid;grid-template-columns:1fr 1fr;align-items:center;width:124px;min-height:40px;padding:4px;border:1px solid #93a5bd70;border-radius:999px;background:linear-gradient(115deg,#ffffffb8,#dae2ed85);box-shadow:inset 0 1px 2px #ffffffd1,0 3px 14px #1b2a400a;backdrop-filter:blur(12px);color:#526179;font-size:11px;line-height:1.4;letter-spacing:0;cursor:pointer}
.locale-thumb{position:absolute;inset:4px auto 4px 4px;width:calc(50% - 4px);border-radius:999px;background:linear-gradient(135deg,#7996bb,#526f99);box-shadow:0 2px 7px #344e7830;transition:transform 420ms cubic-bezier(.22,1,.36,1),background 350ms;z-index:-1}
.locale-option{font-weight:600;transition:color 200ms;white-space:nowrap}
.locale-switch[aria-checked=false] .locale-option:first-of-type,.locale-switch[aria-checked=false] .locale-option-first,.locale-switch[aria-checked=true] .locale-option-last{color:#fff}
.locale-switch[aria-checked=true] .locale-thumb{transform:translateX(100%)}
.script-switch{width:96px}
.locale-switch:hover{box-shadow:inset 0 1px 2px #fff,0 4px 16px #526f9726}
.locale-switch:focus-visible{outline:2px solid #526f99;outline-offset:4px}
:root[data-color-scheme=pink] .locale-thumb{background:linear-gradient(135deg,#edbbd4,#d895b9)}
:root[data-color-scheme=pink] .locale-switch[aria-checked=false] .locale-option-first,:root[data-color-scheme=pink] .locale-switch[aria-checked=true] .locale-option-last{color:#46283f}
html:lang(zh) body{font-family:'DM Sans','PingFang SC','PingFang TC','Microsoft YaHei','Microsoft JhengHei',sans-serif}
html:lang(zh) :is(h2,h3,h4,.nav-links a>span:nth-child(2),.contact-title){font-family:Manrope,'PingFang SC','PingFang TC','Microsoft YaHei','Microsoft JhengHei',sans-serif;letter-spacing:0}
html:lang(zh) :is(p,.large-copy,.body-copy,.contributions li){line-height:1.85}
html:lang(zh) .home-context h2{font-size:clamp(32px,3.8vw,56px);line-height:1.4}
html:lang(zh) .education-card h2{font-size:clamp(28px,3.5vw,52px);line-height:1.45}
html:lang(zh) .card-caption h3{font-size:clamp(19px,1.75vw,26px);line-height:1.45}
html:lang(zh) .cover-kind{line-height:1.5}
html:lang(zh) .cover-topics{flex-wrap:wrap}
html:lang(zh) .cover-date{font-size:clamp(12px,1.15vw,18px)}
html:lang(zh) .home-timeline-stop h4{font-size:clamp(12px,1.1vw,18px)}
html:lang(zh) .section-heading h2{line-height:1.4}
/* Preserve the English header geometry in every language and palette. */
.header-experience{width:144px;flex:0 0 144px;justify-content:space-between;white-space:nowrap}
.header-contact{width:152px;flex:0 0 152px;justify-content:space-between;white-space:nowrap}
.menu-toggle{width:108px;flex:0 0 108px;justify-content:space-between;white-space:nowrap}
.header-settings .theme-label{width:72px;flex:0 0 72px}
.header-settings .theme-switch{width:112px;flex:0 0 112px}
@media(max-width:1250px){.header-settings{gap:10px}.theme-label{display:none}.site-header{gap:12px}.header-contact{display:none}}
@media(min-width:701px) and (max-width:900px){.site-header{padding-left:4%;padding-right:4%;gap:10px}.locale-switch{width:112px}.script-switch,.script-control{width:88px}.header-experience{padding:10px 15px;width:118px;flex-basis:118px}.menu-toggle{width:44px;flex-basis:44px;justify-content:center}.menu-label{display:none}.menu-toggle{padding:4px 5px}}
@media(max-width:700px){
 .site-header{height:122px;display:grid;grid-template-columns:1fr auto auto;grid-template-rows:48px 44px;align-content:center;gap:6px 10px;padding:10px 5%}
 .wordmark{grid-column:1;grid-row:1}.header-experience{grid-column:2;grid-row:1}.menu-toggle{grid-column:3;grid-row:1}
 .header-settings{grid-column:1/-1;grid-row:2;justify-content:flex-end;gap:8px}
 .locale-switch{width:116px;min-height:36px;font-size:11px}.script-switch,.script-control{width:90px}.script-control{height:36px}
 .header-experience{width:108px;min-height:40px;flex-basis:108px;justify-content:center}.menu-toggle{width:40px;flex-basis:40px;justify-content:center}
 .header-settings .theme-switch,html:lang(zh) .header-settings .theme-switch{width:90px;flex-basis:90px;min-height:36px}
 .site-header~main{padding-top:44px}
 .navigation{padding-top:140px}
 html:lang(zh) .home-context h2{font-size:32px}
 html:lang(zh) .education-card h2{font-size:28px}
 html:lang(zh) .home-education-title{font-size:30px}
 html:lang(zh) .experience-list .section-heading{flex-wrap:wrap}
}
@media(max-width:360px){.header-settings{gap:6px}.locale-switch{width:104px}.script-switch,.script-control{width:78px}.header-settings .theme-switch,html:lang(zh) .header-settings .theme-switch{width:78px;flex-basis:78px}}
@media(prefers-reduced-motion:reduce){.locale-thumb,.locale-option{transition:none}.script-control:not([hidden]){animation:none}}
