/* Modern Design System 2025 */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&display=swap");

:root {
  /* Palette de couleurs sophistiquée */
  --primary-hue: 250;
  --primary-sat: 80%;
  --primary-light: 60%;

  --color-primary: hsl(
    var(--primary-hue),
    var(--primary-sat),
    var(--primary-light)
  );
  --color-primary-glow: hsl(var(--primary-hue), var(--primary-sat), 70%);
  --color-secondary: #00f2ff;

  /* Light Theme */
  --bg-body: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-surface-transparent: rgba(255, 255, 255, 0.7);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(148, 163, 184, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 24px -6px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

  /* Gradients */
  --gradient-text: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  --gradient-surface: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );

  /* Layout */
  --container-width: 1100px;
  --header-height: 80px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  /* Dark Theme - Deep Space */
  --bg-body: #030712;
  --bg-surface: #111827;
  --bg-surface-transparent: rgba(17, 24, 39, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
  --color-primary-glow: hsl(var(--primary-hue), var(--primary-sat), 30%);

  --gradient-surface: linear-gradient(
    145deg,
    rgba(30, 41, 59, 0.4) 0%,
    rgba(15, 23, 42, 0.6) 100%
  );
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    color 0.4s ease;
  background-image: radial-gradient(
      circle at 15% 50%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(0, 242, 255, 0.08) 0%,
      transparent 25%
    );
  background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
.nav-logo {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
}
h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 3rem;
  text-align: center;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}
ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.highlight-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-text);
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.about-content:hover .highlight-text::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--bg-surface-transparent);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-icon {
  display: none;
}

/* Mobile Nav */
.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
  }

  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: fixed;
    bottom: 0 !important;
    top: auto !important;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0;
    z-index: 9999;
    transform: none;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-menu.active {
    transform: none;
  }

  .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    gap: 0;
    padding: 0.5rem;
    color: var(--text-muted);
    border-radius: 8px;
  }

  .nav-link span {
    display: none;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link.active {
    color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
  }

  .nav-icon {
    display: block;
    width: 24px;
    height: 24px;
  }

  /* Adjust main content padding for bottom nav */
  body {
    padding-bottom: 70px;
  }
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

.theme-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

[data-theme="light"] .moon-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-height);
  position: relative;
}

.hero-content {
  max-width: 800px;
  animation: fadeUp 0.8s ease-out;
}

.hero-title {
  margin-bottom: 1rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 2em rgba(99, 102, 241, 0.2));
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-location {
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--color-primary-glow);
}

/* Sections General */
.section {
  padding: 6rem 0;
}

/* Cards (Glassmorphism) */
.experience-grid,
.projects-grid,
.skills-grid {
  display: grid;
  gap: 2rem;
}

.experience-card,
.project-card,
.skill-category {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.experience-card::before,
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-text);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.experience-card:hover,
.project-card:hover,
.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

.experience-card:hover::before,
.project-card:hover::before {
  opacity: 1;
}

/* Experience Specifics */
.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.experience-company {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.experience-role {
  font-weight: 600;
  color: var(--text-main);
}

.experience-dates {
  font-size: 0.9rem;
  font-family: monospace;
  background: var(--bg-body);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.experience-details li {
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
}

.experience-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
}

/* Skills Grid (Bento Style) */
.skills-grid {
  grid-template-columns: repeat(2, 1fr);
}

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

.skill-category h3 {
  text-align: center;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.skill-list li {
  background: var(--bg-body);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.skill-list li:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: scale(1.05);
}

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

.project-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-col {
  text-align: left;
}

.contact-info-col h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-actions {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item {
  background: var(--bg-surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease;
  width: fit-content;
}

.contact-item:hover {
  transform: scale(1.02);
  border-color: var(--color-primary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--color-primary-glow);
  border-color: transparent;
}

/* Form */
.contact-form {
  background: var(--bg-surface-transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-text);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: var(--bg-surface);
}

.contact-form .btn {
  width: 100%;
}

/* Footer */
.footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  margin-top: 4rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .experience-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info-col {
    text-align: center;
  }

  .contact-actions {
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }
}
