:root {
  --ink: #1b2733;
  --muted: #5c6b7a;
  --line: #e2e8ee;
  --accent: #0b5a8f;
  --accent-deep: #094a75;   /* hover / strong emphasis */
  --accent-soft: #dbe7f0;   /* pale fills, badges, figure bg */
  --bg: #f7f9fb;
  --white: #ffffff;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --paper: #fcfbf8;
  --warm: #6f6455;
  --warm-deep: #463e33;
  --warm-line: #d8d2c4;
  --dot: #b9cbdb;
  --avatar-bg: #dbe7f0;
  /* 8pt spacing scale (D10) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
}
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- header: serif academic --- */
.site-header {
  background: var(--paper);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--warm-line);
  font-family: var(--serif);
}
.masthead {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 10px 32px;
  padding-top: var(--space-3); padding-bottom: var(--space-2);
}
.brand { color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name {
  display: block; font-size: 1.5rem; font-weight: 700;
  letter-spacing: .005em; line-height: 1.25;
}
.brand-sub { font-size: .92rem; font-style: italic; color: var(--warm); line-height: 1.45; margin: 5px 0 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: 18px; padding-bottom: 4px; }
.site-nav a {
  font-family: var(--serif);
  font-size: .84rem; font-weight: 400; letter-spacing: .12em;
  text-transform: uppercase; color: var(--warm);
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--accent); border-bottom-color: var(--accent); text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .site-nav a { transition: none; }
}

main.wrap { padding-top: var(--space-6); padding-bottom: 64px; min-height: 60vh; }

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

.section { margin-bottom: var(--space-4); }
h2 { font-size: 1.35rem; margin: 0 0 var(--space-2); padding-bottom: var(--space-1); border-bottom: 1px solid var(--line); }
.overview { max-width: none; font-size: 1.01rem; line-height: 1.78; text-align: justify; text-justify: inter-word; hyphens: auto; }
.overview + .overview { margin-top: var(--space-2); }
.research-figure { margin: 0 0 var(--space-4); }
.research-figure img { display: block; width: 100%; height: auto; }
.rq-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
  gap: 16px; margin-top: 10px;
}
.rq-card {
  background: var(--white); border: 1px solid #eef2f6; border-radius: 10px;
  border-top: 3px solid var(--accent);
  padding: var(--space-2) var(--space-3);
  box-shadow: 0 1px 3px rgba(27,39,51,.05);
}
.rq-card h3 { font-size: 1rem; line-height: 1.42; margin: 0 0 10px; }
.rq-topic {
  position: relative; margin: 0 0 5px; padding-left: 14px;
  font-size: .9rem; color: var(--muted); line-height: 1.5;
}
.rq-topic:last-child { margin-bottom: 0; }
.rq-topic::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--dot);
}
@media (min-width: 780px) {
  .rq-grid > .rq-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.callout {
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 8px; padding: 24px 28px;
}
.button {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 9px 18px; border-radius: 6px; font-size: .92rem;
}
.button:hover { text-decoration: none; background: var(--accent-deep); }

/* --- D5: card hover feedback --- */
.rq-card, .person, .pub, .contact-card {
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rq-card:hover, .person:hover, .pub:hover, .contact-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 8px rgba(11,90,143,.10);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .rq-card, .person, .pub, .contact-card { transition: none; }
  .rq-card:hover, .person:hover, .pub:hover, .contact-card:hover { transform: none; }
}

/* --- color audit C8: in-text links always underlined (WCAG 1.4.1) --- */
.overview a, .lede a, .news-list a, .pub-note a, .pub-links a,
.profile-links a, .contact-action a, .alumni-list a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-head { margin-bottom: var(--space-4); }
.page-head h1 { font-size: 2rem; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: var(--space-3); }
.person {
  background: var(--white); border: 1px solid #eef2f6;
  border-radius: 10px; padding: var(--space-3);
  box-shadow: 0 1px 3px rgba(27,39,51,.05);
  display: flex; flex-direction: column; align-items: flex-start;
}
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
/* --- 01 圆形浮标 · 曲线环绕（PI 卡片） --- */
.person-lead { display: block; }
.person-lead .avatar {
  float: left; width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  shape-outside: circle(50%); shape-margin: 12px; margin: 2px 20px 10px 0;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--accent), 0 3px 10px rgba(11,90,143,.12);
}
@media (max-width: 480px) {
  .person-lead .avatar { float: none; shape-outside: none; display: block; margin: 0 auto 16px; }
}
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--avatar-bg); color: var(--accent); font-size: 1.9rem; font-weight: 700;
}
.person h2 { font-size: 1.1rem; border: 0; padding: 0; margin: 0 0 4px; }
.person .role { font-size: .85rem; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.person .focus { font-size: .92rem; color: var(--muted); margin: 0 0 10px; }
.person .person-bio { font-size: .88rem; color: var(--muted); line-height: 1.7; margin: 0 0 12px; }

/* --- lab members: two-column list, portrait floats into the text --- */
.members { margin-bottom: var(--space-4); }
.members h2 { font-family: var(--serif); }
.member-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px; margin: var(--space-2) 0 var(--space-4);
}
.member { border-top: 1px solid var(--line); padding-top: var(--space-2); }
.member::after { content: ""; display: block; clear: both; }
.member-photo {
  float: left; width: 172px; height: auto; max-width: 100%;
  margin: 4px 18px 10px 0; border-radius: 10px;
  shape-outside: inset(0 round 10px);
  box-shadow: 0 0 0 1px var(--line), 0 2px 10px rgba(27,39,51,.08);
}
.member-name { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 3px; }
.member-role {
  font-size: .74rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.member-bio { font-size: .86rem; color: var(--muted); line-height: 1.72; margin: 0; }
@media (max-width: 820px) {
  .member-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .member-photo { width: 140px; margin: 3px 15px 6px 0; }
}

.person .links { font-size: .85rem; margin: 0; display: flex; gap: 12px; }

.pub-list { list-style: none; padding: 0; margin: 0; }
.pub {
  background: var(--white); border: 1px solid #eef2f6;
  border-radius: 8px; padding: var(--space-3) var(--space-3); margin-bottom: var(--space-2);
  box-shadow: 0 1px 3px rgba(27,39,51,.05);
}
.pub-title { font-weight: 600; margin: 0 0 6px; }
.pub-authors { font-size: .92rem; color: var(--muted); margin: 0 0 4px; }
.pub-meta { font-size: .92rem; margin: 0 0 8px; }
.pub-note { font-size: .84rem; color: var(--muted); margin: 0 0 8px; font-style: italic; }
.pub-links { font-size: .85rem; margin: 0; display: flex; gap: 14px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-3); }
.contact-card { background: var(--white); border: 1px solid #eef2f6; border-radius: 10px; padding: var(--space-3); box-shadow: 0 1px 3px rgba(27,39,51,.05); }
.contact-card h2 { font-size: 1.1rem; }
address { font-style: normal; line-height: 1.8; }
.muted { color: var(--muted); font-size: .92rem; }

.site-footer {
  background: var(--paper); border-top: 3px solid var(--ink);
  padding: var(--space-3) 0; font-size: .84rem; color: var(--muted);
}
.site-footer p { margin: 4px 0; }
.footer-name { color: var(--ink); font-weight: 600; }
.footer-tagline {
  font-family: var(--serif); font-style: italic;
  color: var(--warm-deep); font-weight: 400; font-size: .95em;
}

@media (max-width: 640px) {
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 1.8rem; }
  .masthead { padding-top: 15px; padding-bottom: 12px; gap: 8px 20px; }
  .brand-name { font-size: 1.16rem; letter-spacing: .005em; }
  .site-nav { gap: 16px; padding-bottom: 2px; }
  .site-nav a { font-size: .72rem; letter-spacing: .08em; padding: 4px 0 3px; }
  main.wrap { padding-top: 24px; }
}

/* --- v-fresh: publication year groups --- */
.year-group { font-size: 1.08rem; font-weight: 600; color: var(--ink);
  margin: var(--space-4) 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.year-group:first-of-type { margin-top: 6px; }
.year-count { font-weight: 400; font-size: .85rem; color: var(--muted); margin-left: 8px; }

/* --- v-fresh: resilience, focus, print --- */
.card-grid:has(.person:only-child) { grid-template-columns: 1fr; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 0 0 6px 0; z-index: 10; }
.skip-link:focus { left: 0; }

@media print {
  .site-nav, .button, .skip-link { display: none; }
  body { background: #fff; }
  .pub, .person, .contact-card, .callout { break-inside: avoid; }
}

/* --- v-fresh: news & research questions --- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-date { font-weight: 600; color: var(--accent); margin-right: 10px; font-size: .9rem; white-space: nowrap; }
.news-link { white-space: nowrap; }
.rq { font-size: 1.02rem; margin: 20px 0 8px; padding: 0; border: 0; }
.funding-note { font-size: .85rem; margin-top: 16px; }

/* --- v-fresh: year jump nav --- */
.year-nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: .85rem; color: var(--muted); margin: 0 0 20px; }
.year-nav a { color: var(--accent); }
.year-group { scroll-margin-top: 16px; }

/* --- v-fresh: scholar link, alumni, email display --- */
.profile-links { font-size: .92rem; margin: 10px 0 0; }
.alumni-list { list-style: none; padding: 0; margin: 8px 0 0; }
.alumni-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.alumni-list li:last-child { border-bottom: 0; }
.email-text { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; }

/* --- contact page: two-row card (email / address) --- */
.contact-rows { padding: 0; }
.contact-row {
  display: grid; grid-template-columns: 132px 1fr;
  gap: 6px 26px; align-items: start;
  padding: 24px 26px;
}
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row h2 {
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border: 0; padding: 0; margin: 7px 0 0;
}
.contact-row .email-text { font-size: 1.18rem; font-weight: 600; margin: 0; letter-spacing: .01em; }
.contact-action { margin: 10px 0 0; font-size: .9rem; }
/* how to say the PI's name - intentionally quiet */
.name-note { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.55; }
@media (max-width: 640px) {
  .contact-row { grid-template-columns: 1fr; gap: 2px; padding: 20px 22px; }
  .contact-row h2 { margin: 0 0 6px; }
  .contact-row .email-text { font-size: 1.05rem; }
}

/* --- gallery page: masonry photo album (images shown whole, never cropped) --- */
.gallery-grid { columns: 3; column-gap: var(--space-2); }
.gallery-grid figure {
  break-inside: avoid; margin: 0 0 var(--space-2);
  background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px;
  box-shadow: 0 1px 3px rgba(27, 39, 51, .05);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}
.gallery-grid figure:hover {
  border-color: var(--accent); box-shadow: 0 4px 12px rgba(27, 39, 51, .1);
  transform: translateY(-1px);
}
.gallery-grid img { display: block; width: 100%; height: auto; border-radius: 4px; }
.gallery-grid figcaption {
  font-family: var(--serif); font-style: italic; font-size: .92rem; line-height: 1.45;
  color: var(--warm-deep); padding: 9px 4px 3px;
}
@media (max-width: 900px) { .gallery-grid { columns: 2; } }
@media (max-width: 560px) { .gallery-grid { columns: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gallery-grid figure, .gallery-grid figure:hover { transition: none; transform: none; }
}
