:root {
  color-scheme: light;
  --bg: #f8f7f2;
  --surface: #ffffff;
  --surface-alt: #f1f5f3;
  --text: #202124;
  --muted: #5f666d;
  --border: #dedbd2;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #dff3ef;
  --link: #0a6fbe;
  --shadow: 0 18px 45px rgba(32, 33, 36, 0.08);
  --max-width: 1120px;
  --sidebar-width: 278px;
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111315;
  --surface: #181b1d;
  --surface-alt: #202528;
  --text: #ece8df;
  --muted: #b6b0a5;
  --border: #343a3f;
  --accent: #6bd4c8;
  --accent-strong: #9ee7df;
  --accent-soft: #153d3a;
  --link: #8fc7ff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

strong {
  color: var(--text);
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 14px;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.masthead__inner {
  display: grid;
  grid-template-columns: minmax(120px, auto) 36px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--accent-strong);
  text-decoration: none;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.page-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 54px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.profile-sidebar {
  min-width: 0;
}

.profile-sticky {
  position: sticky;
  top: 92px;
}

.avatar {
  display: block;
  width: 176px;
  height: 176px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-alt);
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: center 30%;
}

.profile-sidebar h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.18;
}

.role {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.profile-meta {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.94rem;
}

.profile-meta li,
.profile-meta a {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 28px;
  color: inherit;
}

.profile-meta a:hover,
.profile-meta a:focus-visible {
  color: var(--accent-strong);
}

.profile-meta svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.content {
  min-width: 0;
  max-width: 760px;
}

.intro {
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.intro p,
.section p {
  margin: 0 0 14px;
}

.section {
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 82px;
}

.section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1.38rem;
  line-height: 1.25;
}

.section h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.compact-list,
.publication-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 1.15rem;
}

.compact-list li::marker,
.publication-list li::marker {
  color: var(--accent);
}

.timeline {
  padding-left: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
}

.timeline time {
  color: var(--accent-strong);
  font-weight: 700;
}

.research-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.research-item {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.research-item h3,
.publication h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.4;
}

.research-item p,
.publication p {
  margin: 0;
}

.publication-list {
  gap: 18px;
}

.publication {
  padding-bottom: 2px;
}

.publication .authors {
  color: var(--muted);
}

.publication .venue {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.publication .venue a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.publication .venue a:hover,
.publication .venue a:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
}

.site-footer {
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .masthead__inner {
    grid-template-columns: minmax(92px, auto) 36px;
    gap: 14px;
    padding: 0 18px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 14px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px 18px 54px;
  }

  .profile-sticky {
    position: static;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
  }

  .avatar {
    width: 112px;
    height: 112px;
    margin: 0;
  }

  .profile-sidebar h1 {
    margin-top: 0;
  }

  .role {
    margin-bottom: 12px;
  }

  .profile-meta {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.84rem;
  }

  .profile-sticky {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .avatar {
    width: 92px;
    height: 92px;
  }

  .profile-meta {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .section {
    padding: 26px 0;
  }
}
