:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #16161f;
  --text-muted: #5c5f70;
  --text-faint: #9393a3;
  --accent: #5b4fe0;
  --accent-strong: #4238b8;
  --accent-soft: #eeecfd;
  --border: #e6e5f0;
  --shadow: 0 1px 2px rgba(22, 22, 31, 0.04), 0 10px 30px rgba(22, 22, 31, 0.05);
  --shadow-hover: 0 4px 10px rgba(22, 22, 31, 0.06), 0 20px 45px rgba(91, 79, 224, 0.12);
  --radius: 16px;
  --max-width: 760px;
  --nav-height: 60px;
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b12;
    --surface: #15151f;
    --text: #f1f1f7;
    --text-muted: #a3a3b8;
    --text-faint: #6b6b80;
    --accent: #9089ff;
    --accent-strong: #a99fff;
    --accent-soft: rgba(144, 137, 255, 0.14);
    --border: #26262f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.35), 0 20px 45px rgba(144, 137, 255, 0.18);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong);
}

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

.container {
  width: min(100% - 2.5rem, 960px);
  margin-inline: auto;
}

/* Header / Hero */

.site-header {
  position: relative;
  overflow: hidden;
  color: #f5f4ff;
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(60% 90% at 12% 0%, rgba(144, 137, 255, 0.55), transparent 60%),
    radial-gradient(50% 70% at 100% 0%, rgba(255, 137, 189, 0.28), transparent 55%),
    linear-gradient(160deg, #0e0c1f 0%, #1a1533 45%, #241b3f 100%);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.site-header .container {
  position: relative;
}

.profile {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.profile-photo {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.profile-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(245, 244, 255, 0.6);
}

.profile-info h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.profile-role {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(245, 244, 255, 0.85);
}

.profile-email {
  margin: 0;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(245, 244, 255, 0.55);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.profile-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(245, 244, 255, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(245, 244, 255, 0.25);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.profile-links a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

/* Navigation */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  justify-content: center;
}

.site-nav-inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.site-nav a {
  display: inline-block;
  padding: 0.5rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.site-nav a.active {
  color: #fff;
  background: var(--accent);
}

/* Main content */

main {
  padding: 3rem 0 4rem;
}

section {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

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

section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about-text {
  margin: 0;
  max-width: 65ch;
  font-size: 1.08rem;
  color: var(--text-muted);
}

.about-text a {
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.about-text a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Publications */

.publications {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1.4rem 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pub-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pub-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: translateY(-2px);
}

.pub-card:hover::before {
  opacity: 1;
}

.pub-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
}

.pub-title a {
  color: var(--text);
}

.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pub-venue {
  display: inline-block;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

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

.pub-links a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* Responsive */

@media (max-width: 600px) {
  .site-header {
    padding: 3.5rem 0 2.75rem;
  }

  .profile {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .profile-photo {
    width: 104px;
    height: 104px;
  }

  .profile-links {
    justify-content: center;
  }

  .site-nav-inner {
    width: 100%;
    justify-content: center;
  }

  .site-nav a {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }

  .pub-card {
    padding: 1.15rem 1.25rem 1.15rem 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pub-card {
    transition: none;
  }

  .pub-card:hover {
    transform: none;
  }
}
