:root {
  --background: #fff;
  --surface: #f7f8fa;
  --text: #202124;
  --muted: #5f6368;
  --border: #e2e5e9;
  --accent: #1769aa;
  --max: 920px;
  --header-height: 64px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 12px;
  color: #fff; background: var(--text); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 20; min-height: var(--header-height);
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--border);
}
.nav {
  min-height: var(--header-height); display: flex; align-items: center;
  justify-content: space-between; gap: 32px;
}
.brand-group { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.university-mark { display: block; width: 30px; height: 30px; flex: 0 0 auto; }
.university-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand {
  min-width: 0; min-height: 24px; color: var(--text); font-size: 17px;
  font-weight: 650; text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.menu-button {
  display: none; width: 40px; height: 40px; padding: 10px; border: 0;
  background: transparent; cursor: pointer;
}
.menu-button span { display: block; width: 20px; height: 1px; margin: 5px 0; background: var(--text); }

main { padding-block: 68px 40px; }
.profile {
  display: grid; grid-template-columns: 152px minmax(0, 1fr); align-items: center;
  gap: 40px; min-height: 152px; margin-bottom: 72px;
}
.portrait {
  width: 152px; aspect-ratio: 1; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: 50%;
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-copy { min-width: 0; }
.profile h1 { min-height: 42px; margin: 0 0 5px; font-size: 34px; font-weight: 680; line-height: 1.25; }
.role { min-height: 27px; margin: 0 0 15px; color: var(--muted); font-size: 17px; }
.profile-links {
  display: flex; flex-wrap: wrap; gap: 9px; min-height: 38px;
  margin: 0; padding: 0; list-style: none;
}
.contact-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 13px; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: 999px; font-size: 14px;
  font-weight: 550; line-height: 1; text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.contact-button:hover {
  color: var(--accent); background: var(--surface); border-color: #c9ced5;
  text-decoration: none;
}
.contact-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-button svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.item-links a { font-size: 14px; font-weight: 550; text-decoration: none; }
.content-section { padding-block: 34px 44px; border-top: 1px solid var(--border); }
.content-section h2 { margin: 0 0 22px; font-size: 23px; font-weight: 650; line-height: 1.3; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.prose { min-height: 72px; max-width: 76ch; color: var(--muted); }
.prose p { margin: 0 0 12px; }

.publication-list { min-height: 140px; }
.publication {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px;
  padding-block: 22px; border-bottom: 1px solid var(--border);
}
.publication:first-child { padding-top: 0; }
.publication:last-child { border-bottom: 0; }
.publication-media {
  aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px;
}
.publication-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.publication-copy { min-width: 0; }
.publication-venue { margin: 0 0 3px; color: var(--accent); font-size: 13px; font-weight: 650; }
.publication h3 {
  margin: 0 0 5px; font-size: 17px; font-weight: 650; line-height: 1.45;
}
.authors, .publication-summary {
  margin: 0 0 7px; color: var(--muted); font-size: 14px;
}
.authors strong { color: var(--text); font-weight: 700; }
.item-links { display: flex; flex-wrap: wrap; gap: 14px; }
.bibtex { margin-top: 7px; font-size: 14px; }
.bibtex summary {
  width: max-content; color: var(--accent); font-weight: 550; cursor: pointer;
  list-style-position: outside;
}
.bibtex-content { position: relative; margin-top: 10px; }
.bibtex pre {
  max-width: 100%; margin: 0; padding: 14px 50px 14px 14px; overflow-x: auto;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}
.bibtex-copy {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; color: var(--muted); background: #fff;
  border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
}
.bibtex-copy:hover { color: var(--accent); border-color: #c9ced5; }
.bibtex-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bibtex-copy.is-copied { color: #137333; border-color: #b7d8bd; }
.bibtex-copy svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.site-footer {
  min-height: 80px; padding-block: 24px; color: var(--muted);
  font-size: 13px; border-top: 1px solid var(--border);
}

@media (max-width: 700px) {
  :root { --header-height: 58px; }
  .container { width: min(100% - 30px, var(--max)); }
  .nav { position: relative; }
  .menu-button { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none;
    align-items: stretch; flex-direction: column; gap: 0; padding: 8px 0;
    background: #fff; border-bottom: 1px solid var(--border);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 0; }
  main { padding-top: 44px; }
  .profile {
    grid-template-columns: 104px minmax(0, 1fr); gap: 24px; margin-bottom: 50px;
  }
  .portrait { width: 104px; }
  .profile h1 { min-height: 34px; font-size: 27px; }
  .role { font-size: 15px; }
  .publication { grid-template-columns: 1fr; gap: 16px; }
  .publication-media { width: min(100%, 360px); }
}

@media (max-width: 440px) {
  .profile { grid-template-columns: 112px minmax(0, 1fr); }
  .portrait { width: 112px; }
  .profile-copy { align-self: center; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
