/* ───────────────────────────────
   Base & Reset
─────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: #fff;
  color: rgb(85,85,85);
}

p {
  color: rgb(85, 85, 85);
}

/* ───────────────────────────────
   Links & Buttons
─────────────────────────────── */
a,
.btn {
  transition: all 300ms ease;
  text-decoration: none;
  color: inherit;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-decoration-color: rgb(181, 181, 181);
}

.btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease;
  min-width: 160px;
  box-sizing: border-box;
  appearance: none;

}

.btn:hover {
  cursor: pointer;
}

.btn-color-1 {
  background: rgb(53,53,53);
  color: #fff;
  border: 2px black;
}

.btn-color-2 {
  background-color: white;
  color: black;
  border: 2px black;
}


.btn-color-1:hover {
  background: rgb(0,0,0);
}

.btn-color-2:hover {
  background: rgb(53,53,53);
  color: #fff;
  border-color: rgb(255,255,255);
}

/* ───────────────────────────────
   Navigation
─────────────────────────────── */
nav,
.nav-links {
  display: flex;
  align-items: center;
}

nav {
  justify-content: space-around;
  height: 17vh;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* Hamburger menu */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  list-style: none;
}

.menu-links a {
  display: block;
  padding: 10px;
  font-size: 1.2rem;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}
.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

/* ───────────────────────────────
   Sections (base layout)
─────────────────────────────── */
section {
  padding-top: 20vh;
  min-height: fit-content;
  margin: 0 10rem;
}

.section-container {
  display: flex;
  gap: 4rem;
  height: auto;
}

/* ───────────────────────────────
   Profile section
─────────────────────────────── */
#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}
.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.title {
  font-size: 3rem;
  text-align: center;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.icon {
  cursor: pointer;
  height: 2rem;
}

/* ───────────────────────────────
   About section
─────────────────────────────── */
#about {
  position: relative;
}

.about-containers {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.about-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.about-pic {
  border-radius: 2rem;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: 0.1rem solid rgb(163,163,163);
  text-align: center;
}

/* ───────────────────────────────
   Experience section
─────────────────────────────── */
#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85,85,85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-around;
  text-align: initial;
}

/* ───────────────────────────────
   Projects section
─────────────────────────────── */
#projects {
  position: relative;
}


.project-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
    transform: scale(1.05);
}

.project-card::after {
  content: "View project →";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}



.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin: 2rem auto;
  max-width: 1400px;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f9f9f9;
  border-radius: 1rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  transition: transform 0.4s ease;

}

.badge {
  display: inline-block;
  background-color: #f0f4fa;
  color: #333;
  font-weight: 500;
  padding: 0.3rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  margin-top: 0rem;
  margin-bottom: 1rem; /* ✅ Espace ajouté sous le badge */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}



.project-card h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.project-btn {
  color: black;
  border-color: rgb(163,163,163);
  font-size: 0.9rem;          /* Réduit la taille du texte */
  padding: 0.5rem 1.5rem;     /* Réduit l'épaisseur du bouton */
  margin-bottom: 1rem;  
  margin-bottom: 1rem;
  display: inline-block;      /* Nécessaire pour les marges verticales sur <a> */
  text-align: center;
}

/* ───────────────────────────────
   Contact section
─────────────────────────────── */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: 0.1rem solid rgb(163,163,163);
  background: rgb(250,250,250);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* ───────────────────────────────
   Footer
─────────────────────────────── */
footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

/* ───────────────────────────────
   Responsive
─────────────────────────────── */
@media (max-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  nav {
    height: auto;
  }
  #desktop-nav {
    display: none;
  }
  #hamburger-nav {
    display: block;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Timeline section ===== */
#experience {
  margin: 4rem auto;
  max-width: 900px;
}

.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 2rem;
  border-left: 2px solid #ccc;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.8rem; /* plus d’espace entre la ligne et le texte */
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -9px; /* légèrement sur la gauche par rapport à la ligne */
  top: 0.45rem;
  width: 14px;   /* réduit la taille */
  height: 14px;  /* réduit la taille */
  background: #333;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #ccc;
}

.timeline-date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.3rem;
  display: block; /* force un saut de ligne avant le titre */
  padding-left: 0.1rem;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #222;
  line-height: 1.3;
}

.timeline-content p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
}



/* Responsive adjustments */
@media (max-width: 768px) {
  .timeline {
    padding-left: 1rem;
  }
  .timeline-item::before {
    left: -9px;
  }
}


