:root {
  --bg: #ffffff;
  --text: #23212a;
  --muted: #6d6a75;
  --accent: #b3446c;
  --accent-soft: #f7e8ee;
  --card: #ffffff;
  --border: #e9e4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161b;
    --text: #eeecf0;
    --muted: #a29fab;
    --accent: #e07a9e;
    --accent-soft: #2c2129;
    --card: #201f26;
    --border: #322f3a;
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
strong { font-weight: 700; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 5vw;
}

nav {
  position: sticky; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand {
  font-weight: 700; text-decoration: none; color: var(--text);
  letter-spacing: 0.02em; font-size: 1.3rem;
}
nav ul { display: flex; gap: 2rem; list-style: none; }
nav ul a {
  text-decoration: none; color: var(--muted);
  font-size: 0.95rem; font-weight: 400;
}
nav ul a:hover { color: var(--accent); }
nav ul a.active { color: var(--accent); font-weight: 700; }

main { flex: 1; }

/* Home */
.hero { padding: 5rem 0; }
.hero .wrap {
  display: flex; gap: 5vw; align-items: center; flex-wrap: wrap;
  justify-content: center;
  max-width: 88rem;
}
.hero-media {
  flex-shrink: 0;
  /* Cancel out the icon row's height so the text centers on the photo alone */
  margin-bottom: calc(-1.4rem - 22px);
}
@media (max-width: 60rem) {
  .hero-media { margin-bottom: 0; }
}
.portrait-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.4rem;
}
.icon-btn { display: inline-flex; }
.icon-btn svg { width: 22px; height: 22px; fill: #000000; }
@media (prefers-color-scheme: dark) {
  .icon-btn svg { fill: #ffffff; }
}
.icon-btn:hover svg { fill: var(--accent); }
.portrait {
  width: min(400px, 80vw); height: min(400px, 80vw);
  border-radius: 18px;
  background: var(--accent-soft);
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 25%;
  display: block;
}
.hero-text { flex: 0 1 60ch; min-width: min(28rem, 90vw); }
h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.15; margin-bottom: 1rem;
  color: var(--accent);
}
.hero-text p { font-size: 1rem; max-width: 60ch; }
.hero-text p + p { margin-top: 1rem; }
.contact-line { margin-top: 1.6rem; }
.contact-line strong { color: var(--accent); }

/* Inner pages */
.page { padding: 4rem 0; }
.page-title {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 2.2rem;
}

.subheading {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.4rem 0 1.2rem;
}
.subheading:first-of-type { margin-top: 0; }

.paper {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.4rem;
}
.paper h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.5; margin-bottom: 0.3rem; }
.paper h3 a { color: var(--text); text-decoration: none; }
.paper h3 a:hover { color: var(--accent); }
.paper .meta { font-size: 0.95rem; color: var(--muted); font-style: italic; margin-bottom: 0.7rem; }
.paper .meta a { color: var(--muted); }
.paper h3 .coauthor {
  font-size: 0.95rem; font-weight: 400;
  color: var(--muted); font-style: italic;
  white-space: nowrap;
}
.paper h3 .coauthor a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: underline;
}
details summary {
  cursor: pointer; color: var(--accent);
  font-size: 0.95rem; font-weight: 400;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; }
details[open] summary::before { content: "− "; }
details p { margin-top: 0.7rem; font-size: 0.98rem; color: var(--muted); max-width: 90ch; }

.cv-embed {
  display: block;
  width: 100%;
  max-width: 62rem;
  height: 82vh;
  min-height: 30rem;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.cv-fallback {
  max-width: 62rem;
  margin: 1rem auto 0;
  text-align: center;
}

.btn {
  display: inline-block;
  background: var(--accent); color: #fff !important;
  text-decoration: none; font-weight: 700;
  padding: 0.7rem 1.6rem; border-radius: 999px;
  font-size: 1rem;
}
.btn:hover { opacity: 0.88; }


