:root {
  --text: #1d1f23;
  --muted: #5f6570;
  --line: #e4e6ea;
  --bg: #ffffff;
  --accent: #1f4e8c;
  --award: #b3261e;
  --bar: #16181c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e9ec;
    --muted: #a0a6b0;
    --line: #2c2f35;
    --bg: #111317;
    --accent: #7fb0f0;
    --award: #f28b82;
    --bar: #0a0b0d;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Barre de navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bar);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}
.brand { color: #fff; font-weight: 600; font-size: 19px; }
.nav { display: flex; gap: 22px; overflow-x: auto; }
.nav a { color: #c9ccd2; font-size: 15px; white-space: nowrap; }
.nav a:hover { color: #fff; text-decoration: none; }

/* Présentation */
.intro {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  padding: 48px 0 16px;
}
.portrait {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.intro h1 { margin: 0; font-size: 28px; font-weight: 700; }
.role { margin: 2px 0 18px; color: var(--muted); }
.links {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
  font-weight: 500;
}
.links .email { color: var(--muted); font-weight: 400; }

/* Sections */
section { padding-top: 32px; }
h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
section ul { padding-left: 20px; margin: 0; }
section li { margin-bottom: 6px; }

.news { list-style: none; padding-left: 0; }
.date {
  display: inline-block;
  min-width: 78px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Publications */
.note { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.pub {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.pub:last-child { border-bottom: 0; }
.pub-media img,
.pub-media video {
  display: block;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.pub h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.pub p { margin: 0 0 2px; }
.authors { font-size: 15px; color: var(--muted); }
.me { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.venue { font-weight: 600; font-size: 15px; color: var(--accent); }
.award { font-weight: 600; font-size: 15px; color: var(--award); }
.pub-links { margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 6px; }
.pub-links a {
  font-size: 13px;
  font-weight: 500;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.pub-links a:hover { border-color: var(--accent); text-decoration: none; }

.footer {
  margin-top: 48px;
  padding: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Mobile */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .intro { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .portrait { max-width: 180px; }
  .pub { grid-template-columns: 1fr; gap: 12px; }
  .pub-media { max-width: 360px; }
}
@media (max-width: 480px) {
  .brand { display: none; }
}

.edu { list-style: none; padding-left: 0; }
.edu li { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.edu-date { color: var(--muted); font-variant-numeric: tabular-nums; }

.links i { width: 1.1em; text-align: center; margin-right: 2px; }
