/* ============================================
   THEME SYSTEM - data-theme + data-mode sur <body>
   ============================================

   📋 GUIDE MODIFICATION COULEURS
   ================================

   Pour modifier les couleurs, éditez les variables ci-dessous :

   Variables disponibles :
   - --color-accent          : Couleur principale du thème
   - --color-accent-alt      : Variante plus claire de l'accent
   - --color-accent-premium  : Couleur secondaire (or, vert foncé, cyan foncé)
   - --color-accent-premium-alt : Variante plus claire du premium
   - --color-success         : Couleur de succès (vert)
   - --color-background      : Fond principal du site
   - --color-surface         : Fond des cartes/sections
   - --color-surface-light   : Fond des survols (avec transparence)
   - --color-light           : Couleur du TEXTE principal (noir en light, blanc en dark)
   - --color-muted           : Couleur du texte secondaire
   - --color-border          : Couleur des bordures
   - --color-shadow          : Couleur des ombres

   GitHub Stats Cards :
   Pour modifier les couleurs des cartes GitHub, éditez les URLs dans index.html :
   - data-dark-src : Paramètres pour le mode dark (bg_color, title_color, icon_color, text_color)
   - data-light-src : Paramètres pour le mode light

   Palette actuelle (Royal Light) :
   bg_color=f8fafc, title_color=1e40af, icon_color=c2410c, text_color=334155

   ============================================ */

/* Typography (Global) */
:root {
  --font-base: "Manrope", system-ui, -apple-system, sans-serif;
  --font-heading: "Roboto", "Manrope", system-ui, sans-serif;
  --layout-container: min(1100px, calc(100vw - 3rem));
}

/* Theme 1: ROYAL - Bleu Profond + Or (Big Tech Senior) - DARK MODE */
:root,
[data-theme="royal"][data-mode="dark"],
[data-theme="royal"]:not([data-mode]) {
  /* Primary Colors */
  --color-accent: #2563eb;
  --accent-rgb: 37 99 235;
  --color-accent-alt: #3b82f6;
  --color-accent-premium: #f59e0b;
  --color-accent-premium-alt: #fbbf24;
  --color-success: #10b981;

  /* Backgrounds */
  --color-background: #030712;
  --color-surface: #0f172a;
  --color-surface-light: rgb(37 99 235 / 0.08);

  /* Text & Borders */
  --color-header-light: #f8fafc;
  --color-header-muted: #94a3b8;
  --color-light: #f8fafc;
  --color-muted: #94a3b8;
  --color-border: rgb(148 163 184 / 0.15);
  --color-shadow: rgb(0 0 0 / 0.6);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb, #3b82f6);
  --gradient-premium: linear-gradient(135deg, #f59e0b, #fbbf24);
  --gradient-surface: linear-gradient(160deg, rgb(15 23 42 / 0.98), rgb(3 7 18 / 0.95));
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(37 99 235 / 0.15), transparent 55%),
                   linear-gradient(135deg, rgb(3 7 18 / 0.98), rgb(15 23 42 / 0.9));
}

/* Theme 1: ROYAL - LIGHT MODE */
[data-theme="royal"][data-mode="light"] {
  /* Primary Colors */
  --color-accent: #1e40af;
  --accent-rgb: 30 64 175;
  --color-accent-alt: #2563eb;
  --color-accent-premium: #c2410c;
  --color-accent-premium-alt: #ea580c;
  --color-success: #15803d;

  /* Backgrounds */
  --color-background: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-light: rgb(37 99 235 / 0.08);

  /* Text & Borders */
  --color-light: #020617;
  --color-muted: #334155;
  --color-border: rgb(51 65 85 / 0.3);
  --color-shadow: rgb(15 23 42 / 0.12);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1e40af, #2563eb);
  --gradient-premium: linear-gradient(135deg, #c2410c, #ea580c);
  --gradient-surface: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(37 99 235 / 0.12), transparent 55%),
                   linear-gradient(135deg, rgb(255 255 255 / 100%), rgb(241 245 249 / 75%));
}

/* Theme 2: EMERALD - Bleu Nuit + Émeraude (Fintech/Scale-up) - DARK MODE */
[data-theme="emerald"][data-mode="dark"],
[data-theme="emerald"]:not([data-mode]) {
  /* Primary Colors */
  --color-accent: #10b981;
  --accent-rgb: 16 185 129;
  --color-accent-alt: #34d399;
  --color-accent-premium: #059669;
  --color-accent-premium-alt: #047857;
  --color-success: #10b981;

  /* Backgrounds */
  --color-background: #020617;
  --color-surface: #0f172a;
  --color-surface-light: rgb(16 185 129 / 0.08);

  /* Text & Borders */
  --color-light: #f1f5f9;
  --color-muted: #94a3b8;
  --color-border: rgb(148 163 184 / 0.12);
  --color-shadow: rgb(0 0 0 / 0.65);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #10b981, #34d399);
  --gradient-premium: linear-gradient(135deg, #059669, #10b981);
  --gradient-surface: linear-gradient(160deg, rgb(15 23 42 / 0.98), rgb(2 6 23 / 0.95));
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(16 185 129 / 0.12), transparent 55%),
                   linear-gradient(135deg, rgb(2 6 23 / 0.98), rgb(15 23 42 / 0.92));
}

/* Theme 2: EMERALD - LIGHT MODE */
[data-theme="emerald"][data-mode="light"] {
  /* Primary Colors */
  --color-accent: #059669;
  --accent-rgb: 5 150 105;
  --color-accent-alt: #10b981;
  --color-accent-premium: #047857;
  --color-accent-premium-alt: #059669;
  --color-success: #15803d;

  /* Backgrounds */
  --color-background: #ffffff;
  --color-surface: #f0fdf4;
  --color-surface-light: rgb(16 185 129 / 0.08);

  /* Text & Borders */
  --color-light: #052e16;
  --color-muted: #334155;
  --color-border: rgb(51 65 85 / 0.3);
  --color-shadow: rgb(5 150 105 / 0.12);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #059669, #10b981);
  --gradient-premium: linear-gradient(135deg, #047857, #059669);
  --gradient-surface: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 100%);
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(16 185 129 / 0.12), transparent 55%),
                   linear-gradient(135deg, rgb(255 255 255 / 100%), rgb(240 253 244 / 75%));
}

/* Theme 3: PREMIUM - Ardoise + Cyan Premium (Tech Lead moderne) - DARK MODE */
[data-theme="premium"][data-mode="dark"],
[data-theme="premium"]:not([data-mode]) {
  /* Primary Colors */
  --color-accent: #06b6d4;
  --accent-rgb: 6 182 212;
  --color-accent-alt: #22d3ee;
  --color-accent-premium: #0891b2;
  --color-accent-premium-alt: #0e7490;
  --color-success: #14b8a6;

  /* Backgrounds */
  --color-background: #0f172a;
  --color-surface: #1e293b;
  --color-surface-light: rgb(6 182 212 / 0.08);

  /* Text & Borders */
  --color-light: #f8fafc;
  --color-muted: #94a3b8;
  --color-border: rgb(148 163 184 / 0.18);
  --color-shadow: rgb(0 0 0 / 0.55);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #06b6d4, #22d3ee);
  --gradient-premium: linear-gradient(135deg, #0891b2, #06b6d4);
  --gradient-surface: linear-gradient(160deg, rgb(30 41 59 / 0.98), rgb(15 23 42 / 0.95));
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(6 182 212 / 0.18), transparent 55%),
                   linear-gradient(135deg, rgb(15 23 42 / 0.98), rgb(30 41 59 / 0.9));
}

/* Theme 3: PREMIUM - LIGHT MODE */
[data-theme="premium"][data-mode="light"] {
  /* Primary Colors */
  --color-accent: #0e7490;
  --accent-rgb: 14 116 144;
  --color-accent-alt: #0891b2;
  --color-accent-premium: #155e75;
  --color-accent-premium-alt: #0e7490;
  --color-success: #0f766e;

  /* Backgrounds */
  --color-background: #ffffff;
  --color-surface: #ecfeff;
  --color-surface-light: rgb(6 182 212 / 0.08);

  /* Text & Borders */
  --color-light: #042f2e;
  --color-muted: #334155;
  --color-border: rgb(51 65 85 / 0.3);
  --color-shadow: rgb(8 145 178 / 0.12);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0e7490, #0891b2);
  --gradient-premium: linear-gradient(135deg, #155e75, #0e7490);
  --gradient-surface: linear-gradient(160deg, #ecfeff 0%, #cffafe 100%);
  --gradient-hero: radial-gradient(circle at 20% 20%, rgb(6 182 212 / 0.12), transparent 55%),
                   linear-gradient(135deg, rgb(255 255 255 / 100%), rgb(236 254 255 / 75%));
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-background);
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-light);
  background: var(--color-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body #nav-container {
  display: flex;
  gap: 2rem;
}

body.nav-open #nav-container {
  color: red;
}

/* Backdrop for mobile menu */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 998;
  backdrop-filter: blur(4px);
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 768px) {
  .nav-backdrop {
    display: none;
  }
}

/* Force proper text colors in light mode using theme variables */
[data-mode="light"] body,
[data-mode="light"] {
  color: var(--color-light);
}

[data-mode="light"] h1,
[data-mode="light"] h2,
[data-mode="light"] h3,
[data-mode="light"] h4,
[data-mode="light"] h5,
[data-mode="light"] h6 {
  color: var(--color-light);
}

[data-mode="light"] p,
[data-mode="light"] li {
  color: var(--color-light);
}

[data-mode="light"] .hero__subtitle,
[data-mode="light"] .metric-label,
[data-mode="light"] .experience-company,
[data-mode="light"] .experience-desc,
[data-mode="light"] .project-desc,
[data-mode="light"] .experience-details-content li,
[data-mode="light"] .experience-tech,
[data-mode="light"] .metric-context,
[data-mode="light"] .hero__meta-label,
[data-mode="light"] .stack-category p,
[data-mode="light"] .value-card p {
  color: var(--color-muted);
}

[data-mode="light"] .card,
[data-mode="light"] .metric-card,
[data-mode="light"] .experience-item--expandable {
  color: var(--color-light);
}

[data-mode="light"] .button--secondary {
  color: var(--color-light) !important;
  background: var(--color-surface);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--gradient-premium);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.3);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: var(--layout-container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  backdrop-filter: blur(18px);
  background: rgb(5 6 7 / 0.86);
  border-bottom: 1px solid var(--color-border);
}

.site-header__layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-header-light);
}

.brand img {
  width: 40px;
  height: 40px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}

.lang-btn {
  padding: 0.4rem 0.7rem;
  border: none;
  background: none;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 0.35rem;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--color-accent);
  background: var(--color-surface-light);
}

.lang-btn.active {
  color: var(--color-light);
  background: var(--color-accent);
}

.mode-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mode-toggle:hover {
  background: var(--color-surface-light);
  border-color: var(--color-accent);
  transform: rotate(20deg);
}

.mode-icon {
  position: absolute;
  transition: all 0.3s ease;
}

.mode-icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.mode-icon--moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-mode="light"] .mode-icon--sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-mode="light"] .mode-icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-border);
}

.theme-btn__preview {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.theme-btn__preview--royal {
  background: linear-gradient(135deg, #2563eb 50%, #f59e0b 50%);
}

.theme-btn__preview--emerald {
  background: linear-gradient(135deg, #0f172a 50%, #10b981 50%);
}

.theme-btn__preview--premium {
  background: linear-gradient(135deg, #1e293b 50%, #06b6d4 50%);
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__menu a {
  color: var(--color-header-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus {
  color: var(--color-accent);
}

.site-nav__menu a.active {
  color: var(--color-accent);
  font-weight: 600;
  position: relative;
}

.site-nav__menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-premium);
  border-radius: 2px;
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.site-nav__bar {
  width: 22px;
  height: 2px;
  background: var(--color-header-light);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-nav__toggle.is-active .site-nav__bar:nth-of-type(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-nav__toggle.is-active .site-nav__bar:nth-of-type(2) {
  opacity: 0;
}

.site-nav__toggle.is-active .site-nav__bar:nth-of-type(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-open {
  overflow: hidden;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient-primary);
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 14px 32px var(--color-shadow);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px var(--color-shadow);
  filter: brightness(1.1);
}

.button--primary {
  background: var(--gradient-premium);
  color: #ffffff !important;
  font-size: 1.05rem;
  padding: 0.85rem 1.8rem;
  box-shadow: 0 16px 36px var(--color-shadow);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
}

.button--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px var(--color-shadow);
  filter: brightness(1.1);
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-light);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 24px var(--color-shadow);
  font-weight: 600;
}

.button--secondary:hover {
  background: var(--color-surface);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--color-shadow);
  filter: brightness(1.05);
}

.button__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.button--ghost {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-light);
  box-shadow: none;
}

.button--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hero {
  padding: 5.5rem 0 4.5rem;
  background: var(--gradient-hero), url("/assets/img/the-wave.png");
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232563eb' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
  animation: drift 60s linear infinite;
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100px, 100px);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hero__avatar {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--color-accent);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.5),
              0 0 0 8px var(--color-surface-light);
  object-fit: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__avatar:hover img {
  transform: scale(1.05);
  box-shadow: 0 24px 72px rgb(0 0 0 / 0.6),
              0 0 0 8px var(--color-surface-light);
}

.hero__avatar-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--gradient-premium);
  color: #ffffff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgb(245 158 11 / 0.4);
  border: 2px solid var(--color-background);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero__text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  margin: 0 0 1.5rem;
  font-weight: 700;
}

.hero__tagline {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--color-accent);
  margin: 0 0 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: rgb(246 248 251 / 0.75);
  margin: 0 0 2.5rem;
  line-height: 1.7;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__meta {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.hero__meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  font-weight: 600;
}

.hero__meta-value {
  font-size: 0.95rem;
  color: var(--color-light);
}

.hero__meta-value a {
  color: var(--color-accent);
  transition: opacity 0.2s ease;
}

.hero__meta-value a:hover {
  opacity: 0.8;
}

.lead {
  font-size: 1.05rem;
  color: rgb(246 248 251 / 0.8);
}

.lead--highlight {
  color: rgb(246 248 251 / 0.95);
  background: var(--color-surface-light);
  padding: 1rem 1.4rem;
  border-radius: 1rem;
  border-left: 3px solid var(--color-success);
  margin-top: 1.2rem;
  box-shadow: 0 8px 24px -12px rgb(0 0 0 / 0.4);
}

.lead--highlight strong {
  color: var(--color-success);
  font-weight: 700;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--color-surface-light);
  color: var(--color-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  box-shadow: 0 4px 12px -8px var(--color-accent);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  justify-content: center;
}

.hero__meta {
  display: grid;
  gap: 1.1rem;
}

.hero__meta dt {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(246 248 251 / 0.55);
}

.hero__meta dd {
  margin: 0.3rem 0 0;
  color: rgb(246 248 251 / 0.85);
}

.card {
  padding: 1.8rem;
  border-radius: 1.4rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 26px 48px -32px var(--color-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 32px 56px -28px var(--color-shadow);
  border-color: var(--color-accent);
}

.card--light {
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
}

.card--highlight {
  background: var(--color-surface-light);
  border: 2px solid var(--color-accent);
  box-shadow: 0 32px 64px -32px var(--color-accent);
  position: relative;
  overflow: hidden;
}

.card--highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0.05;
  z-index: 0;
}

.card--highlight > * {
  position: relative;
  z-index: 1;
}

.hero__sidebar {
  display: grid;
  gap: 1.6rem;
}

.avatar {
  width: 120px;
  height: 120px;
  margin: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  border: 2px solid rgb(0 214 255 / 0.35);
  box-shadow: 0 16px 32px -18px rgb(0 214 255 / 0.4);
  object-fit: cover;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: rgb(246 248 251 / 0.85);
  font-size: 0.95rem;
}

.contact-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgb(0 214 255 / 0.14);
  border: 1px solid rgb(0 214 255 / 0.2);
}

.contact-list__icon img {
  width: 16px;
  height: 16px;
  filter: brightness(1.12);
}

.hero__qr {
  display: grid;
  gap: 0.8rem;
  text-align: center;
}

.hero__qr img {
  width: 120px;
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

.section--muted {
  background: var(--gradient-surface);
  position: relative;
  overflow: hidden;
}

.section--muted::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgb(37 99 235 / 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgb(245 158 11 / 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.section--muted::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* Section Decorations */
.section--decorated {
  position: relative;
  overflow: hidden;
}

.section--decorated::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, var(--color-accent) 2px, transparent 2px),
    radial-gradient(circle at 60% 70%, var(--color-accent) 1px, transparent 1px),
    radial-gradient(circle at 80% 10%, var(--color-accent) 1.5px, transparent 1.5px);
  background-size: 100px 100px, 80px 80px, 120px 120px;
  background-position: 0 0, 40px 40px, 20px 60px;
  opacity: 0.1;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.section--decorated::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 500px;
  height: 100%;
  background-image:
    linear-gradient(120deg, transparent 48%, var(--color-accent) 49%, var(--color-accent) 51%, transparent 52%),
    linear-gradient(60deg, transparent 48%, var(--color-accent) 49%, var(--color-accent) 51%, transparent 52%);
  background-size: 80px 80px;
  opacity: 0.08;
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.section--decorated-alt {
  position: relative;
  overflow: hidden;
}

.section--decorated-alt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  height: 100%;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 35px,
      var(--color-accent) 35px,
      var(--color-accent) 36px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 35px,
      var(--color-accent) 35px,
      var(--color-accent) 36px
    );
  opacity: 0.07;
  pointer-events: none;
  animation: slideDown 12s linear infinite;
}

.section--decorated-alt::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 100%;
  background-image:
    radial-gradient(circle at 30% 20%, var(--color-accent) 3px, transparent 3px),
    radial-gradient(circle at 70% 50%, var(--color-accent) 2px, transparent 2px),
    radial-gradient(circle at 50% 80%, var(--color-accent) 2.5px, transparent 2.5px);
  background-size: 90px 90px, 110px 110px, 130px 130px;
  background-position: 0 0, 30px 30px, 60px 15px;
  opacity: 0.09;
  pointer-events: none;
  animation: slideUp 15s linear infinite;
}

@keyframes slideDown {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 100px, 0 100px;
  }
}

@keyframes slideUp {
  0% {
    background-position: 0 0, 30px 30px, 60px 15px;
  }
  100% {
    background-position: 0 -100px, 30px -70px, 60px -85px;
  }
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section__header {
  max-width: 640px;
  margin-bottom: 2.8rem;
  position: relative;
}

.section__header--center {
  text-align: center;
  max-width: none;
  margin-bottom: 3.5rem;
}

.section__header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0.3rem 0 1rem;
  position: relative;
  display: inline-block;
}

.section__header--center h2::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-premium);
  border-radius: 999px;
}

/* Metrics Section */
.metrics-section {
  padding: 4rem 0 3rem;
  background: var(--gradient-surface);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.metric-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1.2rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -24px var(--color-shadow);
  border-color: var(--color-accent);
}

.metric-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-heading);
  margin-bottom: 0.5rem;
}

.metric-value--positive {
  color: var(--color-success);
}

.metric-value--success {
  color: var(--color-success);
}

.metric-value--perfect {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
}

.metric-perfect-badge {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-success);
  font-family: var(--font-heading);
  line-height: 1;
}

.metric-perfect-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.metric-card--perfect {
  background: linear-gradient(135deg,
    var(--color-surface) 0%,
    rgb(16 185 129 / 0.05) 100%);
  border-color: rgb(16 185 129 / 0.3);
}

.metric-card--perfect:hover {
  border-color: var(--color-success);
  box-shadow: 0 20px 48px -24px rgb(16 185 129 / 0.4);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.metric-bar {
  width: 100%;
  height: 6px;
  background: rgb(148 163 184 / 0.2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.metric-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 999px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgb(255 255 255 / 0.6),
    transparent
  );
  animation: shimmer 2.5s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes shimmer {
  0% {
    left: -50%;
  }
  100% {
    left: 150%;
  }
}

.metric-bar-fill--positive {
  background: linear-gradient(90deg, var(--color-success), var(--color-accent-alt));
}

.metric-bar-fill--success {
  background: linear-gradient(90deg, var(--color-success), #34d399);
}

.metric-card.is-visible .metric-bar-fill {
  width: var(--bar-width, 100%);
}

.metric-context {
  font-size: 0.8rem;
  color: rgb(246 248 251 / 0.6);
  font-style: italic;
}

/* Value Section */
.value-section {
  padding: 5rem 0;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .site-nav__toggle {
    display: flex;
    order: 1;
  }

  #nav-container {
    position: absolute;
    inset: 72px 1rem auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 1.2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 22px 42px -28px var(--color-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  #nav-container.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .value-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.value-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.value-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
  color: var(--color-accent);
}

.value-card p {
  font-size: 0.95rem;
  color: rgb(246 248 251 / 0.7);
  line-height: 1.6;
  margin: 0;
}

/* Tech Logos Cloud */
#competences .container header + div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

#competences .container header + div h3 {
  font-size: 1.1rem;
  color: var(--color-accent);
  margin: 0 0 1rem;
  font-weight: 600;
  text-align: center;
}

.tech-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 1fr));
  gap: 1rem;
  max-width: 900px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--color-shadow);
  border-color: var(--color-accent);
}

.tech-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: scale(0.9);
  opacity: 0.5;
}

.tech-item:hover img {
  transform: scale(1);
  opacity: 1;
}

.tech-item img[alt="GitHub"] {
  filter: invert(100%);
}

body[data-mode="light"] .tech-item img[alt="GitHub"] {
  filter: invert(0%);
}

.tech-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted);
  text-align: center;
  transition: color 0.3s ease;
}

.tech-item:hover .tech-name {
  color: var(--color-light);
}

/* Stack Grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-nav__menu,
  .header-controls {
    align-self: center;
  }
}

.stack-category {
  text-align: center;
}

.stack-category h3 {
  font-size: 1.1rem;
  color: var(--color-accent);
  margin: 0 0 1rem;
  font-weight: 600;
}

.stack-category p {
  font-size: 0.9rem;
  color: rgb(246 248 251 / 0.7);
  line-height: 1.8;
  margin: 0;
}

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.stack-list-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-light);
  line-height: 1.6;
}

.stack-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-accent);
  filter: drop-shadow(0 0 4px rgb(var(--accent-rgb) / 0.3));
  padding: 6px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.5);
  border: 1px solid var(--color-border);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0;
}

.timeline {
  display: grid;
  gap: 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 10px;
  width: 2px;
  background: linear-gradient(180deg, rgb(0 214 255 / 0.45), transparent 70%);
}

.timeline__item {
  position: relative;
  padding-left: 2.6rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 1.2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 6px rgb(0 214 255 / 0.18);
}

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.85rem;
  color: rgb(246 248 251 / 0.6);
  margin-bottom: 0.6rem;
}

.timeline__item h3 {
  margin-top: 0;
}

.timeline__item ul {
  color: rgb(246 248 251 / 0.78);
}

.timeline__stack {
  margin-top: 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(246 248 251 / 0.55);
}

.timeline__sub-experience {
  margin: 1.4rem 0 1.4rem 1rem;
  padding-left: 1.2rem;
  border-left: 2px solid rgb(0 214 255 / 0.25);
}

.timeline__sub-experience h4 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--color-light);
}

.timeline__sub-period {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgb(246 248 251 / 0.6);
  letter-spacing: 0.02em;
}

.timeline__sub-experience p {
  font-size: 0.95rem;
  color: rgb(246 248 251 / 0.7);
  margin: 0 0 0.8rem;
}

.timeline__sub-experience ul {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1.8rem;
}

.grid--projects {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--education {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card--project {
  display: grid;
  gap: 1rem;
}

.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(0 214 255 / 0.18);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-list__item {
  padding: 0.35rem 0.8rem;
  border-radius: 0.8rem;
  background: rgb(0 214 255 / 0.16);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.skills {
  display: grid;
  gap: 2.2rem;
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.skill-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: rgb(246 248 251 / 0.78);
}

.card--education {
  display: grid;
  gap: 0.8rem;
}

.contact {
  display: grid;
  gap: 2.4rem;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}

.contact__card {
  display: grid;
  gap: 1rem;
}

.contact-list--compact {
  gap: 0.7rem;
}

.contact__note {
  color: rgb(246 248 251 / 0.75);
  font-size: 0.85rem;
  margin: 0;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-light);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* Experience Section */
.experience-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.experience-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.experience-item--expandable {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1.2rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.experience-item--expandable:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 24px -12px var(--color-shadow);
}

.experience-summary {
  cursor: pointer;
  position: relative;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.experience-company-logo {
  flex-shrink: 0;
}

.company-logo {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  border: 2px solid;
  transition: all 0.3s ease;
}

/* Logos spécifiques par entreprise */
.company-logo--twr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
}

.company-logo--sdf {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f093fb;
  color: white;
}

.company-logo--ac {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-color: #4facfe;
  color: white;
}

.company-logo--to {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-color: #43e97b;
  color: white;
}

.experience-item--expandable:hover .company-logo {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px currentColor;
}

.experience-content {
  flex: 1;
  min-width: 0;
}

.experience-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.experience-toggle-btn:hover {
  background: var(--color-accent);
  color: var(--color-surface);
  border-color: var(--color-accent);
}

.experience-toggle-btn svg {
  transition: transform 0.3s ease;
}

.experience-item--expandable.is-expanded .experience-toggle-btn svg {
  transform: rotate(180deg);
}

.experience-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-item--expandable.is-expanded .experience-details {
  max-height: 800px;
}

.experience-details-content {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.experience-details-content h4 {
  font-size: 1rem;
  color: var(--color-accent);
  margin: 0 0 1rem;
  font-weight: 600;
}

.experience-details-content ul {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  color: rgb(246 248 251 / 0.8);
}

.experience-details-content li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.experience-tech {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0;
  font-style: italic;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.experience-header h3 {
  font-size: 1.2rem;
  color: var(--color-light);
  margin: 0;
  font-weight: 600;
}

.experience-period {
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: nowrap;
}

.experience-company {
  font-size: 0.95rem;
  color: var(--color-accent);
  margin: 0 0 0.8rem;
}

.experience-desc {
  font-size: 0.95rem;
  color: rgb(246 248 251 / 0.7);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.experience-highlights {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.experience-highlights li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.experience-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* Git Stats (GitHub + GitLab) */
.git-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin: 0 auto 4rem;
  max-width: 1000px;
}

.git-stats-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.git-stats-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-light);
  margin: 0;
}

.git-stats-title svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

/* Custom Git Profile Cards (GitHub + GitLab) */
.git-profile-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.git-profile-card:hover {
  transform: translateY(-4px);
}

.custom-git-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.git-profile-card:hover .custom-git-card {
  box-shadow: 0 20px 48px -24px var(--color-shadow);
  border-color: var(--color-accent);
}

.custom-git-card-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.git-platform-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  filter: drop-shadow(0 0 8px rgb(var(--accent-rgb) / 0.2));
}

.custom-git-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-light);
}

.custom-git-card-subtitle {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.custom-git-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.custom-git-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.custom-git-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-git-stat-label {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.custom-git-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-accent);
  font-weight: 600;
  transition: gap 0.3s ease;
}

.git-profile-card:hover .custom-git-card-footer {
  gap: 0.5rem;
}

/* Languages Section */
.custom-git-card-languages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
}

.languages-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.languages-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-border);
}

.languages-bar-segment {
  height: 100%;
  transition: opacity 0.2s ease;
}

.languages-bar-segment:hover {
  opacity: 0.8;
  cursor: help;
}

.languages-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.languages-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.language-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.language-name {
  font-weight: 500;
  color: var(--color-light);
}

.language-percent {
  color: var(--color-muted);
  font-weight: 400;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-card {
  padding: 2rem;
}

.project-card h3 {
  font-size: 1.3rem;
  margin: 0 0 0.8rem;
  color: var(--color-light);
}

.project-highlight {
  font-size: 0.85rem;
  color: var(--color-accent);
  margin: 0 0 1rem;
  font-weight: 600;
}

.project-desc {
  font-size: 0.9rem;
  color: rgb(246 248 251 / 0.7);
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

/* Testimonial Section */
.testimonial-section {
  padding: 4.5rem 0;
}

.testimonial {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.testimonial__quote {
  margin: 0 0 2rem;
  padding: 0;
  border: none;
}

.testimonial__quote p {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-light);
  opacity: 0.9;
  line-height: 1.7;
  margin: 0;
}

.testimonial__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.testimonial__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.testimonial__author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  text-align: left;
}

.testimonial__author strong {
  font-size: 1rem;
  color: var(--color-accent);
}

.testimonial__author span {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* Light mode: force dark text for testimonials */
[data-mode="light"] .testimonial__author strong {
  color: var(--color-accent) !important;
}

[data-mode="light"] .testimonial__author span {
  color: #334155 !important;
}

/* Contact Section */
.contact-section {
  padding: 5rem 0;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.contact-method h3 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
  color: var(--color-accent);
}

.contact-method p {
  margin: 0 0 1.5rem;
  color: rgb(246 248 251 / 0.75);
  line-height: 1.6;
}

.contact-method a {
  color: var(--color-accent);
}

.contact-links {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.contact-links a {
  transition: opacity 0.2s ease;
}

.contact-links a:hover {
  opacity: 0.7;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

.contact-buttons .button {
  width: 320px;
  justify-content: center;
  padding: 0.75rem 1.5rem;
}

.qrcode-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--color-shadow);
}

.qrcode-image {
  display: block;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

/* Section CTA */
.section-cta {
  max-width: 900px;
  margin: 4rem auto 0;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--gradient-surface);
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.section-cta__text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-light);
  margin: 0 0 2rem;
}

.section-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgb(255 255 255 / 0.08);
  background: var(--color-surface);
  padding: 2.2rem 0;
}

.site-footer__layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgb(246 248 251 / 0.6);
}

.will-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.will-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__sidebar {
    order: -1;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline__item {
    padding-left: 2.2rem;
  }
}

@media (max-width: 820px) {
  .container {
    width: calc(100vw - 2.4rem);
  }

  .site-nav__toggle {
    display: flex;
  }

  .site-nav {
    gap: 1rem;
  }

  .header-controls {
    gap: 0.75rem;
  }

  .lang-switcher {
    padding: 0.2rem;
  }

  .lang-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }

  .theme-switcher {
    padding: 0.25rem;
  }

  .theme-btn {
    width: 28px;
    height: 28px;
  }

  .contact-methods {
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  #competences .container header + div {
    grid-template-columns: 1fr;
  }
  .tech-logos {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }
  .contact-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-buttons .button {
    width: auto;
  }
}

@media (max-width: 670px) {
  .contact-buttons {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .contact-buttons .button {
    width: 320px;
  }
}

@media (max-width: 640px) {
  .site-header__layout {
    padding: 1rem 0;
  }
  .tech-logos {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__avatar {
    width: 140px;
    height: 140px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .hero__cta .button {
    justify-content: center;
    width: 100%;
  }

  .hero__meta {
    flex-direction: column;
    gap: 2rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .tech-logos {
    gap: 1.5rem;
    padding: 1rem;
  }

  .tech-logos img {
    width: 44px;
    height: 44px;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .git-stats {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .custom-git-card-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .custom-git-stat-value {
    font-size: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__layout {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .site-nav__menu {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .tech-logos {
    grid-template-columns: 1fr;
  }
}
