:root {
  --text: #25282c;
  --muted: #626970;
  --accent: #285f8f;
  --accent-dark: #17476f;
  --border: #dfe3e6;
  --soft: #f6f8f9;
  --white: #ffffff;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
img { display: block; max-width: 100%; }

.page-width { width: min(1040px, calc(100% - 48px)); margin-inline: auto; }

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -60px;
  left: 20px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--accent-dark);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.site-name {
  color: var(--text);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav { display: flex; gap: 28px; }
.site-nav a { color: #40464c; font-size: 14px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.menu-toggle { display: none; }

.profile-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 52px;
  padding: 64px 0 58px;
}

.portrait-frame {
  display: grid;
  overflow: hidden;
  width: 230px;
  aspect-ratio: 4 / 5;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 2px;
  place-items: center;
}

.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.portrait-initials { color: var(--accent); font-family: var(--serif); font-size: 62px; }

.profile-content h1 {
  margin: -5px 0 4px;
  color: #1e2226;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

#chinese-name { margin-left: 8px; font-family: "Microsoft YaHei", sans-serif; font-size: 27px; font-weight: 500; }
.profile-role { margin: 0; color: var(--text); font-size: 18px; font-weight: 600; }
.profile-affiliation { margin: 2px 0 18px; color: var(--muted); line-height: 1.45; }
.profile-detail { margin: 14px 0 10px; }
.profile-detail strong { font-weight: 600; }

.interest-list { display: inline-flex; flex-wrap: wrap; gap: 0; }
.interest-list span:not(:last-child)::after { margin: 0 8px; color: #a1a7ac; content: "·"; }

.profile-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.profile-links a { font-weight: 500; }
.profile-links span { color: #9aa0a6; }
.profile-status { margin: 11px 0 0; color: var(--muted); font-size: 14px; }
.profile-status::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; content: ""; background: #4d8b61; border-radius: 50%; }

.biography { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--border); }
.biography p { margin: 0 0 13px; }
.biography p:last-child { margin-bottom: 0; }

.academic-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 46px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 72px;
}

.section-title p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
}

.education-list,
.research-list,
.experience-list,
.publication-list,
.honors-list,
.skills-list { border-top: 1px solid #aeb5ba; }

.education-entry,
.experience-entry,
.publication-entry {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 24px;
  padding: 23px 0;
  border-bottom: 1px solid var(--border);
}

.entry-meta { color: var(--muted); font-size: 14px; }
.education-entry h3,
.experience-entry h3,
.publication-entry h3,
.research-entry h3,
.skill-row h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.education-entry p,
.experience-entry p,
.publication-entry p,
.research-entry p,
.skill-row p { margin: 7px 0 0; color: #4f565c; }

.research-entry { padding: 23px 0; border-bottom: 1px solid var(--border); }
.research-entry p { max-width: 720px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tag-list span { padding: 2px 8px; color: #4a5966; background: var(--soft); border: 1px solid var(--border); border-radius: 2px; font-size: 12px; }

.entry-heading { display: flex; gap: 20px; align-items: baseline; justify-content: space-between; }
.entry-heading a { flex: none; font-size: 13px; text-decoration: none; }
.experience-entry .entry-role { margin-top: 4px; color: var(--accent); font-size: 14px; font-weight: 600; }
.experience-entry .entry-tools { color: var(--muted); font-size: 13px; font-style: italic; }

.publication-toolbar { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.publication-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.publication-list { padding: 0; margin: 0; list-style: none; }
.publication-entry p { margin-top: 4px; }
.publication-entry .publication-venue { color: var(--text); font-style: italic; }
.publication-links { margin-top: 8px; }
.publication-links a { margin-right: 8px; font-size: 14px; text-decoration: none; }

.honors-list { padding: 0; margin: 0; list-style: none; }
.honors-list li { display: grid; grid-template-columns: 105px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.honors-list time { color: var(--muted); font-size: 14px; }
.honors-list p { margin: 0; }

.skill-row { display: grid; grid-template-columns: 155px 1fr; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.skill-row h3 { font-size: 16px; }
.skill-row p { margin: 0; }

.contact-section { padding-bottom: 58px; }
.contact-content p { max-width: 700px; margin: 0 0 12px; }
.contact-content a { font-size: 18px; font-weight: 600; }

.site-footer { color: #596066; background: var(--soft); border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding-block: 23px; }
.footer-inner p { margin: 0; }
.footer-inner, .footer-inner a { font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-inner > a { justify-self: end; }

@media (max-width: 820px) {
  .page-width { width: min(100% - 36px, 680px); }
  .site-nav { gap: 18px; }
  .profile-section { grid-template-columns: 190px minmax(0, 1fr); gap: 34px; }
  .portrait-frame { width: 190px; }
  .academic-section { grid-template-columns: 155px minmax(0, 1fr); gap: 30px; }
  .education-entry, .experience-entry, .publication-entry { grid-template-columns: 120px minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .header-inner { min-height: 58px; }
  .menu-toggle { position: relative; display: block; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; }
  .menu-toggle > span:not(.sr-only) { position: absolute; right: 2px; width: 25px; height: 1px; background: var(--text); transition: transform 0.2s, top 0.2s; }
  .menu-toggle > span:first-child { top: 12px; }
  .menu-toggle > span:nth-child(2) { top: 21px; }
  .menu-toggle[aria-expanded="true"] > span:first-child { top: 17px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { top: 17px; transform: rotate(-45deg); }
  .site-nav { position: absolute; top: 58px; right: 0; left: 0; display: none; flex-direction: column; gap: 0; padding: 10px 18px 20px; background: var(--white); border-bottom: 1px solid var(--border); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 8px 0; font-size: 16px; }
  .profile-section { grid-template-columns: 1fr; gap: 30px; padding-top: 38px; }
  .portrait-frame { width: min(230px, 72vw); }
  .profile-content h1 { font-size: 34px; }
  #chinese-name { display: inline-block; font-size: 24px; }
  .academic-section { grid-template-columns: 1fr; gap: 22px; padding: 38px 0; }
  .section-title h2 { font-size: 24px; }
  .education-entry, .experience-entry, .publication-entry { grid-template-columns: 1fr; gap: 5px; }
  .honors-list li { grid-template-columns: 82px 1fr; gap: 14px; }
  .skill-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { grid-template-columns: 1fr; gap: 12px; }
  .footer-inner > a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
