/* Portfolio de KOKWE KONO : thème sombre, sans dépendance. Les animations sont coupées avec prefers-reduced-motion. */
:root {
  color-scheme: dark;
  --bg: #070b16;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e6ebf5;
  --muted: #94a3b8;
  --accent: #818cf8;
  --accent-2: #c084fc;
  --accent-3: #22d3ee;
  --gold: #fbbf24;
  --ok: #34d399;
  --radius: 20px;
  --mx: 50vw;
  --my: 30vh;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--accent); }
img { max-width: 100%; }
::selection { background: rgba(129, 140, 248, 0.4); }

/* Langues : sans JavaScript, les deux restent affichées. */
html[data-lang="fr"] [lang="en"], html[data-lang="en"] [lang="fr"] { display: none; }

/* Fond : orbes qui dérivent, grille en dégradé, halo qui suit la souris */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; animation: drift 22s ease-in-out infinite alternate; }
.o1 { width: 520px; height: 520px; background: #4f46e5; top: -160px; left: -120px; }
.o2 { width: 440px; height: 440px; background: #7c3aed; top: 30vh; right: -140px; animation-duration: 28s; animation-delay: -6s; }
.o3 { width: 380px; height: 380px; background: #0891b2; bottom: -140px; left: 28vw; animation-duration: 32s; animation-delay: -12s; opacity: 0.35; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.12); } }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 20%, #000 15%, transparent 70%); opacity: 0.55; }
.spot { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx) var(--my), rgba(129, 140, 248, 0.14), transparent 60%); }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); z-index: 60; background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2)); }

/* En-tête */
header.site { position: sticky; top: 0; z-index: 50; transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s; }
header.site.scrolled { background: rgba(7, 11, 22, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--border); }
.bar { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: 0.01em; }
.mono { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 0.8rem; font-weight: 900; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45); }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
nav.main a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; transition: color 0.2s, background 0.2s; }
nav.main a:hover, nav.main a.active { color: var(--text); background: var(--surface-2); }
.langs { display: inline-flex; margin-left: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.langs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 800; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: #0b1020; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #0b1020; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 3px; border-radius: 6px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }
section { position: relative; }
section.block { padding: 96px 0 0; }
.kicker { font: 700 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-3); margin: 0 0 12px; }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
p.sub { color: var(--muted); max-width: 42em; margin: 0 0 32px; }

/* Hero */
.hero { padding: 72px 0 8px; display: grid; gap: 48px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 0.85fr; padding-top: 96px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4rem); line-height: 1.06; margin: 20px 0 18px; letter-spacing: -0.035em; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(0.5em); filter: blur(6px); animation: word 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
html:not(.js) .hero h1 .w { opacity: 1; transform: none; filter: none; animation: none; }
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
.grad { background: linear-gradient(100deg, var(--accent-3), var(--accent), var(--accent-2), var(--accent-3)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 7s linear infinite; }
@keyframes shine { to { background-position: -250% 0; } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; margin: 0 0 22px; }
.stackline { font: 600 0.95rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); margin: 0 0 26px; min-height: 1.4em; }
.stackline b { color: var(--text); font-weight: 700; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--accent-3); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 14px; font-weight: 800; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s; }
.btn.primary { color: #0b1020; background: linear-gradient(120deg, #a5b4fc, #c4b5fd); box-shadow: 0 10px 28px rgba(129, 140, 248, 0.35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(129, 140, 248, 0.5); }
.btn.ghost { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.btn.ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.25); }

/* Avatar + terminal */
.visual { position: relative; display: grid; gap: 22px; justify-items: center; }
.avatar { position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; font-weight: 900; color: #fff; letter-spacing: 0.02em; background: #0d1224; }
.avatar::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, var(--accent-3), var(--accent), var(--accent-2), var(--gold), var(--accent-3)); animation: spin 8s linear infinite; }
.avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, #1b2144, #0d1224); z-index: -1; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
@keyframes spin { to { transform: rotate(360deg); } }
.term { width: 100%; max-width: 440px; border: 1px solid var(--border); border-radius: 16px; background: rgba(8, 12, 26, 0.85); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); overflow: hidden; font: 0.86rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.term .head { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.term .head i { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.term .head i:nth-child(1) { background: #f87171; } .term .head i:nth-child(2) { background: #fbbf24; } .term .head i:nth-child(3) { background: #34d399; }
.term .head span { margin-left: 8px; color: var(--muted); font-size: 0.75rem; }
.term .body { padding: 14px 16px 16px; color: #cbd5e1; }
.term .ln { opacity: 0; transform: translateX(-6px); animation: line 0.45s ease forwards; animation-delay: calc(var(--n) * 520ms + 900ms); }
html:not(.js) .term .ln { opacity: 1; transform: none; animation: none; }
@keyframes line { to { opacity: 1; transform: none; } }
.term .ok { color: var(--ok); } .term .dim { color: var(--muted); } .term .acc { color: var(--accent-3); }

/* Chiffres */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 72px; }
.stat { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat b { display: block; font-size: 2.3rem; line-height: 1.1; letter-spacing: -0.03em; background: linear-gradient(120deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Bandeau de technologies */
.marquee { margin-top: 56px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 12px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { white-space: nowrap; padding: 9px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 700; font-size: 0.9rem; }
@keyframes scroll { to { transform: translateX(-50%); } }
html:not(.js) .track { flex-wrap: wrap; width: auto; animation: none; justify-content: center; }

/* Cartes d'expertise */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform 0.3s, border-color 0.3s, background 0.3s; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(300px circle at var(--cx, 50%) var(--cy, 0%), rgba(129, 140, 248, 0.16), transparent 60%); opacity: 0; transition: opacity 0.3s; }
.card:hover { transform: translateY(-5px); border-color: rgba(129, 140, 248, 0.5); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card .ic { position: relative; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: rgba(129, 140, 248, 0.14); margin-bottom: 14px; }
.card .ic svg { width: 24px; height: 24px; }
.card h3 { position: relative; margin: 0 0 6px; font-size: 1.08rem; }
.card p { position: relative; margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Étude de cas */
.case { display: grid; gap: 28px; padding: 28px; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(160deg, rgba(79, 70, 229, 0.14), rgba(255, 255, 255, 0.03) 55%); transform-style: preserve-3d; transition: transform 0.2s ease-out, border-color 0.3s; }
.case:hover { border-color: rgba(129, 140, 248, 0.45); }
@media (min-width: 900px) { .case { grid-template-columns: 1fr 1fr; padding: 40px; } }
.case-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.case-head img { width: 72px; height: 72px; border-radius: 18px; }
.case h3 { margin: 0; font-size: 1.7rem; letter-spacing: -0.02em; }
.pill { display: inline-block; margin-top: 4px; font-size: 0.72rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; background: rgba(34, 211, 238, 0.12); color: var(--accent-3); }
.case p { color: var(--muted); margin: 0 0 14px; }
.decisions { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.decisions li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--text); font-size: 0.95rem; }
.decisions li::before { content: "✓"; color: var(--ok); font-weight: 900; }
.decisions small { display: block; color: var(--muted); font-size: 0.88rem; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 0; font-size: 0.92rem; }
.arch { width: 100%; height: auto; align-self: center; }
.arch text { fill: var(--text); font: 600 13px system-ui, sans-serif; }
.arch .sm { fill: var(--muted); font-size: 10.5px; font-weight: 500; }
.arch rect.node { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.4; }
.arch rect.core { fill: rgba(129, 140, 248, 0.18); stroke: var(--accent); }
.arch path.flow { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 6 8; animation: flow 1.4s linear infinite; opacity: 0; }
.arch path.flow.alt { stroke: var(--accent-3); animation-direction: reverse; }
.arch.in path.flow { opacity: 0.9; transition: opacity 0.6s 0.6s; }
.arch g.n { opacity: 0; transform: translateY(8px); transition: opacity 0.6s, transform 0.6s; transition-delay: calc(var(--i) * 140ms); }
.arch.in g.n { opacity: 1; transform: none; }
@keyframes flow { to { stroke-dashoffset: -28; } }
html:not(.js) .arch path.flow { opacity: 0.9; } html:not(.js) .arch g.n { opacity: 1; transform: none; }

/* Contact */
.contact { text-align: center; padding: 48px 24px; border: 1px solid var(--border); border-radius: 28px; background: radial-gradient(600px circle at 50% 0%, rgba(129, 140, 248, 0.18), transparent 70%), var(--surface); }
.contact h2 { margin-bottom: 10px; }
.contact p { color: var(--muted); max-width: 34em; margin: 0 auto 26px; }
.contact .social { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.contact .social:empty { display: none; }

/* Apparition au défilement */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  nav.main a { padding: 8px 9px; font-size: 0.88rem; }
  section.block { padding-top: 72px; }
  .hero { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orb, .grad, .avatar::before, .track, .eyebrow .dot, .caret, .arch path.flow { animation: none !important; }
  .hero h1 .w, .term .ln { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .js .reveal, .arch g.n { opacity: 1 !important; transform: none !important; transition: none !important; }
  .arch path.flow { opacity: 0.9 !important; }
  .case, .card { transition: none !important; }
}

/* Filet de sécurité : si une animation n'a pas tourné, tout est affiché au bout de quelques secondes. */
.settled .hero h1 .w, .settled .term .ln { opacity: 1 !important; transform: none !important; filter: none !important; }

/* Parcours : chronologie */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 18px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent-3), var(--accent), var(--accent-2)); opacity: 0.6; }
.timeline > li { position: relative; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.timeline > li::before { content: ""; position: absolute; left: -26px; top: 26px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.18); }
.timeline .when { display: inline-block; font: 700 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-3); margin-bottom: 8px; }
.timeline h3 { margin: 0 0 4px; font-size: 1.15rem; }
.timeline p { margin: 0; color: var(--muted); }
.timeline .meta { font-size: 0.92rem; font-weight: 600; color: var(--text); margin: 0 0 10px; opacity: 0.85; }
.timeline .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.timeline .tags span { font-size: 0.78rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: rgba(129, 140, 248, 0.14); color: var(--accent); }

.timeline .bul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 0.95rem; }
.timeline .res { margin: 10px 0 4px; font-weight: 800; font-size: 0.85rem; color: var(--text); }
.timeline .res-list { margin: 0 0 4px; padding-left: 18px; font-size: 0.92rem; color: var(--muted); }
.timeline .res-list a { font-weight: 700; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span { font-size: 0.82rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }

/* Téléphone : menu sur une seconde ligne défilante, langues à côté du nom, schéma lisible */
.langs { margin-left: 8px; }
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; row-gap: 4px; padding: 10px 16px; }
  .langs { margin-left: auto; }
  nav.main { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { white-space: nowrap; }
  main { padding-left: 16px; padding-right: 16px; }
  .stat { padding: 16px; }
  .stat b { font-size: 1.9rem; }
  .case { padding: 20px; border-radius: 22px; }
  .contact { padding: 36px 18px; }
  .arch .sm { display: none; }
  .arch text { font-size: 19px; }
  .timeline { padding-left: 22px; }
  .timeline > li { padding: 16px 16px; }
}
.brand span:last-child { white-space: nowrap; }

/* Photo et réseaux */
.avatar { overflow: visible; }
.avatar img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 22%; background: #fff; }
.social-grid { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 640px; margin: 8px auto 0; text-align: left; }
@media (min-width: 640px) { .social-grid { grid-template-columns: 1fr 1fr; } }
.social-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s; }
.social-card:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.6); background: var(--surface-2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.social-card .ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(129, 140, 248, 0.14); color: var(--text); }
.social-card .ico svg { width: 26px; height: 26px; }
.social-card .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.social-card b { font-size: 1.05rem; }
.social-card small { color: var(--muted); font-size: 0.88rem; }
.social-card .go { flex: none; color: var(--accent); font-size: 1.3rem; transition: transform 0.25s; }
.social-card:hover .go { transform: translate(3px, -3px); }
@media (prefers-reduced-motion: reduce) { .social-card, .social-card .go { transition: none !important; } .social-card:hover { transform: none; } }

.case .cta { margin-top: 6px; }
.case .links { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--border); gap: 8px 20px; }
.case .links a { padding: 4px 0; }

/* Présentation : trois preuves sous le titre */
.values { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); max-width: 40em; }
.values li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: transform 0.25s, border-color 0.25s; }
.values li:hover { transform: translateY(-3px); border-color: rgba(129, 140, 248, 0.5); }
.values .vi { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: rgba(129, 140, 248, 0.16); }
.values .vi svg { width: 20px; height: 20px; }
.values b { display: block; font-size: 0.98rem; }
.values small { display: block; color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
@media (prefers-reduced-motion: reduce) { .values li { transition: none !important; } .values li:hover { transform: none; } }

/* Titre : une fois les mots séparés par le script, c'est chaque mot qui porte le dégradé (un fond découpé dans le texte ne traverse pas les mots animés). */
html.js .grad { background: none; color: inherit; animation: none; }
html.js .grad .w { background: linear-gradient(100deg, var(--accent-3), var(--accent), var(--accent-2), var(--accent-3)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: word 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, shine 7s linear infinite; animation-delay: calc(var(--i) * 70ms + 150ms), 0s; }
@media (prefers-reduced-motion: reduce) { html.js .grad .w { animation: none !important; } }

/* Expertise : six cartes, trois par ligne sur grand écran */
#expertise .cards { grid-template-columns: 1fr; }
@media (min-width: 620px) { #expertise .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { #expertise .cards { grid-template-columns: repeat(3, 1fr); } }

/* Expertise : description et technologies sur chaque carte */
#expertise .card { display: flex; flex-direction: column; }
#expertise .card p:not(.chips) { flex: 1; }
#expertise .card .chips { margin-top: 16px; }
#expertise .card .chips span { font-size: 0.78rem; padding: 3px 10px; }

/* Formation */
.edu { grid-template-columns: 1fr; }
@media (min-width: 700px) { .edu { grid-template-columns: repeat(3, 1fr); } }
.edu .year { display: inline-block; margin-bottom: 12px; font: 700 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-3); position: relative; }
.edu .school { color: var(--accent); font-weight: 700; margin-bottom: 8px; }


/* Marquee: a logo in front of each technology */
.track span { display: inline-flex; align-items: center; gap: 8px; }
.track svg { width: 18px; height: 18px; flex: none; }

/* Accueil en cartes */
.hero.bento { display: grid; gap: 16px; align-items: stretch; grid-template-columns: minmax(0, 1fr); padding: 56px 0 0; }
.tile { position: relative; overflow: hidden; min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tag { margin: 0 0 12px; font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-3); }
@media (min-width: 640px) {
  .hero.bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-hero, .t-feature, .t-stats, .t-tools { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .hero.bento { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 72px; }
  .t-hero { grid-column: 1 / 5; grid-row: 1 / 3; }
  .t-feature { grid-column: 5 / 7; grid-row: 1 / 3; }
  .t-place { grid-column: 1 / 4; grid-row: 3; }
  .t-now { grid-column: 4 / 7; grid-row: 3; }
  .t-stats { grid-column: 1 / -1; grid-row: 4; }
  .t-tools { grid-column: 1 / -1; grid-row: 5; }
}
.t-hero { padding: 28px; }
.id-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.t-hero .avatar { flex: none; width: 96px; height: 96px; margin-bottom: 0; }
.id-row .eyebrow { flex: 0 1 auto; min-width: 0; border-radius: 18px; }
.t-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 16px 0 14px; }
.t-hero .lead { font-size: 1.08rem; }
.social-icons { display: flex; gap: 6px; }
.t-hero .cta { margin-bottom: 18px; }
.social-icons a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.social-icons a:hover { color: var(--text); background: var(--surface-2); }
.social-icons svg { width: 20px; height: 20px; }

.t-feature { display: flex; flex-direction: column; gap: 10px; background: radial-gradient(420px circle at 100% 0%, rgba(129, 140, 248, 0.22), transparent 60%), var(--surface); }
.t-feature .tag { margin-bottom: 4px; padding-right: 48px; }
.ft-title { margin: 0; font-size: 1.8rem; letter-spacing: -0.02em; }
.ft-sub { margin: 0 0 8px; color: var(--muted); }
.ft-go { z-index: 2; position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #0b1020; text-decoration: none; font-weight: 900; transition: transform 0.25s; }
.ft-go:hover { transform: translate(2px, -2px); }
.t-feature .term { max-width: none; }
.shot { margin-top: auto; flex: 1; min-height: 200px; overflow: hidden; position: relative; border: 1px solid var(--border); border-radius: 16px 16px 0 0; border-bottom: 0; }
.shot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

.place { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.place svg { color: var(--accent); }
.place-sub { margin: 2px 0 18px; color: var(--muted); }
.place-clock { margin: 0; color: var(--muted); }
.place-clock b { display: block; color: var(--text); font-size: 2.3rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.place-clock small { display: block; margin-top: 6px; font-size: 0.8rem; }

.t-stats .stats { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .t-stats .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.t-stats .stats { align-items: stretch; }
.t-stats .stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.t-stats .stat b { font-size: 1.9rem; }
.now { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.now b { display: block; }
.now span { color: var(--muted); font-size: 0.92rem; }
.t-tools { padding: 20px 0; }
.t-tools .tag { padding: 0 24px; }
.t-tools .marquee { margin-top: 0; }

/* Pied de page : une seule ligne */
footer.site { margin-top: 72px; border-top: 1px solid var(--border); }
.foot-inner { max-width: 1120px; margin: 0 auto; padding: 22px 20px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 0.9rem; }

/* Bascule clair / sombre */
.theme-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: 8px; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: color 0.2s, background 0.2s; }
.theme-btn:hover { color: var(--text); background: var(--surface-2); }
html[data-theme="dark"] .t-moon, html:not([data-theme]) .t-moon { display: none; }
html[data-theme="light"] .t-sun { display: none; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: rgba(15, 23, 42, 0.04);
  --surface-2: rgba(15, 23, 42, 0.08);
  --border: rgba(15, 23, 42, 0.13);
  --text: #0f172a;
  --muted: #475569;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-3: #0e7490;
  --ok: #059669;
}
html[data-theme="light"] ::selection { background: rgba(79, 70, 229, 0.25); }
html[data-theme="light"] header.site.scrolled { background: rgba(246, 247, 251, 0.82); }
html[data-theme="light"] .orb { opacity: 0.16; }
html[data-theme="light"] .grid-bg { opacity: 0.35; }
html[data-theme="light"] .spot { background: radial-gradient(520px circle at var(--mx) var(--my), rgba(79, 70, 229, 0.07), transparent 60%); }
html[data-theme="light"] .langs button[aria-pressed="true"], html[data-theme="light"] .skip { color: #fff; }
html[data-theme="light"] .stat b { background: linear-gradient(120deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .btn.primary { color: #fff; background: linear-gradient(120deg, #4f46e5, #7c3aed); box-shadow: 0 10px 28px rgba(79, 70, 229, 0.28); }
html[data-theme="light"] .btn.ghost:hover { border-color: rgba(15, 23, 42, 0.3); }
html[data-theme="light"] .ft-go { color: #fff; }
html[data-theme="light"] .t-feature { background: radial-gradient(420px circle at 100% 0%, rgba(79, 70, 229, 0.14), transparent 60%), var(--surface); }
html[data-theme="light"] .term { --text: #e6ebf5; --muted: #94a3b8; --border: rgba(255, 255, 255, 0.1); --surface: rgba(255, 255, 255, 0.045); --accent-3: #22d3ee; --ok: #34d399; }
html[data-theme="light"] .arch rect.node { fill: rgba(15, 23, 42, 0.05); stroke: rgba(15, 23, 42, 0.25); }
html[data-theme="light"] .social-card:hover { box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .avatar { background: #e2e8f0; }

/* Téléphone : même soin que sur grand écran */
@media (max-width: 900px) {
  nav.main { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); padding-right: 24px; }
}
@media (max-width: 639px) {
  .hero.bento { gap: 12px; padding-top: 28px; }
  .tile { padding: 20px; border-radius: 18px; }
  .t-hero { padding: 22px 20px; }
  .id-row { gap: 14px; margin-bottom: 18px; }
  .t-hero .avatar { width: 84px; height: 84px; }
  .eyebrow { font-size: 0.78rem; padding: 5px 12px; gap: 8px; }
}
@media (max-width: 400px) {
  .eyebrow { font-size: 0.72rem; padding: 5px 10px; gap: 6px; letter-spacing: 0; }
}
@media (max-width: 639px) {
  .t-hero h1 { font-size: 2rem; margin: 14px 0 12px; }
  .t-hero .lead { font-size: 1rem; line-height: 1.6; margin-bottom: 14px; }
  .values { gap: 10px; margin-bottom: 16px; }
  .values li:hover { transform: none; }
  .t-hero .cta { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
  .t-hero .cta .btn { justify-content: center; width: 100%; }
  .t-hero .stackline { margin-bottom: 18px; }
  .t-place { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 12px; }
  .t-place .tag { grid-column: 1 / -1; }
  .t-place .place, .t-place .place-sub { grid-column: 1; }
  .t-place .place-sub { margin-bottom: 0; }
  .t-place .place-clock { grid-column: 2; grid-row: 2 / 4; text-align: right; }
  /* Chiffres : quatre cartes à contour, de même hauteur, le chiffre en haut et son libellé dessous */
  .t-stats .stats { gap: 10px; align-items: stretch; }
  .t-stats .stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
  .t-stats .stat span { font-size: 0.88rem; line-height: 1.4; }
  /* En ce moment : une carte à contour par ligne, comme les chiffres */
  .now { gap: 10px; }
  .now li { padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
  .now b { margin-bottom: 2px; }
  .t-tools { padding: 18px 0; }
  .t-tools .tag { padding: 0 20px; }
  .case .arch { display: none; }
  .foot-inner { padding: 18px 16px 28px; }
}

/* Tablette : le projet vedette passe sur deux colonnes (texte et terminal, capture), la capture garde ses proportions */
@media (min-width: 640px) and (max-width: 999px) {
  .t-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); column-gap: 24px; align-content: start; }
  .t-feature .tag, .t-feature .ft-title, .t-feature .ft-sub, .t-feature .term { grid-column: 1; }
  .t-feature .shot { grid-column: 2; grid-row: 1 / 6; margin-top: 52px; min-height: 380px; border-bottom: 1px solid var(--border); border-radius: 18px; }
}

/* Pied de page : le nom, le mot de remerciement au milieu, puis les réseaux */
.foot-inner { gap: 16px 40px; }
.foot-by { font-weight: 700; color: var(--text); white-space: nowrap; }
.foot-msg { margin: 0; flex: 1; max-width: 34em; line-height: 1.5; }
@media (max-width: 699px) {
  .foot-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .foot-msg { flex: none; }
}

/* E-mail : la carte seule sur sa ligne prend toute la largeur */
@media (min-width: 640px) { .social-grid .social-card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
