:root { color-scheme: light dark; --page: #fff; --ink: #282828; --secondary: #504945; --muted: #74716c; --divider: #e8e7e3; --surface: #f4f4f1; --reading-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --cjk-reading-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif; --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
@media (prefers-color-scheme: dark) { :root { --page: #151514; --ink: #f1efe9; --secondary: #c9c5bb; --muted: #aaa69c; --divider: #393934; --surface: #242421; } }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); color: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-language="en"] [data-lang="zh"], html[data-language="zh"] [data-lang="en"], [hidden] { display: none !important; }
body { margin: 0; background: var(--page); font: 400 17px/1.6 var(--reading-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[data-language="zh"] .bio-section { font-family: var(--cjk-reading-font); font-size: .98em; font-weight: 400; letter-spacing: 0; line-height: 1.82; }
a { color: inherit; text-underline-offset: .22em; text-decoration-color: var(--divider); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.site-chrome { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; min-height: 72px; padding: 12px clamp(20px, 3.5vw, 48px); background: var(--page); font: 13px/1.4 var(--ui-font); }
.site-home-label { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.language-picker { position: relative; }
.language-toggle { min-height: 44px; padding: 0 12px; border: 1px solid var(--divider); border-radius: 8px; color: var(--ink); background: transparent; font: inherit; cursor: pointer; }
.language-menu { position: absolute; top: calc(100% + 6px); right: 0; width: 132px; padding: 5px; border: 1px solid var(--divider); border-radius: 8px; background: var(--page); box-shadow: 0 6px 24px #00000012; }
.language-menu a { display: block; padding: 12px; text-decoration: none; border-radius: 4px; }
.language-menu a:hover, .language-menu a:focus-visible { background: var(--surface); }
.language-menu a[aria-current="page"]::after { content: " ✓"; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 12px; z-index: 30; transform: translateY(-160%); background: var(--page); }
.skip-link:focus { transform: translateY(0); }
.site-shell { padding: 40px clamp(20px, 4vw, 52px) 32px; }
.content-frame { max-width: 1040px; margin: 0 auto; }
.home-layout { display: grid; grid-template-columns: minmax(0, 660px) 260px; gap: clamp(40px, 7vw, 96px); align-items: start; }
.home-copy { min-width: 0; }
.mobile-portrait { display: none; }
.profile-heading { margin: 0 0 28px; }
.eyebrow { margin: 0 0 18px; color: var(--muted); font: 12px/1.6 var(--ui-font); letter-spacing: .04em; }
.site-title { margin: 0; font-size: clamp(2.2rem, 3.5vw, 2.65rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.name-zh, .name-en { white-space: nowrap; }
.name-divider { color: var(--divider); font-weight: 400; }
.profile-role { margin: 12px 0 0; font: 13px/1.6 var(--ui-font); color: var(--muted); }
.bio-section { color: var(--secondary); font-size: inherit; line-height: inherit; scroll-margin-top: 100px; }
.bio-section p { margin: 0 0 18px; }
.bio-section a { color: var(--ink); }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 30px 0 46px; font: 13px/1.5 var(--ui-font); }
.section-nav a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--divider); }
.section-nav a:hover { border-color: currentColor; }
.content-section { margin-top: 46px; scroll-margin-top: 96px; }
.content-section h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
.index-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--divider); }
.index-row, .contact-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--divider); }
.row-copy { min-width: 0; }
.row-copy h3 { margin: 0; font-size: 1em; font-weight: 400; line-height: 1.6; }
.row-copy p { margin: 6px 0 0; font: .8rem/1.45 var(--ui-font); color: var(--muted); }
.row-meta { color: var(--muted); font: .8rem/1.5 var(--ui-font); text-align: right; white-space: nowrap; }
.contact-row { text-decoration: none; font-size: inherit; overflow-wrap: anywhere; }
.contact-row:hover { color: var(--muted); }
.home-visual { position: sticky; top: 112px; padding-top: 4px; }
.home-visual img { display: block; width: 100%; height: auto; border-radius: 4px; }
.home-visual p { margin: 16px 0 0; color: var(--muted); font: 12px/1.6 var(--ui-font); }
@media (max-width: 900px) {
    .content-frame { max-width: 660px; }
    .home-layout { display: block; }
    .home-copy { width: 100%; }
    .home-visual { display: none; }
    .site-chrome { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
    .site-shell { padding: 20px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
    .profile-heading { display: grid; grid-template-columns: minmax(0, 1fr) 88px; column-gap: 20px; margin-bottom: 28px; }
    .eyebrow { grid-column: 1 / -1; grid-row: 1; margin-bottom: 20px; }
    .site-title { grid-column: 1; grid-row: 2; align-self: end; }
    .site-title .name-zh, .site-title .name-en { display: block; }
    .site-title .name-en { margin-top: .25em; }
    .site-title .name-divider { display: none; }
    .profile-role { grid-column: 1; grid-row: 3; }
    .mobile-portrait { display: block; grid-column: 2; grid-row: 2 / 4; align-self: center; width: 88px; height: auto; border-radius: 4px; }
    .row-copy h3 { overflow-wrap: anywhere; }
}
@media (max-width: 639px) {
    .profile-heading { column-gap: 16px; grid-template-columns: minmax(0, 1fr) 80px; }
    .mobile-portrait { width: 80px; }
    .section-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 24px 0 32px; }
    .section-nav a { justify-content: center; min-height: 44px; font-size: 13px; }
    .content-section { margin-top: 34px; }
    .index-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .index-row .row-meta { text-align: left; white-space: normal; }
    .row-meta a { display: inline-flex; align-items: center; min-height: 44px; }
    .row-copy p { font-size: .875rem; line-height: 1.75; }
    .contact-row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-chrome, .skip-link, .section-nav { display: none; } .home-visual { position: static; } .content-section { break-inside: avoid; } }

@media (min-width: 1100px) { .home-copy { font-size: 19px; } }
@media (max-width: 639px) { .site-title { font-size: clamp(1.65rem, 7.2vw, 2.2rem); } }



/* Flowing academic citations with compact publication actions. */
#publications { --citation-blue: #1565c0; }
.citation-list { list-style: none; margin: 20px 0 0; padding: 0; }
.citation-item { margin-bottom: 21px; line-height: 1.65; overflow-wrap: break-word; }
.citation-item p { margin: 0; }
.citation-title { color: var(--citation-blue); text-decoration: none; transition: color .6s; }
.citation-title:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { #publications { --citation-blue: #80baff; } }
.citation-ieee { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .citation-title { transition: none; } }

.education-link, .education-link:hover, .education-link:visited, .education-link:active { color: inherit; text-decoration: none; background: transparent; }

.home-footer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px 24px; margin-top: 48px; padding: 26px 0 0; border-top: 1px solid var(--divider); color: var(--muted); font: 16px/1.6 var(--ui-font); }
.footer-copyright { white-space: nowrap; }
.home-footer a { color: inherit; text-decoration: underline; }
.footer-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-stats > span { white-space: nowrap; }
@media (max-width: 639px) { .home-footer { margin-top: 32px; padding-top: 22px; font-size: 14px; gap: 12px 24px; } .footer-stats { gap: 8px 20px; } }
