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

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #9a9a9a;
  --gray-600: #555;
  --blue: #1877f2;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--black);
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 80px;
  overflow-x: hidden;
}


/* ═══════════════════════════════════════════════════
   COVER
═══════════════════════════════════════════════════ */
.cover {
  width: 100%; height: 220px;
  background: #0a0a0a;
  position: relative; overflow: hidden;
}
.cover-img {
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.85;
  will-change: transform;
}
.cover-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none; mix-blend-mode: overlay;
}

/* ═══════════════════════════════════════════════════
   PROFILE HEADER
═══════════════════════════════════════════════════ */
.profile-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 24px; margin-top: -56px; position: relative; z-index: 2;
}
.avatar-ring {
  width: 112px; height: 112px; border-radius: 50%;
  border: 4px solid var(--white); overflow: hidden;
  background: var(--gray-200);
  box-shadow: 0 4px 24px rgba(0,0,0,.12); flex-shrink: 0;
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { text-align: center; margin-top: 14px; }

.profile-name {
  font-family: 'Instrument Serif', serif;
  font-size: 28px; font-weight: 400;
  letter-spacing: -0.5px; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.profile-name em { font-style: italic; color: var(--gray-600); }

/* Blue verification badge */
.verify-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--blue); flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(24,119,242,0.4);
}
.verify-badge svg { display: block; }

.profile-role {
  font-size: 13px; font-weight: 500; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: 1.2px; margin-top: 4px;
}
.profile-location {
  font-size: 13px; color: var(--gray-400); margin-top: 6px;
  display: flex; align-items: center; gap: 4px; justify-content: center;
}
.profile-bio {
  font-size: 14.5px; color: var(--gray-600); line-height: 1.65;
  margin-top: 16px; max-width: 460px; text-align: center;
}

/* ═══════════════════════════════════════════════════
   QUICK NAV (ancres de section — réutilise le style
   des project-tag pour rester fidèle au design existant)
═══════════════════════════════════════════════════ */
.quick-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 18px;
}
.quick-nav .project-tag {
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.quick-nav .project-tag:hover {
  background: var(--black); color: var(--white); border-color: var(--black);
}

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.btn-row {
  display: flex; gap: 10px; margin-top: 22px;
  justify-content: center; flex-wrap: wrap;
}
#lang-toggle { min-width: 52px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 24px; border-radius: 100px;
  font-size: 13.5px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--black);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--black); color: var(--white); }
.btn-outline { background: var(--white); color: var(--black); }
.btn-hire {
  background: linear-gradient(135deg, #1877f2, #0e5ecf);
  color: #fff; border-color: transparent;
}
.btn-hire:hover { box-shadow: 0 6px 20px rgba(24,119,242,0.35); }

/* ═══════════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════════ */
.divider {
  width: 40px; height: 2px;
  background: var(--black); margin: 40px auto 0;
}

/* ═══════════════════════════════════════════════════
   SECTIONS
═══════════════════════════════════════════════════ */
section { padding: 40px 24px 0; }
.section-label {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════
   ABOUT ME
═══════════════════════════════════════════════════ */
.about-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--gray-100);
}
.about-text {
  font-size: 15px; line-height: 1.75; color: var(--black);
  margin-bottom: 20px;
}
.about-text strong { font-weight: 700; }
.volunteer-strip {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border-radius: 12px;
  padding: 16px; border: 1.5px solid var(--gray-200);
}
.volunteer-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #0a0a0a; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.volunteer-body .volunteer-title {
  font-size: 14px; font-weight: 700;
}
.volunteer-body .volunteer-desc {
  font-size: 13px; color: var(--gray-600); margin-top: 3px; line-height: 1.5;
}


/* ═══════════════════════════════════════════════════
   SOFT SKILLS DASHBOARD
═══════════════════════════════════════════════════ */
.soft-skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.soft-skill-card {
  border: 1.5px solid var(--gray-200);
  border-radius: 14px; padding: 18px 16px;
  background: var(--white);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.soft-skill-card.visible {
  opacity: 1; transform: translateY(0);
}
.soft-skill-label {
  font-size: 12px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.soft-skill-emoji { font-size: 16px; }
.soft-skill-ring {
  position: relative; width: 64px; height: 64px; margin: 0 auto;
}
.soft-skill-ring svg { transform: rotate(-90deg); }
.ring-track {
  fill: none; stroke: var(--gray-200); stroke-width: 5;
}
.ring-progress {
  fill: none; stroke: rgba(107, 116, 255, 1); stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 163;
  stroke-dashoffset: 163;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.soft-skill-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   SKILLS TECH
═══════════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}
.skill-chip {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 16px 8px 14px;
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  background: var(--white);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
  overflow: hidden;
}
/* Petite touche de couleur : liseré haut qui change de teinte,
   + halo coloré assorti au survol, sans toucher au reste du design */
.skill-chip::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--chip-accent, var(--blue));
}
.skill-chip:nth-child(6n+1) { --chip-accent: #1877f2; }
.skill-chip:nth-child(6n+2) { --chip-accent: #f2385a; }
.skill-chip:nth-child(6n+3) { --chip-accent: #f5a623; }
.skill-chip:nth-child(6n+4) { --chip-accent: #22a37b; }
.skill-chip:nth-child(6n+5) { --chip-accent: #8a4fff; }
.skill-chip:nth-child(6n+6) { --chip-accent: #00b8d9; }
.skill-chip:hover {
  border-color: var(--chip-accent, var(--black));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -6px var(--chip-accent, rgba(0,0,0,.2));
}
.skill-chip img { width: 32px; height: 32px; object-fit: contain; }
.skill-chip span {
  font-size: 11px; font-weight: 600; color: var(--black);
  text-align: center; line-height: 1.2;
}

/* ═══════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════ */
.projects-list { display: flex; flex-direction: column; gap: 16px; }
.project-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); overflow: hidden;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: var(--black);
  box-shadow: 0 8px 32px rgba(0,0,0,.07);
}
.project-thumb {
  width: 100%; aspect-ratio: 16/8;
  object-fit: cover; background: var(--gray-100); display: block;
}
.project-thumb-placeholder {
  width: 100%; aspect-ratio: 16/8;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.project-body { padding: 18px 20px; }
.project-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.project-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.project-link {
  flex-shrink: 0; width: 32px; height: 32px;
  border: 1.5px solid var(--gray-200); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--black); text-decoration: none; font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}
.project-link:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.project-desc { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; margin-bottom: 14px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px;
  background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200);
}

/* ═══════════════════════════════════════════════════
   TESTIMONIALS — STACKING SCROLL
═══════════════════════════════════════════════════ */
.testimonials-stack {
  display: flex; flex-direction: column; gap: 12px;
}
.testi-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px; background: var(--white);
  position: relative;
  opacity: 0; transform: translateY(30px) scale(0.97);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s;
}
.testi-card.visible {
  opacity: 1; transform: translateY(0) scale(1);
}
.testi-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.06); }
.testi-quote {
  font-size: 60px; font-family: 'Instrument Serif', serif;
  color: var(--gray-200); line-height: 0.8;
  position: absolute; top: 16px; right: 20px;
}
.testi-stars { display: flex; gap: 2px; margin-bottom: 12px; }
.testi-stars span { font-size: 13px; }
.testi-text {
  font-size: 14.5px; line-height: 1.7; color: var(--black);
  font-style: italic; margin-bottom: 20px;
}
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-100); overflow: hidden; flex-shrink: 0;
  border: 2px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
}
.testi-name { font-size: 13.5px; font-weight: 700; }
.testi-role { font-size: 12px; color: var(--gray-400); }

/* ═══════════════════════════════════════════════════
   CERTIFICATES — image gallery cards
═══════════════════════════════════════════════════ */
.certs-list { display: flex; flex-direction: column; gap: 12px; }
.cert-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1.5px solid var(--gray-200);
  border-radius: 12px; background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none; color: var(--black);
}
.cert-card:hover {
  border-color: var(--black);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.cert-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.cert-body { flex: 1; min-width: 0; }
.cert-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-issuer { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.cert-date { font-size: 11px; font-weight: 600; color: var(--gray-400); flex-shrink: 0; }
.cert-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 100px;
  background: #f0f9f0; color: #2a8a2a; border: 1px solid #c5e8c5; margin-top: 4px;
}

/* Real certificate images section */
.cert-images-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px;
}
.cert-img-card {
  display: block;
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  overflow: hidden; cursor: pointer;
  text-decoration: none; color: var(--black);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.cert-img-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  border-color: var(--black);
}
/* Cadre à ratio fixe : n'importe quelle image de certificat (portrait,
   paysage, carrée, haute résolution...) s'affiche entière, sans être
   rognée, grâce à object-fit: contain + fond neutre en letterbox. */
.cert-img-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.cert-img-card img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
}
.cert-img-label {
  padding: 10px 12px;
  font-size: 11px; font-weight: 700; line-height: 1.3;
}
.cert-img-sub {
  font-size: 10px; color: var(--gray-400); font-weight: 400; margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════ */
.contact-grid {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.contact-icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--black);
}
.contact-icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  background: var(--white);
}
.contact-icon:hover .contact-icon-circle {
  background: var(--black); border-color: var(--black);
  transform: translateY(-3px);
}
.contact-icon:hover .contact-icon-circle svg { filter: invert(1); }
.contact-icon-label { font-size: 11px; font-weight: 600; color: var(--gray-400); }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.footer-line {
  margin-top: 56px; text-align: center;
  font-size: 12px; color: var(--gray-400); padding: 0 24px;
}
.footer-line strong { color: var(--black); }

/* ═══════════════════════════════════════════════════
   FADE-UP ON SCROLL
═══════════════════════════════════════════════════ */
.fade-up {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1; transform: translateY(0);
}

/* Initial page load animations */
.cover { animation: fadeUp .4s ease both; }
.profile-header { animation: fadeUp .4s .1s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   Le layout est fluide dès la base (max-width: 680px,
   grids en fr/auto-fill) ; ces paliers affinent les
   espacements, tailles de texte et grilles pour que le
   rendu reste confortable sur tablette et petit mobile,
   sans changer la structure ni le design.
═══════════════════════════════════════════════════ */
@media (max-width: 680px) {
  section { padding: 36px 20px 0; }
}

@media (max-width: 600px) {
  .profile-header { padding: 0 20px; }
  .cover { height: 190px; }
}

@media (max-width: 480px) {
  body { max-width: 100%; }
  .cover { height: 160px; }
  .avatar-ring { width: 92px; height: 92px; }
  .profile-name { font-size: clamp(20px, 6vw, 24px); }
  .profile-bio { font-size: 14px; }
  section { padding: 32px 18px 0; }
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
  .soft-skills-grid { grid-template-columns: 1fr 1fr; }
  .cert-images-grid { grid-template-columns: 1fr; }
  .quick-nav { gap: 6px; }
  .quick-nav .project-tag { font-size: 10px; padding: 3px 8px; }
}

@media (max-width: 380px) {
  section { padding: 28px 14px 0; }
  .avatar-ring { width: 80px; height: 80px; }
  .profile-name { font-size: clamp(18px, 6vw, 22px); }
  .profile-role { font-size: 11.5px; letter-spacing: 0.8px; }
  .btn { padding: 10px 18px; font-size: 12.5px; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .skill-chip { padding: 12px 6px 10px; }
  .cert-card { padding: 12px 14px; gap: 12px; }
  .cert-title { font-size: 13px; }
  .about-card { padding: 18px; }
}

/* Empêche tout débordement horizontal, quelle que soit la largeur */
html, body { width: 100%; overflow-x: hidden; }
img { max-width: 100%; }