/* Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #121212;
  color: #f0f0f0;
  line-height: 1.6;
  overflow-x: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

body::-webkit-scrollbar {
  display: none;  /* Chrome, Safari, Opera */
}

/* Header */
header {
  background-color: #1c1c1c;
  padding: 20px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  clip-path: polygon(0% 0%, 100% 0%, 100% 20%, 60% 20%, 55% 100%, 0% 100%);
  padding-bottom: 10px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

nav .logo {
  display: flex;
  align-items: center;
  color: #b1b1b1;
}

nav .logo h1 {
  font-weight: 600;
  font-size: 24px;
  margin-left: 10px;
  user-select: none;
}

nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: #f0f0f0;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #00d6ff;
}

/* Timeline */
.timeline {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 40px;
  z-index: 100;
  margin-top:5%;
  max-height:90%;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow-y:auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: #bbb;
  font-weight: 600;
  transition: color 0.3s ease;
}

.timeline-item p {
  margin: 0;
  font-size: 16px;
}

.timeline-item .timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #444;
  transition: background-color 0.3s ease;
}

.timeline-item.active {
  color: #00ece1;
}

.timeline-item.active .timeline-dot {
  background-color: #00ece1;
}

/* Project Section */
main#projects {
  scroll-behavior: smooth;
  margin-top: 80px; /* space for fixed header */
}

.project-card {
  height: 100vh;
  padding: 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: start;
  background: linear-gradient(135deg, #0f0f0f, #1c1c1c);
  border-left: 4px solid transparent;
  transition: border-color 0.3s ease;
  position: relative;
}

.project-card.active {
  border-left-color: #00d6ff;
}

.project-card h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #00d6ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  user-select: none;
}

.project-card img.responsive-img {
  max-width: 90%;
  max-height: 90%
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 20px;
}

.project-card p {
  font-size: 18px;
  max-width: 600px;
  color: #bbb;
  user-select: none;
}

/* Scroll indicator arrow fixed at bottom center */
.scroll-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  color: #00d6ffcc;
  animation: bounce 1.2s infinite;
  user-select: none;
  z-index: 150;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-15px);
  }
}

/* Contact */
.contact {
  background-color: #1c1c1c;
  padding: 60px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact h2 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 20px;
  user-select: none;
}

.contact p {
  font-size: 18px;
  color: #bbb;
  user-select: none;
}

/* Footer */
footer {
  background-color: #121212;
  padding: 20px 0;
  text-align: center;
  user-select: none;
}

footer p {
  color: #bbb;
}

/* Responsive */

/* Hide timeline and adjust project padding on small screens */
@media (max-width: 768px) {


  header .logo h1 {
    font-size: 2vh;
  }

  header .logo svg {
    width: 30px;
    height: 30px;
  }

  header {
    clip-path: polygon(0% 0%, 100% 0%, 100% 20%, 44vh 20%, 40vh 100%, 0% 100%);
  }

  .timeline {
    position: fixed;
    top: auto; /* juste sous la barre de navigation */
    margin-top: 110px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    padding: 10px 0;
    padding-left: 10px;
  }

    .timeline-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    flex-direction: row;
    gap: 20px;
    scrollbar-width: none; /* Firefox support */
    -ms-overflow-style: none; /* IE support */
  }

  .timeline-items::-webkit-scrollbar {
    display: none;
  }

  .timeline-item {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 12px;
    color: #fff;
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s;
  }

    .timeline-item.active {
      color: #00ece1;
    }

    .timeline-items::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: #fff;
    z-index: -1;
  }

  .timeline-item::before {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      height: 2px;
      width: 100%;
      background-color: white;
      z-index: 0;
    }

  .timeline-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: transparent;
    transition: background 0.3s;
  }

  .timeline-item.active::after {
    background: #00ece1;
  }

  .timeline-dot {
    width: 10px;
    height: 10px;
    background: #00d6ff;
    border-radius: 50%;
    margin-bottom: 5px;
  }

  .timeline-item p {
    font-size: 12px;
    margin: 0;
  }

  .project-card {
    padding: 30px 15px;
  }

  .project-card h2 {
    font-size: 28px;
  }

  .project-card p {
    font-size: 16px;
    max-width: 90%;
  }

  .project-card img.responsive-img {
    max-height: 40vh;
  }
}

@media (max-width: 480px) {

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li a {
    font-size: 16px;
  }

  .project-card h2 {
    font-size: 24px;
  }

  .project-card p {
    font-size: 14px;
  }

  .project-card img.responsive-img {
    max-height: 90%;
  }
}

.image-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.image-row img.responsive-img {
  flex: 1 1 45%;
  max-width: 45%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 15px #00d6ff88;
}

@media (max-width: 768px) {
  .image-row img.responsive-img {
    max-width: 100%;
  }
}

html, body {
  scroll-behavior: smooth;
  height: 100%;
  overflow: hidden;
}

main {
  height: 100vh;
  overflow-y: hidden;
  scroll-snap-type: y mandatory;
}

.project-card {
  height: 100vh;
  scroll-snap-align: start;
}