@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

:root {
  color-scheme: light;
  --background: #fff;
  --surface: #f7f8fa;
  --text: #202124;
  --muted: #5f6368;
  --light: #80868b;
  --border: #e3e6e8;
  --accent: #1769aa;
  --accent-soft: #edf5fb;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #16181b;
  --surface: #202328;
  --text: #edf0f2;
  --muted: #b1b7bd;
  --light: #90979e;
  --border: #34383d;
  --accent: #75b7e8;
  --accent-soft: #1b3040;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { color: inherit; font: inherit; }

.site-header {
  width: min(920px, calc(100% - 40px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border);
}
.brand { margin-right: auto; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-copy { display: flex; align-items: baseline; gap: 10px; }
.brand-copy strong { font-family: "Source Serif 4", Georgia, serif; font-size: 1.15rem; }
.brand-copy small { color: var(--light); font-size: .75rem; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { position: relative; color: var(--muted); font-size: .85rem; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 1px; background: var(--accent); transition: right .22s ease; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a:hover::after { right: 0; }
.icon-button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: transparent; cursor: pointer; transition: color .2s, border-color .2s, transform .2s; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); transform: rotate(12deg); }
.icon-button:active { transform: rotate(12deg) scale(.9); }

.page-shell { width: min(880px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 48px;
  align-items: start;
  padding: 64px 0 46px;
}
.eyebrow, .section-index {
  color: var(--light);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 7px 0 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 2.6rem;
  line-height: 1.15;
  letter-spacing: -.025em;
}
h1 span { color: var(--text); font-weight: 600; }
.chinese-name { margin: 2px 0 14px; color: var(--muted); font-size: 1rem; letter-spacing: .12em; }
.lead { margin-bottom: 25px; color: var(--muted); font-weight: 500; }
.bio { color: var(--text); }
.bio p { margin-bottom: 13px; }
.bio a { white-space: nowrap; }
.profile-links { display: flex; flex-wrap: wrap; gap: 7px 17px; margin-top: 24px; }
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: .9rem;
  cursor: pointer;
}
.profile-link { position: relative; overflow: hidden; }
.profile-link:hover { text-decoration: underline; }
.profile-link:active { transform: translateY(1px); }
.profile-link span { font-size: .75rem; }
.profile-panel { padding-top: 27px; perspective: 700px; }
.avatar { width: 190px; height: 225px; display: block; object-fit: cover; object-position: center top; border-radius: 3px; box-shadow: 0 8px 24px rgba(31,45,58,.1); transition: transform .18s ease, box-shadow .25s ease; will-change: transform; }
.profile-panel:hover .avatar { box-shadow: 0 14px 32px rgba(31,45,58,.16); }

.content-section { padding: 42px 0 10px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}
h2 {
  margin: 1px 0 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.3;
}
.section-count { color: var(--light); font-size: .75rem; }
.publication-list { border: 0; }
.publication { position: relative; padding: 18px 12px 18px 0; border-bottom: 1px solid var(--border); transition: padding .22s ease, background .22s ease, border-color .22s ease; }
.publication::before { content: ""; position: absolute; left: 0; top: 17px; bottom: 17px; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: center; transition: transform .22s ease; }
.publication:first-child { padding-top: 5px; }
.publication::after { display: none; }
.publication:hover { padding-left: 14px; background: linear-gradient(90deg, var(--accent-soft), transparent 78%); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.publication:hover::before { transform: scaleY(1); }
.pub-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-bottom: 5px; color: var(--muted); font-size: .78rem; }
.venue { padding: 1px 6px; border: 0; border-radius: 3px; background: var(--accent-soft); color: var(--accent) !important; font-size: .7rem; font-weight: 600; }
.citation-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid #d4a72c; border-radius: 999px; background: linear-gradient(135deg,#fff9df,#f8e8a5); color: #755600; font-size: .68rem; font-weight: 600; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(181,135,19,.13); }
.citation-badge span { color: #c08b00; font-size: .7rem; }
.highly-cited h3::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-radius: 50%; background: #d4a72c; vertical-align: middle; box-shadow: 0 0 0 3px rgba(212,167,44,.14); }
:root[data-theme="dark"] .citation-badge { border-color: #a77d20; background: #312917; color: #f1d77a; box-shadow: none; }
.publication h3 { max-width: none; margin-bottom: 5px; font-family: "Source Serif 4", Georgia, serif; font-size: 1.05rem; line-height: 1.45; }
.publication h3 a { color: var(--text); }
.publication h3 a { transition: color .18s ease; }
.publication h3 a:hover { color: var(--accent); text-decoration: none; }
.publication p { margin-bottom: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.publication p strong { color: var(--text); }
.pub-actions { display: flex; gap: 13px; margin-top: 6px; }
.pub-actions a { font-size: .78rem; }

.project-grid { display: block; }
.project-card { min-height: 0; padding: 18px 10px 18px 0; border: 0; border-bottom: 1px solid var(--border); background: none; transition: padding .22s ease, background .22s ease; }
.project-card:hover { padding-left: 12px; background: linear-gradient(90deg, var(--surface), transparent 82%); }
.project-number { display: none; }
.project-card h3 { margin: 0 0 7px; font-family: "Source Serif 4", Georgia, serif; font-size: 1.05rem; line-height: 1.5; }
.project-card p { margin-bottom: 4px; color: var(--muted); font-size: .86rem; }
.project-card time { display: block; margin-top: 6px; padding: 0; color: var(--light); font-size: .78rem; }
.service-row { display: grid; grid-template-columns: 130px 1fr; gap: 20px; align-items: baseline; min-height: 0; padding: 14px 0; border-bottom: 1px solid var(--border); }
.service-row:first-of-type { border-top: 0; }
.service-row div { display: block; }
.service-row div span { display: none; }
.service-row strong { font-family: "Source Serif 4", Georgia, serif; font-size: 1rem; }
.service-row > p { margin: 0; color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.gallery-item { position: relative; aspect-ratio: 4/3; padding: 0; overflow: hidden; border: 1px solid var(--border); background: var(--surface); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.gallery-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 7px; background: rgba(0,0,0,.58); color: #fff; font-size: .66rem; text-align: left; }
.gallery-item.image-missing { cursor: default; }
.gallery-item.image-missing img { display: none; }
.gallery-item.image-missing::before { content: "Image pending"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--light); font-size: .7rem; }
.gallery-item:not(.image-missing):hover img { transform: scale(1.035); filter: saturate(1.08); }
.gallery-item:active { transform: scale(.985); }
.people-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.people-heading h3 { margin: 0; font-family: "Source Serif 4", Georgia, serif; font-size: 1.08rem; }
.people-heading p { margin: 0; color: var(--light); font-size: .8rem; }
.people-placeholder { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px dashed var(--border); border-radius: 4px; background: var(--surface); color: var(--muted); }
.placeholder-avatar { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--background); border: 1px solid var(--border); color: var(--light); font-family: "Source Serif 4", Georgia, serif; font-size: 1.35rem; }
.people-placeholder strong { display: block; color: var(--text); font-family: "Source Serif 4", Georgia, serif; }
.people-placeholder span { display: block; margin-top: 3px; font-size: .82rem; }
.people-group + .people-group { margin-top: 32px; }
.alumni-group { padding-top: 28px; border-top: 1px solid var(--border); }

.site-footer { width: min(880px, calc(100% - 40px)); margin: 70px auto 0; padding: 22px 0 35px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); color: var(--light); font-size: .72rem; }
#backTop { padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; transition: transform .2s ease; }
#backTop:hover { transform: translateY(-2px); }
#backTop:active { transform: translateY(0); }
.modal { width: min(450px, calc(100% - 36px)); padding: 30px; border: 1px solid var(--border); border-radius: 4px; background: var(--background); color: var(--text); box-shadow: 0 16px 48px rgba(0,0,0,.18); }
.modal::backdrop { background: rgba(0,0,0,.55); }
.modal-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.modal-label { color: var(--light); font-size: .7rem; font-weight: 600; letter-spacing: .08em; }
.modal h2 { margin: 8px 0 20px; font-size: 1.55rem; }
.modal p { margin: 12px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.copy-email { width: 100%; padding: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); font-size: .82rem; cursor: pointer; }
.wechat-code { width: min(260px, 100%); display: block; margin: 18px auto 0; }
.image-modal { width: min(900px, calc(100% - 36px)); }
.image-modal img { display: block; max-width: 100%; max-height: 78vh; margin: auto; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.click-ripple { position: fixed; z-index: 1000; width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 50%; pointer-events: none; transform: translate(-50%,-50%) scale(.4); opacity: .7; animation: ripple-out .45s ease-out forwards; }
@keyframes ripple-out { to { transform: translate(-50%,-50%) scale(4.5); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .site-header, .page-shell, .site-footer { width: min(100% - 28px, 880px); }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 42px; }
  .profile-panel { grid-row: 1; padding: 0; }
  .avatar { width: 120px; height: 142px; }
  h1 { font-size: 2.15rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .brand-copy small { display: none; }
  .profile-links { gap: 5px 13px; }
  .section-heading { align-items: start; flex-direction: column; gap: 3px; }
  .service-row { grid-template-columns: 1fr; gap: 3px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .people-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .site-footer { flex-direction: column; }
}
