@font-face {
  font-family: WenKai;
  src: url('assets/wenkai-i18n.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #f5f3ed;
  --ink: #292b26;
  --muted: #6e736a;
  --line: #d9dbd0;
  --accent: #6c7d6e;
  --sans: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --kai: WenKai, 'Klee One', 'Kaiti SC', KaiTi, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
::selection { background: #dbe0d0; }
p, h1, h2, h3 { margin: 0; }
.skip-link { position: fixed; top: -60px; left: 20px; background: var(--paper); padding: 12px; z-index: 10; }
.skip-link:focus { top: 12px; }
.page { min-height: 100svh; }
.photograph { position: relative; width: min(100% - 48px, 1160px); height: clamp(260px, 28vw, 360px); margin: 24px auto 0; overflow: hidden; background: #1f667d; }
.background-photo { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% center; }
.photograph::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #0002, transparent 30%, transparent 65%, #0005); }
.photo-topline, .photo-bottomline { position: absolute; z-index: 1; left: 32px; right: 32px; color: white; font-size: 11px; letter-spacing: .4px; line-height: 1.6; text-shadow: 0 1px 5px #0009; display: flex; justify-content: space-between; gap: 18px; }
.photo-topline { top: 28px; }
.photo-topline > span:last-child { font-size: 19px; line-height: 1; }
.photo-bottomline { bottom: 24px; align-items: flex-end; }
.photo-bottomline > a { font-size: 10px; text-align: right; }
.photo-bottomline > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.paper { width: min(100% - 96px, 1040px); margin-inline: auto; display: flex; flex-direction: column; }
.header { min-height: 78px; padding-block: 16px; gap: 18px 32px; flex-wrap: wrap; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.language-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.language-switcher[hidden] { display: none; }
.language-switcher button { padding: 8px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; white-space: nowrap; text-underline-offset: 5px; }
.language-switcher button:hover { color: var(--ink); }
.language-switcher button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
:lang(en) .chinese-name { font-family: var(--sans); font-size: 42px; letter-spacing: 3px; }
:lang(en) .education-copy h3 { font-family: var(--sans); font-size: 22px; letter-spacing: 0; }
:lang(en) .han { font-family: var(--sans); font-size: 15px; }
nav { display: flex; gap: 30px; font-size: 13px; }
nav a { position: relative; padding: 8px 0; }
nav a::after { content: ''; position: absolute; bottom: 2px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width .2s; }
nav a:hover::after { width: 100%; }
nav span { padding-left: 3px; color: var(--muted); }
main { flex: 1; }
.intro { padding: 54px 0 48px; }
.identity { display: flex; align-items: center; gap: 28px; }
.avatar { width: 112px; height: 112px; object-fit: cover; border-radius: 50%; }
.chinese-name { font: 400 46px/1.25 var(--kai); letter-spacing: 3px; }
.name-divider { font: 300 22px var(--sans); color: #a4a69d; margin: 0 10px; vertical-align: 5px; }
.roman-name { font: 400 15px var(--sans); letter-spacing: 3px; vertical-align: 7px; white-space: nowrap; }
.identity-note { font-size: 14px; letter-spacing: .3px; color: var(--muted); margin-top: 12px; }
.intro-university { font-size: 22px; letter-spacing: .1px; line-height: 1.5; margin-top: 30px; }
.intro-field { font-size: 16px; line-height: 1.8; margin-top: 9px; color: var(--muted); text-wrap: pretty; }
.contact { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 22px; font-size: 14px; line-height: 1.6; }
.contact-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.contact a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; overflow-wrap: anywhere; }
.contact a:hover { text-decoration-color: var(--accent); }
.text-link { font-size: 13px; display: inline-flex; align-items: center; gap: 34px; }
.education-link { margin-top: 24px; }
.text-link > span[aria-hidden] { color: var(--accent); transition: transform .2s; }
.text-link:hover > span[aria-hidden] { transform: translateY(3px); }
.education { padding-bottom: 48px; }
.section-label { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.section-label h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 2.2px; font-weight: 400; }
.section-label > span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.education-entry { display: flex; position: relative; padding-top: 25px; gap: 17px; }
.entry-mark { height: 6px; width: 6px; border: 1px solid var(--accent); border-radius: 50%; flex-shrink: 0; margin-top: 12px; }
.education-copy { flex: 1; min-width: 0; }
.education-copy h3 { font: 400 25px/1.5 var(--kai); letter-spacing: .5px; }
.education-copy h3 span { display: inline; font: 15px/1.6 var(--sans); letter-spacing: 0; margin-left: 12px; color: var(--muted); }
.education-copy p { font-size: 14px; line-height: 1.75; margin-top: 14px; color: #5e665c; }
.han { font: 400 16px/1.8 var(--kai); }
.degree { font-size: 12px; color: var(--muted); padding-top: 9px; white-space: nowrap; }
.footer { border-top: 1px solid var(--line); padding: 23px 0 26px; font-size: 11px; letter-spacing: .4px; color: var(--muted); }
@media (max-width: 1100px) { .degree { display: none; } }
@media (max-width: 760px) {
  .photograph { width: calc(100% - 32px); height: clamp(220px, 55vw, 300px); margin-top: 16px; }
  .photo-topline, .photo-bottomline { left: 20px; right: 20px; }
  .contact { gap: 8px 18px; font-size: 13px; }
  .contact-label { flex-basis: 100%; }
  .photo-topline { top: 20px; font-size: 10px; }
  .photo-bottomline { bottom: 18px; font-size: 10px; }
  .photo-bottomline > a { font-size: 8px; max-width: 58%; }
  .paper { width: calc(100% - 48px); }
  .header { min-height: 92px; padding-block: 14px; gap: 8px; }
  .language-switcher { width: 100%; gap: 8px 20px; }
  .language-switcher button { font-size: 11px; }
  nav { margin-left: auto; }
  nav { gap: 25px; }
  .intro { padding-top: 38px; padding-bottom: 38px; }
  .identity { gap: 20px; }
  .avatar { width: 96px; height: 96px; }
  .chinese-name { font-size: 38px; letter-spacing: 1px; }
  :lang(en) .chinese-name { font-size: 34px; }
  :lang(en) .education-copy h3 { font-size: 20px; }
  :lang(en) .han { font-size: 14px; }
  .roman-name { font-size: 12px; letter-spacing: 1.5px; vertical-align: 5px; }
  .name-divider { margin: 0 5px; font-size: 17px; vertical-align: 4px; }
  .identity-note { font-size: 12px; margin-top: 9px; }
  .intro-university { font-size: 20px; margin-top: 25px; }
  .intro-field { font-size: 14px; }
  .education { padding-bottom: 36px; }
  .education-entry { gap: 13px; }
  .education-copy h3 { font-size: 24px; }
  .education-copy h3 span { display: block; margin: 3px 0 0; font-size: 14px; }
  .han { font-size: 15px; }
  .footer { font-size: 10px; }
}
@media (max-width: 360px) {
  .identity { gap: 15px; }
  .avatar { width: 82px; height: 82px; }
  .chinese-name { font-size: 32px; }
  .roman-name { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  .photograph, .header, .footer, .education-link, .skip-link { display: none !important; }
  .paper { width: 100%; padding: 20px; }
  .intro { padding-top: 20px; padding-bottom: 30px; }
  .education { padding-bottom: 20px; }
  body { background: white; }
}
