/* =========================================================
   Portfolio — Rosalie Corine Nkounghawe Tomeyum
   Thème : variables CSS (sombre par défaut, clair via data-theme)
   ========================================================= */

:root {
  --bg: #070b16;
  --bg-alt: #0e1424;
  --surface: #111827;
  --surface-2: #0a0f1c;
  --border: rgba(148, 163, 184, 0.16);
  --text: #eef2f8;
  --muted: #9aa6bb;
  --accent: #6b9bff;
  --violet: #b084f5;
  --grad: linear-gradient(90deg, #5f94ff 0%, #b98af7 100%);
  --glow: rgba(96, 140, 255, 0.18);
  --btn-text: #0a0f1c;

  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1140px;
  --font: "Manrope", system-ui, sans-serif;
  --font-head: "Sora", "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f3f5fb;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #526077;
  --accent: #3d6fe0;
  --violet: #8a55d9;
  --grad: linear-gradient(90deg, #3d6fe0 0%, #9a5ce6 100%);
  --glow: rgba(61, 111, 224, 0.12);
  --btn-text: #ffffff;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.ico {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ico--accent { color: var(--accent); }
.ico--violet { color: var(--violet); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav__brand { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--muted); white-space: nowrap; }
.nav__links { display: flex; gap: 34px; }
.nav__links a { color: var(--muted); font-size: 16px; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-current { color: var(--text); }
.nav__actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.ico--moon { display: none; }
[data-theme="light"] .ico--sun { display: none; }
[data-theme="light"] .ico--moon { display: block; }
.nav__burger { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border-radius: 16px;
  font: 600 16px/1 var(--font); cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--btn-text); }
.btn--primary:hover { box-shadow: 0 10px 30px -8px var(--accent); }
.btn--ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--link { color: var(--muted); padding-inline: 12px; }
.btn--link:hover { color: var(--text); }
.btn--link .ico { width: 18px; height: 18px; transition: transform .2s; }
.btn--link:hover .ico { transform: translateX(4px); }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 120px;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(150, 100, 240, .14), transparent 60%),
    radial-gradient(800px 600px at 0% 0%, rgba(80, 130, 255, .12), transparent 60%);
}
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero__title { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 800; margin: 36px 0 26px; }
.hero__role { color: var(--muted); font-size: clamp(.85rem, 1.6vw, 1.15rem); margin-bottom: 26px; }
.hero__lead { color: var(--muted); max-width: 720px; font-size: 1.15rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 40px 0 44px; }

.stats { display: flex; flex-wrap: wrap; gap: 20px; }
.stat {
  min-width: 200px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.stat strong, .metric strong {
  display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.6rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span, .metric span { color: var(--muted); font-size: 14px; }

.hero__visual {
  position: relative; width: min(480px, 100%); aspect-ratio: 1;
  margin: 60px auto 0; border-radius: 32px;
  background:
    radial-gradient(circle at 60% 40%, rgba(120, 110, 255, .5), transparent 55%),
    radial-gradient(circle at 30% 80%, rgba(80, 140, 255, .35), transparent 50%),
    #0b1030;
  box-shadow: 0 30px 90px -20px rgba(80, 120, 255, .45);
}
.hero__visual img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hero__chip {
  position: absolute; left: -24px; bottom: -26px;
  padding: 14px 20px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); border: 1px solid var(--border);
  display: flex; flex-direction: column; line-height: 1.35;
}
.hero__chip strong { font-size: 15px; }
.hero__chip span { font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .28em; color: var(--accent);
  margin-bottom: 14px;
}
.section__title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; margin-bottom: 18px; }
.section__lead { color: var(--muted); max-width: 820px; font-size: 1.1rem; margin-bottom: 48px; }
.subhead { font-size: 1.35rem; font-weight: 600; margin: 48px 0 28px; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-3px); }
.card .ico { width: 24px; height: 24px; margin-bottom: 18px; }
.card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); }
.card__meta { color: var(--accent) !important; font-size: 14px; margin-bottom: 12px; }

.pills { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.pill { padding: 10px 20px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 16px; }
.pill strong { color: var(--text); }

/* ---------- Projets ---------- */
.project {
  padding: 44px 40px; margin-bottom: 30px;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--border);
}
.project__tag { font-size: 14px; text-transform: uppercase; letter-spacing: .16em; color: var(--violet); margin-bottom: 14px; }
.project__title { font-size: clamp(1.4rem, 3vw, 1.95rem); font-weight: 700; margin-bottom: 8px; }
.project__org { color: var(--accent); margin-bottom: 18px; }
.project__desc { color: var(--muted); font-size: 1.1rem; max-width: 940px; margin-bottom: 26px; }
.metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.metric { padding: 14px 20px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border); }
.metric strong { font-size: 1.3rem; }
.bullets { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.bullets li { display: flex; gap: 12px; color: var(--muted); }
.bullets .ico { color: var(--accent); margin-top: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags span {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 10px; background: var(--bg-alt); color: var(--text);
}

/* ---------- Compétences ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 30px; }
.tab {
  padding: 12px 20px; border-radius: 999px; cursor: pointer;
  font: 500 16px var(--font); color: var(--muted);
  background: transparent; border: 1px solid var(--border);
  transition: all .2s;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.is-active { background: var(--accent); color: var(--btn-text); border-color: var(--accent); }
.panel {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 30px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  animation: fade .35s ease;
}
.panel[hidden] { display: none; }
.panel span {
  font-family: var(--font-mono); font-weight: 500; font-size: 15px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 44px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.timeline > li { position: relative; padding-bottom: 36px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline__icon {
  position: absolute; left: -44px; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-alt); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
.timeline__icon .ico { width: 14px; height: 14px; }
.timeline__date { color: var(--accent); font-size: 14px; font-weight: 500; }
.timeline h4 { font-size: 1.25rem; font-weight: 600; margin: 4px 0; }
.timeline__org { color: var(--muted); margin-bottom: 10px; }
.timeline ul { list-style: none; padding: 0; margin: 0; color: var(--muted); display: grid; gap: 6px; }
.timeline ul li::before { content: "— "; }

/* ---------- Contact ---------- */
.section--contact { background: radial-gradient(900px 400px at 50% 100%, var(--glow), transparent 70%), var(--bg); }
.contact-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.contact-list a, .contact-list span {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s;
}
.contact-list a:hover { border-color: var(--accent); }

.form {
  display: grid; gap: 18px; padding: 30px;
  border-radius: 26px; background: var(--surface); border: 1px solid var(--border);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 10px; font-weight: 600; font-size: 16px; }
.form input, .form textarea {
  width: 100%; padding: 16px 20px; border-radius: 18px;
  font: 400 16px var(--font); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
}
.form input::placeholder, .form textarea::placeholder { color: var(--muted); opacity: .8; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.form .hp { display: none; }
.form__status { text-align: center; font-size: 15px; min-height: 1.4em; }
.form__status.ok { color: #4ade80; }
.form__status.err { color: #f87171; }
.form button[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 34px 0; color: var(--muted); font-size: 16px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer__social { display: flex; gap: 18px; }
.footer__social a:hover { color: var(--accent); }

/* ---------- Apparition au scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge__dot { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav__burger { display: grid; }
  .nav__links {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__links a:last-child { border-bottom: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 90px; }
  .section { padding: 80px 0; }
  .grid--2, .form__row { grid-template-columns: 1fr; }
  .stat { min-width: 0; flex: 1 1 140px; }
  .project { padding: 30px 22px; }
  .hero__chip { left: 12px; bottom: -22px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .contact-list a, .contact-list span { word-break: break-word; }
}
