*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #ffffff;
  --bg: #f8f9fa;
  --text: #202124;
  --muted: #5f6368;
  --link: #1a73e8;
  --link-hover: #1557b0;
  --accent: #1a73e8;
  --border: #e0e0e0;
  --nav-height: 64px;
  --sans: 'Roboto', 'Google Sans', Arial, sans-serif;
  --heading: 'Google Sans', 'Roboto', Arial, sans-serif;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  background: var(--white);
  color: var(--text);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --white: #000000;
  --bg: #000000;
  --text: #ffffff;
  --muted: #d0d0d0;
  --link: #8ab4f8;
  --link-hover: #a8c7fa;
  --accent: #8ab4f8;
  --border: #ffffff;
}

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

main,
footer {
  background: var(--white);
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 0;
}

.theme-toggle {
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.theme-toggle:hover {
  background: var(--bg);
  color: var(--text);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}

.theme-toggle .sun-icon {
  display: none;
}

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

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

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 1;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.9rem 1.4rem;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--accent); }

.nav-link .chevron {
  width: 16px;
  height: 16px;
  display: inline-block;
  transition: transform 0.2s;
}

.nav-item:hover .chevron { transform: rotate(180deg); }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 220px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  z-index: 300;
}

.nav-item:hover .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 0.8rem 1.15rem;
  font-size: 0.98rem;
  color: var(--text);
}

.dropdown a:hover { background: var(--bg); text-decoration: none; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.home-main {
  min-height: calc(100vh - var(--nav-height) - 84px);
  padding-top: 1.75rem;
  padding-bottom: 2rem;
}

.home-hero {
  min-height: calc(100vh - var(--nav-height) - 240px);
  display: flex;
  align-items: center;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

h1 {
  font-family: var(--heading);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-main .bio {
  max-width: 700px;
  margin-top: -0.9rem;
}

.home-main .bio h1 {
  text-align: center;
}

.home-main .bio p:first-of-type {
  font-size: 1.05rem;
}

.bio p {
  color: var(--text);
  font-size: 1.14rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.news-section {
  margin-top: 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.news-title {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.news-list {
  padding-left: 1.2rem;
}

.news-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.85rem;
  align-items: start;
  margin-bottom: 0.65rem;
}

.news-date {
  font-weight: 500;
  color: var(--muted);
}

.news-text {
  color: var(--text);
  min-width: 0;
}

.photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.icon-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.icon-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--link);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.15s;
}

.icon-link:hover { background: var(--bg); text-decoration: none; }

.icon-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.profile-emails {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.email-link {
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  background: var(--white);
}

.email-link:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.email-logo {
  width: 1.9rem;
  height: 1.9rem;
  object-fit: contain;
  flex-shrink: 0;
}

.ut-email .email-logo {
  width: 5rem;
  height: 2.8rem;
}

.profile-socials {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.2rem;
}

.social-link {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--link);
  background: var(--white);
  text-decoration: none;
}

.social-link:hover {
  background: var(--bg);
  color: var(--link);
  text-decoration: none;
}

.social-link svg {
  width: 1.4rem;
  height: 1.4rem;
}

.social-logo {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: contain;
}

h2.page-title {
  font-family: var(--heading);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.pub-list { display: flex; flex-direction: column; gap: 2.5rem; }

.pub-section + .pub-section {
  margin-top: 4rem;
}

.pub-section-title {
  margin-bottom: 2rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pub-thumb {
  width: 260px;
  height: 170px;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  padding: 0.35rem;
}

.pub-thumb-placeholder {
  width: 260px;
  height: 170px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-info h3 {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

.pub-info h3 a { color: var(--text); }
.pub-info h3 a:hover { color: var(--link); }

.pub-authors {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

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

.pub-venue .award {
  font-style: normal;
  color: #c5221f;
  font-weight: 500;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-link {
  font-size: 0.8rem;
  color: var(--link);
  padding: 0.2rem 0.5rem;
  border: 1px solid #c5d9f7;
  border-radius: 3px;
  background: #f0f5ff;
}

.pub-link:hover { background: #e0ecff; text-decoration: none; }

.contact-block { max-width: 560px; }
.contact-block p { font-size: 0.975rem; margin-bottom: 1.5rem; color: var(--text); }
.contact-icons { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.contact-row svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }

.overview-text p { font-size: 0.975rem; margin-bottom: 1rem; line-height: 1.7; }

.overview-text h3 {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 1.5rem 0 0.5rem;
}

.overview-hero {
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.overview-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.overview-headline {
  max-width: 11ch;
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.98;
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.overview-intro {
  max-width: 100%;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: break-word;
}

.overview-feature {
  display: block;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.overview-copy h2 {
  font-family: var(--heading);
  font-size: 1.55rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
  width: 100%;
  max-width: 100%;
}

.overview-copy p {
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 0.9rem;
  text-wrap: pretty;
  hyphens: auto;
  overflow-wrap: break-word;
}

.overview-question {
  position: relative;
  padding-left: 1.5rem;
  font-style: italic;
}

.overview-question::before {
  content: "\2192";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  font-style: normal;
}

.overview-media-float {
  float: right;
  width: 380px;
  margin: 0.15rem 0 0.9rem 1.3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.overview-media-stack {
  grid-template-columns: 1fr;
}

.overview-media-float img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.overview-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.overview-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
}

.overview-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg);
}

.overview-card h3 {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 500;
  padding: 1rem 1.1rem 0.25rem;
}

.overview-card p {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--muted);
  padding: 0 1.1rem 1.1rem;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

html[data-theme="dark"] header {
  background: #000000;
}

html[data-theme="dark"] .dropdown {
  background: #000000;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .pub-link {
  border-color: #ffffff;
  background: #000000;
}

html[data-theme="dark"] .pub-link:hover {
  background: #111111;
}

html[data-theme="dark"] .pub-venue .award {
  color: #ff8a80;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --white: #000000;
    --bg: #000000;
    --text: #ffffff;
    --muted: #d0d0d0;
    --link: #8ab4f8;
    --link-hover: #a8c7fa;
    --accent: #8ab4f8;
    --border: #ffffff;
  }

  html:not([data-theme="light"]) header {
    background: #000000;
  }

  html:not([data-theme="light"]) .dropdown {
    background: #000000;
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
  }

  html:not([data-theme="light"]) .pub-link {
    border-color: #ffffff;
    background: #000000;
  }

  html:not([data-theme="light"]) .pub-link:hover {
    background: #111111;
  }

  html:not([data-theme="light"]) .pub-venue .award {
    color: #ff8a80;
  }
}

@media (max-width: 650px) {
  header {
    padding: 0 1rem;
    gap: 0;
  }

  nav {
    gap: 0.2rem;
  }

  .nav-link {
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
  }

  .theme-toggle {
    width: 2rem;
    height: 2rem;
  }

  .home-main {
    min-height: auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .home-hero {
    min-height: auto;
    display: block;
  }

  .home-grid { grid-template-columns: 1fr; }
  .photo-col { order: -1; flex-direction: column; align-items: flex-start; }
  .profile-photo { width: 140px; height: 140px; }  .icon-links,
  .profile-emails { justify-content: flex-start; align-items: flex-start; }
  .email-link { max-width: none; }
  .home-main .bio h1 { text-align: left; }
  .overview-headline { max-width: 100%; }
  .overview-media-float {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
  .pub-item { grid-template-columns: 1fr; }
  .pub-thumb, .pub-thumb-placeholder { width: 100%; height: 160px; }
}
