:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-nav: rgba(10, 10, 10, 0.95);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-primary: #8b5cf6;
  --accent-secondary: #6366f1;
  --accent-hover: #a855f7;
  --border-color: #2a2a2a;
  --shadow-light: rgba(139, 92, 246, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.3);
  --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Scrollbar moderne */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

/* Navigation moderne avec effet de flou */
nav {
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

nav h1 {
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

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

nav a:hover::after {
  width: 100%;
}

/* Header avec animation moderne */
header {
  text-align: center;
  padding: 8rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  z-index: -1;
}

header h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1.2s ease-out;
}

header p {
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 300;
  animation: fadeInUp 1.2s ease-out 0.2s both;
}

/* Sections avec espacement moderne */
section {
  scroll-margin-top: 100px;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: auto;
  animation: fadeInUp 1s ease-out;
}

h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 3rem;
  text-align: center;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Grille de projets moderne et professionnelle */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-medium);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  position: relative;
}

.project-accordion:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 15px 35px var(--shadow-medium);
}

.project-header {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.project-header:hover {
  background: var(--bg-secondary);
}

.project-header h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.arrow {
  color: var(--accent-primary);
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.project-accordion.active .arrow {
  transform: rotate(180deg);
}

.project-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  padding: 0 2rem;
}

.project-accordion.active .project-content {
  max-height: 1000px;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
}

.project-content img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  transition: transform 0.4s ease;
  border: 1px solid var(--border-color);
}

.project-content img:hover {
  transform: scale(1.02);
}

.project-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

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

.project-links a {
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.project-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--shadow-light);
}

/* Grille de compétences moderne */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.skill-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.skill-block:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 30px var(--shadow-medium);
}

.skill-block:hover::before {
  transform: scaleX(1);
}

.skill-block h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-block ul {
  list-style: none;
  padding-left: 0;
}

.skill-block li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: color 0.3s ease;
}

.skill-block li:hover {
  color: var(--text-primary);
}

/* Section contact moderne */
.contact-mail {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.contact-mail::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

.contact-mail:hover {
  color: var(--accent-hover);
}

.contact-mail:hover::after {
  width: 100%;
}

.cv-button {
  background: var(--gradient-primary);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cv-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-secondary);
  transition: left 0.3s ease;
}

.cv-button:hover::before {
  left: 0;
}

.cv-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow-light);
}

.cv-button span {
  position: relative;
  z-index: 1;
}

/* Boutons génériques */
button {
  background: var(--gradient-primary);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

button:hover {
  background: var(--gradient-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-light);
}

/* Liste avec style moderne */
ul li {
  margin-left: 1.5rem;
  list-style-type: none;
  margin-bottom: 0.75rem;
  position: relative;
  color: var(--text-secondary);
}

ul li::before {
  content: '▸';
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: -1.5rem;
}

/* Footer moderne */
footer {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}

/* Bouton retour en haut moderne */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gradient-primary);
  color: var(--text-primary);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  box-shadow: 0 8px 25px var(--shadow-medium);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--shadow-medium);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive design moderne */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  nav ul {
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    position: absolute;
    top: 100%;
    right: 1rem;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-medium);
    display: none;
    min-width: 200px;
  }

  nav ul.show {
    display: flex;
  }

  nav .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--accent-primary);
  }

  header h1 {
    font-size: 2.5rem;
  }

  header p {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-accordion {
    min-height: auto;
  }

  .project-content img {
    height: 180px;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  header p {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .project-content img {
    height: 160px;
  }

  .cv-button,
  button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

  .scroll-top {
    width: 50px;
    height: 50px;
    font-size: 1rem;
  }
}
