/* Shared English / Chinese presentation. English is the no-script default. */
html:not([data-language="zh"]) [data-lang="zh"],
html[data-language="zh"] [data-lang="en"] { display: none !important; }
:root { --ink: #173a49; --muted: #62747c; --accent: #267c70; --line: #e2e9ec; }
html { scroll-padding-top: 85px; }
body { color: #364b55; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.75; }
a { color: #236c80; }
a:focus-visible, button:focus-visible { outline: 3px solid #389386; outline-offset: 4px; }
.masthead { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.masthead .site-header { display: flex; align-items: center; gap: 24px; max-width: 1220px; padding: 15px 24px; }
.site-header::after, .site-header::before { display: none; }
.site-wordmark { flex: 0 0 auto; color: var(--ink); font-weight: 800; font-size: 23px; letter-spacing: -1.3px; }
.site-wordmark span { color: var(--accent); }
.site-navigation { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.site-navigation::-webkit-scrollbar { display: none; }
.site-navigation a { flex: 0 0 auto; font-size: 12px; font-weight: 550; color: #53666f; padding: 4px 0; white-space: nowrap; }
.site-navigation a:hover { color: var(--accent); }
.language-switch { display: flex; flex-shrink: 0; padding: 3px; background: #edf2f3; border-radius: 7px; gap: 2px; }
.language-switch button { border: 0; border-radius: 5px; padding: 5px 9px; color: #5c7079; background: transparent; font-family: inherit; font-weight: 600; font-size: 12px; line-height: 1.5; cursor: pointer; }
.language-switch button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 4px #173a4915; }
#main { max-width: 1160px; margin-top: 42px; padding: 0 24px 48px; }
.sidebar { width: 200px; }
.sidebar .author__avatar img { max-width: 160px; padding: 4px; border-color: #dbe5e8; }
.sidebar .author__name { color: var(--ink); font-size: 23px; letter-spacing: -.4px; }
.sidebar .author__bio { color: var(--muted); font-size: 13px; }
.sidebar .author__urls { font-size: 13px; line-height: 1.6; }
.author__urls i { color: #728e96; }
.author__urls a { padding: 4px 0; }
.page { width: calc(100% - 245px); padding-left: 0; }
.page__content h1:before, .page__content .anchor:before, .page__content #about-me:before { display: none; }
.page__content #about-me { margin-top: 0; }
.page__content h2 { color: var(--ink); font-size: 24px; letter-spacing: -.6px; margin: 46px 0 19px; border-bottom: 1px solid var(--line); padding-bottom: 13px; scroll-margin-top: 88px; }
.page__content h3 { color: var(--ink); font-size: 17px; margin-top: 26px; }
.page__content p { margin-bottom: 15px; }
.profile-intro { margin-bottom: 20px; }
.page__content .bio-paragraph { text-align: justify; text-justify: auto; }
.profile-intro .intro-eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: 2.2px; text-transform: uppercase; margin: 0 0 9px; }
.page__content .intro-title { font-size: 46px; line-height: 1.15; color: var(--ink); letter-spacing: -1.7px; margin: 0 0 13px; padding: 0; border: 0; }
.intro-name-secondary { color: #76888f; font-size: .52em; font-weight: 500; letter-spacing: 1px; margin-left: 9px; white-space: nowrap; }
.intro-role { color: #59717c; font-size: 15px; margin-bottom: 20px; }
.research-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 23px; }
.research-tags > span { padding: 5px 12px; color: #246c61; font-size: 12px; font-weight: 700; background: #edf6f3; border: 1px solid #d7e9e3; border-radius: 5px; }
.paper-box { padding: 24px 0; align-items: center; }
.paper-box .paper-box-image img { box-shadow: none; border: 1px solid #e3eaed; border-radius: 5px; padding: 7px; background: #fff; }
.paper-box .paper-box-image > div { position: relative; width: 100%; }
.paper-box .paper-box-text { font-size: 14px; line-height: 1.6; }
.paper-box .paper-box-text p { margin-bottom: 11px; }
.paper-box-text strong a { text-decoration: none; color: #184a60; }
.badge { top: 0; left: 0; margin: 0; padding: 4px 9px; background: #173f52; border-radius: 4px 0 5px 0; font-size: 10px; line-height: 1.5; }
.pub-venue { background: #eaf1f4; color: #315d70; border-radius: 3px; padding: 3px 6px; font-size: 10px; }
.page__content > ul { padding-left: 20px; }
.page__content > ul > li { margin-bottom: 12px; }
.scholar-citation-badge { color: #fff; background: #285f78; border: 1px solid #285f78; box-shadow: none; font-size: 11px; border-radius: 5px; margin: 6px 0; }
.scholar-citation-badge__count { color: #285f78; }
.scholar-citation-badge:hover { box-shadow: none; transform: none; }
.show_paper_citations { color: #71838a; font-size: 12px; }
.publication-note, .corresponding-note { color: var(--muted); font-size: 12px; }
.company-inline { box-shadow: none; background: #f8fafb; border-color: #e5ebed; }
@media (min-width: 925px) { .sidebar { position: sticky; top: 100px; } }
@media (max-width: 1100px) { .site-navigation { gap: 15px; } .masthead .site-header { gap: 17px; } }
@media (max-width: 924px) {
 #main { margin-top: 24px; padding: 0 22px 32px; }
 .sidebar { float: none; width: 100%; margin: 0 0 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
 .page { float: none; width: 100%; padding: 0; }
 .sidebar .author__avatar img { max-width: 80px; }
 .profile_box { flex-wrap: wrap; gap: 10px; }
 .author__urls-wrapper { max-width: 100%; }
 .author__urls_sm { display: flex; flex-wrap: wrap; gap: 12px; font-size: 22px; }
 .author__urls_sm a { display: inline-flex; }
 .masthead .site-header { flex-wrap: wrap; gap: 12px; padding: 10px 20px; }
 .site-navigation { order: 3; flex-basis: 100%; gap: 23px; }
 .language-switch { margin-left: auto; }
 html { scroll-padding-top: 110px; }
 .page__content h2 { scroll-margin-top: 110px; }
}
@media (max-width: 600px) {
 body { font-size: 14px; }
 .page__content .intro-title { font-size: 36px; }
 .intro-name-secondary { font-size: .5em; }
 .page__content h2 { margin-top: 36px; font-size: 22px; }
 .paper-box { gap: 12px; }
 .paper-box .paper-box-text { order: 1; }
 .paper-box .paper-box-image { order: 2; }
 .paper-box .paper-box-image img { max-width: 400px; }
 .sidebar .author__name { font-size: 20px; }
 .sidebar .author__bio { margin: 6px 0; }
 .author__urls-wrapper { flex-basis: 100%; margin-left: 0; }
 .company-inline { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Internship dates, company mark and role follow a compact resume row. */
.internship-section { margin-top: 46px; }
.page__content .internship-section h2 { margin: 0 0 13px; }
.internship-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 15px 0 4px; align-items: start; }
.internship-period { padding-top: 2px; color: #526176; font-size: 14px; font-weight: 600; line-height: 26px; white-space: nowrap; }
.internship-detail { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.internship-logo { flex: 0 0 26px; display: block; width: 26px; height: 26px; margin-top: 1px; object-fit: contain; }
.internship-copy { min-width: 0; }
.page__content .internship-title { margin: 0; color: #253443; font-size: 17px; font-weight: 700; line-height: 28px; }
.page__content .internship-location { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 600px) {
  .internship-section { margin-top: 36px; }
  .internship-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .internship-period { padding-top: 0; font-size: 13px; }
  .page__content .internship-title { font-size: 16px; line-height: 25px; }
}

/* Publication rows: thumbnail, title, authors, venue/award, then resources. */
.paper-box.publication-card { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 16px; padding: 28px 0; align-items: start; }
.publication-card .paper-box-image { display: block; width: 100%; min-width: 0; max-width: none; order: 0; }
.publication-card .paper-box-image > .paper-thumbnail { position: relative; display: flex; align-items: center; justify-content: center; height: 166px; border: 1px solid #dce4eb; border-radius: 5px; background: #f7f9fb; box-shadow: 0 3px 9px rgba(28, 47, 64, .12); overflow: hidden; }
.publication-card .paper-box-image img { display: block; width: 100%; height: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; object-fit: contain; background: transparent; }
.publication-card .badge { z-index: 1; top: 10px; left: 0; padding: 3px 8px; font-size: 11px; font-weight: 700; line-height: 1.5; background: #073da4; border-radius: 0 3px 3px 0; }
.publication-card .paper-box-text { max-width: none; min-width: 0; padding: 0; order: 0; }
.page__content .paper-title { margin: 0 0 7px; color: #4b5156; font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: 0; }
.page__content .paper-authors { margin: 0 0 7px; color: #0875d7; font-size: 15px; font-weight: 500; line-height: 1.55; }
.paper-authors strong { font-weight: 750; }
.paper-venue-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 9px; margin: 0 0 8px; }
.paper-venue { color: #354052; font-size: 15px; font-style: italic; font-weight: 650; line-height: 1.55; }
.paper-award { display: inline-block; padding: 2px 7px; border: 1px solid #efb8ac; border-radius: 2px; background: #fff4ef; color: #c0392b; font-size: 12px; font-style: normal; font-weight: 650; line-height: 1.45; }
.paper-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 16px; }
.page__content .paper-links a { color: #2c5091; font-size: 15px; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.publication-compact { padding: 21px 0; border-bottom: 1px solid var(--line); }
.page__content > .publication-compact:last-of-type { border-bottom: 0; }
.publication-compact .paper-box-text { width: 100%; }
@media (min-width: 925px) and (max-width: 1100px) {
 .paper-box.publication-card { grid-template-columns: 220px minmax(0, 1fr); }
 .publication-card .paper-box-image > .paper-thumbnail { height: 150px; }
}
@media (max-width: 640px) {
 .paper-box.publication-card { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 23px 0; }
 .publication-card .paper-box-image { width: min(100%, 320px); }
 .publication-card .paper-box-image > .paper-thumbnail { height: 190px; }
 .page__content .paper-title { font-size: 16px; }
 .page__content .paper-authors, .paper-venue, .page__content .paper-links a { font-size: 14px; }
}
