*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: Karla;
  src: url("Karla-VariableFont_wght.ttf");
}

@font-face {
  font-family: Karla;
  font-weight: bold;
  src: url("Karla-Bold.ttf");
}

body {
  /* display: flex; */
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: white;
  font-family: Karla;
  overflow-x: hidden;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.5;
}

.ElenaBiasi {
  position: absolute;
  z-index: 2;
  width: 50%;
  /* position: fixed; */
  font-family: Karla;
  padding: 40px;
  padding-top: 60vh;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  line-height: clamp(1.4rem, 2.8vw, 2rem);
  color: blue;
  transition:
    filter 0.2s ease,
    opacity 0.2s ease;
  pointer-events: none;

  /* color: rgba(255, 255, 255, 0.8); */
}

.ElenaBiasi::after {
  content: "↓";
  display: block;
  margin-top: 10px;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: white;

  opacity: 0.6;
  animation: scrollHint 1.8s ease-in-out infinite;
}

#nextProjectBtn {
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

#nextProjectBtn:hover {
  transform: scale(1.05);
  opacity: 0.85;
}
/* CV container */
.cv {
  position: fixed;
  top: 50%;
  right: 20px; /* distance from right edge */
  transform: translateY(-50%); /* only vertical centering */
  width: 50%;
  max-width: 100%; /* missing unit fixed */
  max-height: 100vh;
  overflow-y: auto;
  padding: 40px;
  background-color: white;
  /* border-radius: 12px; */
  font-family: Karla, sans-serif;
  color: blue;
  display: none;
  z-index: 1000;
  opacity: 90%;
}

/* CV Title */
.titreCV {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: bold;
  color: blue;
  margin-bottom: 30px;
}

/* Individual CV item */
.cv-item {
  margin-bottom: 25px;
  border-left: 3px solid blue;
  padding-left: 20px;
  position: relative;
}

/* .cv-item::before {
  content: "";
  width: 10px;
  height: 10px;
  background: blue;
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 5px;
} */

.cv-role {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0;
  color: blue;
}

.cv-date {
  font-size: 0.9rem;
  color: blue;
  display: block;
  margin-bottom: 5px;
}

.cv-company {
  color: blue;

  font-size: 1rem;
  font-style: italic;
  display: block;
  margin-bottom: 8px;
}

.cv-description {
  font-size: 1rem;
  line-height: 1.5rem;
  margin: 0;
}

/* Make it scrollable on mobile if needed */
@media (max-width: 768px) {
  .cv {
    width: 95%;
    padding: 20px 15px;
  }
}

@keyframes scrollHint {
  0% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(6px);
    opacity: 0.7;
  }
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
}

@media (max-width: 768px) {
  .ElenaBiasi {
    position: relative; /* 👈 back to normal flow */
    width: 100%;
    padding: 20px;
    top: auto;
    transform: none;
    font-size: 1.1rem;
    line-height: 1.5rem;
  }
}

.hautdepage {
  position: relative;
  width: 100%;
  height: 100vh; /* pleine hauteur écran */
  overflow: hidden;
  padding-bottom: 10px;
  z-index: 1;
}

/* vidéo en fond */
.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: brightness(90%); /* darkens the video by 50% */
}

/* contenu au-dessus de la vidéo */
.hautdepage > div {
  position: relative;
  z-index: 1;
  color: white; /* souvent nécessaire */
}

@keyframes spin-scale {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.2);
  }
}

#letterA:hover {
  animation: spin-scale 0.5s linear;
  color: blue;
}

.text-overlay {
  position: fixed;
}
#page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  color: black;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: auto; /* Enables scrolling */
}

#pageContent {
  padding: 10px;
  /* display: flex; */
  /* max-width: 900px; */
  margin: auto;
  /* text-align: center; */
  padding-top: 5%;
}

#boxTitle {
  /* padding-top: 50px; */
  padding-left: 15%;
  padding-bottom: 25px;
  width: 80%;
}

#keywords {
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.keyword-bubble {
  padding: 6px 12px;
  border-radius: 999px;
  background: blue;
  font-size: clamp(1rem, 2vw, 1rem);
  white-space: nowrap;
  color: white;
}

/* #projectVideo {
  width: 100%;
  padding: 20px;
} */

#projectVideo {
  padding-bottom: 50px;
  width: 100%;
  height: 90vh;
  max-height: 500px; /* limite sur grands écrans */
  min-height: 300px; /* lisible sur mobile */

  object-fit: cover; /* 👈 super important */
  display: block;
}

/* #closePage {
  background-color: blue;
  color: white;
  padding-left: 10px;
  padding-bottom: 5px;
  padding-top: 5px;
  padding-right: 10px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 40%;
  border: none;
  position: absolute;
  top: 20px;
  left: 20px;
}
#closePage:hover {
  opacity: 50%;
} */

#closePage {
  background-color: blue;
  color: white;

  width: 45px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: clamp(1rem, 1.8vw, 1.5rem);

  border: none;
  border-radius: 50%; /* 👈 true circle */

  cursor: pointer;

  position: absolute;
  top: 20px;
  left: 20px;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

#closePage:hover {
  transform: scale(1.08);
  opacity: 0.85;
}

#projectTitle {
  width: 100%;
  /* font-family: Karla; */
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  color: blue;
  font-weight: bold;
}
#projectDescription {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: blue;
}

.grid-container {
  display: grid;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  justify-content: center;
  padding-top: 10%;
  padding: 20px;
}

.contact {
  text-align: right;
  padding: 20px;
  font-family: Karla;
}

.contact:hover {
  cursor: pointer;
  color: blue;
}
#contactOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1;
}

#contactOverlay p {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: black;
  text-align: center;
  margin: 0;
}

#contactOverlay .back-arrow {
  position: fixed;
  top: env(safe-area-inset-top, 20px);
  left: env(safe-area-inset-left, 20px);
  font-size: clamp(1.4rem, 5vw, 2rem);
  cursor: pointer;
  color: blue;
  user-select: none;
  z-index: 1000;
}

#cv .back-arrow {
  position: fixed;
  top: env(safe-area-inset-top, 20px);
  left: 20px;
  font-size: clamp(1.4rem, 5vw, 2rem);
  cursor: pointer;
  z-index: 1000;
}

@media (max-width: 768px) {
  #contactOverlay .back-arrow {
    position: fixed;
  }
}
#contactOverlay .back-arrow :hover {
  opacity: 50%;
}

/* Desktop – up to 3 columns max */
@media (min-width: 900px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1400px;
  }
}

/* Tablet – 2 columns */
@media (min-width: 600px) and (max-width: 899px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile – 1 column */
@media (max-width: 599px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

.grid-item {
  text-align: center;
  width: 100%;
  aspect-ratio: 16 / 9; /* 👈 choose ratio you like */
  overflow: hidden;
  position: relative;
  /* background: white; */
  /* padding: 5px; */
  /* border-radius: 1px; */
  /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); */
}
.grid-item video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  display: block;
  transition: transform 0.3s ease;
}

.grid-item:hover video {
  transform: scale(1.03); /* Slight zoom effect on hover */
  cursor: pointer;
}

.grid-item p {
  font-size: clamp(14px, 1.2vw, 14px);
  margin-left: 10px;
  transform: translate(0, -200%);
  position: absolute; /* Make sure it's positioned correctly within the grid item */
  visibility: hidden; /* Initially hide */
  opacity: 0; /* Make text invisible */
  transition:
    visibility 0s,
    opacity 0.3s ease; /* Smooth transition */
  backdrop-filter: blur(10px);
  /* border-radius: 20px; */
  padding: 10px;
  background-color: rgb(4, 0, 255);
}

footer {
  padding-left: 20px;
  color: blue;
}

.grid-item:hover p {
  visibility: visible; /* Show on hover */
  opacity: 1; /* Fade in */
  /* transform: translate(-50%, -50%); */
  color: white;
}

.grid-item:hover video {
  /* filter: blur(5px); */
  cursor: pointer;
}
#imageGrid {
  display: grid;
  gap: 20px;
  width: 100%;
  padding: 10px;
  margin: 0 auto;
  justify-content: center;
  grid-template-columns: repeat(2, 1fr); /* ✅ Always 2 columns */
}

.grid-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* keeps nice proportions */
  object-fit: cover;
  /* border-radius: 10px; */
  transition: transform 0.3s ease;
  display: block;
}

.grid-image:hover {
  cursor: pointer;
}

#fullscreenOverlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.9);
  width: 100vw;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#fullscreenImage {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 20px black;
  overflow-y: hidden; /* Hide vertical scrollbar */
  overflow-x: hidden; /* Hide horizontal scrollbar */
}

#closeFullscreenBtn {
  position: absolute;
  top: 5%;
  right: 5%;
  background-color: white;
  color: black;
  border: none;
  font-size: clamp(14px, 1.2vw, 20px);
  padding: 5px 15px;
  cursor: pointer;
}

#closeFullscreenBtn:hover {
  background-color: blue;
  color: white;
}

.dropdown {
  display: none; /* caché par défaut */
  position: absolute;
  top: 100%; /* en dessous du texte */
  left: 0;
  background: white;
  border: 1px solid #ccc;
  /* border-radius: 8px; */
  padding: 8px 0;
  min-width: 150px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000000000;
}

.dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown li {
  padding: 8px 12px;
}

.dropdown li a {
  text-decoration: none;
  color: black;
  display: block;
}

.dropdown li:hover {
  background: #f0f0f0;
}

/* Afficher le menu au hover */

#filterContainer {
  text-align: center;
  margin: 30px 0;
}

.filterButton {
  background: white;
  border: 1px solid blue;
  color: blue;
  font-family: Karla;
  border-radius: 20px;
  padding: 8px 20px;
  margin-top: 10px;
  margin-right: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filterButton:hover {
  background: blue;
  color: white;
}

.filterButton.active {
  background: blue;
  color: white;
}
