.about_me {
  width: 100%;
  height: 100vh;
  background-color: var(--beige);

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 3rem 1rem auto;
  justify-content: end;
  align-items: center;
  padding: 3rem;
  gap: 1rem;
}

.titulo_about {
  width: 100%;
  grid-column: 1/3;
  grid-row: 1/2;
  display: flex;
  justify-content: center;
  font-size: var(--title);
}

.linea_morada {
  width: 6rem;
  height: 0.4rem;
  grid-column: 1/3;
  grid-row: 2/3;
  background-color: var(--violet);

  justify-self: center;
  border-radius: 1rem;
  margin-top: -3rem;
}

.carrusel {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1rem;
}

.carrusel_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fade 1s ease-in-out;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Animaciones carrusel */
.fade-in {
  animation: fadeIn 0.6s forwards;
}

.fade-out {
  animation: fadeOut 0.6s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Botón CV */
.cv {
  all: unset;
  width: 12rem;
  height: 3rem;
  border: 2px solid var(--violet);
  color: var(--violet);
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  border-radius: 3rem;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cv::before {
  content: "";
  position: absolute;
  width: 0%;
  height: 100%;
  background: var(--violet);
  left: 0;
  top: 0;
  z-index: -1;
  transition: width 0.4s ease;
}

.cv:hover {
  color: var(--violet-light);
}

.cv:hover::before {
  width: 100%;
}

.informacion_me {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stats {
  width: 60%;
  height: 10rem;

  border-radius: 0.5rem;
  align-self: center;
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
  .about_me {
    grid-template-columns: 1fr; /* Una columna */
    grid-template-rows: auto auto auto auto;
    padding: 2rem;
    height: auto;
  }

  .titulo_about {
    font-size: 2rem; /* Ajusta tamaño de título */
    margin-bottom: 1rem;
  }

  .linea_morada {
    width: 5rem;
    margin-top: -2rem;
  }

  .carrusel {
    height: 20rem;
    margin-bottom: 1rem;
  }

  .cv {
    width: 10rem;
    height: 2.8rem;
    font-size: 0.9rem;
    margin-top: 5rem;
  }

  .stats {
    width: 80%;
    height: 8rem;
  }
}

/* Móviles (menos de 768px) */
@media (max-width: 767px) {
  .about_me {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
    padding: 1rem;
    gap: 0.5rem;
    height: auto;
  }

  .titulo_about {
    font-size: 1.5rem;
  }

  .linea_morada {
    width: 4rem;
    margin-top: -1rem;
  }

  .carrusel {
    height: 15rem;
  }

  .cv {
    width: 9rem;
    height: 2.5rem;
    font-size: 0.85rem;
    margin-top: 8rem;
  }

  .informacion_me {
    gap: 0.5rem;
  }

  .stats {
    width: 100%;
    height: 6rem;
  }
}
