@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fira Code"; src: url("/fonts/fira-code.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #110809;
  --line: #2c1a1c;
  --text: #c9b4b5;
  --muted: #8a7476;
  --title: #f4e6e6;
  --accent: #ff3b4f;
  --hover: #1a0e10;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Fira Code", ui-monospace, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf6f2;
  --line: #e5dad4;
  --text: #3b2e2f;
  --muted: #85777a;
  --title: #160c0d;
  --accent: #d1192e;
  --hover: #f2ebe5;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--title); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { color: var(--title); font-weight: 600; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { width: min(920px, 100% - 40px); margin: 0 auto; }
.mono, .label, .meta { font-family: var(--mono); }
.skip { position: absolute; left: 12px; top: -50px; padding: 8px 12px; background: var(--accent); color: #fff; }
.skip:focus { top: 12px; }

/* En-tête */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 32px 0; font-family: var(--mono); font-size: 13px; }
.top .name { color: var(--title); text-decoration: none; font-weight: 600; }
.top .name::after { content: "_"; color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.top nav a, .top nav button { color: var(--muted); text-decoration: none; font-size: 13px; }
.top nav a:hover, .top nav button:hover { color: var(--accent); }
.top nav b { color: var(--title); font-weight: 500; }

/* Intro */
.intro { padding: 90px 0 80px; border-bottom: 1px solid var(--line); }
.intro .meta { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.intro .meta span { color: var(--accent); }
.intro h1 { max-width: 780px; font-size: clamp(30px, 5vw, 50px); line-height: 1.12; letter-spacing: -.025em; font-weight: 600; }
.intro h1 em { font-style: normal; color: var(--muted); }
.intro p { max-width: 560px; margin-top: 26px; font-size: 18px; }
.intro .links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; font-family: var(--mono); font-size: 14px; }

/* Lignes "étiquette | contenu" */
.row { display: grid; grid-template-columns: 180px 1fr; gap: 24px 40px; padding: 64px 0; border-bottom: 1px solid var(--line); }
.label { font-size: 13px; color: var(--muted); padding-top: 4px; }
.label::before { content: attr(data-n) " "; color: var(--accent); }
.prose p + p { margin-top: 14px; }
.prose { font-size: 17px; max-width: 620px; }
.prose strong { color: var(--title); font-weight: 500; }

.about { display: grid; grid-template-columns: 1fr 150px; gap: 36px; align-items: start; }
.about img { width: 150px; height: 150px; object-fit: cover; border-radius: 4px; filter: grayscale(1); transition: filter .3s; }
.about img:hover { filter: none; }

/* Ce que je fais */
.do li { display: grid; grid-template-columns: 200px 1fr; gap: 6px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.do li:first-child { border-top: 0; padding-top: 0; }
.do h3 { font-size: 16px; font-weight: 500; }
.do p { color: var(--muted); }

/* Projets */
.work li { border-top: 1px solid var(--line); }
.work li:first-child { border-top: 0; }
.work article { display: grid; grid-template-columns: 90px 1fr; gap: 4px 20px; padding: 22px 0; }
.work .year { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.work h3 { font-size: 18px; font-weight: 600; }
.work h3 small { margin-left: 8px; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.work p { margin-top: 6px; max-width: 620px; }
.work .stack { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.work .main h3 { font-size: 22px; }
.work .main ul { margin-top: 10px; }
.work .main ul li { border: 0; position: relative; padding-left: 18px; margin-top: 4px; }
.work .main ul li::before { content: "-"; position: absolute; left: 2px; color: var(--accent); }

/* Parcours */
.xp li { display: grid; grid-template-columns: 170px 1fr; gap: 4px 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.xp li:first-child { border-top: 0; padding-top: 0; }
.xp .when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.xp h3 { font-size: 16px; font-weight: 500; }
.xp h3 span { color: var(--accent); }
.xp p { color: var(--muted); margin-top: 2px; }

/* Stack */
.stack-list div { display: grid; grid-template-columns: 140px 1fr; gap: 4px 20px; padding: 8px 0; }
.stack-list dt { color: var(--muted); font-family: var(--mono); font-size: 13px; padding-top: 2px; }
.stack-list dd { color: var(--title); }

/* Contact */
.contact h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.02em; line-height: 1.2; font-weight: 600; max-width: 600px; }
.contact p { margin-top: 14px; max-width: 520px; }
.copy { margin-top: 26px; padding: 12px 18px; border: 1px solid var(--title); color: var(--title); font-family: var(--mono); font-size: 14px; transition: background .15s, color .15s, border-color .15s; }
.copy:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.copy-done { display: inline-block; margin-left: 14px; font-family: var(--mono); font-size: 13px; color: var(--accent); opacity: 0; transition: opacity .2s; }
.copy-done.show { opacity: 1; }

/* ===== Finitions ===== */
body { border-top: 3px solid var(--accent); }

/* titre */
.intro h1 .dot { color: var(--accent); }
.now { margin-top: 18px !important; font-family: var(--mono); font-size: 13px !important; color: var(--muted); }
.pulse { position: relative; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 1px; border-radius: 50%; background: #3ecf6e; }
.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid #3ecf6e; opacity: .5; }
.intro .links a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.intro .links a:hover { border-color: var(--accent); }

/* étiquettes de section qui restent visibles */
@media (min-width: 721px) {
  .label { position: sticky; top: 28px; align-self: start; }
}

/* captures */
.shot { display: block; margin: 16px 0 14px; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--hover); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55); }
.shot img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.025); }

/* lignes de projets */
.work > li > article { position: relative; isolation: isolate; }
.work > li > article::before { content: ""; position: absolute; inset: 0 -16px; z-index: -1; border-radius: 6px; background: var(--hover); opacity: 0; transition: opacity .2s; }
.work > li > article:hover::before { opacity: 1; }
.work h3 a { text-decoration: none; }
.work h3 a::after { content: " ↗"; font-size: .7em; color: var(--muted); display: inline-block; transition: transform .2s, color .2s; }
.work h3 a:hover::after { transform: translate(2px, -2px); color: var(--accent); }
.work .main h3 { font-size: 26px; letter-spacing: -.02em; }

/* parcours : petite frise */
.xp li { position: relative; }
.xp li:first-child .when { color: var(--accent); }

/* signature en bas de page */
footer { padding: 70px 0 40px; }
.sign { font-size: clamp(64px, 17vw, 190px); font-weight: 700; letter-spacing: -.06em; line-height: .8; color: color-mix(in srgb, var(--title) 7%, transparent); user-select: none; }
.sign span { color: var(--accent); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 30px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); }

/* apparition douce au chargement */
.intro > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.intro > :nth-child(2) { animation-delay: .06s; } .intro > :nth-child(3) { animation-delay: .12s; }
.intro > :nth-child(4) { animation-delay: .18s; } .intro > :nth-child(5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .intro > * { animation: none; } .shot img { transition: none; } }

footer { font-family: var(--mono); color: var(--muted); }

/* 404 */
.notfound { padding: 140px 0; }
.notfound h1 { font-size: clamp(40px, 8vw, 72px); letter-spacing: -.03em; }
.notfound p { margin: 16px 0 28px; font-size: 18px; }

.sr-copy { position: fixed; top: 0; left: 0; opacity: 0; }

@media (max-width: 720px) {
  .intro { padding: 50px 0 56px; }
  .row { grid-template-columns: 1fr; gap: 20px; padding: 48px 0; }
  .about { grid-template-columns: 1fr; }
  .about img { order: -1; width: 110px; height: 110px; }
  .do li, .xp li, .stack-list div { grid-template-columns: 1fr; gap: 2px; }
  .work article { grid-template-columns: 1fr; gap: 2px; }
}
