/* =========================
   RESET + VARIABLES
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.10);
  --text: #e8ecff;
  --muted: rgba(232,236,255,0.70);
  --accent: #7c5cff;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.40);
}

body.light{
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,0.04);
  --panel-2: rgba(0,0,0,0.06);
  --text: #101426;
  --muted: rgba(16,20,38,0.70);
  --accent: #5a3cff;
  --border: rgba(0,0,0,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.12);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

/* =========================
   UTILITAIRES
========================= */
.container { width: min(1100px, 92%); margin: 0 auto; }
.section { padding: 70px 0; }
.section__head { margin-bottom: 18px; }
.section__head h2 { font-size: clamp(1.4rem, 2.3vw, 2rem); }
.section__head p { color: var(--muted); }

.muted { color: var(--muted); }
.accent { color: var(--accent); }

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.grid-2{
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr 0.8fr;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag{
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

/* Skip link */
.skip-link{
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
}
.skip-link:focus { left: 10px; z-index: 9999; }

/* =========================
   HEADER / NAV
========================= */
.header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo{
  font-weight: 800;
  letter-spacing: 0.2px;
}
.logo span{ color: var(--accent); }

.nav__links{
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__links a{
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
.nav__links a:hover{ background: var(--panel-2); color: var(--text); }

.nav__toggle{
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.bar{
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* =========================
   HERO
========================= */
.hero{
  padding: 55px 0 20px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.badge{
  display: inline-block;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  margin-bottom: 12px;
  color: var(--muted);
}

.hero h1{
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.lead{ color: var(--muted); margin-bottom: 18px; }

.hero__cta{ display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover{ filter: brightness(1.05); }

.btn--ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover{ background: var(--panel-2); }

.hero__stats{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.stat{
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 10px 12px;
  border-radius: 14px;
  min-width: 120px;
}
.stat__num{ font-size: 1.2rem; font-weight: 800; display: block; }
.stat__label{ font-size: 0.9rem; color: var(--muted); }

.hero__card{
  display: grid;
  gap: 14px;
}

.avatar{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at top left, rgba(124,92,255,0.35), transparent 60%),
              var(--panel);
  padding: 18px;
  display: grid;
  place-items: center;
}
.avatar__placeholder{
  width: 110px;
  height: 110px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.6rem;
}

.avatar__img{
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

/* =========================
   SKILLS / PROJECTS
========================= */
.cards{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.filters{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.chip{
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.is-active{
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.projects{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.project h3{ margin-bottom: 6px; }

/* =========================
   FORM
========================= */
.form{
  display: grid;
  gap: 12px;
}
label{ display: grid; gap: 6px; color: var(--muted); }
input, textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}
input:focus, textarea:focus{
  outline: 2px solid rgba(124,92,255,0.35);
  border-color: rgba(124,92,255,0.55);
}
.form__hint{ min-height: 18px; }

/* =========================
   FOOTER
========================= */
.footer{
  padding: 28px 0 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}
.backtop{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
}
/* =========================
   EDUCATION TIMELINE
========================= */
.timeline{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.timeline__item h3{ margin-bottom: 6px; }

/* Responsive (tablette) */
@media (max-width: 900px){
  .timeline{ grid-template-columns: 1fr; }
}


/* =========================
   MEDIA QUERIES (RESPONSIVE)
========================= */

/* Tablette */
@media (max-width: 900px){
  /* Avatar responsive */
  .avatar__img{ width: 120px; height: 120px; }
  .avatar__img{width:120px;height:120px;}
  .hero{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .projects{ grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px){
  .avatar__img{ width: 110px; height: 110px; }
  .avatar__img{width:110px;height:110px;}
  .nav__toggle{ display: inline-flex; }
  .nav__links{
    position: absolute;
    top: 64px;
    right: 4%;
    left: 4%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg);
  }
  .nav__links.is-open{ display: flex; }
  .footer{ flex-direction: column; align-items: flex-start; }
}
