:root {
  color-scheme: light;
  --accent: #1a7a6d;
  --accent-hover: #15655a;
  --accent-light: rgba(26, 122, 109, 0.08);
  --bg-primary: #f8f6f1;
  --bg-secondary: #f0ece4;
  --bg-card: #ffffff;
  --text-primary: #2c2a25;
  --text-secondary: #5c5850;
  --text-muted: #8a857c;
  --border-color: #e2ded6;
  --shadow-sm: 0 1px 3px rgba(44, 42, 37, 0.06);
  --shadow-md: 0 4px 12px rgba(44, 42, 37, 0.08);
  --shadow-lg: 0 8px 24px rgba(44, 42, 37, 0.1);
  --container-max: 1360px;
  --nav-max: 1388px;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.75;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  transition: color var(--transition-fast);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 2.5rem 0 1rem;
}

h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: 1.875rem;
}

h2::after {
  background-color: var(--accent);
  border-radius: 1px;
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.75rem;
  width: 2rem;
}

h3 {
  font-size: 1.375rem;
}

p,
li {
  color: var(--text-secondary);
  max-width: 65ch;
  overflow-wrap: anywhere;
}

strong {
  color: var(--text-primary);
}

.navbar {
  backdrop-filter: saturate(180%) blur(16px);
  background-color: rgba(248, 246, 241, 0.8);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  align-items: center;
  display: flex;
  gap: 1.15rem;
  height: 64px;
  margin: 0 auto;
  max-width: var(--nav-max);
  padding: 0 1rem;
}

.navbar-brand {
  align-items: center;
  color: var(--text-primary);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  gap: 0.45rem;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: #3b9588;
  border-radius: var(--radius-sm);
  color: #ffffff;
  display: inline-flex;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.68rem;
  font-weight: 800;
  height: 1.5rem;
  justify-content: center;
  letter-spacing: 0;
  width: 1.5rem;
}

.navbar-nav {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 0.35rem;
  justify-content: center;
}

.navbar-nav a {
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.65rem;
  position: relative;
  text-decoration: none;
}

.navbar-nav a:hover,
.navbar-nav a:focus-visible {
  background-color: var(--accent-light);
  color: var(--accent);
  outline: none;
}

.navbar-nav a.active {
  color: var(--accent);
}

.navbar-nav a.active::after {
  background-color: var(--accent);
  border-radius: 1px;
  bottom: 0.15rem;
  content: "";
  height: 2px;
  left: 0.65rem;
  position: absolute;
  right: 0.65rem;
}

.nav-toggle,
.navbar-toggler {
  display: none;
}

.home-grid {
  align-items: start;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) 350px;
  margin: 0 auto;
  max-width: var(--container-max);
  padding: 2rem 0 4rem;
}

.home-content {
  min-width: 0;
}

.home-hero {
  font-size: 2.75rem;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 0.25rem;
}

.home-hero::after {
  display: none;
}

.home-hero-sub {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  font-style: italic;
  margin: 0 0 2rem;
  max-width: none;
}

.intro > p:not(.home-hero-sub) {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.chip {
  background-color: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  color: var(--accent);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.875rem;
  text-decoration: none;
}

.chip:hover,
.chip:focus-visible {
  background-color: var(--accent);
  color: #ffffff;
}

.section {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
}

.section h2:first-child {
  margin-top: 0;
}

.pub-entry {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  position: relative;
}

.pub-entry:last-child {
  border-bottom: 0;
}

.pub-type,
.role {
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.pub-title {
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 0.35rem;
}

.pub-authors {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0.15rem 0;
}

.pub-venue {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: italic;
  margin: 0.15rem 0;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.year-badge {
  background-color: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  color: var(--accent);
  float: right;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0.1rem 0 0.5rem 0.75rem;
  padding: 0.15rem 0.625rem;
}

.btn-pill {
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.6;
  padding: 0.25rem 0.875rem;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-pdf,
.btn-website {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-pdf:hover,
.btn-pdf:focus-visible,
.btn-website:hover,
.btn-website:focus-visible {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-doi {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-doi:hover,
.btn-doi:focus-visible {
  color: var(--bg-primary);
  opacity: 0.85;
}

.btn-abstract {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
  list-style: none;
  margin-top: 0.75rem;
}

.btn-abstract:hover,
.btn-abstract:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  font-size: 0.9375rem;
  margin-top: 1rem;
}

.teaching-group {
  border-bottom: 1px solid var(--border-color);
  padding: 1.35rem 0;
}

.teaching-group:first-of-type {
  padding-top: 0.25rem;
}

.teaching-group:last-child {
  border-bottom: 0;
}

.teaching-group h3 {
  font-size: 1.25rem;
  margin-top: 0;
}

.teaching-table {
  border-top: 1px solid var(--border-color);
  overflow: visible;
}

.teaching-row {
  display: grid;
  gap: 0.28rem;
  grid-template-columns: 1fr;
  padding: 1.05rem 0;
}

.teaching-row + .teaching-row {
  border-top: 1px solid var(--border-color);
}

.teaching-row span {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  min-width: 0;
  overflow-wrap: break-word;
}

.teaching-head {
  display: none;
}

.sidebar {
  display: grid;
  gap: 1.5rem;
}

.profile-card,
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.profile-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 2.7rem 1.4rem 2rem;
  position: relative;
  text-align: center;
}

.profile-card::before {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.profile-photo {
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--border-color),
    var(--shadow-md);
  height: 192px;
  margin: 0 auto 1.1rem;
  object-fit: cover;
  object-position: center top;
  width: 192px;
}

.profile-name {
  font-size: 1.375rem;
  margin: 0 0 0.25rem;
}

.profile-name::after,
.section-card h2::after,
.site-footer h2::after {
  display: none;
}

.profile-title {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.profile-institution {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 0.2rem 0 0;
}

.profile-links {
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.icon-link {
  align-items: center;
  background-color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  color: #ffffff;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 700;
  height: 3.05rem;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0 1rem;
  text-decoration: none;
}

.icon-link:hover,
.icon-link:focus-visible {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.profile-education {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  text-align: left;
}

.profile-education li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: none;
  padding: 0.25rem 0;
}

.section-card {
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.section-card h2 {
  font-size: 1.375rem;
  margin: 0 0 1.35rem;
}

.news-item {
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 0;
}

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

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

.news-date {
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.news-headline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.news-headline a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration-color: var(--accent);
}

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: var(--container-max);
  padding: 2.5rem 0;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 0.8rem;
}

.site-footer p,
.site-footer a {
  color: var(--text-secondary);
  display: block;
  font-size: 0.875rem;
  margin: 0.25rem 0;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 auto;
  max-width: var(--container-max);
  padding: 1rem 0 1.5rem;
}

@media (max-width: 1100px) {
  .home-grid,
  .footer-inner,
  .footer-bottom {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }
}

@media (max-width: 900px) {
  .nav-inner {
    align-items: center;
    display: grid;
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 67px;
  }

  .navbar-toggler {
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    gap: 0.28rem;
    height: 2.65rem;
    justify-content: center;
    width: 3.15rem;
  }

  .navbar-toggler span {
    background: var(--text-secondary);
    border-radius: 1px;
    display: block;
    height: 2px;
    width: 1.25rem;
  }

  .navbar-nav {
    display: none;
  }

  .nav-toggle:checked ~ .navbar-nav {
    border-top: 1px solid var(--border-color);
    display: grid;
    gap: 0.2rem;
    grid-column: 1 / -1;
    justify-content: stretch;
    padding: 0.85rem 0 1rem;
  }

  .navbar-nav a {
    font-size: 0.94rem;
    padding: 0.65rem 0.8rem;
  }

  .navbar-nav a.active::after {
    display: none;
  }

  .navbar-nav a.active {
    background-color: var(--accent-light);
  }

  .home-grid {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .home-hero {
    font-size: 2.1rem;
  }

  .sidebar {
    margin-top: 1rem;
  }

  .profile-card,
  .section-card {
    max-width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-inner,
  .home-grid,
  .footer-inner,
  .footer-bottom {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .home-grid {
    padding-bottom: 3rem;
  }

  .intro > p:not(.home-hero-sub) {
    font-size: 1rem;
  }

  .year-badge {
    float: none;
    margin: 0 0 0.75rem;
  }

}
