/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf8f5;
  --text: #2c2420;
  --accent: #8b3a3a;
  --accent-hover: #6f2929;
  --accent-light: #c97a5a;
  --muted: #7a6e64;
  --border: #d9d0c7;
  --card-bg: #ffffff;
  --shadow: 0 2px 12px rgba(44, 36, 32, 0.08);
}

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

body {
  font-family: "EB Garamond", "Garamond", "Georgia", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
}

/* === Typography === */
h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 3rem;
  letter-spacing: 0.01em;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

/* === Navigation === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-right a {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-right a:hover {
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

/* === Hero === */
#hero {
  max-width: 1100px;
  min-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 60px;
}

.hero-inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.hero-content {
  text-align: left;
}

.hero-content h1 {
  margin-bottom: 0.5rem;
}

.hero-figure {
  margin: 0;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.subtitle {
  font-size: 1.3rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text);
  margin-top: 1rem;
  max-width: 42rem;
}

.identity-summary {
  font-size: 1.08rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.quick-facts {
  margin-top: 1.75rem;
}

.quick-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.quick-facts dl > div {
  padding: 1rem 1.15rem;
  background: var(--card-bg);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-facts dd {
  margin-top: 0.2rem;
}

/* === Sections === */
section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-content {
  margin-top: 1rem;
}

.section-content > p + p {
  margin-top: 1rem;
}

/* === Timeline === */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.year {
  min-width: 110px;
  font-size: 0.95rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2px;
}

/* === Publication === */
.publication,
.research-interests {
  margin-bottom: 2rem;
}

.research-interests {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.paper-title {
  font-style: italic;
  margin: 0.5rem 0;
}

.paper-authors {
  margin-bottom: 0.35rem;
}

.paper-venue {
  color: var(--muted);
  font-size: 0.95rem;
}

.paper-note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.paper-summary,
.paper-result,
.paper-analysis {
  margin-top: 1rem;
}

.paper-result {
  padding-left: 1rem;
  border-left: 3px solid var(--accent-light);
}

.publication-details {
  margin-top: 1.25rem;
}

.publication-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.publication-details summary:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* === Resources === */
.resources-intro {
  margin-bottom: 1.5rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.resource-card {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.resource-card h3 {
  margin-bottom: 0.45rem;
}

.resource-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* === Skills === */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-card ul {
  list-style: none;
}

.skill-card li {
  padding: 4px 0;
  font-size: 0.95rem;
}

/* === Cours === */
#cours ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

#cours li {
  padding: 4px 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* === FAQ === */
.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.faq-list summary:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
}

.faq-list p {
  margin-top: 0.75rem;
}

/* === Contact === */
.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

address.contact-info {
  font-style: normal;
}

.contact-icon {
  font-size: 1.2rem;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

/* === Mobile === */
@media (max-width: 768px) {
  .nav-right {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250, 248, 245, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 0.8rem;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-right a {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .hamburger {
    display: block;
  }

  h1 {
    font-size: 2.2rem;
  }

  #hero {
    padding-top: 100px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-content {
    text-align: center;
  }

  .hero-figure {
    width: min(240px, 72vw);
    margin: 0 auto;
    grid-row: 1;
  }

  .hero-portrait {
    width: 100%;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .timeline-item {
    flex-direction: column;
    gap: 0.2rem;
  }

  .year {
    min-width: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts dl {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
