* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  color: #ffffff;
  text-decoration: none;
  list-style: none;
}

body {
  overflow-x: hidden;
  background-color: #0a0a0a;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #00ffaa #0a0a0a;
}

html {
  scroll-behavior: initial;
  /* Lenis handles smoothing */
  scroll-snap-type: y proximity;
  scroll-padding-top: 100px;
  overflow-x: hidden;
}

input:required:valid {
  border-color: #00ffaa;
}


canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

#content {
  position: relative;
  z-index: 1;
}

section {
  min-height: 100vh;
  padding: 100px 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.header {
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 20px;
  left: 5%;
  width: 90%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.8);
  top: 10px;
  padding: 10px 5%;
  border-color: rgba(0, 255, 170, 0.2);
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  background: linear-gradient(45deg, #fff, #00ffaa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 25px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 25px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a {
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

.nav-links a:hover,
.nav-links a.active {
  color: #00ffaa;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #00ffaa;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px #00ffaa;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

h1 {
  font-size: 72px;
  margin-bottom: 20px;
  line-height: 1.1;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

h2 {
  font-size: 48px;
  margin-bottom: 20px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

p {
  font-size: 18px;
  max-width: 600px;
  margin-bottom: 30px;
  line-height: 1.6;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
}

.btn {
  padding: 20px 30px;
  background: linear-gradient(45deg, #00aa8d, #00ffaa);
  border: none;
  border-radius: 50px;
  color: #0a0a0a;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 255, 170, 0.3);
}

.projects-container,
.certificate-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 50px;
  padding: 20px 0;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  position: relative;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  animation: float 6s ease-in-out infinite;
}

/* Wavy Staggered Effect */
.projects-container .project-card:nth-child(even),
.certificate-container .project-card:nth-child(even) {
  transform: translateY(30px);
  animation-delay: 1.5s;
}

.projects-container .project-card:nth-child(odd),
.certificate-container .project-card:nth-child(odd) {
  animation-delay: 0s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(1deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Override even child transform on hover to avoid jumping */
.projects-container .project-card:nth-child(even):hover,
.certificate-container .project-card:nth-child(even):hover {
  transform: translateY(20px) scale(1.03);
}

.project-card:hover {
  transform: translateY(-20px) scale(1.03);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 170, 0.4);
  box-shadow: 0 20px 40px rgba(0, 255, 170, 0.15);
}

/* Wavy Section Separator */
.wave-separator {
  width: 100%;
  height: 100px;
  overflow: hidden;
  line-height: 0;
  margin-top: -50px;
  margin-bottom: 50px;
}

.wave-separator svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 100px;
}

.wave-separator .shape-fill {
  fill: #0a0a0a;
}

.skills-container,
.activities-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}



.skill-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: #00ffaa;
  font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  gap: 15px;
}

.skill-card i {
  font-size: 28px;
  color: #00ffaa;
}

.skill-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  padding: 30px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, background 0.3s ease;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: var(--y, 0);
  left: var(--x, 0);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 255, 170, 0.1), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.skill-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 255, 170, 0.3);
}

.project-img {
  width: 100%;
  height: 200px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-content {
  padding: 0px;
}

.project-content h3 {
  font-size: 22px;
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

.project-content p {
  font-size: 16px;
  margin-bottom: 15px;
}

.contact-form {
  max-width: 600px;
  margin-top: 30px;
}

.form-group {
  margin-bottom: 20px;
}

input,
textarea {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
}

textarea {
  min-height: 150px;
  resize: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #00ffaa;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  opacity: 0.2;
  border-radius: 50%;
  filter: blur(5px);
}

footer {
  padding: 50px 10%;
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: #00ffaa;
  transform: translateY(-5px);
}

/* Animation classes */
.fade-in {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loader */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.progress-bar {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}

.progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #00ffaa;
  transition: width 0.3s ease;
}

.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Profile picture */
.profile-picture {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #00ffaa;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 255, 170, 0.3);
  position: relative;
  z-index: 5;
}

.profile-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 255, 170, 0.1);
  pointer-events: none;
  z-index: 1;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 100;
}

/* Polygon menu animation */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.95);
  clip-path: polygon(0 0, 0 0, 0 0);
  transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 90;
}

.menu-overlay.open {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.nav-links.mobile-active {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 95;
  opacity: 0;
  transition: opacity 0.4s ease;
  transition-delay: 0.3s;
}

.nav-links.mobile-active.visible {
  opacity: 1;
}

.nav-links.mobile-active a {
  font-size: 24px;
  margin: 15px 0;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.nav-links.mobile-active.visible a {
  transform: translateY(0);
  opacity: 1;
}

.nav-links.mobile-active.visible a:nth-child(1) {
  transition-delay: 0.4s;
}

.nav-links.mobile-active.visible a:nth-child(2) {
  transition-delay: 0.5s;
}

.nav-links.mobile-active.visible a:nth-child(3) {
  transition-delay: 0.6s;
}

.nav-links.mobile-active.visible a:nth-child(4) {
  transition-delay: 0.7s;
}

.nav-links.mobile-active.visible a:nth-child(5) {
  transition-delay: 0.8s;
}

/* About section layout */
.about-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
}

.about-text {
  flex: 1;
}

/* Enhanced responsive styles */
@media (max-width: 1024px) {
  .about-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  p {
    font-size: 16px;
  }

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

  .contact-form {
    width: 100%;
  }

  footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  canvas {
    opacity: 0.6;
    /* Reduce opacity for better text visibility on mobile */
  }

  section {
    padding: 100px 5%;
  }

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

  .profile-picture {
    width: 180px;
    height: 180px;
    align-self: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 36px;
  }

  section {
    padding: 80px 20px;
  }

  .project-card {
    min-width: 100%;
  }

  .btn {
    padding: 15px 20px;
    font-size: 14px;
  }

  .profile-picture {
    width: 150px;
    height: 150px;
  }
}

/* Mobile Nav */
.mobile {
  position: fixed;
  top: 4rem;
  left: 0;
  width: 100%;
  background: rgba(18, 18, 18, 0.95);

  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  overflow: hidden;
  /* transition: height 0.5s cubic-bezier(0.77, 0, 0.175, 1); */
  z-index: 999;
  height: 100dvh;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path 0.4s ease-in-out;

}

.activeMenu {
  /* height: calc(100vh - var(--header-height)); */
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);

}

.mobile li a {
  color: #00ffaa;
  font-size: 1.5rem;
  font-weight: 600;
  transition: all .5s linear;
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.mobile li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;

}

.mobile li a:hover {
  color: #00ffaa5e;
}

.mobile li a:hover::after {
  width: 100%;
}

.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #00ffaa;
  color: #000;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 999;
  bottom: 30px;
  right: 30px;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.btnContainer {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 10px 0;
}

.project-content h3 {
  color: #00ffaa;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Image de l'activité */
.activity-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1rem;
}

/* Détails de l'activité */
.project-content p {
  color: white;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.project-content p strong {
  color: rgba(0, 255, 170, 0.651);
}

/* Responsive design pour petits écrans */
@media (max-width: 768px) {
  .activities-container {
    grid-template-columns: 1fr;
  }

  .project-content {
    padding: 1rem;
  }
}


/* Image principale */
.main-image-container {
  margin-bottom: 1rem;
}

.activity-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  transition: opacity 0.3s ease;
}

/* Galerie d'images */
.image-gallery {
  margin-bottom: 1rem;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumbnail:hover {
  border-color: #3498db;
  opacity: 0.9;
}

.thumbnail.active {
  border-color: #3498db;
  transform: scale(1.05);
}

/* Détails de l'activité */
.project-content p {
  color: white;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.project-content p strong {
  color: #00ffaa;
}

/* Responsive design */
@media (max-width: 768px) {
  .activities-container {
    grid-template-columns: 1fr;
  }

  .project-content {
    padding: 1rem;
  }
}




/* Learn More button styling */
.learn-more-btn {
  background-color: #00ffaa;
  color: black;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 0.8rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.learn-more-btn:hover {
  background-color: rgba(0, 255, 170, 0.589);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Description text styling */
.description {
  color: white;
  line-height: 1.6;
  margin: 0.7rem 0;
  font-size: 0.95rem;
}

.full-description {
  color: white;
  line-height: 1.6;
  margin: 0.7rem 0;
  font-size: 0.95rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Activity details container */
.activity-details {
  padding-top: 0.5rem;
}




/* ================================================ */

.experience-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 50px;
  position: relative;
  padding-left: 40px;
}

.experience-container::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #00ffaa, transparent);
  opacity: 0.3;
}

.experience-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.experience-card::before {
  content: '';
  position: absolute;
  left: -42px;
  top: 35px;
  width: 14px;
  height: 14px;
  background: #0a0a0a;
  border: 3px solid #00ffaa;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
  transition: transform 0.3s ease;
}

.experience-card:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 255, 170, 0.4);
}

.experience-card:hover::before {
  transform: scale(1.5);
  background: #00ffaa;
}

.exp-year {
  margin-bottom: 10px;
}

.exp-year p {
  color: #00ffaa;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.exp-details h3 {
  font-size: 24px;
  margin-bottom: 5px;
  color: #fff;
}

.exp-details h4 {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
  font-weight: 400;
}

.exp-details p {
  font-size: 15px;
  line-height: 1.7;
  max-width: 100%;
}

/* About Section Enhancements */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  filter: drop-shadow(0 20px 40px rgba(0, 255, 170, 0.2));
  border: 1px solid rgba(0, 255, 170, 0.3);
}

.visual-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 255, 170, 0.15), transparent 70%);
  z-index: -1;
  animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
  from {
    transform: scale(0.9);
    opacity: 0.5;
  }

  to {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-visual {
    height: 300px;
    order: -1;
  }
}

/* Interactive 3D Controls */
.interactive-controls {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
}

.burst-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 255, 170, 0.1);
  border: 2px solid #00ffaa;
  color: #00ffaa;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
  animation: neonPulse 2s infinite;
}

.burst-btn:hover {
  background: #00ffaa;
  color: #000;
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 0 40px rgba(0, 255, 170, 0.5);
}

.burst-btn:active {
  transform: scale(0.9);
}

@keyframes neonPulse {
  0% {
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
  }

  50% {
    box-shadow: 0 0 40px rgba(0, 255, 170, 0.5);
  }

  100% {
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
  }
}

@media (max-width: 768px) {
  .interactive-controls {
    bottom: 20px;
    right: 20px;
  }

  .burst-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}