/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  /* 
      Change favorite color
      Default: hsl(162, 100%, 40%)
      Orange: hsl(14, 100%, 65%) - Blue: hsl(210, 100%, 70%)
      Pink: hsl(356, 100%, 75%) - Purple: hsl(250, 100%, 75%)

      For more colors visit: https://colors.dopely.top/color-pedia
      -> Choose any color 
      -> click on tab (Color Conversion)
      -> Copy the color mode (HSL)
  */

  --hue: 287;
  --first-color: hsl(var(--hue), 69%, 38%);
  --first-color-alt: hsl(var(--hue), 56%, 35%);
  --title-color: hsl(228, 8%, 95%);
  --text-color: hsl(0, 0%, 100%);
  --body-color: hsl(228, 15%, 20%);
  --container-color: hsla(286, 88%, 17%, 0.726);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --biggest-font-size: 2rem;
  --bigger-font-size: 1.25rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1152px) {
  :root {
    --biggest-font-size: 4rem;
    --bigger-font-size: 2rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

input,
textarea,
button,
body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background: linear-gradient(to bottom, #350535, #9c0ed4de, #79518a, #59175f, #5f0c57);
  color: var(--text-color);
}

input,
textarea,
button {
  outline: none;
  border: none;
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem 2rem;
}

.section__title, 
.section__subtitle {
  text-align: center;
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

.section__title {
  font-size: var(--h1-font-size);
  margin-bottom: 1.5rem;
}

.section__subtitle {
  font-size: var(--small-font-size);
  margin-bottom: .25rem;
}

.section__subtitle span {
  color: var(--first-color);
}

.main {
  overflow: hidden; /* For animation ScrollReveal */
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  background-color: rgba(109, 10, 104, 0.411);
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-weight: var(--font-medium);
}

.nav__logo span {
  color: var(--first-color);
}

.nav__toggle, 
.nav__close {
  display: flex;
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    background-color: hsla(0, 0%, 10%, .3);
    width: 75%;
    height: 100%;
    padding: 4.5rem 0 0 3rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: right .4s;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  row-gap: 3rem;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color .4s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}

/* Show menu */
.show-menu {
  right: 0;
}

/* Add blur to header */
.blur-header {
  background-color: transparent;
}

.blur-header::after {
  content: "";
  position: absolute;
  width: 1000%;
  height: 100%;
  background-color: hsla(0, 0%, 10%, .3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); /* For safari */
  top: 0;
  left: 0;
  z-index: -1;
}

/* Active link */
.active-link {
  color: var(--first-color);
}

/*=============== HOME ===============*/
.home {
  background-color: var(--container-color);
}

.home__container {
  padding-top: 2rem;
  row-gap: 2.5rem;
}

.home__content {
  display: grid;
  row-gap: 2rem;
}

.home__data {
  text-align: center;
}

.home__subtitle, 
.home__education {
  font-size: var(--bigger-font-size);
}
.home__subtitle span, 
.home__title {
  color: var(--first-color);
}

.home__title {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-semi-bold);
  line-height: 1.2;
}

.home__description {
  margin-block: 1rem 1.5rem;
  color: var(--title-color);
}

.home__social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
}

.home__social-link img {
  width: 2rem; /* Ajusta el tamaño de los iconos según sea necesario */
  height: auto; /* Mantén la relación de aspecto */
}

.home__social-link:hover {
  transform: translateY(-.25rem);
}
/*image*/
.home__image {
  position: relative;
  display: flex; /* Agrega display flex */
  align-items: center; /* Centra verticalmente los elementos hijos */
  justify-content: center; /* Centra horizontalmente los elementos hijos */
}

.home__img {
  position: relative;
  top: -6rem;
  z-index: 1;   
  width: 25rem; /* Ajusta el ancho de la imagen según sea necesario */
}



/*=============== BUTTONS ===============*/
/*-----------------CV--------------*/
.button1 {
  position: absolute; /* Posicionamiento absoluto para mover el botón */
  left: 9rem; /* Ajusta esta propiedad para moverlo a la izquierda */
  top: 54%; /* Mueve el botón hacia abajo */
  transform: translateY(20px); /* Ajusta esta propiedad para moverlo más abajo */
  display: inline-block;
  background-color: rgba(83, 7, 71, 0.918);
  padding: 1rem 6rem;
  border-radius: 0.5rem;
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color 0.4s;
  border: none; /* Eliminar borde para personalizar con box-shadow */
  z-index: 1; /* Asegura que el botón esté delante de la imagen */
}

.button1::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  background: linear-gradient(to right, #a10baf, transparent, #aa139d);
  background-size: 200% 100%;
  animation: electric 5s infinite linear alternate-reverse; /* Ejecutar la animación por defecto */
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.button1:hover::before {
  animation-play-state: paused; /* Pausar la animación cuando se pasa el ratón sobre el botón */
}

@keyframes electric {
  0% {
    background-position: -200% 0; /* Iniciar desde el final de la animación */
  }
  100% {
    background-position: 200% 0; /* Terminar en el inicio de la animación */
  }
}

.button1:hover {
  color: var(--second-color);
}

/* Media Queries para dispositivos móviles y tabletas */
@media (max-width: 1024px) {
  .button1 {
    left: 7rem; /* Ajusta la posición para pantallas más pequeñas */
    top: 70%; /* Mueve el botón más abajo */
    padding: 1rem 5rem; /* Ajusta el padding */
  }
}
@media (max-width: 840px) {
  .button1 {
    left: 4.4rem; /* Ajusta la posición para pantallas más pequeñas */
    top: 55%; /* Mueve el botón más abajo */
    padding: 1rem 5rem; /* Ajusta el padding */
  }
}

@media (max-width: 768px) {
  .button1 {
    left: 4.8rem; /* Ajusta la posición para pantallas más pequeñas */
    top: 53%; /* Mueve el botón más abajo */
    padding: 1rem 4rem; /* Ajusta el padding */
  }
}

@media (max-width: 480px) {
  .button1 {
    left: 5rem; /* Ajusta la posición para pantallas más pequeñas */
    top: 47%; /* Mueve el botón más abajo */
    padding: 1rem 3rem; /* Ajusta el padding */
  }
}
/*--------another button------*/
.button {
  position: relative; /* Añadido para posicionamiento */
  overflow: hidden; /* Añadido para ocultar el efecto degradado */
  display: inline-block;
  background-color:rgba(83, 7, 71, 0.521);
  padding: 1rem 1.75rem;
  border-radius: .5rem;
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: color 0.4s;
  border: none; /* Eliminar borde para personalizar con box-shadow */
}

.button::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 100%;
  background: linear-gradient(to right, #a10baf, transparent, #aa139d);
  background-size: 200% 100%;
  animation: electric 5s infinite linear alternate-reverse; /* Ejecutar la animación por defecto */
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}

.button:hover::before {
  animation-play-state: paused; /* Pausar la animación cuando se pasa el ratón sobre el botón */
}

@keyframes electric {
  0% {
    background-position: -200% 0; /* Iniciar desde el final de la animación */
  }
  100% {
    background-position: 200% 0; /* Terminar en el inicio de la animación */
  }
}

.button:hover {
  color: var(--second-color);
}
/*=============== ABOUT ===============*/
.about__container {
  row-gap: 2.5rem;
}

.about__data {
  text-align: center;
}

.about__description {
  margin-bottom: 2rem;
}

.about__image {
  justify-self: center;
}



/*=============== SKILLS ===============*/
.skills {
  background-color: var(--container-color);
}


.experience {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  height: 30vh;
  margin-bottom: 8rem;
}

.achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.circle {
  width: 6rem; /* Ajusta el tamaño de los círculos según sea necesario */
  height: 6rem; /* Ajusta el tamaño de los círculos según sea necesario */
  background-color: rgba(255, 255, 255, 0.308);
  border-radius: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem; /* Ajusta el tamaño del texto dentro de los círculos */
  font-weight: bold;
  margin-bottom: 2rem; /* Ajusta el espacio entre los círculos */
  margin-right: 1rem; /* Ajusta el espacio a la derecha de los círculos */
}

.circle::before {
  border-radius: 100%;
  content: '';
  background-image: linear-gradient(to bottom, #eb0cebdc 0%, #187cee 100%);
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  position: absolute;
  z-index: -1;
  box-shadow: var(--boxShadow);
}

.achievement span:nth-child(2) {
  color: var(--pink);
}

@media screen and (max-width: 768px) {
  .experience {
    flex-direction: column; /* Cambia a una columna en pantallas más pequeñas */
    height: auto; /* Ajusta la altura automáticamente */
  }

  .achievement {
    margin-bottom: 2rem; /* Espacio entre los logros en pantallas más pequeñas */
  }
}



/*=============== SERVICES ===============*/
.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding-block: 1rem;
}

.services__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  padding: 2rem 1.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  transition: all 0.4s ease;
}

.services__card:hover {
  transform: translateY(-10px) scale(1.03);
  border: 2px solid var(--first-color);
}

.services__icon {
  font-size: 4rem;
  color: var(--first-color);
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
}

.services__card:hover .services__icon {
  transform: rotate(10deg) scale(1.2);
}

.services__title {
  font-size: var(--h2-font-size);
  margin-bottom: 1rem;
}

.services__description {
  font-size: var(--normal-font-size);
  flex-grow: 1; 
  margin-bottom: 1.5rem;
}

.services__btn {
  padding: 0.6rem 1.2rem;
  background-color: var(--first-color);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: auto; 
}

.services__btn:hover {
  background-color: var(--first-color-alt);
  transform: translateY(-2px);
}
/*=============== PROJECTS ===============*/
.projects {
  background-color: var(--container-color);
  padding-block: 2rem; 
}

.projects__container {
  display: grid;
  row-gap: 1rem; 
  justify-content: center;
  padding-block: 1rem;
}

.projects__card {
  width: 300px;           
  height: 200px;          
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #fff; 
}

.projects__card h3, 
.projects__card h2 {
  text-align: center;
}

.projects__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    
  z-index: 0;
}

.projects__modal {
  position: absolute;
  left: 0;
  bottom: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
            hsla(279, 94%, 14%, 0.568) 0%, 
            hsla(var(--hue), 70%, 40%, .9) 120%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); /* Para Safari */
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: bottom .4s;
}

.projects__subtitle, 
.projects__button {
  color: var(--title-color);
  font-size: var(--small-font-size);
}

.projects__subtitle {
  display: block;
  margin-bottom: .25rem;
}

.projects__title {
  font-size: var(--h2-font-size);
  margin-bottom: .75rem;
  font-weight: var(--font-semi-bold);
}

.projects__button {
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-weight: var(--font-medium);
}

.projects__button i {
  font-size: 1.25rem;
}

.projects__card:hover .projects__modal {
  bottom: 0;
}


.projects__footer-title {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--title-color);
  position: relative;
}

.projects__footer-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--first-color);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.projects__card,
.projects__modal,
.projects__img {
  transition: all 0.4s ease-in-out;
}


/*=============== CONTACT ===============*/
.contact__container {
  padding-top: 1rem;
}

.contact__form, 
.contact__group {
  display: grid;
  row-gap: 1rem;
}

.contact__form {
  position: relative;
}

.contact__input {
  padding: 1rem 1.25rem;
  border-radius: .5rem;
  background-color: var(--container-color);
  color: var(--title-color);
}

.contact__input::placeholder {
  color: var(--text-color);
}

.contact__form textarea {
  height: 11rem;
  resize: none;
  margin-bottom: 2rem;
}

.contact__button {
  justify-self: center;
  cursor: pointer;
}

/*=============== CONTACT - ESTILOS MEJORADOS ===============*/
/* Mensajes emergentes */
.contact__message {
  position: relative; 
  width: 100%;
  bottom: auto;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: var(--small-font-size);
  text-align: center;
  transition: all 0.3s ease;
}

/* Error */
.contact__message.error {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
}

/* Éxito */
.contact__message.success {
  background-color: rgba(0, 255, 0, 0.1);
  color: #00b300;
  border: 1px solid #00b300;
}

/* reCAPTCHA de mierda  */
.g-recaptcha {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  transform: scale(0.9); 
  transform-origin: center;
}

.contact__message.loading {
  color: var(--text-color); 
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-style: italic;
}


.contact__button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}



/*=============== FOOTER ===============*/
.footer {
  background-color: var(--container-color);
  padding-block: 3.5rem 2rem;
  mix-blend-mode: screen;
}

.footer__container {
  row-gap: 2rem;
  text-align: center;
}

.footer__title {
  font-size: var(--h1-font-size);
  font-weight: var(--font-semi-bold);
  margin-bottom: .25rem;
}

.footer__title span {
  color: var(--first-color);
}

.footer__education {
  font-size: var(--normal-font-size);
}

.footer__social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
}



.footer__social-link:hover {
  transform: translateY(-.25rem);
}

.footer__copy {
  font-size: var(--smaller-font-size);
  margin-top: 2rem;
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
  width: .6rem;
  border-radius: .5rem;
  background-color: hsl(228, 12%, 25%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(228, 8%, 35%);
  border-radius: .5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(228, 8%, 45%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -50%;
  background-color: var(--body-color);
  padding: 6px;
  display: inline-flex;
  border-radius: .25rem;
  color: var(--first-color);
  font-size: 1.25rem;
  box-shadow: 0 4px 12px hsla(228, 15%, 8%, .4);
  z-index: var(--z-tooltip);
  transition: bottom .4s, transform .4s;
}

.scrollup:hover {
  transform: translateY(-.25rem);
}

/* Show Scroll Up */
.show-scroll {
  bottom: 3rem;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }

  .skills__content {
    grid-template-columns: max-content;
    row-gap: 1rem;
  }

  .services__card {
    padding-block: 1.5rem;
  }
}


@media screen and (min-width: 576px) {
  .home__container,
  .about__container,
  .skills__container,
  .services__container,
  .projects__container,
  .contact__container {
    grid-template-columns: 360px;
    justify-content: center;
  }
}

@media screen and (min-width: 768px) {
  .nav__menu {
    width: 55%;
  }

  .home__container,
  .about__container,
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .home__data,
  .about__data,
  .skills__data,
  :is(.about__data, .skills__data) :is(.section__subtitle, .section__title) {
    text-align: initial;
  }

  .home__social {
    justify-content: initial;
  }


  .about__data {
    order: 1;
  }

  .services__container,
  .projects__container {
    grid-template-columns: repeat(2, 352px);
  }
}


@media screen and (min-width: 1023px) {
  .section {
    padding-block: 7rem 2rem;
  }
  .section__subtitle {
    font-size: var(--normal-font-size);
  }

  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__close, 
  .nav__toggle {
    display: none;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 3rem;
  }
  .nav__menu {
    width: initial;
  }

  .blur-header::after {
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px); /* For safari */
  }
}

@media screen and (min-width: 1152px) {
  .container {
    margin-inline: auto;
  }

  .home__container {
    grid-template-columns: 455px 550px;
    column-gap: 7rem;
    padding-block: 2rem 3rem;
  }
  
  .home__content {
    row-gap: 4.5rem;
  }
  .home__description {
    margin-block: 1.5rem 2.5rem;
  }
  .home__social {
    column-gap: 1.5rem;
  }

  .about__container {
    grid-template-columns: 550px 460px;
    column-gap: 4.5rem;
    padding-bottom: 1rem;
  }
 
  .about__description {
    margin-bottom: 3rem;
  }

  .skills__container {
    grid-template-columns: 340px 425px;
    column-gap: 10rem;
    padding-bottom: 4rem;
  }
  .skills__description {
    margin-bottom: 3rem;
  }
  .skills__content {
    column-gap: 8rem;
  }
  .skills__group {
    row-gap: 1.5rem;
  }
  .skills__item {
    font-size: var(--h3-font-size);
  }

  .services__container {
    grid-template-columns: repeat(3, 352px);
    padding-block: 2.5rem 4rem;
  }
  .services__card {
    padding: 3.5rem 2rem;
  }

  .projects__container {
    grid-template-columns: repeat(3, 350px);
    row-gap: 3rem;
    padding-block: 2.5rem 4rem;
  }
  .projects__button {
    font-size: var(--normal-font-size);
  }

  .contact__container {
    grid-template-columns: 680px;
    padding-block: 2.5rem 2rem;
  }
  .contact__form {
    row-gap: 1.5rem;
  }
  .contact__group {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
  }
  .contact__input {
    padding: 1.5rem;
  }
  .contact__form textarea {
    height: 20rem;
  }

  .footer {
    padding-block: 4.5rem 4rem;
  }
  .footer__container {
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    text-align: initial;
  }
  .footer__title {
    font-size: var(--bigger-font-size);
  }
  .footer__social {
    column-gap: 1.5rem;
  }
  .footer__copy {
    margin: 0;
    justify-self: flex-end;
  }

  .scrollup {
    right: 3rem;
  }

  
  #particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }
  
}