/* ==========================================================================
   France d'Agrain — academic website
   Shared stylesheet
   ========================================================================== */

:root {
  --navy: #2c3e50;
  --navy-dark: #22303d;
  --accent: #16a085;
  --accent-dark: #12876f;
  --text: #2d3436;
  --muted: #6c7a80;
  --line: #e4e8eb;
  --bg: #ffffff;
  --bg-soft: #f6f8f9;
  --maxw: 900px;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header / navigation ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  flex-wrap: wrap;
}

.nav__brand {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
}
.nav__brand span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.92rem;
}

.nav__links a {
  color: #d8dee2;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav__links a:hover { background: rgba(255,255,255,0.10); color: #fff; }
.nav__links a.active { color: #fff; }
.nav__links a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  margin-top: 3px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-title {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
.page-subtitle {
  color: var(--muted);
  margin: 0 0 36px;
  font-size: 1.05rem;
}

h2 {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.35rem;
  color: var(--navy);
  margin: 44px 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}
h3 {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  color: var(--navy);
  margin: 24px 0 6px;
}

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

/* ---------- Home / hero ---------- */
.hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.hero__photo {
  flex: 0 0 220px;
  max-width: 220px;
}
.hero__photo img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.hero__body { flex: 1 1 380px; }
.hero__name {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.15;
}
.hero__role {
  color: var(--accent-dark);
  font-size: 1.15rem;
  font-weight: 600;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0 0 18px;
}
.hero__body p { margin: 0 0 16px; }

/* ---------- Contact chips ---------- */
.contact {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}
.contact a, .contact span {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 20px;
  color: var(--navy);
  text-decoration: none;
}
.contact a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Publication / paper cards ---------- */
.paper {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 22px 0;
  background: var(--bg);
}
.paper__title {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.35;
}
.paper__meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.paper__meta .authors { font-style: italic; }
.paper__links {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}
.paper__links a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent-dark);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.paper__links a:hover { background: var(--accent); color: #fff; }

.abstract-toggle {
  cursor: pointer;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-dark);
  list-style: none;
  user-select: none;
}
.abstract-toggle::-webkit-details-marker { display: none; }
.abstract-toggle::before { content: "▸ "; }
details[open] .abstract-toggle::before { content: "▾ "; }
.paper details .abstract {
  margin-top: 10px;
  font-size: 0.98rem;
  color: var(--text);
  text-align: justify;
}
.abstract .label {
  font-weight: 700;
  color: var(--navy);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- Generic content lists ---------- */
.entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-child { border-bottom: none; }
.entry__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.entry__title {
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.entry__date {
  color: var(--accent-dark);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  white-space: nowrap;
}
.entry__place { color: var(--muted); margin: 2px 0 0; font-size: 0.98rem; }
.entry__talk { margin: 4px 0 0; font-size: 0.98rem; color: var(--text); }

/* ---------- Simple year lists (seminars) ---------- */
.talk-list {
  margin: 10px 0 0;
  padding-left: 22px;
}
.talk-list li { margin: 6px 0; }
.entry ul { margin: 8px 0 0; padding-left: 20px; }
.entry ul li { margin: 2px 0; }

.note {
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 24px;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Embedded CV PDF ---------- */
.cv-embed {
  width: 100%;
  height: 85vh;
  min-height: 600px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-family: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}
.site-footer .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer a { color: var(--accent-dark); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { justify-content: center; }
  .nav__brand { width: 100%; text-align: center; margin-bottom: 4px; }
  .nav__links { justify-content: center; }
  .hero { justify-content: center; text-align: center; }
  .hero__photo { flex-basis: 180px; }
  .contact { justify-content: center; }
  .entry__head { flex-direction: column; }
}
