:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #65717e;
  --line: #dce2e2;
  --accent: #155e63;
  --accent-soft: #e7f0ef;
  --gold: #b58a48;
  --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
  --serif: Georgia, "Times New Roman", "Noto Serif SC", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

[data-theme="dark"] {
  --bg: #101617;
  --surface: #172022;
  --ink: #edf3f2;
  --muted: #acb8b8;
  --line: #314043;
  --accent: #78c4c5;
  --accent-soft: #1d3435;
  --gold: #d8ad67;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  transition: background-color 180ms ease, color 180ms ease;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0.3rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 10%);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 2rem));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.site-title span { color: var(--accent); }

.nav-wrap { display: flex; align-items: center; gap: 0.5rem; }
.site-nav { display: flex; align-items: center; gap: 0.3rem; }
.site-nav a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.icon-button {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
}
.menu-button { display: none; }

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.75rem);
  align-items: start;
}

.profile { position: sticky; top: 108px; text-align: center; }
.portrait-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto 1.4rem;
}
.portrait-wrap::after {
  content: "";
  position: absolute;
  inset: 7px -8px -7px 8px;
  z-index: -1;
  border-radius: 48% 52% 49% 51%;
  background: var(--accent-soft);
}
.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  border: 5px solid var(--surface);
  box-shadow: var(--shadow);
}
.profile h1 { margin: 0; font-family: var(--serif); font-size: 1.55rem; line-height: 1.2; }
.profile-role { margin: 0.45rem auto 0; max-width: 15rem; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.profile-meta { margin: 1.25rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.profile-meta li + li { margin-top: 0.35rem; }
.profile-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.25rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); }

.content { min-width: 0; }
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.display-title {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.display-title em { color: var(--accent); font-style: normal; }
.lede { max-width: 760px; margin: 1.4rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 2rem;
}
.topic-card {
  min-height: 138px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.035);
}
.topic-number { color: var(--gold); font-family: var(--serif); font-size: 0.9rem; }
.topic-card h3 { margin: 1.3rem 0 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; }

.section { margin-top: 4rem; }
.section-heading { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.2; }
.section-heading::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.plain-list { margin: 0; padding-left: 1.25rem; }
.plain-list li + li { margin-top: 0.65rem; }

.research-list { display: grid; gap: 0; }
.research-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.research-item:last-child { border-bottom: 1px solid var(--line); }
.research-item h3 { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; }
.research-item h3 a { color: var(--accent); text-decoration: none; }
.research-item h3 a:hover { text-decoration: underline; }
.research-meta { margin: 0.4rem 0 0; color: var(--muted); }
.research-meta a,
.research-meta a:hover { text-decoration: none; }
.research-venue { margin: 0.35rem 0 0; color: var(--ink); font-weight: 650; }
.research-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.paper-link {
  display: inline-flex;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}
.status {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.15em;
}

.contact-card {
  max-width: 720px;
  margin-top: 2rem;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.contact-card h2 { margin-top: 0; font-family: var(--serif); }
.contact-email { display: inline-block; margin-top: 0.3rem; font-family: var(--serif); font-size: clamp(1.1rem, 3vw, 1.55rem); }

.profile-welcome {
  margin-top: 1.75rem;
  text-align: left;
}
.profile-welcome h1 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 750;
}
.profile-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.research-page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
}
.research-intro {
  max-width: 700px;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.research-intro + .section { margin-top: 2.75rem; }
.research-content .section { margin-top: 2.5rem; }
.research-content .section-heading { margin-bottom: 0.35rem; }
.research-content .section-heading h2 { font-size: clamp(1.45rem, 2.5vw, 1.85rem); }
.research-content .research-item { padding: 0.72rem 0; }
.research-content .research-item h3 { font-size: 1.05rem; line-height: 1.35; }
.research-content .research-meta { margin-top: 0.16rem; font-size: 0.9rem; line-height: 1.45; }
.research-content .research-venue { margin-top: 0.12rem; font-size: 0.9rem; line-height: 1.45; }

.contact-only-shell {
  width: min(900px, calc(100% - 2rem));
  min-height: calc(100vh - 160px);
  margin: 0 auto;
  padding: 4rem 0;
}
.contact-only-shell p { margin: 0; font-size: 1.05rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 2rem; display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; }
.footer-inner p { margin: 0; }

@media (max-width: 800px) {
  .header-inner { min-height: 64px; }
  .site-header { min-height: 64px; }
  .menu-button { display: inline-grid; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    padding: 0.8rem 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.65rem 0.85rem; }
  .page-shell { grid-template-columns: 1fr; padding-top: 2rem; gap: 2.7rem; }
  .profile { position: static; text-align: left; display: grid; grid-template-columns: 120px 1fr; column-gap: 1.2rem; align-items: center; }
  .portrait-wrap { width: 112px; height: 112px; margin: 0; grid-row: 1 / span 3; }
  .profile-role { margin-left: 0; }
  .profile-meta { grid-column: 1 / -1; }
  .profile-links { grid-column: 1 / -1; justify-content: flex-start; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: auto; }
  .research-profile { display: block; text-align: center; }
  .research-profile .portrait-wrap { width: 112px; height: 112px; margin: 0 auto; grid-row: auto; }
  .research-profile .profile-welcome { max-width: 520px; margin: 1.35rem auto 0; text-align: left; }
  .research-profile .profile-links { justify-content: center; }
}

@media (max-width: 480px) {
  .site-title span { display: none; }
  .profile { grid-template-columns: 92px 1fr; }
  .portrait-wrap { width: 84px; height: 84px; }
  .display-title { font-size: 2.35rem; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

