:root {
  --text: #111111;
  --muted: #555555;
  --accent: #0b4f8a;
  --border: #e6e6e6;
  --bg: #ffffff;
  --bg-soft: #f2f2f2;
}

html[data-theme="dark"] {
  --text: #e7edf7;
  --muted: #a7b3c6;
  --accent: #7fb0ff;
  --border: #2a3342;
  --bg: #0f141c;
  --bg-soft: #1a2230;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.site-title {
  font-family: "Source Serif 4", "Georgia", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.site-nav {
  display: block;
  margin-left: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
}

.theme-toggle-item {
  display: inline-flex;
  align-items: center;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--bg-soft);
  text-decoration: none;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-sun {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon {
  fill: currentColor;
  stroke: none;
  display: none;
}

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

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

.page-content {
  padding: 2.5rem 0 3rem;
}

.page-header h1,
.home-hero h1 {
  font-family: "Source Serif 4", "Georgia", serif;
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-body h2,
.home-body h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.page-body h3,
.home-body h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.home-hero {
  margin-bottom: 2rem;
}

.profile-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.profile-image img {
  width: 200px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.profile-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  align-items: center;
}

.profile-links a {
  display: inline-flex;
  line-height: 0;
  color: var(--text);
}

.profile-links .icon {
  width: 20px;
  height: 20px;
  display: block;
}

.affiliation {
  margin: 0 0 0.3rem;
  font-weight: 600;
}

.location {
  margin: 0 0 1rem;
  color: var(--muted);
}

.intro {
  font-size: 1.05rem;
  margin: 0;
}

.intro p {
  margin: 0 0 1rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

.pub-list,
.project-list {
  padding-left: 1.2rem;
  margin: 0;
}

.pub-list > li,
.project-list > li {
  margin-bottom: 1.4rem;
}

.paper-sublist {
  margin: 0.15rem 0 0.1rem;
  padding-left: 1.2rem;
}

.paper-sublist li {
  margin: 0.1rem 0;
}

.paper-sublist li:last-child {
  margin-bottom: 0;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.home-body h2.section-heading {
  margin-top: 2.2rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0;
  border-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text);
  font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  align-items: start;
}

.edu-school {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  line-height: 1.35;
}

.edu-degree {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.edu-note {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.edu-date {
  margin: 0;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 0.35rem;
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    fill 0.35s ease,
    stroke 0.35s ease;
}

@media (max-width: 760px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-toggle-label {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    display: none;
    margin-left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.75rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

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

  .profile-image img {
    width: 160px;
  }

  .edu-item {
    grid-template-columns: 1fr;
    row-gap: 0.3rem;
  }

  .edu-date {
    font-size: 0.98rem;
    color: var(--muted);
  }
}

.slide-frame {
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
}
