/* ===== Variables & reset ===== */
:root {
  --bg: #0d1117;
  --bg-alt: #11161f;
  --surface: #161c28;
  --surface-2: #1b2333;
  --text: #e8edf5;
  --muted: #9aa6b8;
  --line: #232c3d;
  --brand: #6c5ce7;
  --brand-2: #00d2ff;
  --accent: #ff6b6b;
  --grad: linear-gradient(120deg, #6c5ce7 0%, #00d2ff 100%);
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6);
  --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.15; }

a { color: inherit; text-decoration: none; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 60px);
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(14px);
  padding: 12px clamp(20px, 5vw, 60px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__logo { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.4rem; letter-spacing: 0.5px; }
.nav__logo span { color: var(--brand-2); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  background: var(--grad);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 100px;
  font-weight: 600;
}
.nav__cta:hover { opacity: 0.9; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 60px) 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(108, 92, 231, 0.28), transparent 60%),
    radial-gradient(55% 50% at 85% 30%, rgba(0, 210, 255, 0.22), transparent 60%),
    radial-gradient(50% 60% at 60% 90%, rgba(255, 107, 107, 0.16), transparent 60%);
  filter: blur(10px);
  animation: float 14s ease-in-out infinite alternate;
}
@keyframes float {
  to { transform: translateY(-24px) scale(1.05); }
}
.hero__inner { position: relative; max-width: 820px; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand-2);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero__title { font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; letter-spacing: -1px; }
.hero__sub { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); margin: 22px auto 34px; max-width: 640px; }
.hero__sub strong { color: var(--text); }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero__tags span {
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 100px;
}
.hero__scroll {
  position: absolute;
  bottom: 28px;
  font-size: 1.4rem;
  color: var(--muted);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(8px); } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(108, 92, 231, 0.8); }
.btn--primary:hover { transform: translateY(-3px); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--brand); }

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(70px, 11vw, 130px) clamp(20px, 5vw, 40px); }
.section--alt { max-width: none; background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 50px; }
.section__num { font-family: "Space Grotesk"; color: var(--brand-2); font-weight: 700; font-size: 1rem; }
.section__title { font-size: clamp(1.8rem, 5vw, 2.8rem); }

/* ===== À propos ===== */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.about__text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about__text strong { color: var(--text); }
.about__cards { list-style: none; display: grid; gap: 14px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card--mini { padding: 20px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; }
.card--mini .card__icon { grid-row: span 2; font-size: 1.8rem; }
.card--mini h3 { font-size: 1.05rem; }
.card--mini p { color: var(--muted); font-size: 0.92rem; }
.card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: var(--shadow); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding-bottom: 36px; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: -26px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--bg-alt); }
.tl__content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; transition: transform 0.25s, border-color 0.25s; }
.tl__content:hover { transform: translateX(6px); border-color: var(--brand); }
.tl__date { font-size: 0.8rem; color: var(--brand-2); font-weight: 600; letter-spacing: 0.5px; }
.tl h3 { margin: 6px 0 4px; font-size: 1.25rem; }
.tl__tag { display: inline-block; font-size: 0.78rem; color: var(--muted); background: var(--surface-2); padding: 3px 12px; border-radius: 100px; margin-bottom: 12px; }
.tl__content > p:last-child { color: var(--muted); }

/* ===== Grid / Projects ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card--project { overflow: hidden; display: flex; flex-direction: column; }
.card__media {
  height: 160px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card__media::after { content: attr(data-emoji); font-size: 4rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35)); }
.card__body { padding: 24px; }
.card__body h3 { font-size: 1.3rem; margin-bottom: 6px; }
.card__meta { font-size: 0.82rem; color: var(--brand-2); font-weight: 600; margin-bottom: 12px; }
.card__body > p:last-child { color: var(--muted); font-size: 0.96rem; }

/* ===== Roadmap ===== */
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.road { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform 0.25s, border-color 0.25s; }
.road:hover { transform: translateY(-5px); }
.road__step { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.road h3 { margin: 10px 0 8px; font-size: 1.15rem; }
.road p { color: var(--muted); font-size: 0.92rem; }
.road--active { border-color: var(--brand); background: linear-gradient(160deg, rgba(108,92,231,0.16), var(--surface)); }
.road--goal { border-color: var(--accent); background: linear-gradient(160deg, rgba(255,107,107,0.14), var(--surface)); }

/* ===== Contact ===== */
.section--contact { text-align: center; }
.contact h2 { font-size: clamp(2rem, 6vw, 3.2rem); }
.contact > p { color: var(--muted); margin: 14px auto 30px; max-width: 520px; }
.contact__list { list-style: none; display: inline-flex; flex-direction: column; gap: 12px; margin: 0 auto 32px; text-align: left; }
.contact__list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 11px 22px; font-weight: 500; transition: border-color 0.2s, transform 0.2s; }
.contact__list li:hover { border-color: var(--brand); transform: translateY(-2px); }
.contact__list a:hover { color: var(--brand-2); }
.contact__ico { font-size: 1.1rem; }
.contact__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact__note { font-size: 0.85rem; color: var(--muted); margin-top: 30px; opacity: 0.7; }

/* ===== Footer ===== */
.footer { text-align: center; padding: 36px 20px; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .nav__links.open { transform: none; }
  .nav__links a { font-size: 1.15rem; }
  .nav__burger { display: flex; z-index: 60; }
  .about { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
