@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,700&display=swap");

:root {
  color-scheme: light;
  --home-bg: #f3f5f8;
  --home-surface: #ffffff;
  --home-surface-soft: #f8fafd;
  --home-text: #172230;
  --home-muted: #586476;
  --home-border: #d9e0e8;
  --home-link: #204f84;
  --home-link-strong: #173e67;
  --home-link-soft: #edf3f9;
  --home-button-bg: #f8fbff;
  --home-button-text-hover: #ffffff;
  --home-nav: rgba(248, 250, 253, 0.94);
  --home-nav-shadow: 0 4px 16px rgba(17, 30, 47, 0.04);
  --home-shadow: 0 10px 28px rgba(16, 32, 52, 0.06);
  --home-section-shadow: 0 5px 16px rgba(17, 30, 47, 0.04);
  --home-photo-shadow: 0 8px 20px rgba(18, 35, 58, 0.1);
  --home-venue-bg: #fff3dc;
  --home-venue-text: #7a4b13;
  --home-radial-primary: rgba(32, 79, 132, 0.1);
  --home-radial-secondary: rgba(23, 62, 103, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --home-bg: #111827;
  --home-surface: #182233;
  --home-surface-soft: #202b3c;
  --home-text: #e8edf5;
  --home-muted: #a7b3c5;
  --home-border: #334155;
  --home-link: #8ec5ff;
  --home-link-strong: #c8ddff;
  --home-link-soft: #233149;
  --home-button-bg: #202d42;
  --home-button-text-hover: #08111f;
  --home-nav: rgba(17, 24, 39, 0.9);
  --home-nav-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
  --home-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
  --home-section-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  --home-photo-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  --home-venue-bg: #3a2b15;
  --home-venue-text: #ffd27d;
  --home-radial-primary: rgba(99, 179, 237, 0.12);
  --home-radial-secondary: rgba(196, 181, 253, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1400px 520px at 8% -8%, var(--home-radial-primary), transparent 60%),
    radial-gradient(1200px 480px at 100% 0%, var(--home-radial-secondary), transparent 58%), var(--home-bg);
  color: var(--home-text);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

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

a:hover {
  text-decoration: underline;
}

strong,
b {
  font-weight: 700;
}

.home-skip {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  transform: translateY(-180%);
  padding: 0.35rem 0.6rem;
  background: var(--home-text);
  color: var(--home-bg);
}

.home-skip:focus {
  transform: translateY(0);
}

.academic-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem max(1.25rem, calc((100vw - 980px) / 2));
  border-bottom: 1px solid var(--home-border);
  background: var(--home-nav);
  backdrop-filter: blur(16px);
  box-shadow: var(--home-nav-shadow);
}

.academic-nav__brand {
  flex: 0 0 auto;
  color: var(--home-text);
  font-weight: 700;
}

.academic-nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 1rem;
  font-size: 0.96rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--home-border);
  border-radius: 999px;
  background: var(--home-button-bg);
  color: var(--home-link-strong);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--home-link);
  background: var(--home-link);
  color: var(--home-button-text-hover);
}

.theme-toggle__icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-toggle__icon--sun,
:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

.academic-main {
  padding: 2.2rem 1.25rem 2.8rem;
}

.academic-content {
  width: min(100%, 980px);
  margin: 0 auto;
}

.academic-section {
  padding: 1.28rem;
  margin-top: 1.18rem;
  border: 1px solid var(--home-border);
  border-radius: 13px;
  background: var(--home-surface);
  box-shadow: var(--home-section-shadow);
  scroll-margin-top: 5.5rem;
}

.academic-section--intro {
  margin-top: 0;
  padding: 1.42rem;
  border-radius: 16px;
  box-shadow: var(--home-shadow);
}

.academic-section__header h2,
.academic-title {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: "Source Serif 4", Georgia, serif;
}

.academic-section__header h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.academic-title {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.bio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 2rem;
  align-items: start;
}

.bio-aside {
  width: 100%;
  max-width: 230px;
}

.bio-paragraphs {
  display: grid;
  gap: 0.75rem;
}

.academic-lede {
  margin: 0;
}

.academic-lede p,
.news-copy p,
.publication-row__authors p {
  margin: 0;
}

.academic-lede ul {
  margin: 0.45rem 0 0;
  padding-left: 1.25rem;
}

.profile-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.profile-inline a,
.publication-row__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.62rem;
  border: 1px solid #7e9fbe;
  border-radius: 9px;
  background: var(--home-button-bg);
  font-weight: 600;
  line-height: 1.2;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.profile-inline a:hover,
.profile-inline a:focus,
.publication-row__links a:hover,
.publication-row__links a:focus {
  border-color: var(--home-link);
  background: var(--home-link);
  color: var(--home-button-text-hover);
  text-decoration: none;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--home-border);
  border-radius: 16px;
  box-shadow: var(--home-photo-shadow);
}

.profile-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: 100%;
  margin: 0.72rem 0 0;
  color: var(--home-muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.profile-location__icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.news-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.news-list time {
  display: inline-block;
  min-width: 4.8rem;
  color: var(--home-muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.news-copy {
  display: inline-block;
}


.publication-list,
.teaching-list {
  display: grid;
  gap: 1rem;
}


.publication-row,
.teaching-row {
  margin: 0;
}


.publication-row__title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.publication-row__title p {
  margin: 0;
}


.teaching-row time {
  color: var(--home-muted);
  font-size: 0.95rem;
}

.publication-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  scroll-margin-top: 5.5rem;
}

.publication-row:target {
  padding: 0.85rem;
  margin: -0.85rem;
  border-radius: 9px;
  background: var(--home-link-soft);
}

.publication-row__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 0.35rem;
}

.publication-row__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-row__venue,
.publication-row__authors {
  margin: 0 0 0.2rem;
}

.publication-row__venue {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.45rem;
  padding: 0.12rem 0.48rem;
  border-radius: 6px;
  background: var(--home-venue-bg);
  color: var(--home-venue-text);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.publication-row__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.publication-row__links:empty {
  display: none;
}

.teaching-row {
  display: grid;
  grid-template-columns: max-content max-content max-content minmax(0, 1fr) max-content;
  gap: 0.6rem 1rem;
  align-items: baseline;
}

.teaching-row time {
  white-space: nowrap;
}

.teaching-row__role,
.teaching-row__school,
.teaching-row__code {
  color: var(--home-muted);
}

.teaching-row__course {
  color: var(--home-link-strong);
  font-weight: 600;
}

.academic-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 1.5rem 1.25rem 2rem;
  color: var(--home-muted);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .academic-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .academic-nav__links {
    justify-content: flex-start;
  }

  .bio-layout,
  .publication-row,
  .teaching-row {
    grid-template-columns: 1fr;
  }

  .bio-aside {
    max-width: 190px;
  }

  .news-list time {
    min-width: 4.2rem;
  }
}
