/* Catppuccin Latte (light) / Mocha (dark) */
:root {
  --bg: #eff1f5; --surface: #ffffff; --line: #dce0e8;
  --text: #4c4f69; --muted: #6c6f85; --head: #303446;
  --blue: #1e66f5; --green: #40a02b; --mauve: #8839ef; --peach: #fe640b; --link: #1e66f5;
  --serif: "Literata", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e2e; --surface: #24273a; --line: #363a4f;
    --text: #cdd6f4; --muted: #a6adc8; --head: #e6e9f9;
    --blue: #89b4fa; --green: #a6e3a1; --mauve: #cba6f7; --peach: #fab387; --link: #89b4fa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1e2e; --surface: #24273a; --line: #363a4f;
  --text: #cdd6f4; --muted: #a6adc8; --head: #e6e9f9;
  --blue: #89b4fa; --green: #a6e3a1; --mauve: #cba6f7; --peach: #fab387; --link: #89b4fa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--head); font-weight: 600; line-height: 1.25; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
section.wrap { padding-top: 44px; }
section.hero { padding-top: 64px; }
h2 { font-size: 1.45rem; margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
h2.sub { margin-top: 36px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { font-weight: 600; color: var(--head); margin-right: auto; }
.nav nav { display: flex; gap: 20px; font: 500 14px var(--sans); }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--head); text-decoration: none; }
.theme {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer;
}

/* Hero */
.hero { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; padding-top: 64px; }
.portrait { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.hero h1 { font-size: 2.4rem; margin: 0 0 4px; }
.role { font: 500 15px var(--sans); color: var(--muted); margin: 0 0 4px; }
.facts { font: 14px var(--sans); color: var(--muted); margin: 0 0 16px; }
.lead { margin: 0 0 22px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  font: 500 14px var(--sans); padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--bg); }

/* News */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 6px 0; align-items: baseline; }
time { font: 500 13px/1.9 var(--sans); color: var(--muted); }

/* Research cards: quiet card + accent stripe */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  border-top: 3px solid var(--accent); padding: 18px 20px;
}
.card h3 { font-size: 1.05rem; margin: 0 0 8px; }
.card p { margin: 0; font-size: 15px; }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.pubs li:last-child { border-bottom: 0; }
.venue { font: 600 12px/2 var(--sans); color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.pubs p { margin: 0; }
.pubs .title { color: var(--head); font-weight: 500; }
.authors { font-size: 15px; color: var(--muted); }
.plinks { margin-top: 6px !important; display: flex; gap: 14px; font: 500 13px var(--sans); }

/* Talks */
.talks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.talk {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text);
  transition: transform .15s, border-color .15s;
}
.talk:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--muted); }
.talk img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: center 30%; border-bottom: 1px solid var(--line); background: var(--line); }
.talk .meta { font: 500 12px var(--sans); color: var(--muted); padding: 12px 14px 2px; }
.talk .ttl { font-size: 15px; color: var(--head); padding: 0 14px 14px; line-height: 1.45; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 10px 0; }
.timeline h3 { font-size: 1.05rem; margin: 0; }
.timeline p { margin: 2px 0 0; font-size: 15px; }
.org { color: var(--muted); font: 500 14px var(--sans) !important; }

.contact { padding-bottom: 24px; }
.foot { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 32px; margin-top: 32px; font: 13px var(--sans); color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .brand { display: none; }
  .nav nav { gap: 16px; overflow-x: auto; margin-right: auto; }
  section.hero { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
  .portrait { width: 120px; height: 120px; }
  .hero h1 { font-size: 2rem; }
  .grid, .talks { grid-template-columns: 1fr; }
  .pubs li, .timeline li, .news li { grid-template-columns: 1fr; gap: 2px; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .talks { grid-template-columns: repeat(2, 1fr); }
}

.aside { font-size: 15px; color: var(--muted); margin-top: 18px; }
#teaching > p:first-of-type { margin-top: -6px; }
