:root {
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --text: #1e2530;
  --text-muted: #5b6472;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #0f1420;
  --bg-alt: #171d2b;
  --text: #e6e9ef;
  --text-muted: #9aa4b2;
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --accent: #22d3ee;
  --border: #2a3245;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

.success-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  text-align: center;
  padding: 16px 20px;
  background: #22c55e;
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}
.success-banner.visible {
  transform: translateY(0);
}


body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

#theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  text-align: center;
  padding: 80px 20px 60px;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.2);
  border: 3px solid white;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.avatar:hover { transform: scale(1.05); }

.hero h1 {
  margin: 0 0 8px;
  font-size: 2.4rem;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 640px;
  margin-inline: auto;
}

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.contact-bar a, .contact-bar span {
  color: white;
  text-decoration: none;
  opacity: 0.95;
}
.contact-bar a:hover { text-decoration: underline; }

.cta {
  display: inline-block;
  background: white;
  color: var(--primary-dark);
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.cta:hover { transform: translateY(-2px); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 28px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 14px 10px;
  flex-wrap: wrap;
}
.navbar a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.navbar a:hover { color: var(--primary); }

main { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.section {
  padding: 60px 0 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
}
.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 4px;
  width: 50px;
  background: var(--primary);
  border-radius: 2px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.skill {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 3px solid var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
}
.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}
.timeline-content {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.timeline-content h3 { margin: 0 0 4px; font-size: 1.15rem; }
.job-meta {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
}
.timeline-content ul { margin: 0; padding-left: 20px; }
.timeline-content li { margin-bottom: 6px; line-height: 1.5; }

.formation-grid, .langues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.formation-card, .langue-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.formation-card h3, .langue-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.formation-card p, .langue-card p {
  margin: 2px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.formation-card .date { font-style: italic; }

.contact-section { text-align: center; padding-bottom: 60px; }
.contact-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.contact-card:hover { border-color: var(--primary); }

.contact-form-section {
  max-width: 640px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form .cta {
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font: inherit;
}

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .navbar { gap: 14px; font-size: 0.85rem; }
}
