:root {
  color-scheme: light;
  --accent: #92316f;
  --brand-gradient: linear-gradient(110deg, #d41465 0%, #7d2c77 50%, #1756a5 100%);
  --text: #484652;
  --muted: #787483;
  --line: #a8a1ad;
  --header-height: clamp(130px, 8.06vw, 220px);
  scroll-padding-top: calc(var(--header-offset, var(--header-height)) + 17px);
  font-family: Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.container { width: 80.65%; max-width: 2200px; margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid #e8e2eb; }
.header-inner { position: relative; min-height: var(--header-height); display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.brand { display: flex; flex-direction: column; min-width: 0; text-decoration: none; }
.brand-heading { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: block; width: clamp(38px, 2.7vw, 74px); height: auto; flex-shrink: 0; }
.brand-name { align-self: flex-start; color: var(--accent); font-size: clamp(30px, 2.2vw, 60px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; white-space: nowrap; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .brand-name { background-image: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.brand-subtitle { margin-top: clamp(8px, .6vw, 16px); color: var(--muted); font-size: clamp(16px, 1.15vw, 31px); line-height: 1.3; }
.brand-subtitle-zh { margin-top: 4px; color: var(--muted); font-size: clamp(14px, .95vw, 26px); line-height: 1.3; }
.main-navigation { display: flex; flex-shrink: 0; align-items: center; gap: clamp(24px, 1.8vw, 49px); font-size: clamp(16px, 1.12vw, 30.5px); color: #302c38; white-space: nowrap; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 9px 0; border: 0; background: transparent; font-size: inherit; line-height: 1.25; font-weight: 500; color: inherit; text-decoration: none; }
.nav-link:hover, .nav-link.is-current { color: var(--accent); }
.nav-link.is-current::after { content: ""; position: absolute; height: 3px; bottom: 0; left: 0; right: 0; border-radius: 2px; background: var(--brand-gradient); }
.main-navigation { margin-left: auto; }
.site-search { flex: 0 0 auto; }
.search-toggle, .search-submit { display: grid; place-items: center; width: 44px; height: 44px; padding: 6px; border: 0; border-radius: 3px; background: transparent; color: var(--accent); }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: #faf3f8; }
.search-toggle svg { fill: none; stroke: url(#search-gradient); stroke-width: 2.2; stroke-linecap: round; }
.search-panel { position: absolute; top: calc(100% - 1px); right: 0; z-index: 20; width: 560px; max-width: 100%; border: 1px solid #e8e2eb; border-radius: 3px; background: #fff; box-shadow: 0 18px 48px #302c381f; }
.search-panel::before { content: ""; position: absolute; top: -3px; left: -1px; right: -1px; height: 3px; background: var(--brand-gradient); }
.search-panel::after { content: ""; position: absolute; top: -14px; right: 14px; width: 17px; height: 12px; background: #1756a5; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.search-form { display: flex; align-items: center; gap: 12px; padding: 20px 22px; }
.search-form input { width: 100%; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 20px; line-height: 1.4; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form input:focus-visible { outline: none; box-shadow: 0 2px 0 var(--accent); }
.search-submit { flex-shrink: 0; color: #302c38; }
.search-submit:hover { background: #faf3f8; color: var(--accent); }
.search-submit svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search-status { margin: 0; padding: 0 24px 14px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.search-results { margin: 0; padding: 0 10px 10px; list-style: none; max-height: min(420px, calc(100dvh - var(--header-offset, 150px) - 150px)); overflow-y: auto; overscroll-behavior: contain; }
.search-results li + li { border-top: 1px solid #eee8ef; }
.search-result { display: block; padding: 14px; color: var(--text); text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.search-result:hover, .search-result:focus-visible { background: #faf3f8; }
.search-result:focus-visible { outline-offset: -3px; }
.search-result-kind { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.search-result-title { display: block; color: var(--accent); font-size: 16px; line-height: 1.45; font-weight: 600; }
.search-result-excerpt { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.main-content { padding-top: clamp(52px, 3.72vw, 102px); padding-bottom: 18px; }
.biography { font-size: clamp(16px, 1.15vw, 31.4px); line-height: 1.66; overflow-wrap: break-word; }
.biography p { margin: 0; }
.section-divider { border: 0; border-top: 3px solid var(--line); margin: clamp(31px, 2.27vw, 62px) 0 clamp(31px, 2.27vw, 62px); }
.closing-divider { margin-bottom: 0; }
.site-footer { padding-block: 8px 30px; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; }
.visit-counter { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 16px; }
.visit-metric { white-space: nowrap; }
.visit-value { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; }
.visit-credit { color: var(--muted); text-underline-offset: .2em; font-size: 12px; }
.visit-status { font-size: 12px; }
.contact-card { padding: clamp(22px, 3vw, 72px) 8%; overflow-wrap: anywhere; }
.contact-card h2 { margin: 0; font-size: inherit; line-height: inherit; font-weight: 700; }
.contact-card address { font-style: normal; }
.contact-card a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.contact-card a:hover { color: var(--accent); }
.contact-card .contact-email { font-style: italic; }
.publications, .news { padding-block: clamp(8px, 1vw, 24px); font-size: clamp(16px, 1.15vw, 31.4px); line-height: 1.7; }
.publications > h2, .news > h1 { margin: 0 0 clamp(26px, 2vw, 48px); color: #302c38; font-size: clamp(26px, 1.8vw, 44px); line-height: 1.25; font-weight: 600; }
.news-page { min-height: calc(100svh - var(--header-offset, var(--header-height))); padding-bottom: 64px; }
.news-page > .news { margin-top: 28px; }
.news p { margin: 0; color: var(--muted); }
.news .news-date { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.publication-group > h3 { margin: 0 0 clamp(22px, 1.8vw, 40px); color: #302c38; font-size: clamp(21px, 1.45vw, 34px); line-height: 1.3; font-weight: 600; }
.publication-group + .publication-group { margin-top: clamp(36px, 3vw, 64px); padding-top: clamp(32px, 2.5vw, 56px); border-top: 1px solid #e8e2eb; }
.publication-list { margin: 0; padding-left: 2em; }
.publication-list > li { padding-left: .5em; }
.publication-list > li + li { margin-top: clamp(32px, 3vw, 64px); padding-top: clamp(32px, 3vw, 64px); border-top: 1px solid #e8e2eb; }
.publication-row { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 2.5vw, 60px); }
.publication-details, .publication-media { min-width: 0; }
.publication-details { overflow-wrap: anywhere; }
.publication-details p, .patent-entry p { margin: 0; }
.patent-entry { overflow-wrap: anywhere; }
.publication-title { margin: .35em 0; color: var(--accent); font-size: 1.05em; line-height: 1.65; font-weight: 700; }
.publication-title a { text-decoration: none; }
.publication-title a:hover { text-decoration: underline; text-underline-offset: .15em; }
.publication-type { display: inline-block; margin-left: .3em; padding: .12em .5em; border-radius: 3px; background: var(--brand-gradient); color: #fff; font-size: .7em; line-height: 1.5; vertical-align: .1em; white-space: nowrap; }
.review-status { background: #fff0d4; color: #825006; }
.projects-intro { margin: 0 0 24px; color: var(--muted); }
.project-entry { overflow-wrap: anywhere; }
.project-entry p { margin: 10px 0 0; }
.project-entry .project-program { margin: 0 0 8px; color: var(--muted); font-size: .9em; }
.project-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.project-status { background: #eaf4ee; color: #276342; }
.under-review .publication-title { color: #302c38; }
.under-review .publication-media { margin: 0; }
.under-review .publication-media-caption { margin-top: 8px; color: var(--muted); font-size: .75em; line-height: 1.5; text-align: center; }
.manuscript-number { font-variant-numeric: tabular-nums; }
.resource-pending { font-size: .8em; }
.publication-citation cite { font-style: normal; }
.publication-resources { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 0; margin: .5em 0 0; padding: 0; list-style: none; }
.publication-resources li + li::before { content: "|"; padding-inline: .45em; color: #a8a1ad; }
.publication-resources [aria-disabled="true"] { color: var(--muted); }
.publication-resources a { color: var(--accent); text-underline-offset: .16em; }
.publication-details .publication-note { margin-top: .35em; color: var(--muted); font-size: .8em; }
.publication-media img, .publication-media video { display: block; width: 100%; height: auto; object-fit: contain; }
/* Hide the narrow capture border in the 1203x602 ActiveSPN2 GIF. */
.publication-media img[src$="activespn2.gif"],
.paper-figure img[src$="activespn2.gif"] { clip-path: inset(1.329% .582% .997% .666%); }
/* Give all under-review figures a 2:1 display area while preserving the complete artwork. */
.under-review .publication-media img { aspect-ratio: 2 / 1; object-fit: contain; object-position: center; background: #fff; }
.publication-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 4 / 3; padding: 20px; border: 1px dashed #c9bfce; background: #faf8fb; color: var(--muted); text-align: center; font-size: clamp(13px, .9vw, 23px); line-height: 1.5; }
.publication-placeholder svg { flex-shrink: 0; width: 40px; height: 40px; margin-bottom: 8px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.publication-placeholder span[lang] { font-size: .9em; }
.paper-page { max-width: 1120px; padding-top: clamp(28px, 3vw, 64px); padding-bottom: 60px; font-size: clamp(16px, 1.2vw, 20px); line-height: 1.8; overflow-wrap: anywhere; }
.paper-back { display: inline-block; color: var(--accent); text-underline-offset: .2em; font-size: .9em; }
.paper-heading { margin-top: 32px; }
.paper-eyebrow { margin: 0 0 14px; color: var(--muted); font-size: .85em; font-weight: 600; }
.paper-eyebrow span { padding-inline: 8px; }
.paper-heading h1 { margin: 0 0 24px; color: #302c38; font-size: clamp(27px, 2.8vw, 43px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; overflow-wrap: normal; }
.paper-authors { margin: 0 0 12px; }
.paper-citation { margin: 0; }
.paper-citation cite { font-style: italic; }
.paper-doi { margin: 8px 0 0; font-size: .9em; }
.paper-page a { color: var(--accent); text-underline-offset: .2em; }
.paper-figure { margin: 36px auto; padding: 24px; background: #faf9fb; border: 1px solid #ece7ef; border-radius: 4px; }
.paper-figure img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; }
/* Fit the complete quadrotor diagram in a 5:3 frame without clipping its labels. */
.publication-media img[src$="parameter-adaptive-control.png"],
.paper-figure img[src$="parameter-adaptive-control.png"] { aspect-ratio: 5 / 3; object-fit: contain; object-position: center; background: #fff; }
.paper-figure img[src$="parameter-adaptive-control.png"] { max-width: 866.667px; max-height: none; margin-inline: auto; }
.paper-section { padding-block: 30px; border-top: 1px solid #e8e2eb; }
.paper-section h2 { margin: 0 0 18px; color: #302c38; font-size: 1.5em; font-weight: 600; line-height: 1.3; }
.paper-section p { margin: 0 0 16px; }
.paper-section p:last-child { margin-bottom: 0; }
.paper-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.paper-links a { display: inline-block; padding: 7px 16px; border: 1px solid #d9c9d6; border-radius: 3px; text-decoration: none; font-size: .9em; }
.paper-links a:hover { background: #faf3f8; border-color: var(--accent); }
.paper-section .paper-note { margin-top: 18px; color: var(--muted); font-size: .85em; }
.paper-section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.paper-section-heading h2 { margin: 0; }
.paper-section-heading > a { font-size: .85em; }
.paper-pdf-viewer { display: block; width: 100%; height: 80vh; min-height: 480px; max-height: 1000px; border: 1px solid #d9d5dd; border-radius: 4px; background: #f3f2f4; }
.paper-pdf-actions { gap: 8px; }
@media (max-width: 800px) {
  .paper-pdf-viewer { height: 70vh; min-height: 360px; }
}

.bibtex { margin: 0; padding: 24px; border: 1px solid #e8e2eb; border-radius: 4px; background: #faf9fb; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78em; line-height: 1.7; }
.bibtex code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.paper-back-bottom { margin-top: 24px; }
.menu-toggle { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 20; padding: 12px 18px; background: white; color: var(--accent); }
.skip-link:focus { top: 12px; }
.team-section h3, .team-page .team-section h2 { margin: 0 0 14px; color: #302c38; font-size: 22px; line-height: 1.35; font-weight: 600; }
.team-section + .team-section { margin-top: 26px; padding-top: 26px; border-top: 1px solid #e8e2eb; }
.team-section ul, .team-students { margin: 0; padding-left: 22px; }
.team-section-note { color: var(--muted); font-size: 14px; }
.team-students { color: var(--muted); }
.team-page { margin-top: 28px; max-width: 1100px; padding-block: clamp(8px, 1vw, 24px); font-size: clamp(16px, 1.15vw, 24px); line-height: 1.7; }
.team-page > h1 { margin: 0 0 clamp(26px, 2vw, 48px); color: #302c38; font-size: clamp(26px, 1.8vw, 44px); line-height: 1.25; font-weight: 600; }
.team-page .team-section li { margin-block: 12px; overflow-wrap: anywhere; }


@media (max-width: 1400px) {
  .header-inner { gap: 24px; }
  .brand-name { font-size: 30px; }
  .brand-subtitle { font-size: 14px; }
  .main-navigation { gap: 20px; font-size: 15px; }
}

@media (max-width: 1100px) {
  .container { width: 88%; }
  .biography { font-size: 17px; line-height: 1.8; }
}

@media (max-width: 1200px) {
  :root { --header-height: 132px; }
  .container { width: calc(100% - 40px); }
  .header-inner { flex-wrap: wrap; gap: 0 10px; padding-block: 20px; }
  .brand { max-width: calc(100% - 108px); margin-right: auto; }
  .brand-heading { gap: 8px; }
  .brand-mark { width: 32px; }
  .brand-name { font-size: 30px; }
  .brand-subtitle { margin-top: 6px; font-size: 13px; }
  .brand-subtitle-zh { font-size: 13px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; padding: 8px; border: 1px solid #e8e2eb; border-radius: 4px; color: var(--accent); background: white; }
  .menu-toggle span { height: 2px; width: 20px; background: currentColor; }
  .menu-toggle { flex-shrink: 0; }
  .site-search { order: 2; }
  .main-navigation { position: relative; order: 3; display: none; width: 100%; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; margin-top: 24px; padding-top: 17px; border-top: 1px solid #e8e2eb; }
  .main-navigation.is-open { display: flex; }
  .search-panel { width: 100%; }
  .search-form { padding: 14px 16px; gap: 8px; }
  .search-form input { font-size: 18px; }
  .search-status { padding-inline: 18px; }
}

@media (max-width: 800px) {
  .main-content { padding-top: 34px; padding-bottom: 24px; }
  .biography { font-size: 16px; line-height: 1.85; }
  .section-divider { margin-block: 30px; border-top-width: 2px; }
  .closing-divider { margin-bottom: 0; }
  .contact-card { padding: 16px 0; }
  .publication-list { padding-left: 1.5em; }
  .publication-list > li { padding-left: .2em; }
  .publication-row { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .publication-placeholder { font-size: 14px; }
  .paper-heading { margin-top: 24px; }
  .paper-figure { padding: 12px; margin-block: 24px; }
  .paper-section { padding-block: 24px; }
  .bibtex { padding: 16px; font-size: .75em; }
}

@media (max-width: 370px) {
  .brand-mark { width: 24px; }
  .brand-subtitle { font-size: 11.5px; }
  .brand-name { font-size: 21px; }
  .main-navigation { gap: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.course-list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.course-link { display: block; height: 100%; padding: 28px; border: 1px solid #e8e2eb; border-radius: 6px; text-decoration: none; overflow-wrap: anywhere; }
.course-link:hover { border-color: var(--accent); background: #fcf9fb; }
.course-link h2, .course-materials h2 { margin: 0 0 12px; color: #302c38; font-size: clamp(20px, 1.45vw, 28px); line-height: 1.4; }
.course-link > span { display: block; color: var(--muted); }
.course-link .course-link-action { margin-top: 24px; color: var(--accent); font-size: .9em; }
.course-page .course-subtitle { margin-bottom: 8px; color: var(--text); }
.course-materials { margin-top: 36px; padding-top: 28px; border-top: 1px solid #e8e2eb; }

/* Student competitions share the Teaching page. */
.teaching-competitions { padding-top: 28px; border-top: 1px solid #e8e2eb; }
.teaching-competitions > h2 { margin: 0 0 12px; color: #302c38; font-size: clamp(22px, 1.6vw, 36px); line-height: 1.35; font-weight: 600; }

/* Author roles are stored separately from names and BibTeX metadata. */
.author-marker { margin-left: .08em; font-size: .72em; line-height: 0; vertical-align: super; white-space: nowrap; }
#publication > h2 { margin-bottom: 12px; }
.author-legend { color: var(--muted); font-size: .88em; line-height: 1.6; }
.publications > .author-legend { margin: 0 0 clamp(24px, 2vw, 40px); }
.paper-heading > .author-legend { margin: 0 0 16px; }
