/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE - DARK MODE */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color:hsl(250, 24%, 9%);
}

/* Smooth scroll avec offset pour navbar */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* NAVBAR */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: hsl(250, 24%, 9%);
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  ;
}

.nav-name {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.nav-links a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 600;
  margin-left: 24px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.25s ease;
}

.nav-links a:hover {
  background-color: #2a2a2a;
  color: white;
}

/* MAIN CONTAINER */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* SECTIONS */
section {
  margin-bottom: 0;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  font-weight: 700;
  color: #ffffff;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  font-weight: 700;
  color: #ffffff;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
  color: #f0f0f0;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  margin-top: 20px;
  font-weight: 600;
  color: #e0e0e0;
}

p {
  margin-bottom: 16px;
  color: #b0b0b0;
}

/* WELCOME SECTION */
#welcome-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#welcome-section h1 {
  text-align: center;
}

#welcome-section p {
  font-size: 1.1rem;
  max-width: 700px;
  color: #a0a0a0;
  text-align: center;
}

/* Cacher la photo mobile sur desktop */
.mobile-intro-image {
  display: none;
}

/* Availability badge */
.availability {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 12px;
}

/* ABOUT WITH IMAGE */
#about {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 20px;
  position: relative;
}

#about .about-wrapper {
  position: relative;
}

#about .about-image {
  float: right;
  margin-left: 32px;
  margin-bottom: 400px;
  width: 280px;
  height: 320px;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid #2a2a2a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
}

#about .about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  transform: translateY(-30px);
}

#about .about-image:hover {
  transform: translateY(-4px);
}

#about p {
  font-size: 0.9rem;
  max-width: 700px;
  text-align: justify;
}

/* Clear float after about section */
#about::after {
  content: "";
  display: table;
  clear: both;
}

/* Tech stack section */
.tech-stack {
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
}

.tech-stack h3 {
  margin-top: 0;
  color: #f0f0f0;
  font-size: 1.1rem;
}

.tech-stack p {
  color: #b0b0b0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* WORK SECTION */
#work {
  padding-top: 0px;
}

.project-bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  padding: 30px;
  border-radius: 16px;
  margin-top: 0px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 1px solid #2a2a2a;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-bg:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  border-color: #3a3a3a;
}

.project-content {
  color: white;
}

.project-content h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0px;
}

.project-content h4 {
  color: #e0e0e0;
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 12px;
}

.project-content p,
.project-content li {
  color: #c0c0c0;
  font-size: 0.9rem;
}

.project-content ul {
  margin: 16px 0;
  padding-left: 20px;
  list-style-type: none;
}

.project-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.project-content ul li:before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #667eea;
  font-size: 1.2rem;
}

/* Project tagline */
.project-tagline {
  font-size: 1.05rem;
  color: #999;
  font-style: italic;
  margin-bottom: 20px;
}

/* Challenges list */
.challenges {
  background: rgba(102, 126, 234, 0.1);
  padding: 16px 16px 16px 20px;
  border-left: 3px solid #667eea;
  border-radius: 4px;
  margin: 20px 0;
}

/* Project buttons */
.project-links {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #663a8f 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: #b0b0b0;
  border: 1px solid #3a3a3a;
}

.btn-secondary:hover {
  background-color: #1a1a1a;
  color: #fff;
  border-color: #667eea;
}

/* Tech badges */
.tech-used {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tech-badge {
  background: rgba(102, 126, 234, 0.15);
  color: #a0a0ff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.project-image {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  margin: 32px auto 0;
  object-fit: contain;
  border-radius: 12px;
  background-color: #fff;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

/* Learning section */
.learning-section {
  background: #1a1a1a;
  padding: 32px;
  border-radius: 12px;
  margin-top: 40px;
  border: 1px solid #2a2a2a;
}

.learning-section h3 {
  color: #f0f0f0;
  margin-top: 0;
  margin-bottom: 16px;
}

.learning-section ul {
  list-style-type: none;
  padding-left: 0;
}

.learning-section li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 12px;
  color: #b0b0b0;
  line-height: 1.6;
}

.learning-section li:before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #667eea;
  font-size: 1.2rem;
}

/* CONTACT */
#contact {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 40px 0;
}

#contact h2 {
  margin-bottom: 16px;
}

#contact > p {
  max-width: 600px;
  margin: 0 auto 32px;
  color: #a0a0a0;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.25s ease;
  font-weight: 500;
}

.social-icon:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  transform: translateX(4px);
  border-color: transparent;
}

.social-icon span {
  font-size: 0.95rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 24px;
  background: #1a1a1a;
  margin-top: 60px;
  color: #808080;
  font-size: 0.9rem;
  border-top: 1px solid #2a2a2a;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #navbar {
    padding: 10px 20px;
    flex-direction: column;
    gap: 8px;
  }

  .nav-name {
    font-size: 1.1rem;
  }

  .nav-links {
    display: flex;
    gap: 8px;
  }

  .nav-links a {
    margin-left: 0;
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .container {
    padding: 90px 20px 20px;
  }

  h1 {
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  /* MOBILE: Sections 100vh */
  
  /* Intro + photo */
  #welcome-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 200px;
  }

  #welcome-section h1 {
    margin-bottom: 12px;
    text-align: left;
  }

  #welcome-section p {
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: justify;
  }

  /* Afficher la photo mobile */
  .mobile-intro-image {
    display: block;
    text-align: center;
    width: 200px;
    height: 200px;
    margin: 20px auto 0;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid #2a2a2a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  }

  .mobile-intro-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    transform: translateY(-50px);
  }

  /* About - optimisé pour tenir dans l'écran */
  #about {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;;
    padding-top: 110px;
    padding-bottom: 40px;
  }

  #about h2 {
    font-size: 1.4rem;
    margin-bottom: 16px;
  }

  #about p {
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  #about .about-image {
    display: none;
  }

  .tech-stack {
    padding: 12px;
    margin: 12px 0;
  }

  .tech-stack h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .tech-stack p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* Work */
  #work {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 18px;
  }
 

  /* Contact */
  #contact {
    min-height: 100vh;
    padding-top: 100px;
  }

  .project-bg {
    padding: 28px 20px;
    margin-top: 0;
  }

  .project-content h3 {
    font-size: 1.3rem;
  }

  .project-content p,
  .project-content li {
    font-size: 0.95rem;
  }

  .project-links {
    flex-direction: column;
    margin: 20px 0;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .project-image {
    max-height: 280px;
    margin-top: 24px;
  }

  .learning-section {
    padding: 20px;
    margin-top: 24px;
  }

  .contact-links {
    max-width: 100%;
  }

  .social-icon {
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  #navbar {
    padding: 12px 16px;
  }

  .nav-name {
    font-size: 1rem;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .container {
    padding: 80px 16px 20px;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .mobile-intro-image {
    width: 180px;
    height: 180px;
  }

  .mobile-intro-image img {
    transform: translateY(-50px);
  }

  #about p {
    font-size: 0.9rem;
  }

  .tech-stack p {
    font-size: 0.8rem;
  }

  .project-bg {
    padding: 24px 16px;
  }

  .project-content h3 {
    font-size: 1.2rem;
  }

  .tech-used {
    gap: 6px;
  }

  .tech-badge {
    font-size: 0.8rem;
    padding: 5px 10px;
  }

  .learning-section {
    padding: 16px;
  }

  .social-icon span {
    font-size: 0.85rem;
  }
}
