:root {
  /* Light Theme — Warm Academic Editorial */
  --bg: #faf9f6;
  --bg-elevated: #ffffff;
  --bg-subtle: #f3f2ed;
  --bg-nav: rgba(250, 249, 246, 0.84);

  --text-primary: #18181b;
  --text-secondary: #4a4a52;
  --text-muted: #76767f;

  --border: #e6e5df;
  --border-strong: #d4d3cb;

  /* Restrained Jade-Emerald Accent (subtle nod to NVIDIA without neon harshness) */
  --accent: #1b6b4a;
  --accent-hover: #145339;
  --accent-soft: #eaf5ef;
  --accent-border: #c5e3d3;

  --badge-bg: #f1f1ec;
  --badge-text: #3f3f46;

  --shadow-avatar: 0 14px 36px -14px rgba(24, 24, 27, 0.16), 0 2px 6px rgba(24, 24, 27, 0.05);
  --shadow-toggle: 0 1px 2px rgba(0, 0, 0, 0.06);

  --font-serif: "Source Serif 4", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --container: 840px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #111214;
  --bg-elevated: #181a1e;
  --bg-subtle: #1e2025;
  --bg-nav: rgba(17, 18, 20, 0.84);

  --text-primary: #f0f0ed;
  --text-secondary: #b4b4bc;
  --text-muted: #80808a;

  --border: #26282e;
  --border-strong: #353842;

  --accent: #4cc38a;
  --accent-hover: #6dd4a2;
  --accent-soft: rgba(76, 195, 138, 0.11);
  --accent-border: rgba(76, 195, 138, 0.28);

  --badge-bg: #1c1e23;
  --badge-text: #c7c7cf;

  --shadow-avatar: 0 18px 40px -14px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-toggle: 0 1px 3px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  transition: background-color 220ms ease, color 220ms ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ================================
   Top Navigation
   ================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background-color 220ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* ================================
   Hero / About Section
   ================================ */
main {
  padding-top: 44px;
  padding-bottom: 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  gap: 44px;
  align-items: start;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--border);
}

.hero-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.hero-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.hero-name-zh {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.hero-role {
  margin: 0 0 18px 0;
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hero-role strong {
  font-weight: 600;
  color: var(--text-primary);
}

.hero-role .sep {
  margin: 0 7px;
  color: var(--border-strong);
}

.hero-bio {
  margin: 0 0 18px 0;
  font-size: 15px;
  line-height: 1.74;
  color: var(--text-secondary);
}

.hero-bio a {
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.hero-bio a:hover {
  text-decoration-color: var(--accent);
}

.focus-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.focus-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--transition), background-color var(--transition), color var(--transition), transform var(--transition);
}

.social-link:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.social-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.85;
}

.social-link .copy-toast {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 500;
  display: none;
}

.social-link.copied .copy-toast {
  display: inline;
}

.social-link.copied .email-label {
  display: none;
}

.hero-avatar-wrap {
  position: relative;
  width: 184px;
  margin-top: 6px;
}

.hero-avatar {
  display: block;
  width: 184px;
  height: 184px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-avatar);
}

/* ================================
   Sections
   ================================ */
.section {
  margin-top: 52px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ================================
   News Timeline
   ================================ */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
  align-items: baseline;
}

.news-item:first-child {
  padding-top: 2px;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item.news-older {
  display: none;
}

.news-list.expanded .news-item.news-older {
  display: grid;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.news-body {
  color: var(--text-secondary);
}

.news-body strong {
  color: var(--text-primary);
  font-weight: 550;
}

.news-body a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.news-body a:hover {
  text-decoration-color: var(--accent);
}

.news-toggle-btn {
  margin-top: 10px;
  padding: 4px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}

.news-toggle-btn:hover {
  color: var(--accent);
}

/* ================================
   Publications Section
   ================================ */
.section-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.section-ext-link:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.section-ext-link svg {
  width: 13px;
  height: 13px;
}

.pub-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.pub-legend {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pub-legend .intern-sample {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* ================================
   Publications List
   ================================ */
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 18px;
  padding: 17px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: background-color var(--transition);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-item:hover {
  background-color: var(--bg-elevated);
}

.pub-venue-col {
  padding-top: 2px;
}

.venue-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.venue-badge.is-highlight {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.pub-title {
  margin: 0 0 4px 0;
  font-size: 15.5px;
  font-weight: 580;
  line-height: 1.44;
  color: var(--text-primary);
}

.pub-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-title .ext-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 5px;
  vertical-align: -1px;
  opacity: 0.42;
  transition: opacity var(--transition), transform var(--transition);
}

.pub-title a:hover .ext-icon {
  opacity: 0.95;
  transform: translate(1px, -1px);
}

.pub-authors {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.56;
  color: var(--text-secondary);
}

.pub-authors .author-me {
  color: var(--text-primary);
  font-weight: 600;
}

.pub-authors .author-intern {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--text-muted);
  text-underline-offset: 3px;
}

.pub-insight {
  margin: 9px 0 0 0;
  padding: 2px 0 2px 11px;
  border-left: 2px solid var(--border-strong);
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--text-muted);
}

.pub-insight.is-highlight {
  border-left-color: var(--accent-border);
}

.pub-insight strong {
  color: var(--text-secondary);
  font-weight: 580;
}

.pub-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.pub-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 8px;
  border-radius: 5px;
  transition: background-color var(--transition), color var(--transition);
}

.pub-link-chip:hover {
  background: var(--accent);
  color: #ffffff;
}

.pub-impact-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
}

/* ================================
   Experience / Education / Honors
   ================================ */
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.timeline-item:first-child {
  padding-top: 2px;
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.timeline-org {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.timeline-role {
  color: var(--text-secondary);
  font-size: 14.5px;
  margin-top: 1px;
}

.timeline-role a {
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 52px;
}

/* ================================
   Footer
   ================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-inner a {
  color: var(--text-muted);
}

.footer-inner a:hover {
  color: var(--accent);
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .nav-brand {
    font-size: 15px;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .nav-links li.hide-mobile {
    display: none;
  }

  main {
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-avatar-wrap {
    order: -1;
    width: 112px;
    margin-top: 0;
  }

  .hero-avatar {
    width: 112px;
    height: 112px;
    border-radius: 14px;
  }

  .hero-name {
    font-size: 30px;
  }

  .hero-name-zh {
    font-size: 18px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 14px 0;
    margin: 0;
  }

  .pub-item:hover {
    background-color: transparent;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
