:root {
  --text: #222222;
  --muted: #646464;
  --soft: #f7f8fa;
  --paper: #fffdfa;
  --panel: #ffffff;
  --line: #e5e3df;
  --accent: #a85f1a;
  --accent-soft: #fff1df;
  --accent-strong: #7b3f00;
  --link: #1f5f99;
  --header-bg: rgba(255, 253, 250, 0.94);
  --nav-link: #333333;
  --shadow-color: rgba(45, 36, 25, 0.08);
  --media-shadow-color: rgba(45, 36, 25, 0.06);
  --badge-bg: #eef4ff;
  --badge-text: #24436b;
  --max-width: 980px;
  --radius: 18px;
  --shadow: 0 18px 45px var(--shadow-color);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --text: #f1efe9;
  --muted: #b8b1a6;
  --soft: #252a30;
  --paper: #121416;
  --panel: #1b1f24;
  --line: #343941;
  --accent: #f0a85f;
  --accent-soft: #362717;
  --accent-strong: #ffd39c;
  --link: #8ec5ff;
  --header-bg: rgba(18, 20, 22, 0.94);
  --nav-link: #e5e1da;
  --shadow-color: rgba(0, 0, 0, 0.38);
  --media-shadow-color: rgba(0, 0, 0, 0.28);
  --badge-bg: #1e314a;
  --badge-text: #b9d8ff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-180%);
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--nav-link);
  font-size: 14px;
  font-weight: 520;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
}

.nav-toggle-label span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--nav-link);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.theme-toggle::before {
  content: "\2600";
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1;
}

:root[data-theme="dark"] .theme-toggle::before {
  content: "\263e";
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 20px 80px;
}

.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 42px;
  margin: 20px 0 46px;
}

.portrait-wrap {
  display: block;
  color: inherit;
}

.portrait {
  width: 220px;
  height: 280px;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
  box-shadow: var(--shadow);
}

.identity-card h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0;
}

.name-alt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 22px;
  letter-spacing: 0.08em;
}

.role {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 520;
}

.affiliation {
  margin: 3px 0 22px;
  color: var(--muted);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 520;
  padding: 7px 11px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.social-row a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

.icon {
  display: inline-flex;
  width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--soft);
  font-size: 11px;
  font-weight: 750;
}

.icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 520;
  padding: 5px 9px;
}

.section {
  margin-top: 42px;
  padding-top: 8px;
}

.anchor-section {
  scroll-margin-top: 80px;
}

.section h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 27px;
  letter-spacing: 0;
}

.section p {
  margin: 0 0 14px;
}

.bio-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 22px;
}

.bio-logo-row a {
  display: inline-flex;
  width: auto;
  height: auto;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.bio-logo-row .tongji-logo-link {
  width: auto;
  height: auto;
}

.bio-logo-row a:hover {
  text-decoration: none;
  opacity: 0.82;
  transform: translateY(-1px);
}

.bio-logo-row img {
  display: block;
  width: auto;
  height: 38px;
  max-width: 156px;
  object-fit: contain;
}

.bio-logo-row .logo-tongji {
  height: 50px;
  max-width: 180px;
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.news-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.news-list time {
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
}

.publication-card {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.publication-card:last-child {
  border-bottom: 1px solid var(--line);
}

.publication-card.featured {
  border-top: 2px solid var(--accent);
}

.publication-media {
  display: flex;
  width: 250px;
  aspect-ratio: 4 / 3;
  align-self: start;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 8px;
  box-shadow: 0 12px 30px var(--media-shadow-color);
}

.publication-media:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.publication-media img,
.publication-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.media-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(135deg, #2f6f5e, #9fb36f);
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
}

.media-placeholder.rust {
  background: linear-gradient(135deg, #9a4f35, #d2a45c);
}

.media-placeholder.blue {
  background: linear-gradient(135deg, #315f8f, #6fa6b2);
}

.publication-copy h3 {
  margin: 5px 0 7px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.28;
}

.publication-copy h3 a {
  color: var(--text);
}

.publication-copy h3 a:hover {
  color: var(--accent);
}

.venue-badge {
  display: inline-block;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  text-transform: uppercase;
}

.venue-badge.award {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.authors,
.author-note,
.summary,
.resources,
.venue-full {
  font-size: 14.5px;
  margin: 8px 0 0;
}

.authors {
  color: var(--text);
}

.author-note {
  color: var(--muted);
  font-size: 13px;
}

.summary,
.venue-full {
  color: var(--muted);
}

.venue-full {
  font-style: italic;
}

.resources a {
  font-weight: 650;
}

.resource-disabled {
  color: var(--muted);
  font-style: italic;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.timeline-item time {
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  padding: 0 20px 36px;
}

@media (max-width: 760px) {
  .navbar {
    align-items: center;
  }

  .nav-actions {
    gap: 10px;
    margin-left: auto;
  }

  .nav-toggle-label {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 63px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    padding: 14px 20px 18px;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: left;
  }

  .portrait {
    width: 170px;
    height: 215px;
  }

  .identity-card h1 {
    font-size: 35px;
  }

  .publication-card {
    grid-template-columns: 1fr;
  }

  .publication-media {
    max-width: 420px;
    width: 100%;
  }

  .news-list li,
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
