/* Portfolio de Guelord Mwenderwa — une seule feuille de style.
   Jetons : couleurs par rôle (clair et sombre), une échelle de texte, trois rayons, deux ombres.
   Cuivre : le métal des pistes de circuit imprimé et celui du Katanga. Neutres chauds, teintés du cuivre. */

:root {
  --surface: #fbfaf8;
  --sunken: #f3f1ee;
  --card: #ffffff;
  --ink: #161412;
  --ink-2: #45403b;
  --ink-3: #6b645d;
  --line: #e4dfd9;
  --line-soft: #efebe6;
  --control: #8e857c;
  --copper: #a64b1c;
  --copper-strong: #8a3b12;
  --copper-soft: #f6e7dd;
  --on-copper: #ffffff;
  --live: #1d7a4c;
  --figure: #ffffff;
  --contact-bg: #161412;
  --contact-ink: #f3efea;
  --contact-ink-2: #cfc7bf;
  --contact-control: #6e665f;
  --contact-hover: rgb(255 255 255 / 0.06);
  --contact-line: #2d2926;
  --contact-via: #3a3531;
  --contact-accent: #e79a6b;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Échelle de texte : 12 · 14 · 16 · 18 · 22 · 28 · 40 · 56 */
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.125rem;
  --t-xl: 1.375rem;
  --t-2xl: 1.75rem;
  --t-3xl: 2.5rem;
  --t-4xl: 3.5rem;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgb(22 20 18 / 0.06), 0 1px 1px rgb(22 20 18 / 0.04);
  --shadow-2: 0 18px 40px -18px rgb(22 20 18 / 0.28), 0 4px 12px -6px rgb(22 20 18 / 0.12);

  --gutter: 16px;
  --max: 1200px;
  --header-h: 64px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #11100f;
    --sunken: #0c0b0a;
    --card: #191716;
    --ink: #f3efea;
    --ink-2: #cfc7bf;
    --ink-3: #a39a91;
    --line: #2d2926;
    --line-soft: #221f1d;
    --control: #6e665f;
    --copper: #e79a6b;
    --copper-strong: #f2b48d;
    --copper-soft: #2a1c14;
    --on-copper: #11100f;
    --live: #5ccb91;
    --figure: #f6f4f1;
    --contact-bg: #191716;
    --contact-ink: #f3efea;
    --contact-ink-2: #cfc7bf;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 18px 40px -18px rgb(0 0 0 / 0.7), 0 4px 12px -6px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --surface: #11100f;
  --sunken: #0c0b0a;
  --card: #191716;
  --ink: #f3efea;
  --ink-2: #cfc7bf;
  --ink-3: #a39a91;
  --line: #2d2926;
  --line-soft: #221f1d;
  --control: #6e665f;
  --copper: #e79a6b;
  --copper-strong: #f2b48d;
  --copper-soft: #2a1c14;
  --on-copper: #11100f;
  --live: #5ccb91;
  --figure: #f6f4f1;
  --contact-bg: #191716;
  --contact-ink: #f3efea;
  --contact-ink-2: #cfc7bf;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 18px 40px -18px rgb(0 0 0 / 0.7), 0 4px 12px -6px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--copper);
  border-radius: var(--r-sm);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Boutons et liens ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { background: var(--copper-strong); color: var(--on-copper); }
.btn-copper { background: var(--copper); color: var(--on-copper); }
.btn-copper:hover { background: var(--copper-strong); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--control); }
.btn-outline:hover { border-color: var(--ink); background: var(--card); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--sunken); }
.btn:active { transform: translateY(1px); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.icon-btn:hover { color: var(--ink); border-color: var(--control); }
.icon-btn svg { width: 18px; height: 18px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--copper);
  font-weight: 600;
  font-size: var(--t-sm);
  text-decoration: none;
  min-height: 44px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.15s ease; }
.link-arrow:hover { color: var(--copper-strong); }
.link-arrow:hover svg { transform: translate(2px, -2px); }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--t-md);
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand-mark { width: 28px; height: 28px; color: var(--ink); flex: none; }
.brand-mark .via { fill: var(--copper); }
.brand-name { white-space: nowrap; }

.nav-desktop { display: none; }
.nav-desktop a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.nav-desktop a:hover { color: var(--ink); background: var(--sunken); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn-contact { display: none; }

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 8px var(--gutter) 20px;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.nav-mobile .btn { width: 100%; margin-top: 16px; }

@media (min-width: 1024px) {
  .nav-desktop { display: flex; gap: 2px; }
  .menu-toggle { display: none; }
  .nav-mobile, .nav-mobile.is-open { display: none; }
  .header-actions .btn-contact { display: inline-flex; }
}

/* ---------- Héros ---------- */

.hero {
  position: relative;
  padding: 40px 0 56px;
  overflow: hidden;
}
.hero-traces {
  position: absolute;
  top: 0;
  right: -120px;
  width: 720px;
  height: 100%;
  color: var(--line);
  pointer-events: none;
  display: none;
}
.hero-traces .via { fill: var(--surface); stroke: var(--line); }
.hero-traces .via-live { fill: var(--copper); stroke: none; }
.hero-grid {
  position: relative;
  display: grid;
  gap: 32px;
}
.hero h1 {
  margin-top: 20px;
  font-size: var(--t-3xl);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 21ch;
}
.hero h1 em { font-style: normal; color: var(--copper); }
.hero-lead {
  margin-top: 20px;
  font-size: var(--t-lg);
  color: var(--ink-2);
  max-width: 58ch;
}
.hero-fields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; max-width: 640px; }
.hero-fields li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
}
.hero-fields li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--copper); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 20px; }
.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
}
.hero-links a:hover { color: var(--ink); }
.hero-links svg { width: 18px; height: 18px; }

.portrait-card {
  position: relative;
  margin: 0;
  max-width: 360px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--shadow-2);
}
.portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--sunken);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--live);
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}
.portrait-card .status {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.fact {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.fact-value {
  font-family: var(--mono);
  font-size: var(--t-2xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  min-width: 2.2ch;
  font-variant-numeric: tabular-nums;
}
.fact-label { color: var(--ink-2); font-size: var(--t-sm); }

@media (min-width: 768px) {
  .hero { padding: 56px 0 72px; }
  .hero h1 { font-size: var(--t-3xl); }
  .facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .fact { flex-direction: column; gap: 4px; padding: 24px 24px 24px 0; border-bottom: 0; }
  .fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
}

@media (min-width: 1024px) {
  .hero { padding: 80px 0 72px; }
  .hero-traces { display: block; }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: center; }
  .hero h1 { font-size: var(--t-4xl); }
  .portrait-card { justify-self: end; width: 100%; }
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}
.section-index {
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
}
.section-head h2 { font-size: var(--t-2xl); letter-spacing: -0.025em; }
.section-head p:not(.section-index) { color: var(--ink-2); max-width: 62ch; font-size: var(--t-md); }

@media (min-width: 768px) {
  .section { padding: 96px 0; }
  .section-head h2 { font-size: var(--t-3xl); }
  .section-head p:not(.section-index) { font-size: var(--t-lg); }
}
@media (min-width: 1024px) {
  .section-head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 64px; align-items: end; margin-bottom: 56px; }
  .section-head .section-index { grid-column: 1 / -1; }
}

/* ---------- Plateformes (études de cas) ---------- */

.cases { display: grid; gap: 32px; }
.case {
  display: grid;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.case-visual {
  position: relative;
  padding: 20px 20px 0;
  background: var(--sunken);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.browser {
  position: relative;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-md);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser-bar span {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img { width: 100%; aspect-ratio: 1184 / 740; object-fit: cover; object-position: top; }
.phone {
  display: none;
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 22%;
  min-width: 120px;
  max-width: 190px;
  padding: 6px;
  border-radius: var(--r-lg);
  background: var(--ink);
  box-shadow: var(--shadow-2);
}
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: var(--r-md); }

.case-body { display: grid; gap: 24px; padding: 24px 20px 28px; min-width: 0; }
.case-intro, .case-details { min-width: 0; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.case-meta .mono { font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.case h3 { margin-top: 14px; font-size: var(--t-2xl); letter-spacing: -0.025em; }
.case-tagline { margin-top: 8px; font-size: var(--t-lg); color: var(--ink); font-weight: 500; }
.case-summary { margin-top: 12px; color: var(--ink-2); }
.case-role {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.case-role strong { color: var(--ink-2); font-weight: 500; }
.case-did { margin-top: 16px; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.case-list { margin-top: 10px; display: grid; gap: 10px; }
.case-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: 1.55;
}
.case-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border: 2px solid var(--copper);
  border-radius: 50%;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-2);
  background: var(--surface);
  white-space: nowrap;
}
.case-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; }

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: var(--sunken);
  scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: start; min-width: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 1184 / 740;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
}
.gallery figcaption { margin-top: 8px; font-size: var(--t-xs); color: var(--ink-3); font-family: var(--mono); }

@media (min-width: 640px) {
  .phone { display: block; }
  .case-visual { padding: 32px 32px 0; }
  .browser { margin-right: 13%; }
}

@media (min-width: 1024px) {
  .cases { gap: 40px; }
  .case-visual { padding: 48px 48px 0; }
  .case-visual .browser { width: 74%; margin-right: 0; }
  .case:nth-child(even) .case-visual .browser { margin-left: auto; }
  .case:nth-child(even) .phone { right: auto; left: 48px; }
  .phone { right: 64px; bottom: 32px; width: 200px; max-width: none; }
  .case-body { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; padding: 40px 48px 44px; }
  .gallery { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 24px 48px 32px; }
}

/* ---------- Réalisations ---------- */

.highlights { display: grid; gap: 16px; }
.highlight {
  position: relative;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.highlight .mono { font-size: var(--t-xs); color: var(--copper); letter-spacing: 0.06em; text-transform: uppercase; }
.highlight h3 { margin-top: 12px; font-size: var(--t-lg); letter-spacing: -0.015em; }
.highlight p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }

@media (min-width: 768px) { .highlights { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .highlights { grid-template-columns: repeat(3, 1fr); } .highlight { padding: 28px; } }

/* ---------- Open source ---------- */

.projects { display: grid; gap: 16px; }
.project {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.project:hover { border-color: var(--control); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.project-figure { background: var(--figure); border-bottom: 1px solid var(--line); }
.project-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.project-body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.project-kind { font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.project h3 { font-size: var(--t-lg); letter-spacing: -0.015em; }
.project p { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }
.project .chips { margin-top: auto; padding-top: 8px; }
.project-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--copper); font-weight: 600; font-size: var(--t-sm); margin-top: 4px; }
.project-cta svg { width: 16px; height: 16px; }

.all-repos { margin-top: 32px; }

.contribs { margin-top: 40px; display: grid; gap: 12px; }
.contribs-head h3 { font-size: var(--t-md); letter-spacing: -0.01em; }
.contribs-head p { margin-top: 6px; color: var(--ink-2); font-size: var(--t-sm); }
.contrib {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  text-decoration: none;
}
.contrib:hover { border-color: var(--control); }
.contrib-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.contrib-repo { font-family: var(--mono); font-size: var(--t-sm); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.contrib-state { font-family: var(--mono); font-size: var(--t-xs); padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink-2); }
.contrib-state.is-merged { color: var(--live); border-color: currentColor; }
.contrib-title { color: var(--ink-2); font-size: var(--t-sm); }

@media (min-width: 768px) {
  .projects { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .projects { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Formation ---------- */

.teaching { display: grid; gap: 16px; }
.course {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  text-decoration: none;
}
.course:hover { border-color: var(--control); }
.course h3 { font-size: var(--t-lg); }
.course p { color: var(--ink-2); font-size: var(--t-sm); }
.course .chips { margin-top: 4px; }
@media (min-width: 768px) { .teaching { grid-template-columns: repeat(2, 1fr); gap: 20px; } }

/* ---------- À propos ---------- */

.about { display: grid; gap: 40px; }
.about-text p { color: var(--ink-2); font-size: var(--t-lg); }
.about-text p + p { margin-top: 16px; }
.about-text .subhead:first-of-type { margin-top: 40px; }
.about-side .subhead:first-child { margin-top: 0; }

.timeline { margin-top: 32px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline strong { font-size: var(--t-md); }
.timeline span { color: var(--ink-2); font-size: var(--t-sm); }
.timeline .mono { font-size: var(--t-xs); color: var(--ink-3); }

.subhead { margin-top: 40px; font-size: var(--t-md); letter-spacing: -0.01em; }
.principles { margin-top: 12px; display: grid; gap: 12px; }
.principles li { padding-left: 22px; position: relative; color: var(--ink-2); font-size: var(--t-sm); }
.principles li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 10px; height: 2px; background: var(--copper); }
.principles strong { color: var(--ink); }

.skills { margin-top: 12px; border-top: 1px solid var(--line); }
.skills div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.skills dt { font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.skills dd { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }

@media (min-width: 768px) {
  .skills div { grid-template-columns: 180px 1fr; gap: 16px; }
}
@media (min-width: 1024px) {
  .about { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; }
  .about-side { padding-top: 8px; }
}

/* ---------- Contact ---------- */

.contact {
  padding: 40px 24px;
  border-radius: var(--r-lg);
  background: var(--contact-bg);
  color: var(--contact-ink);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.contact .eyebrow { color: var(--contact-ink-2); }
.contact h2 { margin-top: 16px; font-size: var(--t-2xl); max-width: 22ch; letter-spacing: -0.025em; }
.contact p { margin-top: 16px; color: var(--contact-ink-2); max-width: 56ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact .btn-outline { color: var(--contact-ink); border-color: var(--contact-control); }
.contact .btn-outline:hover { background: var(--contact-hover); border-color: var(--contact-ink); }
.contact-email { margin-top: 20px; font-family: var(--mono); font-size: var(--t-sm); color: var(--contact-ink-2); overflow-wrap: anywhere; }
.contact-traces { position: absolute; right: -40px; bottom: -40px; width: 360px; color: var(--contact-line); pointer-events: none; display: none; }
.contact-traces .via { fill: var(--contact-bg); stroke: var(--contact-via); }
.contact-traces .via-live { fill: var(--contact-accent); stroke: none; }

@media (min-width: 768px) {
  .contact { padding: 64px; }
  .contact h2 { font-size: var(--t-3xl); }
  .contact-traces { display: block; }
}

/* ---------- Pied de page ---------- */

.site-footer { padding: 40px 0 56px; color: var(--ink-3); font-size: var(--t-sm); }
.footer-inner { border-top: 1px solid var(--line); padding-top: 24px; }

/* ---------- Page 404 ---------- */

.not-found { min-height: 70vh; display: grid; align-content: center; gap: 20px; padding: 64px 0; }
.not-found h1 { font-size: var(--t-3xl); max-width: 18ch; }
.not-found p { color: var(--ink-2); font-size: var(--t-lg); }
.not-found p.not-found-actions { margin-top: 20px; }
.not-found > div + div { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
