/* ===== VARIABLES & RESET ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f1117;
  --bg-card: #13161e;
  --blue-main: #2563eb;
  --blue-light: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.25);
  --blue-border: rgba(59, 130, 246, 0.3);
  --text-primary: #f0f4ff;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --anodized: #1a1d27;
  --anodized-light: #1e2130;
  --border: rgba(255, 255, 255, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-canvas canvas {
  width: 100%;
  height: 100%;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(37, 99, 235, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(37, 99, 235, 0.08) 0%, transparent 50%);
}

.page-wrapper {
  position: relative;
  z-index: 1;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--blue-main); border-radius: 3px; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

nav.scrolled {
  background: rgba(10, 10, 15, 0.9);
  border-bottom-color: var(--blue-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo span {
  color: var(--blue-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active {
  color: var(--blue-light);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

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

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  width: 100%;
  text-align: center;
  max-width: 300px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--blue-light);
  background: rgba(59, 130, 246, 0.08);
}

/* ===== MAIN CONTENT ===== */
main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ===== SECTION LAYOUTS ===== */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-sm {
  padding: 3.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid var(--blue-border);
  color: var(--blue-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
  animation: pulse-dot 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-title .highlight {
  color: var(--blue-light);
  position: relative;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

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

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--blue-main);
  color: #fff;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  background: var(--blue-light);
  box-shadow: 0 0 36px rgba(59, 130, 246, 0.55);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  border-color: var(--blue-border);
  background: rgba(59, 130, 246, 0.07);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-light);
  border: 1px solid var(--blue-border);
  padding: 0.6rem 1.4rem;
}

.btn-ghost:hover {
  background: rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--blue-border);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.12);
}

/* ===== SECTION HEADER ===== */
.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--blue-light);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  line-height: 1.7;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 6rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.page-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1.25rem;
}

.page-hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--blue-light);
}

.page-hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.page-hero-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

/* ===== TAG ===== */
.tag {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-light);
  border: 1px solid var(--blue-border);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.tag-gray {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--blue-light);
  text-decoration: none;
}

/* ===== PROGRESS BAR ===== */
.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--anodized-light);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.skill-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-main), var(--blue-light));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-main), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-main);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.timeline-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.timeline-sub {
  font-size: 0.88rem;
  color: var(--blue-light);
  margin-bottom: 0.6rem;
}

.timeline-body {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ===== CONTACT FORM ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--anodized);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-main);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== CERT BADGE ===== */
.cert-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--blue-light);
  font-size: 1.5rem;
}

/* ===== VEILLE ===== */
.veille-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.veille-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ===== STATS ROW ===== */
.stats-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-value span {
  color: var(--blue-light);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero-title { font-size: clamp(2.2rem, 10vw, 4rem); }
  .hero-cta { flex-direction: column; align-items: center; }

  .section { padding: 3.5rem 1.25rem; }
  .page-hero { padding: 4rem 1.25rem 2.5rem; }

  .stats-row { gap: 1.5rem; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .timeline { padding-left: 1.5rem; }
}
