* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #fff; color: #303030; font: 16px/1.65 Arial, sans-serif; }
main { max-width: 860px; margin: 0 auto; padding: 48px 40px 24px; }
a { color: #3666b0; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, [tabindex]:focus-visible { outline: 2px solid #3666b0; outline-offset: 5px; }
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 24px; line-height: 1.4; margin: 0 0 18px; border-bottom: 1px solid #ddd; padding-bottom: 9px; }
h3 { font-size: 16px; line-height: 1.55; margin: 0; }
p { margin: 0 0 13px; }
.affiliation { color: #626262; margin-bottom: 12px; }
section { margin-top: 33px; }
.interests { padding-left: 22px; margin: 0; }
.interests li { padding-left: 2px; margin-bottom: 7px; }
.section-note { float: right; font-size: 12px; font-weight: normal; color: #707070; margin-top: 10px; }
.news-scroll { max-height: 230px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #b4bdc9 #f1f3f6; padding-right: 14px; overscroll-behavior-y: auto; }
.news-scroll::-webkit-scrollbar { width: 7px; }
.news-scroll::-webkit-scrollbar-thumb { background: #b4bdc9; border-radius: 5px; }
.news-scroll::-webkit-scrollbar-track { background: #f1f3f6; }
.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding-bottom: 13px; }
time { color: #6a6a6a; font-size: 14px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.contribution { font-size: 14px; font-weight: normal; }
.authors { margin: 5px 0 0; }
.venue { margin: 1px 0 6px; color: #3b5a85; }
.muted { color: #6c6c6c; font-weight: normal; }
.paper-summary { color: #555; font-size: 15px; margin: 0; }
.education-row { display: flex; justify-content: space-between; gap: 20px; }
.education-date { color: #666; white-space: nowrap; font-size: 14px; }
footer { margin-top: 42px; padding-top: 15px; border-top: 1px solid #e6e6e6; display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: white; padding: 8px; }
@media (max-width: 600px) { main { padding: 30px 22px 20px; } h1 { font-size: 30px; } h2 { font-size: 22px; } section { margin-top: 28px; } nav { gap: 5px 16px; } .section-note { float: none; display: block; margin: 3px 0 0; } .contribution { display: block; font-size: 13px; } .education-row { display: block; } .education-date { margin-top: 3px; } .news-list li { grid-template-columns: 64px 1fr; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { nav, .section-note, footer a { display: none; } main { padding: 0; } .news-scroll { max-height: none; overflow: visible; } }

/* Profile and illustrated publications */
.profile-header { display: flex; align-items: center; gap: 30px; }
.profile-info { flex: 1; min-width: 0; }
.portrait { width: 190px; height: 220px; object-fit: cover; object-position: 70% 68%; border-radius: 3px; flex-shrink: 0; }
.emails { font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; margin: 16px 0 12px; }
.preferred { color: #626262; font-size: 13px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 0; }
.profile-links span { color: #999; }
.news-scroll { max-height: 300px; }
.publications { margin: 0; padding: 0; }
.paper { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 34px; }
.pipeline-link { display: block; margin: 0 8px 8px 0; }
.pipeline { display: block; width: 100%; height: auto; background: #fff; border: 1px solid #e5e7eb; padding: 5px; box-shadow: 7px 7px 0 #e0e5ec; }
.paper-info h3 { line-height: 1.45; }
.paper-info .authors { font-size: 15px; }
.paper-links { margin: 0 0 7px; display: flex; gap: 12px; font-size: 14px; }
.education-row { align-items: center; gap: 20px; }
.school-emblem { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.education-info { flex: 1; }
.education-info p { margin: 3px 0 0; }
.education-date { margin: 0; }
@media (max-width: 700px) {
.profile-header { gap: 20px; align-items: flex-start; }
.portrait { width: 130px; height: 165px; }
.paper { grid-template-columns: 1fr; gap: 19px; }
.pipeline-link { width: min(100%, 400px); }
.education-row { display: grid; grid-template-columns: 65px 1fr; gap: 5px 15px; }
.school-emblem { width: 65px; height: 65px; grid-row: span 2; }
.education-date { grid-column: 2; white-space: normal; }
}
@media (max-width: 480px) {
.profile-header { flex-direction: column-reverse; gap: 20px; }
.portrait { width: 145px; height: 170px; }
.emails { font-size: 14px; }
}

/* Compact contact block */
.emails { margin: 17px 0 16px; font-size: 14px; line-height: 1.6; }
.email-primary, .email-secondary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.email-label { color: #666; font-size: 13px; }
.email-primary .preferred { color: #777; font-size: 11px; }
.email-secondary { margin-top: 5px; font-size: 13px; }
.email-secondary a { color: #61718a; }
.email-separator { color: #b4b4b4; }
@media (max-width: 480px) {
.email-secondary { flex-direction: column; gap: 3px; }
.email-separator { display: none; }
}

/* Smaller headings and plain-text email addresses */
h1 { font-size: 28px; }
h2 { font-size: 21px; }
.chinese-name { font-size: 1em; font-weight: 500; white-space: nowrap; }
.email-primary { color: #4b4b4b; }
.email-secondary { color: #6b6b6b; }
@media (max-width: 600px) { h1 { font-size: 26px; } h2 { font-size: 20px; } }

/* Soften the partially visible last News item; reveal fully at the bottom. */
.news-scroll.has-more-below {
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 32px), transparent 100%);
}
@media print { .news-scroll.has-more-below { -webkit-mask-image: none; mask-image: none; } }
