/* Academic homepage; visual reference: https://wangchenyang.cn/ */
:root {
  color-scheme: light;
  --bg: #f2f2f0;
  --surface: #fafafa;
  --text: #171717;
  --muted: #525252;
  --border: #cfcfcd;
  --link: #0f3d6b;
  --link-hover: #0a2847;
  --link-underline-hover: rgba(15, 61, 107, .52);
  --warm: #9e5b4c;
  --warm-soft: rgba(158, 91, 76, .14);
  --marker: #a3a3a3;
  --avatar-start: rgba(193, 92, 65, .16);
  --avatar-end: rgba(255, 252, 250, .92);
  --avatar-shadow: 0 12px 40px rgba(28, 27, 26, .09), 0 4px 14px rgba(158, 91, 76, .1);
  --font-body: "Source Sans 3", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Source Serif 4", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c1b1a;
    --surface: #262524;
    --text: #f2f0ec;
    --muted: #a8a39e;
    --border: #3f3c39;
    --link: #9ec5e8;
    --link-hover: #f4d4c4;
    --link-underline-hover: rgba(244, 212, 196, .55);
    --warm: #e8b4a0;
    --warm-soft: rgba(232, 180, 160, .14);
    --marker: #6b6560;
    --avatar-start: rgba(232, 180, 160, .24);
    --avatar-end: rgba(42, 40, 38, .96);
    --avatar-shadow: 0 12px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 180, 160, .1);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1b1a;
  --surface: #262524;
  --text: #f2f0ec;
  --muted: #a8a39e;
  --border: #3f3c39;
  --link: #9ec5e8;
  --link-hover: #f4d4c4;
  --link-underline-hover: rgba(244, 212, 196, .55);
  --warm: #e8b4a0;
  --warm-soft: rgba(232, 180, 160, .14);
  --marker: #6b6560;
  --avatar-start: rgba(232, 180, 160, .24);
  --avatar-end: rgba(42, 40, 38, .96);
  --avatar-shadow: 0 12px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 180, 160, .1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.62 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .2s ease;
}
a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover { color: var(--link-hover); border-bottom-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--warm); outline-offset: 4px; border-radius: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--surface); z-index: 10; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.page { max-width: 61rem; margin: 0 auto; padding: 2rem 1.5rem 3.5rem; display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; }
/* Follow the page briefly, then stay near the top, as in the reference. */
.sidebar { position: sticky; top: 1.25rem; z-index: 2; align-self: start; min-width: 0; padding-right: 1.5rem; }
.sidebar a { transition: color .15s ease, border-color .15s ease; }
.sidebar-inner { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.hero-avatar-wrap { width: 180px; max-width: 100%; margin-bottom: 14px; padding: 3.6px; border-radius: 14.4px; background: linear-gradient(152deg, var(--avatar-start), var(--avatar-end)); box-shadow: var(--avatar-shadow); flex-shrink: 0; }
.hero-avatar { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; border-radius: 10.8px; background: var(--surface); transition: filter .4s ease; }
.hero-avatar-wrap:hover .hero-avatar { filter: brightness(1.04) saturate(1.02); }
.sidebar h1 { margin: 0 0 4px; font: 700 1.45rem/1.2 var(--font-display); letter-spacing: -.02em; }
.name-cn { margin: 0 0 12px; font-size: .98rem; font-weight: 500; color: var(--muted); }
.sidebar-role { margin: 0 0 2px; font-size: .92rem; font-weight: 600; line-height: 1.4; }
.sidebar-role-cn { margin: 0 0 6px; font-size: .84rem; font-weight: 500; color: var(--muted); line-height: 1.35; }
.sidebar-affil { margin: 0 0 6px; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.sidebar-location { margin: 0 0 10px; font-size: .82rem; color: var(--muted); }
.sidebar-email { margin: 0 0 4px; font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.sidebar-email a { display: inline-flex; align-items: center; gap: .4em; max-width: 100%; }
.sidebar-email a span { min-width: 0; }
.sidebar-wechat { position: relative; display: inline-flex; max-width: 100%; margin: 0 0 12px; font-size: .86rem; line-height: 1.45; overflow-wrap: anywhere; }
.sidebar-wechat span { min-width: 0; }
.wechat-link { display: inline-flex; align-items: center; gap: .4em; max-width: 100%; }
.wechat-link:hover, .wechat-link:focus-visible { color: var(--warm); }
.wechat-qr { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 3; width: min(240px, calc(100vw - 2rem)); padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, visibility .15s ease; }
.wechat-qr::after { content: ""; position: absolute; top: 100%; left: 0; width: 100%; height: 10px; }
.wechat-qr img { display: block; width: 100%; height: auto; max-height: var(--wechat-qr-max-height, 65vh); object-fit: contain; border-radius: 3px; }
.sidebar-wechat.is-below .wechat-qr { top: calc(100% + 8px); bottom: auto; }
.sidebar-wechat.is-below .wechat-qr::after { top: auto; bottom: 100%; }
.sidebar-wechat:not(.is-dismissed):hover .wechat-qr,
.sidebar-wechat:not(.is-dismissed) .wechat-link:focus-visible + .wechat-qr { opacity: 1; visibility: visible; pointer-events: auto; }
.sidebar-links { margin: 0 0 18px; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.sidebar-links a { font-weight: 500; border-bottom-color: var(--border); }
.sidebar-links a:hover { color: var(--warm); }
.side-nav { width: 100%; padding-top: 14px; border-top: 1px solid var(--border); font-family: "Source Sans 3 Navigation", var(--font-body); }
.side-nav-title { margin: 0 0 8px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-nav ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: block; padding: 3px 0; font-size: .88rem; font-weight: 500; color: var(--muted); border: 0; }
.side-nav a:hover { color: var(--warm); }
.main-wrap { min-width: 0; padding-left: 2.25rem; border-left: 1px solid var(--border); }
.main { max-width: none; padding-top: 2px; }
.main:focus { outline: none; }
section { margin-bottom: 2.1rem; }
section h2 { margin: 0 0 10px; padding: 0 0 5px; border-bottom: 1px solid var(--border); font: 700 1.22rem/1.62 var(--font-display); letter-spacing: -.02em; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 10px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.section-head h2 { margin: 0; padding: 0; border: 0; }
.theme-btn { flex-shrink: 0; border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px; background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 600; cursor: pointer; }
.theme-btn:hover { color: var(--warm); border-color: var(--warm); background: var(--warm-soft); }
.prose { font-size: .98rem; line-height: 1.72; }
.prose p { margin: 0 0 .85em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 600; }
/* Share the Short Bio link interaction from sypj-98.github.io across content sections. */
.prose a, .education-list a, .text-list a { text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.prose a:hover, .prose a:focus-visible,
.education-list a:hover, .education-list a:focus-visible,
.text-list a:hover, .text-list a:focus-visible { color: var(--link-hover); border-bottom-color: var(--link-underline-hover); }
.education-list { margin: 0; padding: 0; list-style: none; }
.education-entry { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 1rem; padding: 16px 0; align-items: center; }
.education-entry + .education-entry { border-top: 1px solid var(--border); }
.education-logo { display: block; width: 70px; max-width: 100%; height: auto; background: transparent; }
.education-entry h3 { margin: 0 0 3px; font-size: .96rem; font-weight: 600; line-height: 1.4; }
.education-entry p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.education-entry .degree { margin-top: 5px; }
.pub-year-heading { margin: 1.35rem 0 6px; padding: 0 0 4px; border-bottom: 1px solid var(--border); font: 700 1.05rem/1.62 var(--font-display); letter-spacing: -.02em; }
.publications-root > .publication-year:first-child .pub-year-heading { margin-top: 0; }
.research-list { margin: 0; padding: 0; list-style: none; }
.pub-entry { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 12px 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pub-entry:last-child { border-bottom: 0; }
/* The entry's 14px top padding plus this 6px margin places the image 20px from its top. */
.pub-thumb { align-self: start; margin-top: 6px; overflow: hidden; border: 1px solid var(--border); border-radius: 2px; }
.pub-thumb img { display: block; width: 100%; height: auto; }
.pub-main { min-width: 0; }
.pub-title { margin: 0 0 5px; font: 600 .98rem/1.36 var(--font-display); }
.pub-authors { margin: 0 0 3px; font-size: .88rem; color: var(--muted); line-height: 1.52; }
.pub-authors b, .pub-authors strong { color: var(--text); font-weight: 600; }
.pub-venue { margin: 0; font-size: .86rem; font-style: italic; color: var(--muted); line-height: 1.5; }
.pub-highlight { color: var(--warm); font-weight: 600; }
.pub-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; margin: 5px 0 0; font-size: .83rem; line-height: 1.5; }
.pub-links a { border-bottom-color: var(--border); transition: color .15s ease, border-color .15s ease; }
.pub-links a:hover { color: var(--warm); }
.pub-link-separator { color: var(--muted); }
.link-icon { display: inline-block; width: 1.25em; height: 1em; flex-shrink: 0; fill: currentColor; }
.wechat-icon { background-color: currentColor; -webkit-mask: url("../icons/wechat.png") center / contain no-repeat; mask: url("../icons/wechat.png") center / contain no-repeat; }
.text-list { margin: 0; padding: 0 0 0 1.25rem; }
.text-list li { padding: 4px 0; font-size: .94rem; line-height: 1.55; }
.text-list li::marker { color: var(--marker); }
.site-footer { margin-top: 2.25rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; padding: 1.5rem 1.15rem 3rem; gap: 1.5rem; }
  .sidebar { position: static; width: auto; padding: 0 0 1.25rem; border-bottom: 1px solid var(--border); }
  .sidebar-inner { align-items: center; text-align: center; }
  .wechat-qr { left: 50%; transform: translateX(-50%); }
  .side-nav ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
  .side-nav-title { text-align: center; }
  .main-wrap { border-left: 0; padding-left: 0; }
  .main { max-width: none; }
}
@media (max-width: 640px) {
  .pub-entry { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 10px 12px; }
  .side-nav a { padding: 6px 2px; }
  .theme-btn { min-height: 32px; }
  .pub-links a { padding: 3px 0; }
}
@media (max-width: 520px) {
  .pub-entry { grid-template-columns: 1fr; }
  .pub-thumb { width: 200px; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .hero-avatar, .sidebar a, .wechat-qr, .prose a, .education-list a, .text-list a, .pub-links a { transition: none; }
  .hero-avatar-wrap:hover .hero-avatar { filter: none; }
}
