/* Research website: approved Design B, shared by the homepage and content pages. */
:root {
  color-scheme: light;
  --ink: #28252c;
  --muted: #716b77;
  --accent: #874594;
  --accent-hover: #63276f;
  --line: #e8e4eb;
  --soft: #faf7fb;
  --page-width: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 25px; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font: 15.5px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.research-site { min-width: 0; overflow-wrap: break-word; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p, figure { margin: 0; }
a { color: var(--accent); text-decoration: none; text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 100; padding: 8px 14px; color: white; background: var(--accent); border-radius: 3px; }
.skip-link:focus { top: 10px; color: white; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }


.site-header { border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--page-width); margin: 0 auto; padding: 17px 0; min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark { color: var(--ink); font-size: 21px; letter-spacing: -.6px; white-space: nowrap; }
.wordmark:hover { color: var(--ink); text-decoration: none; }
.name-given { font-weight: 350; }
.name-family { font-weight: 650; }
.site-nav { display: flex; flex-wrap: wrap; gap: 23px; align-items: center; font-size: 13px; }
.site-nav a { color: #514a57; }
.site-nav a:hover { color: var(--accent); }

main { max-width: var(--page-width); margin: 0 auto; padding: 43px 0 35px; }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 43px; align-items: start; margin-bottom: 43px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: 1.05px; text-transform: uppercase; }
.profile .eyebrow { margin-bottom: 8px; }
h1 { font-size: 40px; line-height: 1.2; font-weight: 400; letter-spacing: -1.3px; }
.chinese-name { margin-left: .18em; font-size: .62em; letter-spacing: 0; white-space: nowrap; }
.profile-role { color: var(--muted); margin-top: 9px; font-size: 14px; }
.bio { margin-top: 21px; line-height: 1.75; }
.bio p + p { margin-top: 13px; }
.bio a, .news-list a, .beyond p a { text-decoration: underline; text-decoration-color: #c8a9d0; }
.profile-links { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 19px; font-size: 13px; }
.profile-visual { padding-top: 4px; }
.profile-visual img { width: 180px; aspect-ratio: 1; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 8px #28202e14; }

main > section + section { margin-top: 37px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 22px; margin-bottom: 20px; }
h2 { font-size: 26px; line-height: 1.3; font-weight: 400; letter-spacing: -.6px; }
.section-heading > a { font-size: 12px; }

.paper-list { display: grid; gap: 28px; }
.paper { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 23px; }
.paper-mark { padding-top: 3px; }
.paper-mark > span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 49px; width: 74px; padding: 6px 4px; color: white; background: var(--accent); border-radius: 2px; font-size: 13px; font-weight: 600; line-height: 1.45; letter-spacing: .3px; }
.paper-mark small { font-size: 10px; font-weight: 400; letter-spacing: .65px; }
.paper-venue { display: flex; flex-wrap: wrap; gap: 6px 11px; align-items: center; color: var(--muted); font-size: 11px; line-height: 1.6; margin-bottom: 5px; }
.paper-award { display: inline-block; color: #856016; background: #fcf8ee; border: 1px solid #e8d6a5; border-radius: 3px; padding: 0 6px; font-size: 10px; line-height: 1.8; }
h3 { font-size: 17px; line-height: 1.5; font-weight: 600; letter-spacing: -.13px; }
.paper h3 a { color: var(--ink); }
.paper h3 a:hover { color: var(--accent); }
.paper-authors { margin-top: 5px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.paper-authors strong { color: #514a57; font-weight: 600; }
.paper-summary { margin-top: 8px; font-size: 14px; color: #534c59; line-height: 1.7; }
.resource-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; font-size: 11px; line-height: 1.4; }
.resource-links a { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; color: #524859; border: 1px solid #ada3b2; border-radius: 3px; }
.resource-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--soft); text-decoration: none; }

.news, .projects, .beyond { border-top: 1px solid var(--line); padding-top: 25px; }
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.news-list li { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 21px; font-size: 14px; line-height: 1.7; }
.news-list time { color: #746a7b; font-size: 12px; padding-top: 1px; white-space: nowrap; }
.news-list p { min-width: 0; }

.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 29px 32px; }
.project { padding-left: 18px; border-left: 2px solid #e5dce8; }
.project h3 { font-size: 19px; font-weight: 500; }
.project h3 a { color: var(--accent); }
.project > p:not(.project-kind):not(.project-meta):not(.resource-links) { margin-top: 7px; max-width: 790px; color: #534c59; font-size: 14px; line-height: 1.75; }
.project-kind { color: #7a6f82; margin-top: 6px; font-size: 11px; }
.project-meta { color: #66506e; margin-top: 9px; font-size: 12px; line-height: 1.8; }
.project-meta strong { font-weight: 600; }
.beyond p { margin-top: 12px; font-size: 14px; color: #534c59; line-height: 1.75; }
.site-footer { border-top: 1px solid var(--line); padding: 18px 22px 22px; color: #746d79; text-align: center; font-size: 11px; line-height: 1.7; }
.site-footer p + p { margin-top: 4px; }
.site-footer a + a { margin-left: 16px; }

/* Content pages retain the same reading width, navigation, and visual rhythm. */
main.content-page { padding-top: 41px; padding-bottom: 48px; min-height: 55vh; }
.content-heading { margin-bottom: 27px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.content-heading h1 { font-size: clamp(29px, 3.5vw, 38px); line-height: 1.3; letter-spacing: -.9px; overflow-wrap: break-word; }
.content-heading > p { margin-top: 10px; }
.page-meta, .page__meta, .page__date { color: var(--muted); font-size: 12px; line-height: 1.7; }
.content-body { min-width: 0; font-size: 15.5px; line-height: 1.8; }
.content-body > :first-child { margin-top: 0; }
.content-body > :last-child { margin-bottom: 0; }
.content-body p { margin: 14px 0; }
.content-body h1 { margin: 32px 0 17px; font-size: 29px; line-height: 1.35; letter-spacing: -.5px; }
.content-body h2 { margin: 31px 0 15px; font-size: 25px; line-height: 1.4; }
.content-body h3 { margin: 25px 0 11px; font-size: 19px; line-height: 1.5; }
.content-body h4, .content-body h5, .content-body h6 { margin: 22px 0 9px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.content-body ul, .content-body ol { margin: 14px 0; padding-left: 25px; }
.content-body li + li { margin-top: 5px; }
.content-body li > ul, .content-body li > ol { margin: 7px 0; }
.content-body li > p { margin: 7px 0; }
.content-body a { overflow-wrap: anywhere; }
.content-body p a, .content-body li a { text-decoration: underline; text-decoration-color: #c8a9d0; }
.content-body .resource-links a { text-decoration: none; }
.content-body strong { font-weight: 600; }
.content-body hr { height: 0; margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
.content-body blockquote { margin: 21px 0; padding: 11px 20px; border-left: 3px solid #c7a4cf; background: var(--soft); color: #62546a; }
.content-body blockquote > :first-child { margin-top: 0; }
.content-body blockquote > :last-child { margin-bottom: 0; }
.content-body code, .content-body pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .87em; }
.content-body :not(pre) > code { padding: 2px 5px; border-radius: 3px; background: #f3eff5; color: #71447d; overflow-wrap: anywhere; }
.content-body pre { max-width: 100%; overflow-x: auto; margin: 19px 0; padding: 17px 19px; background: #f6f4f7; border: 1px solid var(--line); border-radius: 4px; color: #3e3544; line-height: 1.7; tab-size: 2; }
.content-body pre code { padding: 0; font-size: 1em; background: transparent; color: inherit; overflow-wrap: normal; white-space: pre; }
.content-body .highlight { max-width: 100%; }
.content-body mjx-container[jax] { display: inline-block; max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; }
.content-body mjx-container[jax][display="true"] { display: block; }
.content-body .highlight pre { margin: 0; }
.content-body div.highlighter-rouge { margin: 19px 0; }
.content-body table { display: block; max-width: 100%; margin: 22px 0; overflow-x: auto; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.65; }
.content-body th { background: var(--soft); color: #514258; font-weight: 600; }
.content-body th, .content-body td { padding: 10px 13px; border: 1px solid var(--line); vertical-align: top; }
.content-body img { max-width: 100%; height: auto; margin: 20px auto; border-radius: 3px; }
.content-body img.emoji { display: inline; width: 1em; height: 1em; margin: 0; vertical-align: -.1em; }
.content-body figure { margin: 23px 0; }
.content-body figure img { margin: 0 auto; }
.content-body figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.content-body details { margin: 17px 0; padding: 11px 15px; background: #fcfafc; border: 1px solid var(--line); border-radius: 3px; }
.content-body summary { cursor: pointer; color: #66506e; font-weight: 500; }
.content-body summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.content-body details[open] > summary { margin-bottom: 12px; }
.content-body details > :last-child { margin-bottom: 0; }
.content-body .footnotes { margin-top: 30px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.archive-list { margin-top: 24px; }
.archive-list article.archive__item, .content-body article.archive__item { padding: 23px 0; border-bottom: 1px solid var(--line); }
.archive-list article.archive__item:first-child, .content-body .list__item:first-of-type article.archive__item { padding-top: 7px; }
.content-body .archive__item-title, .archive-list .archive__item-title { margin: 0 0 9px; font-size: 21px; line-height: 1.5; letter-spacing: -.2px; }
.archive__item-title a { color: var(--ink); }
.archive__item-title a:hover { color: var(--accent); }
.content-body .archive__item p, .archive-list .archive__item p { margin: 9px 0; font-size: 14px; line-height: 1.75; }
.content-body .archive__item .page__date, .content-body .archive__item .page__meta { font-size: 12px; }
.content-body .archive__subtitle { margin-top: 29px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.content-body .btn { display: inline-flex; align-items: center; padding: 5px 12px; border: 1px solid #ada3b2; border-radius: 3px; font-size: 13px; }
.content-body .btn:hover { background: var(--soft); text-decoration: none; }

@media (max-width: 1000px) {
  .header-inner, main { margin-left: 32px; margin-right: 32px; }
  .profile { gap: 32px; }
}
@media (max-width: 720px) {
  .header-inner, main { margin-left: 24px; margin-right: 24px; }
  .header-inner { flex-wrap: wrap; gap: 12px 20px; padding: 15px 0; }
  .site-nav { gap: 17px; font-size: 12px; }
  main { padding-top: 32px; }
  .profile { grid-template-columns: minmax(0, 1fr) 145px; gap: 26px; margin-bottom: 34px; }
  .profile-visual img { width: 145px; }
  h1 { font-size: 34px; }
  .profile .eyebrow { font-size: 9px; }
  .profile-role { font-size: 13px; }
  .bio { font-size: 14px; }
  .profile-links { gap: 15px; font-size: 12px; }
  .paper { grid-template-columns: 65px minmax(0, 1fr); gap: 17px; }
  .paper-mark > span { width: 65px; font-size: 12px; }
  .news-list li { grid-template-columns: 84px minmax(0, 1fr); gap: 17px; }
  .project-list { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  main.content-page { padding-top: 31px; padding-bottom: 35px; }
  .content-heading { margin-bottom: 23px; padding-bottom: 19px; }
  .content-heading h1 { font-size: 31px; }
  .content-body { font-size: 15px; }
  .content-body h2 { font-size: 23px; }
}
@media (max-width: 500px) {
  body { font-size: 15px; }
  .header-inner, main { margin-left: 20px; margin-right: 20px; }
  .header-inner { display: block; }
  .wordmark { font-size: 20px; }
  .site-nav { margin-top: 12px; gap: 12px; justify-content: space-between; font-size: 11.5px; }
  main { padding-top: 27px; }
  .profile { grid-template-columns: minmax(0, 1fr) 88px; gap: 0 18px; }
  .profile-copy { display: contents; }
  .profile .eyebrow { grid-column: 1; grid-row: 1; margin-bottom: 7px; font-size: 9px; line-height: 1.6; letter-spacing: .7px; }
  .profile h1 { grid-column: 1; grid-row: 2; font-size: 32px; letter-spacing: -.8px; }
  .profile .chinese-name { display: block; font-size: 18px; margin: 6px 0 0; }
  .profile-visual { grid-column: 2; grid-row: 1 / span 2; width: 88px; padding-top: 3px; align-self: start; }
  .profile-visual img { width: 88px; }
  .profile-role { grid-column: 1 / -1; grid-row: 3; margin-top: 15px; font-size: 13px; }
  .bio { grid-column: 1 / -1; grid-row: 4; margin-top: 18px; font-size: 14.5px; }
  .profile-links { grid-column: 1 / -1; grid-row: 5; margin-top: 17px; gap: 18px; }
  .profile { margin-bottom: 34px; }
  h2 { font-size: 24px; }
  main > section + section { margin-top: 31px; }
  .section-heading { margin-bottom: 18px; gap: 6px 16px; }
  .section-heading > a { font-size: 11px; }
  .paper { grid-template-columns: 55px minmax(0, 1fr); gap: 13px; }
  .paper-mark > span { width: 55px; min-height: 44px; font-size: 11px; }
  .paper-mark small { font-size: 9px; }
  .paper h3 { font-size: 15px; line-height: 1.6; }
  .paper-summary { font-size: 13px; line-height: 1.75; }
  .paper-authors { font-size: 11px; }
  .paper-venue { font-size: 10px; gap: 5px 8px; }
  .paper-award { font-size: 9px; }
  .resource-links { gap: 6px; font-size: 10px; }
  .resource-links a { min-height: 28px; padding: 4px 8px; }
  .news-list { gap: 15px; }
  .news-list li { display: block; font-size: 13.5px; }
  .news-list time { display: block; margin-bottom: 3px; font-size: 11px; }
  .project { padding-left: 14px; }
  .project h3 { font-size: 18px; }
  .project-meta { font-size: 11px; }
  .beyond p { font-size: 13.5px; }
  .content-heading h1 { font-size: 28px; letter-spacing: -.6px; }
  .content-body { font-size: 14.5px; }
  .content-body h2 { font-size: 22px; }
  .content-body h3 { font-size: 18px; }
  .content-body pre { padding: 13px; font-size: 12px; }
  .content-body table { font-size: 12px; }
  .content-body th, .content-body td { padding: 8px 10px; }
  .content-body .archive__item-title, .archive-list .archive__item-title { font-size: 19px; }
}
@media (max-width: 350px) {
  .header-inner, main { margin-left: 17px; margin-right: 17px; }
  .profile { grid-template-columns: minmax(0, 1fr) 73px; column-gap: 14px; }
  .profile-visual, .profile-visual img { width: 73px; }
  .profile h1 { font-size: 29px; }
  .profile .eyebrow { font-size: 8.5px; }
  .site-nav { gap: 7px; font-size: 10.5px; }
  .paper { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .paper-mark > span { display: inline-flex; flex-direction: row; gap: 5px; width: auto; min-height: 26px; padding: 4px 9px; }
  .paper-mark small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
