:root {
  --ink: #23363a;
  --muted: #6b7d80;
  --line: #dce9e7;
  --surface: #ffffff;
  --surface-soft: #f6fbfa;
  --mint-50: #eff9f7;
  --mint-100: #dff2ee;
  --mint-300: #9ed8cc;
  --mint-500: #4fae9d;
  --mint-700: #2f7f73;
  --sky-500: #4d9fc0;
  --shadow: 0 18px 45px rgba(49, 99, 92, 0.10);
  --shadow-soft: 0 8px 24px rgba(49, 99, 92, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 28px;
  background:
    radial-gradient(circle at 8% 8%, rgba(158, 216, 204, 0.22), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(77, 159, 192, 0.13), transparent 24%),
    linear-gradient(145deg, #f7fbfb 0%, #eef7f5 48%, #f8fbfd 100%);
  color: var(--ink);
  font: 15px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 32px; font-weight: 750; }
h2 { font-size: 24px; font-weight: 720; }
h3 { font-size: 18px; font-weight: 680; }
p, ul, ol, table, pre, dl { margin: 0 0 20px; }

a {
  color: var(--mint-700);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}
a:hover { color: #1f665d; }
a small { color: var(--muted); display: block; font-size: 11px; margin-top: 2px; }

.wrapper {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

header {
  width: auto;
  float: none;
  position: sticky;
  top: 24px;
  padding: 28px;
  border: 1px solid rgba(158, 216, 204, 0.52);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-font-smoothing: antialiased;
}
header h1 { margin-bottom: 2px; }
.chinese-name {
  margin: 0 0 8px;
  color: #3f716b;
  font-family: KaiTi, "STKaiti", "Kaiti SC", "FZKai-Z03", serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .12em;
}
header .role {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.site-nav { display: grid; gap: 9px; margin: 4px 0 24px; }
.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
}
.nav-card:hover {
  transform: translateY(-1px);
  border-color: var(--mint-300);
  background: var(--mint-50);
  box-shadow: var(--shadow-soft);
}
.nav-card.active {
  color: #215f57;
  border-color: var(--mint-300);
  background: linear-gradient(135deg, var(--mint-100), #edf8fb);
  box-shadow: inset 3px 0 0 var(--mint-500);
}
.nav-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: var(--mint-700);
  box-shadow: 0 4px 12px rgba(49, 99, 92, 0.08);
  font-size: 15px;
}
.nav-label { display: grid; line-height: 1.15; }
.nav-label strong { color: inherit; font-size: 14px; font-weight: 700; }
.nav-label small { color: var(--muted); font-size: 11px; margin-top: 4px; }

.sidebar-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
header .social-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 20px;
}
header .social-row a {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}
header .social-row a:hover { color: var(--mint-700); border-color: var(--mint-300); background: var(--mint-50); }
header .social-row br { display: none; }

.contact-card {
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #f8fcfb, #f2f8fa);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.contact-card b { display: block; color: var(--ink); margin-bottom: 4px; }
.site-credit { margin: 0 0 10px; color: #8a9a9c; font-size: 10px; text-align: center; }
.visitor-counter {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.visitor-counter a { display: inline-flex; line-height: 0; }
.visitor-counter img { display: block; height: 20px; width: auto; }

section {
  width: auto;
  min-width: 0;
  float: none;
  padding: 36px 40px 44px;
  border: 1px solid rgba(220, 233, 231, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}
section > hr:first-child { display: none; }
section h2 { position: relative; padding-bottom: 12px; margin: 0 0 22px; }
section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--mint-500), var(--sky-500));
}
section > h3 { margin-top: 4px; color: #2b655e; }

.profile-photo {
  display: block;
  width: 220px;
  height: 235px;
  object-fit: cover;
  margin: 0 auto 28px;
  padding: 7px;
  border: 1px solid var(--mint-100);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, var(--mint-50));
  box-shadow: 0 16px 32px rgba(49, 99, 92, 0.14);
}
.profile-hero {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 24px;
}
.profile-carousel {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(158, 216, 204, 0.7);
  border-radius: 26px;
  background: var(--mint-50);
  box-shadow: 0 18px 36px rgba(49, 99, 92, 0.16);
}
.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 1.1s ease;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
.carousel-slide:nth-child(2) img { object-position: center; }
.carousel-shade {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(transparent, rgba(17, 42, 45, 0.5));
  pointer-events: none;
}
.carousel-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.carousel-arrow, .carousel-toggle, .carousel-dot {
  border: 0;
  cursor: pointer;
}
.carousel-arrow, .carousel-toggle {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #245f58;
  box-shadow: 0 5px 14px rgba(20, 54, 58, 0.2);
}
.carousel-arrow:hover, .carousel-toggle:hover { background: #fff; transform: translateY(-1px); }
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 7px; }
.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  transition: width .2s ease, background-color .2s ease;
}
.carousel-dot.active { width: 24px; background: #fff; }
.hero-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 90% 10%, rgba(77, 159, 192, 0.13), transparent 35%),
    linear-gradient(145deg, #ffffff, var(--mint-50));
}
.hero-eyebrow {
  margin-bottom: 9px;
  color: var(--mint-700);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero-summary h2 { max-width: 520px; margin-bottom: 14px; font-size: 28px; }
.hero-summary p { margin-bottom: 20px; color: #536c70; font-size: 15px; }
.research-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.research-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(158, 216, 204, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #356b65;
  font-size: 12px;
  font-weight: 650;
}
.affiliation-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 30px;
}
.affiliation-card {
  display: grid;
  grid-template-rows: 86px auto;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfdfd;
  color: var(--ink);
  text-align: center;
}
.affiliation-card:hover { border-color: var(--mint-300); background: var(--mint-50); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.institution-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 7px 12px;
  overflow: hidden;
  border: 1px solid rgba(197, 222, 217, .75);
  border-radius: 14px;
  background: #fff;
}
.institution-logo img { display: block; width: auto; max-width: 100%; max-height: 72px; object-fit: contain; }
.affiliation-copy { min-width: 0; }
.affiliation-copy strong, .affiliation-copy small { display: block; }
.affiliation-copy strong { min-height: 38px; margin-bottom: 4px; font-size: 13px; line-height: 1.42; }
.affiliation-copy small { color: var(--muted); font-size: 10px; }
.biography-title { margin-top: 6px; }
.home-content > p {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fff, #f9fcfc);
}
.home-content > p:last-of-type { border-left: 4px solid var(--mint-300); background: var(--mint-50); }
.personal-content > p {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfdfd;
}
.personal-content > h3:not(:first-of-type) { margin-top: 26px; }
.personal-content hr { margin: 28px 0; }

.paper-entry {
  padding: 13px 16px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--mint-300);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #fff, #f9fcfc);
  box-shadow: 0 6px 18px rgba(49, 99, 92, 0.05);
}
.paper-entry + .paper-entry { margin-top: 14px; }
.paper-entry > br:last-child { display: none; }
.paper-entry > p:first-child > a:first-child { color: #286f66; font-size: 15px !important; }
.patent-entry > .patent-title { margin-bottom: 8px; }
.patent-title-main {
  color: #286f66;
  font-size: 15px;
  font-weight: 700;
}
.patent-title-zh { color: #3f716b; font-weight: 650; }
.patent-meta { color: var(--muted); font-size: 13px; }
.patent-action { margin: 4px 0 0; }
.patent-entry .panel p:last-child { margin-bottom: 0; }
details.paper-group {
  overflow: hidden;
  border-color: var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: #fff !important;
  box-shadow: var(--shadow-soft);
}
details.paper-group + details.paper-group { margin-top: 12px; }
details.paper-group > summary {
  padding: 13px 16px !important;
  color: #286f66 !important;
  background: linear-gradient(135deg, var(--mint-50), #f4fafb) !important;
}
details.paper-group > summary:hover { background: var(--mint-100) !important; }
.paper-list { padding: 16px !important; }

button.accordion {
  margin-top: 4px !important;
  padding: 4px 8px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--surface-soft) !important;
  color: var(--mint-700) !important;
  font-size: 12px !important;
}
button.accordion:hover, button.accordion.active {
  border-color: var(--mint-300) !important;
  background: var(--mint-50) !important;
}
div.panel {
  margin: 8px 0 4px !important;
  padding: 14px 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--mint-50) !important;
  color: #4d6467 !important;
}

.cv-content { padding: 24px; }
.cv-reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.cv-reader-header h2 { margin: 0; }
.cv-download-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.cv-download-link:hover { border-color: var(--mint-300); background: var(--mint-50); }
.cv-reader {
  display: block;
  width: 100%;
  height: calc(100vh - 112px);
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #eef3f3;
}

blockquote { margin: 0; padding: 0 0 0 20px; border-left: 3px solid var(--mint-300); color: var(--muted); font-style: italic; }
code, pre { color: #33494c; font: 12px/1.55 Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, Consolas, monospace; }
pre { padding: 12px 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f7fbfa; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th, dt, strong { color: var(--ink); font-weight: 650; }
img { max-width: 100%; }
hr { height: 1px; margin: 30px 0; border: 0; background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent); }
small { font-size: 11px; }
footer { width: auto; float: none; position: static; }

@media print, screen and (max-width: 980px) {
  body { padding: 20px; }
  .wrapper { grid-template-columns: 1fr; gap: 20px; }
  header { position: static; padding: 24px; }
  .site-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-card { align-items: center; justify-content: center; min-height: 52px; }
  .nav-label small { display: none; }
  header .social-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  section { padding: 30px; }
  .profile-hero { grid-template-columns: minmax(230px, 290px) minmax(0, 1fr); gap: 20px; }
  .hero-summary { padding: 24px; }
  .affiliation-strip { grid-template-columns: 1fr; }
  .affiliation-card { grid-template-columns: 148px minmax(0, 1fr); grid-template-rows: 78px; align-items: center; text-align: left; }
  .institution-logo { height: 64px; }
  .institution-logo img { max-height: 58px; }
  .affiliation-copy strong { min-height: 0; }
  .cv-reader { height: 80vh; min-height: 680px; }
}

@media print, screen and (max-width: 640px) {
  body { padding: 12px; font-size: 14px; }
  header, section { border-radius: 18px; }
  header { padding: 20px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .site-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-card { justify-content: flex-start; }
  header .social-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section { padding: 24px 18px 30px; }
  .profile-photo { width: 190px; height: 205px; }
  .profile-hero { grid-template-columns: 1fr; gap: 14px; }
  .profile-carousel { min-height: 350px; }
  .hero-summary { padding: 22px 20px; }
  .hero-summary h2 { font-size: 23px; }
  .affiliation-strip { margin-bottom: 26px; }
  .affiliation-card { grid-template-columns: 102px minmax(0, 1fr); padding: 11px; }
  .institution-logo { padding: 5px 8px; }
  .paper-list { padding: 10px !important; }
  .paper-entry { padding: 12px 13px 8px; }
  .cv-content { padding: 18px 12px 12px; }
  .cv-reader-header { align-items: flex-start; }
  .cv-reader { height: 72vh; min-height: 540px; border-radius: 12px; }
  pre, code { word-wrap: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

@media print {
  body { padding: 0.4in; background: #fff; color: #444; font-size: 12pt; }
  header, section { box-shadow: none; border: 1px solid #ddd; }
}
