/* ================================================================
   PORTFOLIO — IBRAHIMA GABAR DIOP
   main.css — Premium Dark Design
================================================================ */

/* Fonts are loaded from <head> with preconnect (no render-blocking @import). */

/* ----------------------------------------------------------------
   1. DESIGN TOKENS
---------------------------------------------------------------- */
:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Backgrounds — deepened for stronger contrast with cards */
  --bg-base:       #0b1120;
  --bg-surface:    #111a2e;
  --bg-card:       rgba(30, 41, 59, 0.55);
  --bg-card-hover: rgba(38, 52, 76, 0.85);

  /* Brand palette — Indigo · Violet · Sky, plus Emerald as the "data" accent */
  --indigo:      #6366f1;
  --violet:      #a78bfa;
  --sky:         #38bdf8;
  --emerald:     #34d399;
  --indigo-dim:  rgba(99, 102, 241, 0.12);
  --violet-dim:  rgba(167, 139, 250, 0.10);
  --emerald-dim: rgba(52, 211, 153, 0.10);

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #6366f1 0%, #a78bfa 55%, #38bdf8 100%);
  --gradient-surface: linear-gradient(145deg, rgba(99,102,241,0.08) 0%, rgba(167,139,250,0.04) 100%);
  --gradient-line:    linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
  --gradient-line-v:  linear-gradient(to bottom, transparent, rgba(99,102,241,0.5), rgba(167,139,250,0.5), transparent);

  /* Text */
  --text-1: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;

  /* Borders */
  --border:        rgba(99, 102, 241, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover:  rgba(99, 102, 241, 0.45);

  /* Shadows */
  --shadow-card: 0 4px 28px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 40px rgba(99, 102, 241, 0.18), 0 4px 20px rgba(0, 0, 0, 0.5);

  /* Layout */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --transition: 0.3s ease;

  /* Legacy aliases */
  --primary:      var(--indigo);
  --primary-dim:  var(--indigo-dim);
  --accent:       var(--sky);
  --bg-dark:      var(--bg-base);
  --bg-darker:    var(--bg-surface);
  --text-light:   var(--text-1);
  --text-medium:  var(--text-2);
  --text-muted:   var(--text-3);
  --border-glow:  var(--border);
  --glow-cyan:    0 0 24px rgba(99,102,241,0.3);
  --glow-cyan-sm: 0 0 12px rgba(99,102,241,0.2);
  --glow-blue:    0 0 12px rgba(99,102,241,0.2);

  /* Surfaces vitrées (nav, footer, menus) — tokenisées pour le thème */
  --glass:        rgba(15, 23, 42, 0.92);
  --glass-strong: rgba(15, 23, 42, 0.98);

  color-scheme: dark;
}

/* ----------------------------------------------------------------
   1b. THÈME CLAIR — surcharge des mêmes variables
---------------------------------------------------------------- */
:root[data-theme="light"] {
  --bg-base:       #f5f7fb;
  --bg-surface:    #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #eef2fb;

  --indigo:      #4f46e5;
  --violet:      #7c3aed;
  --sky:         #0284c7;
  --emerald:     #059669;
  --indigo-dim:  rgba(79, 70, 229, 0.10);
  --violet-dim:  rgba(124, 58, 237, 0.08);
  --emerald-dim: rgba(5, 150, 105, 0.08);

  --gradient-surface: linear-gradient(145deg, rgba(79,70,229,0.05) 0%, rgba(124,58,237,0.03) 100%);

  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --border:        rgba(79, 70, 229, 0.20);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-hover:  rgba(79, 70, 229, 0.45);

  --shadow-card:  0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 10px 30px rgba(79, 70, 229, 0.15), 0 4px 16px rgba(15, 23, 42, 0.08);

  --glass:        rgba(255, 255, 255, 0.85);
  --glass-strong: rgba(255, 255, 255, 0.97);

  color-scheme: light;
}
:root[data-theme="light"] footer { background: #eceff6; }
:root[data-theme="light"] #mainNav,
:root[data-theme="light"] #mainNav.scrolled { background: var(--glass); }
:root[data-theme="light"] .nav-mobile,
:root[data-theme="light"] .nav-dropdown-menu { background: var(--glass-strong); }
:root[data-theme="light"] .portfolio-overlay {
  background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.55) 100%);
}

/* Bouton de bascule de thème */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--violet);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}
.theme-toggle:hover { border-color: var(--border-hover); color: var(--indigo); }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 0 0.7rem;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--violet);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.25s ease;
}
.lang-toggle:hover { border-color: var(--border-hover); color: var(--indigo); }

body { transition: background-color 0.3s ease, color 0.3s ease; }

/* ----------------------------------------------------------------
   2. RESET & BASE
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-1);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 0.5rem;
  background: none;
}

p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-2);
  margin: 0 0 1rem;
  background: none;
}

a {
  color: var(--text-1);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--violet); }

img { max-width: 100%; }

/* ----------------------------------------------------------------
   3. UTILITIES
---------------------------------------------------------------- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 2px;
  margin: 0.55rem auto 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 3.5rem;
  font-weight: 400;
}

/* Accessibility — visually hidden but available to screen readers */
.visually-hidden {
  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 — appears on keyboard focus only */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Reading progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-brand);
  z-index: 1001;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(99,102,241,0.5);
  pointer-events: none;
}

/* ----------------------------------------------------------------
   4. NAVIGATION — Floating pill glassmorphism
---------------------------------------------------------------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 1.5rem;
  pointer-events: none;
}

#mainNav {
  pointer-events: all;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.025);
}

#mainNav.scrolled {
  background: rgba(15, 23, 42, 0.92);
  border-color: var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 0 14px rgba(99,102,241,0.4);
  flex-shrink: 0;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-1);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-logo:hover .nav-logo-name { color: var(--violet); }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links .nav-link {
  display: block;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.38rem 0.82rem;
  border-radius: 30px;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.nav-links .nav-link:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}

.nav-links .nav-link.active {
  color: var(--violet);
  background: rgba(167,139,250,0.1);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 1.1rem;
  background: var(--gradient-brand);
  color: #fff !important;
  font-family: var(--font-display);
  font-size: 0.83rem;
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 0 18px rgba(99,102,241,0.3);
  white-space: nowrap;
}

.nav-cta:hover {
  box-shadow: 0 0 28px rgba(99,102,241,0.5);
  transform: translateY(-1px);
  color: #fff !important;
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 35px;
  height: 35px;
  background: rgba(99,102,241,0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0.38rem;
  transition: all 0.25s ease;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--violet);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-burger:hover {
  background: rgba(99,102,241,0.14);
  border-color: var(--border-hover);
}

.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  pointer-events: all;
  max-width: 1000px;
  margin: 0.5rem auto 0;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.75rem;
  display: none;
  backdrop-filter: blur(24px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.nav-mobile.open {
  display: block;
  animation: fadeInDown 0.2s ease both;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-mobile .nav-link {
  display: block;
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.68rem 1.2rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-mobile .nav-link:hover {
  background: rgba(99,102,241,0.08);
  color: var(--violet);
}

.nav-mobile .nav-cta-mobile {
  margin-top: 0.3rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  color: var(--violet) !important;
  font-weight: 700;
  text-align: center;
}

/* Mobile menu: grouped "About" section */
.nav-mobile-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3, #64748b);
  padding: 0.7rem 1.2rem 0.2rem;
}
.nav-mobile .nav-sub {
  padding-left: 1.9rem;
  font-size: 0.95rem;
}

/* ----------------------------------------------------------------
   4b. NAV DROPDOWN (desktop) — groups About / Experience / Skills / Certs
---------------------------------------------------------------- */
.nav-dropdown { position: relative; display: flex; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.38rem 0.82rem;
  border-radius: 30px;
  transition: all 0.22s ease;
  white-space: nowrap;
}
.nav-dropdown-toggle:hover,
.nav-dropdown:focus-within .nav-dropdown-toggle {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}
.nav-dropdown-toggle.has-active {
  color: var(--violet);
  background: rgba(167,139,250,0.1);
  font-weight: 600;
}
.nav-dropdown-toggle .caret {
  font-size: 0.62rem;
  transition: transform 0.22s ease;
}
.nav-dropdown:hover .nav-dropdown-toggle .caret,
.nav-dropdown.open .nav-dropdown-toggle .caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 210px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 60;
}
/* invisible hover bridge so the gap doesn't drop the menu */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu .nav-link {
  white-space: nowrap;
}

/* ----------------------------------------------------------------
   5. HERO SECTION
---------------------------------------------------------------- */
#home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  background:
    radial-gradient(ellipse 80% 60% at 25% 55%, rgba(99,102,241,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 78% 28%, rgba(167,139,250,0.10) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 85% 82%, rgba(56,189,248,0.07) 0%, transparent 55%),
    var(--bg-base);
}

/* Subtle grid */
#home::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

#particles-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.typing-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(99,102,241,0.08);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 0.32rem 0.95rem;
  margin-bottom: 1.4rem;
  animation: fadeInDown 1s ease both;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52,211,153,0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(0.75); opacity: 0.6; }
}

#typing-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1rem;
  animation: fadeInDown 1.2s ease both;
  min-height: 1.2em;
  line-height: 1.1;
}

#typing-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 1.2rem;
  animation: fadeInUp 1.4s ease both;
  min-height: 1.3em;
  letter-spacing: 0.01em;
}

#typing-lead {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-2);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1.6s ease both;
  min-height: 1.5em;
  line-height: 1.85;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Reusable button base */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.88rem 2.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  border: 1.5px solid transparent;
}

/* Primary filled CTA — "View my work", "Start a project" */
#typing-button,
.btn:not(.btn-outline) {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 0 22px rgba(99,102,241,0.3);
}

#typing-button:hover,
.btn:not(.btn-outline):hover {
  color: #fff;
  box-shadow: 0 0 34px rgba(99,102,241,0.5), 0 0 60px rgba(167,139,250,0.2);
  transform: translateY(-3px);
}

/* Secondary outline CTA — "Work with me" */
.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(99,102,241,0.45);
  color: var(--text-1);
}

.btn-outline:hover {
  border-color: var(--violet);
  color: var(--violet);
  box-shadow: 0 0 24px rgba(99,102,241,0.25);
  transform: translateY(-3px);
}

/* ----------------------------------------------------------------
   5b. SERVICES SECTION
---------------------------------------------------------------- */
.services-section {
  background: var(--bg-base);
  padding: 7rem 0 5rem;
  position: relative;
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.service-card:hover::before { opacity: 1; }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  margin-bottom: 1.1rem;
}

.service-icon i {
  font-size: 1.4rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.97rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0;
}

.services-cta { margin-top: 3rem; }

/* ----------------------------------------------------------------
   6. ABOUT — Terminal
---------------------------------------------------------------- */
.about-section {
  background: var(--bg-surface);
  padding: 7rem 0;
  position: relative;
}

.terminal-container {
  background: #111827;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(99,102,241,0.04);
  max-width: 840px;
  margin: 2.5rem auto 0;
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: #1a2740;
  padding: 0.72rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dots span {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 6px;
}

.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.terminal-title {
  color: var(--text-3);
  font-size: 0.78rem;
  margin-left: 0.75rem;
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 1.75rem 1.9rem;
  font-size: 1rem;
  color: #a5f3c0;
  line-height: 1.8;
}

.terminal-body {
  font-size: 0.94rem;
  line-height: 1.65;
}

.terminal-body strong { color: #e2e8f0; font-weight: 600; }

/* Command line the "user typed" */
.log-cmd {
  color: #e2e8f0;
  font-family: var(--font-mono);
  margin: 0 0 0.9rem;
}
.term-prompt { color: #27c93f; font-weight: 700; margin-right: 0.5rem; }
.cmd-arg { color: #fbbf24; }

/* Streamed Airflow-style log lines */
.log-line {
  font-family: var(--font-mono);
  color: #cbd5e1;
  margin: 0 0 0.28rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-t   { color: #64748b; margin-right: 0.55rem; }        /* timestamp, grey  */
.lvl-info { color: #38bdf8; font-weight: 600; margin-right: 0.55rem; } /* INFO, blue */
.lvl-task { color: #c084fc; font-weight: 600; margin-right: 0.35rem; } /* task, violet */
.lvl-ok   { color: #22c55e; font-weight: 700; margin-right: 0.55rem; } /* SUCCESS/✓ green */
.arrow    { color: #64748b; }

.log-out {                 /* the "→ value" continuation lines */
  color: #e2e8f0;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
}
.log-done {
  margin-top: 0.9rem;
  color: #86efac;
}

/* JS-driven reveal: hidden until the line is played in.
   No-JS / reduced-motion fall back to fully visible (see below). */
.terminal-body.js-anim .log-line,
.terminal-body.js-anim .log-cmd { opacity: 0; }
.terminal-body.js-anim .log-line.shown,
.terminal-body.js-anim .log-cmd.shown {
  opacity: 1;
  animation: logIn 0.28s ease both;
}
@keyframes logIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.blinking-cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #86efac;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .terminal-body.js-anim .log-line,
  .terminal-body.js-anim .log-cmd { opacity: 1; animation: none; }
  .blinking-cursor { animation: none; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ----------------------------------------------------------------
   7. EXPERIENCE — Timeline
---------------------------------------------------------------- */
.experience-section {
  padding: 7rem 0;
  background: var(--bg-base);
  position: relative;
}

.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--gradient-line-v);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 46%;
  margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 2.5rem;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 54%;
  padding-left: 2.5rem;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18), 0 0 14px rgba(99,102,241,0.5);
  top: 1.3rem;
}

.timeline-item:nth-child(odd)  .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left:  -7px; }

.timeline-dot--edu {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.18), 0 0 14px rgba(167,139,250,0.5);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.timeline-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-hover);
}

.timeline-card:hover::before { opacity: 1; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-badge-ongoing {
  font-size: 0.67rem;
  font-weight: 600;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.28);
  color: var(--violet);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}

.timeline-company {
  font-size: 0.97rem;
  color: var(--text-3);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-company i { color: var(--indigo); }
.timeline-location-flag { font-size: 0.77rem; color: var(--text-3); }

.timeline-location {
  font-size: 0.8rem;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.timeline-period {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--violet);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.18);
  border-radius: 20px;
  padding: 0.2rem 0.68rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.timeline-desc strong { color: var(--text-1); }

.timeline-tasks {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  text-align: left !important;
}

.timeline-tasks li {
  font-size: 0.98rem;
  color: var(--text-2);
  padding: 0.27rem 0 0.27rem 1.25rem;
  position: relative;
  line-height: 1.6;
}

.timeline-tasks li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-size: 0.74rem;
  top: 0.34rem;
}

.timeline-tasks li strong { color: var(--text-1); }

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.timeline-item:nth-child(odd) .timeline-tags { justify-content: flex-end; }

.timeline-tags span {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(99,102,241,0.07);
  border: 1px solid rgba(99,102,241,0.18);
  color: var(--text-2);
  padding: 0.17rem 0.58rem;
  border-radius: 20px;
  letter-spacing: 0.15px;
  transition: all var(--transition);
}

.timeline-tags span:hover {
  background: rgba(99,102,241,0.14);
  border-color: rgba(99,102,241,0.38);
  color: var(--text-1);
}

.timeline-section-label {
  text-align: center;
  margin: 0;
  padding: 1.5rem 0;
  position: relative;
  z-index: 1;
}

.timeline-section-label::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1.5px;
  background: var(--gradient-line-v);
  transform: translateX(-50%);
  z-index: -1;
}

.timeline-section-label span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-3);
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 0.33rem 1.1rem;
}

.timeline-section-label i {
  color: var(--indigo);
  font-size: 0.74rem;
}

/* ----------------------------------------------------------------
   8. SKILLS SECTION
---------------------------------------------------------------- */
#skills {
  background: var(--bg-surface);
  padding: 6.5rem 0;
  position: relative;
}

#skills::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-line);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.55rem 1.4rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-surface);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.skill-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.skill-card:hover::after { opacity: 1; }

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.skill-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Font Awesome skill icons — consistent with service cards, no external hotlink */
.skill-icon-fa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--indigo-dim);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.skill-icon-fa i {
  font-size: 1.15rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skill-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-1);
  margin: 0;
}

.skill-description {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.6;
}

/* ----------------------------------------------------------------
   9. PORTFOLIO SECTION
---------------------------------------------------------------- */
#portfolio {
  background: var(--bg-base);
  padding: 6.5rem 0;
  text-align: center;
}

/* Category filter chips */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 0 2.4rem;
}

.filter-chip {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-chip:hover {
  color: var(--text-1);
  border-color: var(--border);
}

.filter-chip.active {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(99,102,241,0.35);
}

/* Projects grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.4rem;
  text-align: left;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition), opacity 0.3s ease;
}

.portfolio-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.portfolio-item.is-hidden { display: none; }

.portfolio-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-surface);
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-thumb img { transform: scale(1.05); }

.portfolio-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  background: rgba(11,17,32,0.75);
  border: 1px solid var(--border);
  color: var(--violet);
}

.portfolio-badge--ai       { color: var(--emerald); border-color: rgba(52,211,153,0.35); }
.portfolio-badge--dbt      { color: var(--sky);     border-color: rgba(56,189,248,0.35); }

.portfolio-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.2rem 1.25rem;
}

.portfolio-body h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 0.45rem;
}

.portfolio-body p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.62;
  margin-bottom: 1rem;
  flex: 1;
}

.portfolio-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-portfolio {
  color: var(--text-1);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.36rem 1rem;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.04);
}

.btn-portfolio:hover {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 18px rgba(99,102,241,0.35);
}

.portfolio-more {
  margin-top: 2.2rem;
  font-size: 0.95rem;
  color: var(--text-2);
}

.portfolio-more a {
  color: var(--violet);
  font-weight: 600;
}
.portfolio-more a:hover { color: var(--sky); }

/* ----------------------------------------------------------------
   10. CERTIFICATIONS SECTION
---------------------------------------------------------------- */
.certifications-section {
  background: var(--bg-surface);
  padding: 6.5rem 0;
  position: relative;
}

.certifications-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--gradient-line);
}

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  /* Staggered entrance (CSS only — replaces the old JS that broke :hover) */
  animation: fadeInUp 0.55s ease both;
}

.cert-card:nth-child(2) { animation-delay: 0.08s; }
.cert-card:nth-child(3) { animation-delay: 0.16s; }
.cert-card:nth-child(4) { animation-delay: 0.24s; }
.cert-card:nth-child(5) { animation-delay: 0.32s; }
.cert-card:nth-child(n+6) { animation-delay: 0.4s; }

.cert-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.cert-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.cert-card:hover::after { transform: scaleX(1); }

.cert-badge {
  display: inline-block;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.22);
  color: var(--violet);
  font-family: var(--font-display);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.17rem 0.52rem;
  border-radius: 4px;
  width: max-content;
}

.cert-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.45;
  margin: 0;
}

.cert-card p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-2);
  margin: 0;
  line-height: 1.4;
}

/* ----------------------------------------------------------------
   11. CONTACT SECTION
---------------------------------------------------------------- */
#contact {
  background: var(--bg-base);
  padding: 6.5rem 0;
}

.contact-info { margin-bottom: 2rem; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.contact-item i {
  font-size: 1.1rem;
  color: var(--indigo);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item p {
  font-size: 1.05rem;
  margin: 0;
  color: var(--text-2);
}

.contact-link {
  color: var(--text-2);
  transition: color var(--transition);
}

.contact-link:hover { color: var(--violet); }

.social-title {
  font-family: var(--font-display);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-3);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.4rem 0.88rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
  cursor: pointer;
  color: var(--text-2);
}

.social-btn:hover {
  background: var(--indigo-dim);
  border-color: var(--border);
  transform: translateY(-2px);
  color: var(--violet);
}

.social-btn i {
  font-size: 0.95rem;
  color: var(--text-3);
  transition: color var(--transition);
}

.social-btn:hover i { color: var(--violet); }

.social-btn span {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  transition: color var(--transition);
}

.social-btn:hover span { color: var(--violet); }

#contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group { margin-bottom: 1.15rem; }

.form-control {
  width: 100%;
  padding: 0.68rem 1rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
  background: rgba(99,102,241,0.025);
}

.form-control::placeholder { color: var(--text-3); }

textarea.form-control {
  resize: vertical;
  min-height: 128px;
}

.btn-submit {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  padding: 0.68rem 1.9rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 25px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 18px rgba(99,102,241,0.22);
}

.btn-submit:hover {
  box-shadow: 0 0 30px rgba(99,102,241,0.42);
  transform: translateY(-2px);
}

.form-message {
  margin-top: 1rem;
  font-size: 0.86rem;
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------
   12. FOOTER
---------------------------------------------------------------- */
footer {
  background: rgba(15,23,42,0.98);
  padding: 2.4rem 0 1.6rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-1);
}

.footer-brand:hover { color: var(--violet); }

.footer-links {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-1);
  background: rgba(255,255,255,0.05);
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-2);
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.footer-social a:hover {
  color: var(--violet);
  border-color: var(--border);
  background: var(--indigo-dim);
  transform: translateY(-2px);
}

.footer-copy {
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 0.8rem;
  margin: 0;
  text-align: center;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

footer a {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----------------------------------------------------------------
   13. SCROLL-TO-TOP
---------------------------------------------------------------- */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: all var(--transition);
  z-index: 999;
  backdrop-filter: blur(12px);
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#scroll-top:hover {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 22px rgba(99,102,241,0.4);
  transform: translateY(-3px) scale(1.05);
}

/* ----------------------------------------------------------------
   14. ANIMATIONS
---------------------------------------------------------------- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Only hide .wow content when WOW.js actually loaded (class set by custom.js).
   If the CDN fails, everything stays visible instead of disappearing forever. */
html.wow-enabled .wow { visibility: hidden; }

/* ----------------------------------------------------------------
   15. RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 860px) {
  #site-header { padding: 0.75rem 1rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-logo-name {
    font-size: 0.86rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Reduced motion — kill decorative animation, keep content usable */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  #particles-container { display: none; }
  .blinking-cursor { animation: none; opacity: 1; }
}

@media (max-width: 768px) {
  #home { padding-top: 80px; }

  .about-section,
  #skills,
  #portfolio,
  .certifications-section,
  #contact,
  .experience-section {
    padding: 4rem 0;
  }

  .skills-container { grid-template-columns: 1fr 1fr; }
  .certifications-grid { grid-template-columns: 1fr; }

  .swiper-slide {
    width: min(300px, calc(100vw - 3rem));
    height: min(300px, calc(100vw - 3rem));
  }

  .hero-cta .btn {
    width: 90%;
    max-width: 280px;
    padding: 0.82rem 1.5rem;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  #contact .col-md-7 { margin-top: 2.5rem; }

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

  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding-left: 3rem;
    padding-right: 0;
    text-align: left;
  }

  .timeline-item:nth-child(odd)  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 10px;
    right: auto;
  }

  .timeline-item:nth-child(odd) .timeline-tags { justify-content: flex-start; }
  .timeline-header { flex-direction: column; gap: 0.5rem; }
  .timeline-section-label::before { left: 16px; }
}

@media (max-width: 480px) {
  .skills-container { grid-template-columns: 1fr; }
  .social-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  #contact-form { padding: 1.25rem; }
}

/* Touch devices — portfolio overlay always visible */
@media (hover: none) {
  .portfolio-overlay {
    opacity: 1;
    background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.88) 100%);
  }
  .portfolio-item img { transform: none !important; }
}

/* ----------------------------------------------------------------
   14. HERO STATS — proof points under the CTA
---------------------------------------------------------------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 620px;
  margin: 3rem auto 0;
  padding: 0;
  animation: fadeInUp 1.8s ease both;
}

.hero-stat {
  min-width: 150px;
  padding: 0.9rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  transition: all var(--transition);
}

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

.hero-stat dd {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.1;
}

.hero-stat dd span { font-size: 1.1rem; }

.hero-stat dt {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-2);
  margin-top: 0.25rem;
}

/* dt after dd visually — flip order */
.hero-stat { display: flex; flex-direction: column-reverse; }

/* ----------------------------------------------------------------
   15. PIPELINE INFOGRAPHIC — from raw data to decision
---------------------------------------------------------------- */
.pipeline-viz {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.pipeline-viz::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
}

.pipeline-viz-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 1.6rem;
}

.pipeline-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 120px;
  padding: 0.9rem 0.8rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}

.pipeline-stage:hover {
  border-color: var(--border);
  background: var(--indigo-dim);
  transform: translateY(-3px);
}

.pipeline-stage--ai {
  border-color: rgba(52,211,153,0.25);
}
.pipeline-stage--ai:hover {
  border-color: rgba(52,211,153,0.5);
  background: var(--emerald-dim);
}
.pipeline-stage--ai .pipeline-icon i { color: var(--emerald); }

.pipeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--indigo-dim);
  border: 1px solid var(--border);
}

.pipeline-icon i {
  font-size: 1rem;
  color: var(--violet);
}

.pipeline-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-1);
}

.pipeline-sub {
  font-size: 0.68rem;
  color: var(--text-2);
  line-height: 1.35;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  color: var(--text-3);
  font-size: 0.9rem;
  padding: 0 0.1rem;
}

/* ----------------------------------------------------------------
   16. BLOG — teaser on home page
---------------------------------------------------------------- */
.blog-teaser-section {
  background: var(--bg-base);
  padding: 6.5rem 0;
  text-align: center;
}

.blog-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  text-align: left;
  margin-bottom: 1rem;
}

.blog-teaser-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.blog-teaser-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.blog-teaser-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  color: inherit;
}

.blog-teaser-card:hover::before { opacity: 1; }

.blog-teaser-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.45;
  margin: 0.55rem 0;
}

.blog-teaser-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

/* ----------------------------------------------------------------
   17. BLOG — index & article pages
---------------------------------------------------------------- */
.blog-page { background: var(--bg-base); }

.blog-wrap {
  padding: 9rem 0 5rem;
  min-height: 70vh;
}

.blog-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4rem;
}

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  margin: 0.4rem 0 1rem;
}

.blog-hero-sub {
  font-size: 1.08rem;
  color: var(--text-2);
  line-height: 1.8;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  max-width: 780px;
  margin: 0 auto;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.blog-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.blog-card:hover::before { opacity: 1; }

.blog-card-link {
  display: block;
  padding: 1.7rem 1.8rem;
  color: inherit;
}
.blog-card-link:hover { color: inherit; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-3);
  font-weight: 500;
}

.blog-dot { color: var(--text-3); }

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin: 0.55rem 0 0.5rem;
}

.blog-card-desc {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0.9rem;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.blog-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--sky);
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 4px;
  padding: 0.14rem 0.5rem;
}

.blog-card-cta {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--violet);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: gap 0.25s ease;
}

.blog-card:hover .blog-card-cta,
.blog-teaser-card:hover .blog-card-cta { gap: 0.75rem; }

/* Article page */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-2);
  margin-bottom: 1.6rem;
}
.article-back:hover { color: var(--violet); }

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.1rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 0.9rem;
}

.article-author {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-2);
  font-weight: 600;
}

.article-author .nav-logo-badge { width: 27px; height: 27px; font-size: 0.55rem; }

.article-header { margin-bottom: 2.6rem; }

/* Article typography */
.article-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-2);
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 2.6rem 0 0.9rem;
  line-height: 1.35;
}

.article-body h3 {
  font-size: 1.18rem;
  margin: 2rem 0 0.7rem;
}

.article-body a {
  color: var(--sky);
  border-bottom: 1px solid rgba(56,189,248,0.3);
}
.article-body a:hover { color: var(--violet); border-color: rgba(167,139,250,0.4); }

.article-body strong { color: var(--text-1); }

.article-body ul, .article-body ol { padding-left: 1.3rem; margin-bottom: 1.2rem; }
.article-body li { margin-bottom: 0.45rem; }

.article-body blockquote {
  border-left: 3px solid var(--indigo);
  background: var(--indigo-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.2rem;
  margin: 1.4rem 0;
  font-style: italic;
}
.article-body blockquote p:last-child { margin: 0; }

/* Inline code */
.article-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.86em;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  color: #c4b5fd;
}

/* Code blocks (pygments wraps in .highlight) */
.article-body .highlight {
  background: #0d1526;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin: 1.4rem 0;
  overflow-x: auto;
}

.article-body .highlight pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  background: transparent;
  border: none;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
}

.article-body .highlight code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Plain fenced blocks without language */
.article-body pre:not(.highlight pre) {
  background: #0d1526;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  color: #e2e8f0;
  margin: 1.4rem 0;
}

/* Tables in articles */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.92rem;
}

.article-body th, .article-body td {
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.8rem;
  text-align: left;
}

.article-body th {
  background: var(--indigo-dim);
  color: var(--text-1);
  font-family: var(--font-display);
  font-weight: 600;
}

.article-footer { margin-top: 3.2rem; }

.article-outro {
  background: var(--gradient-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.7rem;
  text-align: center;
}

.article-outro p { margin-bottom: 1.4rem; }
.article-outro strong { color: var(--text-1); }

/* ----------------------------------------------------------------
   18. RESPONSIVE — new components
---------------------------------------------------------------- */
@media (max-width: 768px) {
  .hero-stats { gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stat { padding: 0.7rem 0.9rem; }
  .hero-stat dd { font-size: 1.35rem; }

  .pipeline-flow { flex-direction: column; align-items: stretch; }
  .pipeline-stage { flex-direction: row; justify-content: flex-start; text-align: left; min-width: 0; gap: 0.8rem; }
  .pipeline-stage .pipeline-sub { margin-left: auto; text-align: right; }
  .pipeline-arrow { justify-content: center; transform: rotate(90deg); padding: 0; }

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

  .blog-wrap { padding-top: 7.5rem; }
  .blog-card-link { padding: 1.3rem 1.2rem; }
  .article { padding: 0 1.1rem; }
  .article-body .highlight pre { font-size: 0.78rem; }
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-stats, .hero-stat, .pipeline-stage, .blog-card, .blog-teaser-card { animation: none; transition: none; }
}

/* ── Contact : « Comment ça se passe » (3 étapes) ─────────────────────────── */
.how-steps-wrap { max-width: 820px; margin: 2.2rem auto 0; }
.how-title {
  text-align: center; font-family: var(--font-display);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 1rem;
}
.how-steps {
  list-style: none; counter-reset: step;
  margin: 0; padding: 0; display: grid; gap: .8rem;
}
@media (min-width: 768px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-steps li {
  counter-increment: step; position: relative;
  padding: 1rem 1.1rem 1rem 2.7rem;
  background: var(--bg-card); border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px; color: var(--text-2);
  font-size: .92rem; line-height: 1.55;
}
.how-steps li::before {
  content: counter(step);
  position: absolute; left: .95rem; top: 1.05rem;
  width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: .74rem; font-weight: 700;
  background: var(--gradient-brand); color: var(--text-1);
}
