/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Liens hypertextes */
.link {
  color: #94b0c9;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #394652, #16354e);
  transition: width 0.3s ease;
}

.link:hover {
  color: #90caf9;
}

.link:hover::after {
  width: 100%;
}

.link:active {
  color: #2196f3;
}

.project-link {
  text-decoration: none;
  color: #ffffff;
}

/* Dans body */
body {
  font-family: "Raleway", sans-serif;
  background: #000000;
  color: #ffffff;
  overflow-x: hidden;
  width: 100%;
  /* Ajoute le background fixe directement ici */
  background-image: url(./assets/images/background_crop.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* ← CLÉ pour l'effet */
}

/* Fond noir texturé - remplit tout l'écran */
.textured-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* Section Fullscreen */
.fullscreen-logo {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Canvas WebGL - fullscreen */
.distortion-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  touch-action: none;
}

@media (max-width: 768px) {
  .fullscreen-logo {
    height: 60vh;
  }

  .distortion-canvas {
    cursor: auto;
  }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 1;
}

.scroll-hint span {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6) 0%,
    transparent 100%
  );
  animation: scroll-line-anim 2s ease-in-out infinite;
}

@keyframes scroll-line-anim {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .scroll-hint {
    bottom: 2rem;
  }

  .scroll-hint span {
    font-size: 0.75rem;
    opacity: 0.5;
  }

  .scroll-line {
    height: 40px;
    opacity: 0.4;
  }
}

/* Retire le background du main-content */
.main-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem;
  /* Plus de background ici */
}

/* Encart de présentation */
.about-section {
  border-radius: 16px;
  padding: 2rem;
  margin: 4rem 15vw;
  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.062);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(13.7px);
  -webkit-backdrop-filter: blur(13.7px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.about-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* Section Projets */
.projects-section {
  padding: 10vh 5vw;
  width: 100%;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 8vh;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  color: #ffffff;
  text-decoration: none;
}

.project-card {
  width: 100%;
  margin-bottom: 15vh;
  position: relative;
  cursor: pointer;
}

.project-image-container {
  width: 100%;
  /*height: 60vh;*/
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.3;
  transform: scale(0.95);
  transition: opacity 0.3s ease;
}

.project-img:hover {
  opacity: 0.5;
}

/* Grain animé en overlay */
.project-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence baseFrequency="0.9" numOctaves="4"/></filter><rect width="300" height="300" filter="url(%23noise)" opacity="0.15"/></svg>');
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
}

.project-info {
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(-10px);
}

.project-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-meta {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

/* Section Skills */
.skills-section-up,
.skills-section-down {
  width: 100%;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.skills {
  padding: 5vh 0;
}

.skills-bar-up,
.skills-bar-down {
  display: flex;
  width: max-content;
  gap: 5%;
  padding: 10px 0;
  overflow: visible;
  backdrop-filter: blur(10px);
  position: relative;
}

.skill {
  border-radius: 16px;
  padding: 15px 20px;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  bottom: 3rem;
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(15.9px);
  -webkit-backdrop-filter: blur(15.9px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
  opacity: 0.9;
}

/* CTA Contact fixe */
.contact-cta {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(15.9px);
  -webkit-backdrop-filter: blur(15.9px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  z-index: 999;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.contact-cta:hover {
  opacity: 1;
  transform: translateX(-5px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.contact-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.contact-cta:hover svg {
  transform: translateX(3px);
}

.contact-footer {
  padding: 4vh 5vw;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .contact-cta {
    bottom: 2rem;
    right: 2rem;
    padding: 0.85rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* Animations */
@keyframes bounce {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@keyframes slide-down {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .about-section {
    margin: 4rem 5vw;
    padding: 1.5rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 5vh;
  }

  .project-card {
    margin-bottom: 10vh;
  }

  .project-image-container {
    height: 40vh;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-meta {
    font-size: 0.85rem;
  }
}

@media screen and (max-height: 600px) {
  .distortion-canvas {
    width: 75vw;
    height: auto;
  }
}
