/* ============================================
   RESET & VARIABLES
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-alt: #0b1222;
  --surface: #1b2336;
  --surface-2: #272f42;
  --border: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #22c55e;
  --accent-2: #22d3ee;
  --accent-glow: rgba(34, 197, 94, 0.30);
  --radius: 14px;
  --radius-lg: 20px;
  --transition: 0.25s ease;
  --max-width: 1180px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible { color: var(--text); }

.dropdown-chevron { transition: transform var(--transition); }
.nav-dropdown.open .dropdown-chevron { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 14px);
  left: -16px;
  display: none;
  width: min(640px, calc(100vw - 32px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.nav-dropdown.open > .dropdown-menu,
.nav-dropdown:hover > .dropdown-menu,
.nav-dropdown:focus-within > .dropdown-menu { display: grid; gap: 10px; }
.dropdown-menu a { display: block; padding: 10px 12px; border-radius: 8px; }
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible { background: var(--surface); }

.learning-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.learning-group h3 {
  margin: 2px 10px 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-nav {
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  transition: all var(--transition);
}

.btn-nav:hover {
  background: var(--accent);
  color: #0f172a !important;
  border-color: var(--accent);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -300px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15), transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero h1 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero h2 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0f172a;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

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

.hero-meta {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Code card */
.hero-card { position: relative; }

.card-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 70%);
  filter: blur(40px);
  z-index: -1;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-title {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.code-block pre {
  padding: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-block .k { color: #c792ea; }
.code-block .c { color: var(--accent-2); }
.code-block .s { color: #c3e88d; }
.code-block .v { color: #f78c6c; }
.code-block .f { color: #82aaff; }

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 90px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.about-text strong { color: var(--text); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.stat-num {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(52, 211, 153, 0.1);
}

.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.skill-card h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-size: 0.82rem;
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tag-list li:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: all var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.timeline-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-content h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.15rem;
  margin: 6px 0 4px;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-content ul {
  padding-left: 0;
}

.timeline-content ul li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.timeline-content ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================
   PROJETS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Image du projet */
.project-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.project-card:hover .project-image img {
  transform: scale(1.06);
}

.project-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-stack li {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}
.gradient-1 { background: linear-gradient(135deg, #34d399, #059669); }
.gradient-2 { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.gradient-3 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.gradient-4 { background: linear-gradient(135deg, #fb7185, #e11d48); }
.gradient-5 { background: linear-gradient(135deg, #fbbf24, #d97706); }

.project-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.project-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-stack li {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 40px;
}

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

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: all var(--transition);
  text-align: center;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--surface-2);
}

.contact-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 10px;
}

.contact-card h4 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  margin-bottom: 6px;
}

.contact-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  word-break: break-word;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-loc { color: var(--text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay for grid items */
.project-card.reveal:nth-child(1),
.skill-card.reveal:nth-child(1),
.stat.reveal:nth-child(1) { transition-delay: 0.05s; }

.project-card.reveal:nth-child(2),
.skill-card.reveal:nth-child(2),
.stat.reveal:nth-child(2) { transition-delay: 0.1s; }

.project-card.reveal:nth-child(3),
.skill-card.reveal:nth-child(3),
.stat.reveal:nth-child(3) { transition-delay: 0.15s; }

.project-card.reveal:nth-child(4),
.skill-card.reveal:nth-child(4),
.stat.reveal:nth-child(4) { transition-delay: 0.2s; }

.project-card.reveal:nth-child(5) { transition-delay: 0.25s; }

/* ============================================
   ACTIVE NAV LINK
   ============================================ */
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  margin-top: 4px;
}

/* ============================================
   BURGER ANIMATION (active state)
   ============================================ */
.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   ACCESSIBILITY — Reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
@media (max-width: 720px) {
    .hero-avatar {
    width: 90px;
    height: 90px;
    }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 18px;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }

  .nav-dropdown { width: 100%; text-align: left; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 10px 12px;
  }
  .dropdown-menu {
    position: static;
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    box-sizing: border-box;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: none;
  }
  .dropdown-menu a { padding: 9px 10px; }
  .learning-group h3 { margin-top: 4px; }

  .burger { display: flex; }

  .hero { padding: 60px 0 50px; }
  .section { padding: 60px 0; }

  .hero-meta { flex-direction: column; gap: 8px; }
  .code-block pre { font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
}
/* ============================================
   PROFILE AVATAR
   ============================================ */
.hero-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 24px;
  box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
/* ============================================
   CERTIFICATIONS
   ============================================ */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.project-case-study .project-body {
  gap: 10px;
}

.project-case-study .project-body p {
  margin: 0;
}

.project-case-study .project-badge {
  position: static;
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--accent);
}

.case-result {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.hero-proof {
  max-width: 620px;
  margin: 16px 0 18px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-size: 0.96rem;
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.recommendation-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.recommendation-project {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.recommendation-card blockquote {
  margin: 14px 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.recommendation-author {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.recommendation-evidence {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: zoom-in;
}

.recommendation-evidence img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  object-position: left center;
}

.recommendation-evidence span {
  display: block;
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-carousel {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.gallery-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: pan-y;
  will-change: transform;
}

.gallery-item {
  flex: 0 0 100%;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.gallery-prev,
.gallery-next,
.gallery-dot {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.gallery-prev,
.gallery-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.gallery-prev:hover,
.gallery-next:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.gallery-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}

.gallery-dot[aria-current="true"] {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track,
  .gallery-item img {
    transition: none;
  }
}

.cert-image {
  display: block;
  height: 220px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
  cursor: zoom-in;
}

.cert-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.cert-image-only {
  justify-content: center;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(52, 211, 153, 0.1);
}

.cert-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cert-body h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 6px;
  line-height: 1.35;
}

.cert-issuer {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.cert-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(34, 211, 238, 0.15));
  color: var(--accent);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ============================================
   CONTACT LAYOUT (2 columns: info + form)
   ============================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-info .contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px 20px;
}

.contact-info .contact-card .contact-icon {
  font-size: 1.4rem;
  margin-bottom: 0;
  flex-shrink: 0;
}

.contact-info .contact-card h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-info .contact-card p {
  font-size: 0.95rem;
  color: var(--text);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all var(--transition);
  resize: vertical;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #5a6478;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.form-group textarea {
  min-height: 130px;
  font-family: inherit;
}

.btn-submit {
  width: 100%;
  margin-top: 4px;
  position: relative;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 20px;
  transition: color var(--transition);
}

.form-status.success { color: var(--accent); }
.form-status.error { color: #fb7185; }

/* ============================================
   RESPONSIVE — Contact + Certifications
   ============================================ */
@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .contact-form {
    padding: 24px 20px;
  }
}
/* ============================================
   LANGUAGE TOGGLE
   ============================================ */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  padding: 0 12px;
  margin-left: 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-toggle:hover {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.lang-toggle:active {
  transform: translateY(0);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 48px rgba(52, 211, 153, 0.12);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(34, 211, 238, 0.15));
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 14px;
  margin-bottom: 18px;
}

.service-card h3 {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card > p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
  flex: 1;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.service-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* CTA at end of Services */
.services-cta {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(34, 211, 238, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.services-cta p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text);
}

/* ============================================
   RESPONSIVE — Language toggle + Services
   ============================================ */
@media (max-width: 720px) {
  .lang-toggle {
    margin-left: auto;
    margin-right: 8px;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

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

  .services-cta {
    padding: 32px 20px;
  }
}
/* ============================================
   PROJECT IMAGE — HOVER ZOOM CUE
   ============================================ */
.project-image.lightbox-trigger {
  cursor: zoom-in;
}

.project-image.lightbox-trigger::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-image.lightbox-trigger:hover::after {
  opacity: 1;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 14, 0.92);
  backdrop-filter: blur(8px);
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.94);
  transition: transform 0.3s ease;
}

.lightbox.open .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border);
  display: block;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 16px;
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  background: rgba(22, 28, 40, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* Prev / Next buttons */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text);
  background: rgba(22, 28, 40, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
}

.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

/* Responsive */
@media (max-width: 640px) {
  .lightbox { padding: 20px 12px; }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }

  .lightbox-caption { font-size: 0.9rem; }
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

.training-card h3 { margin-bottom: 10px; }
.training-link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}
.training-link:hover { text-decoration: underline; }


/* ============================================
   REFINEMENTS
   ============================================ */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Section labels: plain sentence case, no fake numbering */
.section-tag {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

/* Hover bridge so the Formations menu does not close in the gap */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #7b869c; }

@media (max-width: 720px) {
  .dropdown-menu::before { display: none; }
  /* Closed mobile menu must not be reachable by keyboard */
  .nav-links { visibility: hidden; transition: transform 0.3s ease, visibility 0s 0.3s; }
  .nav-links.open { visibility: visible; transition: transform 0.3s ease; }
}


/* ============================================
   LAYOUT — Portfolio Grid + Bento (ui-ux-pro-max)
   ============================================ */
.ico {
  width: 1.4em; height: 1.4em;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.skill-icon, .service-icon, .contact-icon { color: var(--accent); }
.skill-icon .ico { width: 1.9rem; height: 1.9rem; }
.service-icon .ico { width: 1.6rem; height: 1.6rem; }
.project-image.lightbox-trigger::after { font-size: 2.6rem; color: #fff; }

/* Projects: consistent card and image sizes */
.projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Skills: equal-width cards */
.skills-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Experience: title column + timeline column */
@media (min-width: 901px) {
  #experience .container {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) 2.2fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 64px;
    align-items: start;
  }
  #experience .section-tag,
  #experience .section-title { grid-column: 1; }
  #experience .section-title { margin-bottom: 0; }
  #experience .timeline { grid-column: 2; grid-row: 1 / span 3; }
}

@media (max-width: 900px) {
  .projects-grid, .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .projects-grid > *, .skills-grid > * { grid-column: auto !important; }
}