/* Portfolio — Romain Fillot
   Une seule colonne, typographie avant tout, une seule couleur d'accent. */

:root {
  --bg: #f7f6f2;
  --text: #1b1b1a;
  --muted: #6e6d68;
  --faint: #a3a29c;
  --line: #e4e2db;
  --line-strong: #cfccc3;
  --surface: #fdfcfa;
  --accent: #1f5c45;
  --accent-soft: #e3efe8;
  --shadow: rgba(0, 0, 0, .25);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

/* Thème sombre : suit le système, sauf choix explicite via le bouton (data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413;
    --text: #efeee9;
    --muted: #b4b2ab;
    --faint: #8c8b84;
    --line: #2c2c29;
    --line-strong: #45443f;
    --surface: #1c1c1a;
    --accent: #8fd1b2;
    --accent-soft: #1c2e26;
    --shadow: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413;
  --text: #efeee9;
  --muted: #b4b2ab;
  --faint: #8c8b84;
  --line: #2c2c29;
  --line-strong: #45443f;
  --surface: #1c1c1a;
  --accent: #8fd1b2;
  --accent-soft: #1c2e26;
  --shadow: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s, color .3s;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; }
a:hover { text-decoration-color: currentColor; color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

p { margin: 0 0 .6em; }
p:last-child { margin-bottom: 0; }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 28px 64px;
}

/* ---------- En-tête ---------- */
.avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
}

.intro-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.socials { display: flex; gap: 10px; }
.social {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.social svg { width: 17px; height: 17px; }
.social:hover { transform: translateY(-2px); color: var(--text); }
.social--gh:hover { color: var(--bg); background: var(--text); border-color: var(--text); }
.social--in:hover { color: #fff; background: #0a66c2; border-color: #0a66c2; }

/* Bouton clair / sombre */
.social--theme { padding: 0; font: inherit; cursor: pointer; }
.social--theme:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.social--theme .icon-sun { display: none; }
:root[data-theme="dark"] .social--theme .icon-sun { display: block; }
:root[data-theme="dark"] .social--theme .icon-moon { display: none; }

h1 {
  font: 400 44px/1.1 var(--serif);
  letter-spacing: -.015em;
  margin: 0 0 6px;
}

.role { color: var(--muted); margin-bottom: 22px; }

.lead { font-size: 17px; max-width: 58ch; }
.lead strong { font-weight: 500; }

.links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 22px; font-size: 14.5px; }
.links a:first-child { color: var(--accent); text-decoration-color: currentColor; font-weight: 500; }

/* ---------- Chiffres clés ---------- */
.impact { margin: 56px 0 24px; }
.impact h2 { margin-bottom: 12px; }

.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.highlights div { padding: 22px 20px 22px 0; }
.highlights div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.highlights strong { display: block; font: 400 26px/1.2 var(--serif); margin-bottom: 4px; }
.highlights span { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: block; }

/* ---------- Sections ---------- */
.block {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 48px 0 0;
}

h2 {
  font: 500 12px/1.9 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}

h3 { font-size: 15.5px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.at { font-weight: 400; color: var(--muted); }

.meta { color: var(--faint); font-size: 13.5px; margin-bottom: 10px; }
.muted { color: var(--muted); }

.stack { color: var(--muted); font-size: 13.5px; margin-top: 10px; }

.result {
  color: var(--text);
  font-weight: 500;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
}

/* ---------- Projets (cartes) ---------- */
.block--wide { grid-template-columns: 1fr; gap: 18px; }

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

.card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -16px var(--shadow);
}

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-logo { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.card-logo--mono {
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font: 500 14px/1 var(--sans); letter-spacing: .02em;
}

.card { --brand: var(--accent); --brand-soft: var(--accent-soft); }
.card--green { --brand: #127a52; --brand-soft: #dcfcec; }
.card--blue  { --brand: #2563eb; --brand-soft: #eaf1fe; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card--green { --brand: #74d8ab; --brand-soft: #17291f; }
  :root:not([data-theme="light"]) .card--blue  { --brand: #8fb3ff; --brand-soft: #19233c; }
}
:root[data-theme="dark"] .card--green { --brand: #74d8ab; --brand-soft: #17291f; }
:root[data-theme="dark"] .card--blue  { --brand: #8fb3ff; --brand-soft: #19233c; }
.card h3 { font: 600 19px/1.3 var(--sans); letter-spacing: -.015em; color: var(--brand); margin-bottom: 2px; }
.card .meta { margin-bottom: 12px; }
.card-desc { font-size: 14.5px; line-height: 1.6; flex-grow: 1; }
.card .stack { margin: 14px 0 0; padding-bottom: 18px; }

.card-links {
  display: flex;
  margin: auto -22px 0;
  border-top: 1px solid var(--line);
}
.card-link {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 0;
  font-size: 13.5px; font-weight: 500;
  text-decoration: none;
  color: var(--text);
  transition: background .2s, color .2s;
}
.card-link + .card-link { border-left: 1px solid var(--line); }
.card-link:hover { color: var(--brand); background: var(--brand-soft); }
.card-link:first-child { border-bottom-left-radius: 11px; }
.card-link:last-child { border-bottom-right-radius: 11px; }
.card-link svg { width: 15px; height: 15px; }
.card-link--off { color: var(--faint); font-weight: 400; }
.card-link--off:hover { color: var(--faint); background: none; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.status .dot { color: #c28a1e; }
.status--neutral .dot { color: var(--faint); animation: none; }
.status--live { color: var(--brand, var(--accent)); border-color: transparent; background: var(--brand-soft, var(--accent-soft)); }
.status--live .dot { color: var(--brand, var(--accent)); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Expérience ---------- */
.job {
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 32px;
}
.job + .job { padding-top: 28px; border-top: 1px solid var(--line); }
.job:last-child { padding-bottom: 0; }
.job .date { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; margin: 0 0 4px; }
.job h3 { margin-bottom: 1px; }

/* ---------- Listes ---------- */
.list { margin: 0; }
.list div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 7px 0; }
.list div + div { border-top: 1px solid var(--line); }
.list dt { color: var(--muted); font-size: 14px; }
.list dd { margin: 0; }

/* ---------- Contact ---------- */
.contact {
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.contact-title { font: 400 26px/1.25 var(--serif); margin-bottom: 12px; }
.email { color: var(--accent); text-decoration-color: currentColor; font-weight: 500; }
.copy {
  margin-left: 10px;
  font: 500 12px var(--sans);
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.copy:hover { color: var(--text); border-color: var(--muted); }
.fine { margin-top: 40px; color: var(--faint); font-size: 12.5px; }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .page { padding: 56px 22px 48px; }
  h1 { font-size: 36px; }
  .lead { font-size: 16px; }
  .impact { margin-top: 40px; }
  .highlights { grid-template-columns: 1fr; }
  .highlights div, .highlights div + div { padding: 16px 0; border-left: 0; }
  .highlights div + div { border-top: 1px solid var(--line); }
  .block { grid-template-columns: 1fr; gap: 14px; padding-top: 44px; }
  .cards { grid-template-columns: 1fr; }
  .list div { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  body { transition: none; }
}
