@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/crimson-pro-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/crimson-pro-latin-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #fcfbf9;
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27grain%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.84%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix type=%27matrix%27 values=%270 0 0 0 .36 0 0 0 0 .32 0 0 0 0 .28 0 0 0 .045 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23grain)%27/%3E%3C/svg%3E");
  --text: #3e3b37;
  --muted: #6b6763;
  --heading: #292826;
  --accent: #a13a53;
  --line: #dcd7d1;
  --row-line: #e9e5df;
  --paper-wash: radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, .55), transparent 78%);
  --frame-background: #faf9f6;
  --frame-border: #d3d0ca;
  --frame-shadow: rgba(26, 38, 51, .09);
  --measure: 960px;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Crimson Pro", "Songti SC", "Noto Serif CJK SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 84px; scroll-behavior: smooth; }
body { margin: 0; background-color: var(--background); background-image: var(--paper-texture), var(--paper-wash); color: var(--text); font-family: var(--serif); font-size: 18px; line-height: 1.55; font-kerning: normal; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 72%, transparent); }
a:hover { text-decoration: underline; text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { max-width: 100%; }
p { margin: 0 0 13px; }
.biography p, #research p, .paper-title { text-wrap: pretty; }
strong { font-weight: 600; }
h1, h2, h3, h4 { color: var(--heading); }
h1, h2 { font-family: var(--serif); font-weight: 450; line-height: 1.15; letter-spacing: -.012em; }
h2 { font-size: 29px; font-weight: 500; letter-spacing: -.018em; margin: 0 0 17px; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 26px 0 10px; }
.container { width: min(var(--measure), calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; left: 20px; top: -100px; background: var(--background); padding: 8px 12px; z-index: 5; }
.skip-link:focus { top: 8px; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: var(--background); transition: background 180ms ease, box-shadow 180ms ease; }
.site-header.is-scrolled { box-shadow: 0 3px 16px rgba(0,0,0,.08); }
.site-header.is-scrolled::after { content: ""; position: absolute; bottom: -1px; left: 0; width: var(--reading-progress, 0%); height: 2px; background: var(--accent); opacity: .78; pointer-events: none; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .site-header.is-scrolled { background: color-mix(in srgb, var(--background) 60%, transparent); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); }
}
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-name { font-family: var(--serif); font-size: 25px; font-weight: 500; color: var(--heading); text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.site-header nav a { position: relative; font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--text); text-decoration: none; padding: 6px 0; transition: color 160ms ease; }
.site-header nav a:hover, .site-header nav a:focus-visible, .site-header nav a[aria-current="location"] { color: var(--accent); }
.site-header nav a::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: 2px; background: var(--accent); transform: scaleX(.55); opacity: 0; transition: transform 160ms ease, opacity 160ms ease; }
.site-header nav a[aria-current="location"]::after, .site-header nav a:hover::after { transform: scaleX(1); opacity: 1; }
.nav-toggle, .theme-toggle { display: none; }
.nav-toggle svg { width: 19px; height: 19px; }
.nav-toggle .close-icon, .nav-toggle .close-label { display: none; }
.nav-toggle[aria-expanded="true"] .menu-icon, .nav-toggle[aria-expanded="true"] .menu-label { display: none; }
.nav-toggle[aria-expanded="true"] .close-icon, .nav-toggle[aria-expanded="true"] .close-label { display: inline; }

.profile { display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 44px; align-items: start; padding: 38px 0 21px; }
.name-divider { display: inline-block; color: var(--muted); opacity: .65; font-weight: 400; font-size: .8em; padding-inline: 3px; }
.profile h1 [lang="zh-CN"] { font-size: .87em; font-weight: 400; letter-spacing: .035em; }
.profile h1 { font-size: clamp(32px, 3.3vw, 38px); line-height: 1.2; font-weight: 500; letter-spacing: -.02em; margin: 0 0 8px; }
.profile-affiliation { font-size: 19px; color: var(--muted); margin-bottom: 18px; }
.profile-affiliation a { text-decoration: none; }
.biography { max-width: 720px; }
.profile-email { color: var(--muted); font-size: 16.5px; margin: 18px 0 7px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; padding: 0; margin: 0; font-size: 18px; }
.profile-links a, .section-link { text-decoration: none; font-weight: 500; }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.profile-links svg { width: 16px; height: 16px; flex: none; fill: currentColor; transition: transform 160ms ease; }
@media (hover: hover) { .profile-links a:hover svg { transform: translateY(-2px); } }
.profile-links a:hover, .section-link:hover { text-decoration: underline; }
.avatar-frame { margin: 6px 0 0; width: 208px; padding: 7px; border: 1px solid var(--frame-border); border-radius: 6px; background: var(--frame-background); box-shadow: 0 2px 4px var(--frame-shadow), 0 7px 19px var(--frame-shadow); transition: box-shadow 180ms ease; }
@media (hover: hover) { .avatar-frame:hover { box-shadow: 0 3px 6px var(--frame-shadow), 0 10px 24px var(--frame-shadow); } }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 36px; align-items: start; border-top: 1px solid var(--line); padding: 26px 0 18px; }
.overview-section { display: flex; flex-direction: column; min-width: 0; font-size: 18px; line-height: 1.48; }
.overview-section h2 { margin-bottom: 15px; }
.overview-grid h2 { font-size: 27px; }
.overview-experience { position: relative; min-width: 0; font-size: 16px; line-height: 1.3; }
@media (min-width: 941px) { .overview-experience::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: -19px; width: 1px; background: var(--line); } }
.overview-experience h2 { margin: 0 0 5px; }
.overview-experience h2#internship { margin-top: 10px; }
.overview-experience .education-entry, .overview-experience .experience-entry { grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 0; padding: 1px 0; }
.overview-experience .education-entry img, .overview-experience .experience-entry img { width: 30px; height: 30px; grid-row: auto; }
.overview-experience .education-entry img.cuhk-logo { width: 34px; height: 34px; }
.overview-experience .experience-entry img.stepfun-logo, .overview-experience .experience-entry img.microsoft-logo { width: 27px; height: 27px; }
.overview-experience .entry-date { grid-column: auto; font-size: 14.5px; }
.overview-experience .education-entry p, .overview-experience .experience-entry p { font-size: 15.5px; line-height: 1.3; margin: 0; }
.overview-experience .education-entry strong, .overview-experience .experience-entry strong { font-size: 16px; }
#research .overview-content { max-height: 360px; }
.overview-content { flex: 1; min-height: 0; max-height: 265px; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.overview-content:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
#research strong { color: var(--accent); font-weight: 600; }
.overview-section ul:not(.news-list), .content-section > ul { padding-left: 1.1em; margin: 0; }
.overview-section ul:not(.news-list) li, .content-section > ul li { padding-left: 3px; margin-bottom: 6px; }
#research p { margin-bottom: 6px; }
#research li { margin-bottom: 3px; line-height: 1.36; padding-left: 1px; }
#research li::marker { font-size: .8em; color: var(--muted); }
#research li:last-child { margin-bottom: 0; }
.news-list { list-style: none; margin: 0; padding: 0; }
#news .overview-content { max-height: 180px; }
.news-scroll-frame { position: relative; }
.news-scroll-frame.has-more::after { content: ""; position: absolute; left: 0; right: 9px; bottom: 0; height: 15px; background: linear-gradient(transparent, var(--background)); pointer-events: none; }
.news-scroll-hint { display: flex; align-items: center; gap: 5px; margin: 6px 0 0 auto; padding: 5px 2px; border: 0; background: transparent; color: var(--accent); font: 500 15px var(--serif); cursor: pointer; }
.news-scroll-hint[hidden] { display: none; }
.news-scroll-hint svg { width: 15px; height: 15px; }
.news-scroll-hint.at-end svg { transform: rotate(180deg); }
.news-scroll-hint:hover { text-decoration: underline; }
.news-scroll-hint:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.news-list li { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 18px; margin-bottom: 8px; }
.news-list li:last-child { margin-bottom: 0; }
.news-list time, .entry-date { font-family: var(--serif); font-size: 16.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-list time { font-weight: 450; letter-spacing: .015em; }
.news-list a { text-decoration: none; }
.news-list a:hover { text-decoration: underline; }

.content-section { border-top: 1px solid var(--line); padding: 27px 0 19px; }
.content-section > h2:not(:first-child) { margin-top: 36px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; }
.section-link { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 17px; }
.external-arrow { width: 17px; height: 17px; flex: none; transition: transform 160ms ease; }
.section-link:hover .external-arrow { transform: translate(2px,-2px); }
.publication-filter { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.publication-count { font-variant-numeric: tabular-nums; font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.publication-filter[hidden], .paper-entry[hidden] { display: none; }
.publication-filter button { font: 500 17px var(--serif); font-variant-numeric: tabular-nums; background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 3px 2px; color: var(--muted); cursor: pointer; }
.publication-filter button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.publication-filter button:hover { color: var(--accent); }
@media (min-width: 601px) { .publication-filter:not([hidden]) + .section-link { border-left: 1px solid var(--line); padding-left: 18px; } }
@media (max-width: 600px) { .publication-filter { order: 3; width: 100%; margin: 0; gap: 18px; } .publication-filter button { min-height: 44px; padding: 7px 3px; } }
.publication-filter button:focus-visible, .publication-group:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.publication-group { display: flex; align-items: center; justify-content: flex-start; gap: 8px; margin: 15px 0 0; padding: 6px 0; font-size: 20px; font-weight: 500; color: var(--heading); letter-spacing: .005em; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); }
.publication-group::-webkit-details-marker { display: none; }
.publication-group:hover { color: var(--accent); }
.group-chevron { order: -1; flex: none; width: 19px; height: 19px; color: var(--accent); transition: transform 160ms ease; transform: rotate(-90deg); }
.publication-details[open] > .publication-group .group-chevron { transform: rotate(0); }
.paper-list { margin: 0 0 4px; padding: 0; list-style: none; }
.paper-entry { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--row-line); }
.paper-entry:last-child { border-bottom: 0; padding-bottom: 12px; }
@media (hover: hover) {
  .paper-entry { transition: background-color 160ms ease; }
  .paper-entry:hover, .paper-entry:focus-within { background-color: color-mix(in srgb, var(--accent) 3%, var(--background)); }
}
.paper-venue { font-variant-numeric: tabular-nums; align-self: start; justify-self: start; max-width: 100%; padding: 2px 0 2px 5px; border-left: 3px solid var(--venue-rule, #963e32); color: var(--accent); font-size: 19px; font-weight: 600; line-height: 1.35; }
.paper-title { font-size: 21px; line-height: 1.3; margin: 0 0 4px; font-weight: 600; letter-spacing: -.012em; }
.paper-title a { color: var(--heading); text-decoration: none; }
.paper-title a:hover { color: var(--accent); text-decoration: underline; }
.paper-authors { font-size: 18px; margin: 0 0 3px; line-height: 1.48; }
.paper-authors u { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.paper-conference { font-size: 16.5px; color: var(--muted); margin: 0 0 7px; line-height: 1.5; }
.paper-conference strong { font-weight: 600; }
.paper-links { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 15px; row-gap: 4px; font-size: 17px; line-height: 1.45; }
.paper-links a { text-decoration: none; font-weight: 500; }
.paper-links a:hover { text-decoration: underline; }
.paper-note { font-style: italic; }
.artifact-status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 9px; font-size: 15px; color: var(--muted); }
.artifact-status img { height: 22px; width: auto; }

.education-entry, .experience-entry { display: grid; gap: 15px; align-items: center; grid-template-columns: 64px minmax(0, 1fr) auto; padding: 12px 0; }
.education-entry, .experience-entry { column-gap: 23px; }
.education-entry img, .experience-entry img { width: 56px; height: 56px; object-fit: contain; justify-self: center; }
.education-entry img.cuhk-logo { width: 64px; height: 64px; }
.experience-entry img.stepfun-logo, .experience-entry img.microsoft-logo { width: 54px; height: 54px; }
.stepfun-logo { border-radius: 50%; }
.education-entry p, .experience-entry p { color: var(--muted); font-size: 17px; line-height: 1.5; margin: 3px 0 0; }
.site-footer { border-top: 1px solid var(--line); display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 24px 0 36px; font-size: 15px; color: var(--muted); }
.visitor-counter { margin-left: auto; }
.visitor-counter img { max-width: 145px; height: auto; }

html[data-theme="dark"] body.theme-auto { color-scheme: dark; --background: #171a1d; --text: #d9dee2; --muted: #a6adb4; --heading: #edf1f5; --accent: #efa7b8; --venue-rule: #d47c6f; --line: #343a40; --row-line: #292f34; --paper-wash: none; --frame-background: #252a2e; --frame-border: #484e53; --frame-shadow: rgba(0, 0, 0, .25); }
html[data-theme="dark"] body.theme-auto .overview-experience img.nwpu-logo { background: #f7f6f3; border-radius: 50%; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body.theme-auto .overview-experience img.nwpu-logo { background: #f7f6f3; border-radius: 50%; }
  html:not([data-theme="light"]) body.theme-auto { color-scheme: dark; --background: #171a1d; --text: #d9dee2; --muted: #a6adb4; --heading: #edf1f5; --accent: #efa7b8; --venue-rule: #d47c6f; --line: #343a40; --row-line: #292f34; --paper-wash: none; --frame-background: #252a2e; --frame-border: #484e53; --frame-shadow: rgba(0, 0, 0, .25); }
}

@media (max-width: 940px) {
  .overview-grid { grid-template-columns: 1fr; gap: 25px; }
  .overview-content { max-height: 340px; }
  #news .overview-content { max-height: 220px; }
  .news-list li { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  #research .overview-content { max-height: 390px; }
}

@media (max-width: 800px) {
  .container { width: calc(100% - 56px); }
  .header-inner { gap: 20px; }
  .site-header nav { gap: 16px; }
  .profile { grid-template-columns: minmax(0, 1fr) 164px; gap: 28px; }
  .avatar-frame { width: 164px; padding: 6px; }
  .paper-entry { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 760px) {
  .header-inner { position: relative; min-height: 62px; padding: 12px 0; gap: 10px; flex-wrap: wrap; }
  .nav-ready .nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--accent); border: 0; padding: 8px 0 8px 10px; font: 500 18px var(--serif); cursor: pointer; }
  .nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .site-header nav { width: 100%; display: grid; grid-template-columns: 1fr; gap: 0; }
  .nav-ready .site-header nav { position: absolute; z-index: 10; top: 100%; right: 0; width: min(240px, 100%); background: var(--background); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 4px 4px; padding: 7px 15px; box-shadow: 0 8px 20px rgba(0,0,0,.09); animation: menu-appear 150ms ease-out; }
  @keyframes menu-appear { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
  .site-header nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 2px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .site-header nav a:last-of-type { border-bottom: 0; }
  .theme-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
  .theme-toggle svg { display: none; width: 22px; height: 22px; }
  .theme-toggle[data-theme-choice="auto"] .theme-auto-icon,
  .theme-toggle[data-theme-choice="light"] .theme-light-icon,
  .theme-toggle[data-theme-choice="dark"] .theme-dark-icon { display: block; }
  .theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .theme-toggle + .nav-toggle { padding-left: 0; }
  .site-header nav a::after { display: none; }
  .nav-ready .nav-toggle[aria-expanded="false"] + nav { display: none; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .profile { display: flex; flex-direction: column-reverse; gap: 20px; padding: 28px 0 19px; }
  .avatar-frame { align-self: center; width: 138px; margin: 0; padding: 6px; }
  .profile-copy { width: 100%; }
  .profile h1 { font-size: 33px; text-align: center; }
  .profile-affiliation { font-size: 18px; margin-bottom: 16px; text-align: center; }
  .profile-email { text-align: center; }
  .profile-links { justify-content: center; column-gap: 16px; }
  .overview-grid { grid-template-columns: 1fr; padding: 25px 0 18px; gap: 28px; }
  h2 { font-size: 28px; margin-bottom: 15px; }
  .content-section { padding: 24px 0 18px; }
  .section-heading { gap: 6px; flex-wrap: wrap; }
  .paper-entry { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .publication-group { min-height: 44px; }
  .paper-venue { font-size: 18px; }
  .paper-title { font-size: 20px; }
  .education-entry, .experience-entry { grid-template-columns: 52px minmax(0, 1fr); gap: 6px 17px; }
  .education-entry img, .experience-entry img { width: 46px; height: 46px; grid-row: span 2; }
  .education-entry img.cuhk-logo { width: 52px; height: 52px; }
  .experience-entry img.stepfun-logo, .experience-entry img.microsoft-logo { width: 44px; height: 44px; }
  .education-entry .entry-date, .experience-entry .entry-date { grid-column: 2; }
  .overview-experience .education-entry, .overview-experience .experience-entry { grid-template-columns: 34px minmax(0, 1fr); row-gap: 1px; padding: 4px 0; }
  .overview-experience .education-entry img, .overview-experience .experience-entry img { grid-row: span 2; }
  .overview-experience .entry-date { grid-column: 2; }
  .site-footer { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .site-header, .site-header nav, .site-header nav a, .external-arrow, .group-chevron, .paper-entry, .profile-links svg, .avatar-frame, .site-header nav a::after { animation: none !important; transition: none !important; } }

/* Keep movement local to the controls and newly revealed content. */
@media (prefers-reduced-motion: no-preference) {
  .publication-filter button { transition: color 150ms ease, border-color 150ms ease; }
  .publication-details[open] > .paper-list { animation: papers-reveal 180ms ease-out; }
  @keyframes papers-reveal { from { opacity: .65; } to { opacity: 1; } }
}
@media (hover: none) {
  .profile-links a { min-height: 32px; }
  .nav-toggle { min-height: 44px; }
}
