body {
  background-color: #0F172A;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Bitcount Grid Single Ink", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  
}
*,*::before, *::after{
  box-sizing: border-box;
}
.header {
  position: fixed;
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: center;
  top: 0;
  left: 0;
  font-weight: bold;
  width: 100%;
  height: 75px;
  padding: 1px 10px;
  z-index: 1000;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(50px);
  z-index: -1;
}


.menu-icons {
  font-size: 1.5rem;
  color: #fff;
  position: absolute;
  cursor: pointer;
  display: none;
  right: 5%;
}

.header .navbar .links {
  list-style: none;
}

#check {
  position: absolute;
  cursor: pointer;
  right: 5%;
  display: none;
}

.header .navbar li {
  display: inline-flex;
  justify-content: space-between;
  padding: 0 20px;
}

/* BREAKPOINTS */
@media(max-width: 992px) {
  .header {
    padding: 0.5rem;
  }
}

@media(max-width: 768px) {
  .header {
    padding: 0.5rem;

    .menu-icons {
      display: inline-flex;
    }

    #check:checked~.menu-icons #menu-icon {
      display: none;
    }


    .menu-icons #close-menu {
      display: none;
    }

    #check:checked~.menu-icons #close-menu {
      display: block;
    }

    .navbar {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      height: 0;
      background-color: rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(50px);
      box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
       transition: .3s ease; 
       overflow: hidden;
    }

    #check:checked~.navbar {
      height: 27.7rem;
     
    }
    .navbar a {
      display: flex;
      flex-direction: column;
      font-size: 1.1rem;
      margin: 1.5rem;
      text-align: center;
    }

    .navbar li {
      display: inline;
      padding: 0;
      font-size: 1.1rem;
      margin: 1.5rem;
      text-align: center;
    }
  }

}

main {
  margin-top: 75px;
}

.header .navbar .links a {
  font-weight: 700;
  color: rgb(234, 235, 238);
  text-decoration: none;
  gap: 20px;
  transition: color 0.3s ease;
}

.header .navbar .links a:hover {
  color: rgb(119, 166, 255);
}

.about-me {
  display: flexbox;
  justify-content: center;
  flex-direction: column;

}

.about-me .title {
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background-color: rgb(119, 166, 255);
  color: white;
}

h1 {
  font-size: 60px;
  padding: 0 0px;
  margin: 0;
}

h2 {
  font-size: 50px;
  padding: 0 0px;
  margin-top: 10px;
}

.about-me {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 10%;
  gap: 2rem;
}

/* Title section */
.about-me .title {
  text-align: center;
  background-color: rgba(113, 117, 128, 0.2);
  color: rgba(117, 144, 231);
  padding: 1rem;
  border-radius: 8px;
  width: 50vw;
  /* 50% del ancho del viewport */
  height: 25vh;
  box-shadow: 1px 1px 6px rgb(117, 144, 231);

}

/* Cursor parpadeante */
@keyframes parpadeo {
  50% {
    border-color: transparent;
  }
}

.about-me .title {
  animation: parpadeo 0.7s step-end infinite;
}

/* “¿Quién soy?” heading */
.about-me h3 {
  text-align: center;
  font-size: 30px;
  margin: 0;
}

/* Description section: image + text side by side */
.about-me .description {
  display: flex;
  justify-content: center;
  /* centers horizontally */
  align-items: center;
  /* centers vertically */
  text-align: center;
  gap: 2rem;
  /* space between image and text */
  flex-wrap: wrap;
  /* stack nicely on smaller screens */
  max-width: 1000px;
}

/* Image styling */
.about-me .description #imagen-about {
  flex: 1;
  max-width: 350px;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Text styling */
.about-me .description h4 {
  flex: 1;
  font-size: 22px;
  font-weight: 400;
  color: rgb(187, 190, 199);
  line-height: 1.5;
  margin: 0;
}

.proyectos h2 {
  text-align: center;
  color: #C4FC04;
}

.proyectos {
  display: flex;
  flex-direction: column;
  
}

.card-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.card-list .card-item {
  color: #fff;
  width: 300px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin: 10px;
  box-shadow: 1px 1px 6px white;
  justify-content: center;

}

.card-list .card-item h3 {
  color: #9c9c9c;
}

.card-list .card-item footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

/* Lista de cards (desktop base) */
.card-list {
  display: flex;
  overflow-x:auto;
  overflow-y: hidden;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  /* espacios consistentes */
}

.card-list .card-item {
  color: #fff;
  width: 300px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 1px 1px 6px white;
}

.card-list .card-item h3 {
  color: #9c9c9c;
}

.card-list .card-item footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.card-list .card-item li {
  display: inline-block;
  padding: 5px;
  list-style-type: none;
  font-size: 40px;
}

.card-item img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  display: block;
}

/* Desktop: grid normal */
@media (min-width: 769px) {
  .card-list {
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* Tablet y móvil: carrusel horizontal con snap */
@media (max-width: 768px) {
  .card-list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0 1rem 2rem;
    /* margen interior y espacio para el pulgar */
    scroll-padding: 1rem;
    overscroll-behavior-x: contain;
    /* evita “arrastrar” la página */
  }

  .card-list .card-item {
    flex: 0 0 auto;
    min-width: 80%;
    /* ancho responsivo de cada card */
    max-width: 420px;
    /* evita cards gigantes en tablets */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    /* se detiene limpiamente en cada card */
  }

  /* Ocultar scrollbar (opcional) */
  .card-list::-webkit-scrollbar {
    display: none;
  }

  .card-list {
    scrollbar-width: auto;
    /* Firefox */
  }
}

/* About: asegúrate de que description es flex antes de cambiar dirección */
.about-me .description {
  display: flex;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-me .description {
    flex-direction: column;
    align-items: flex-start;
  }
}

.about-me .description h4 {
  text-align: center;
}

@media (max-width: 600px) {
  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 25px;
  }

  .header {
    padding: 5px 6%;
  }
}