/*-------- projects ------- */
.projects-filter {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.filter-btn {
  background: transparent;
  border: 2px solid #ced8d6;
  color: #ced8d6;
  padding: 0.5rem 1.2rem;
  font-size: 14px;
  border-radius: 25px; 
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: Quicksand-regular;
}

.filter-btn:hover {
  background: #ced8d6;
  color: #073028;
  transform: scale(1.05);
}

.filter-btn.active {
  background: #ced8d6;
  color: #073028;
  box-shadow: 0 4px 12px rgba(11, 150, 128, 0.4);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.title-front {
  font-family: Quicksand-regular;
  color: #ced8d6;
  font-size: 16px;
  letter-spacing: 1.5px;
  margin: 0;
}

.project-language {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.project-language i {
  font-size: 22px;
}

.project-language span {
  font-size: 14px;
  font-weight: 500;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
}

.project-card {
  position: relative;
  height: 400px;
  width: 300px;
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
  transition: transform 0.5s ease;
}

.front{
  transform: perspective(600px) rotateY(0deg);
  box-shadow: 0 5px 10px #000;
}

.project-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.back{
  font-family: Quicksand-light;
  transform: perspective(600px) rotateY(180deg);
  background: rgba(9, 60, 50,0.5);
  padding: 15px;
  color: #ced8d6;
  display: flex;
  text-align: center;
  flex-direction: column;
  justify-content: space-between;  
  box-shadow: 0 5px 10px #000;
}

.title-back{
  color: #ced8d6;
  font-family: Quicksand-regular;
  font-size: 30px;
  margin-top: 20px;
  letter-spacing: 1.5px;
}

.project-desc {  
  line-height: 1.5;
  letter-spacing: 1px;
}

.project-card:hover .front{
  transform: perspective(600px) rotateY(180deg);
}

.project-card:hover .back{
  transform: perspective(600px) rotateY(360deg);
}

.project-link a {
  font-family: Quicksand-light;
  text-decoration: none;
  background: #0b9680;
  color: #ced8d6;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background 0.3s;
}

.project-link{
  border-top: solid 1px #ced8d6;
  height: 50px;
  line-height: 50px;
}

.project-link a:hover {
  background: #073028;
}


/*----------------- Lightmode projects------------------*/
body.light-mode .filter-btn {
  border: 2px solid #073028;
  color: #073028;
}

body.light-mode .filter-btn:hover {
  background: #073028;
  color: #ced8d6;
}

body.light-mode .filter-btn.active {
  background: #073028;
  color: #ced8d6;
  box-shadow: 0 4px 12px rgba(7, 48, 40, 0.7);
}


body.light-mode .title-back{
  color: #073028;
}

body.light-mode .project-desc {
  color: #073028;
}

body.light-mode .project-link a {
  background: #073028;
}

body.light-mode .project-link a:hover {
  background: #0b9680;
}

body.light-mode .project-link{
  border-top: solid 1px #073028;
}

body.light-mode .back{
  background: rgba(138, 202, 191,0.5);
}



/*----------------- About & contacts ------------------*/

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.contacts-item {
  flex: 1 1 100%;
  min-width: 250px;
  display: flex;;
  align-items: flex-start;
}

@media (min-width: 600px) {
  .contacts-item  {
    flex: 1 1 45%;
  }
}

.contact-title {
  font-family: Quicksand-regular;
  text-transform: uppercase;
  font-size: clamp(0.9rem, 1.7vw, 1.1rem);
  letter-spacing: 1px;
  color: #ced8d6;
  margin-bottom: 0.5rem;
}


.link a {
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  letter-spacing: 1px;
  margin-left: clamp(1.5rem, 5.5vw, 7rem);
  font-family: Quicksand-light;
  color: #ced8d6;
  text-decoration: none;
  transition: all 0.3s ease;
}


.link a:hover {
  color: #ced8d6;
  border-bottom: 1px solid #ffffff;
}

.separate {
  height: 625px; /* Ajusta según el alto de tu título y separador */
}


.container {
  width: 90%;
  margin: 6rem auto;
  padding: 2rem; 
}

.about, .contacts, .projects{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 3rem;
  padding: 40px 0;
  align-items: flex-start;
}

.about-left, .about-right, .contacts-contain, .projects-contain{
  flex: 1;
  min-width: 300px;
}

.page-title {
  font-family: Candal;
  letter-spacing: 1.5px;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  margin-bottom: 0.5rem;
  color: #ced8d6;
}

.head-separator {
  border: none;
  height: 2px;
  background-color: #ced8d6;
  width: auto;
  margin-bottom: 2rem;
}

.about-text {
  letter-spacing: 1px;
  font-family: Quicksand-light;
  font-size: clamp(0.85rem, 1vw + 0.5rem, 1.2rem);
  line-height: 1.5;
  color: #ced8d6;
}

.cv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b9680 0%, #0fbea3 45%, #073028 100%);
  border: 1px solid rgba(206, 216, 214, 0.32);
  color: #ced8d6;
  text-decoration: none;
  font-family: Quicksand-regular;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(11, 150, 128, 0.42);
  animation: cvPulse 2.8s ease-in-out infinite;
}

.cv-button:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(206, 216, 214, 0.58);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), 0 0 26px rgba(11, 150, 128, 0.42);
  filter: saturate(1.08);
}

.cv-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
  z-index: -1;
}

.cv-button:hover::before {
  transform: translateX(130%);
}

.cv-button::after {
  content: ">";
  font-size: 1.05em;
  line-height: 1;
  transition: transform 0.25s ease;
}

.cv-button:hover::after {
  transform: translateX(4px);
}

@keyframes cvPulse {
  0%, 100% {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(11, 150, 128, 0.34);
  }
  50% {
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24), 0 0 0 10px rgba(11, 150, 128, 0);
  }
}

.university-link {
  display: inline-block;
  margin: 0 0.1rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-family: Quicksand-regular;
  background: rgba(11, 150, 128, 0.18);
  border: 1px solid rgba(206, 216, 214, 0.22);
  box-shadow: inset 0 -0.15rem 0 rgba(11, 150, 128, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.university-link:hover {
  background: rgba(11, 150, 128, 0.3);
  border-color: rgba(206, 216, 214, 0.45);
  transform: translateY(-1px);
  box-shadow: inset 0 -0.2rem 0 rgba(7, 48, 40, 0.28), 0 8px 18px rgba(0, 0, 0, 0.12);
}

.about-left, .contacts-contain, .projects-contain{
  opacity: 0;
  transform: translateX(-100px);
  animation: slideIn 1s ease-out forwards;
  animation-delay: 0.3s;
}

.about-right {
  opacity: 0;
  transform: translateX(100px);
  display: flex;
  animation: slideIn 1s ease-out forwards;
  animation-delay: 0.3s;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-image {
  max-width: 380px; 
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* Sombra más intensa */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}


.about-image:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}


@media (max-width: 800px) {
  .about-right {
    position: static;
    width: 100%;
    margin-top: 2rem;
  }

  .about-image {
    max-width: none;
    width: 100vw; 
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
}


/*----------------- Lightmode-about & contact ------------------*/
body.light-mode .contact-title{
  color: #073028;
}

body.light-mode .link a{
  color: #073028;
}


body.light-mode .page-title {
  color: #073028;
}
body.light-mode .head-separator {
  background-color: #073028;
}

body.light-mode .about-text {
  color: #073028;
}

body.light-mode .cv-button {
  background: linear-gradient(135deg, #073028 0%, #0b9680 55%, #0fbea3 100%);
  color: #ced8d6;
  border-color: rgba(7, 48, 40, 0.18);
}

body.light-mode .cv-button:hover {
  border-color: rgba(7, 48, 40, 0.3);
  box-shadow: 0 18px 34px rgba(7, 48, 40, 0.22), 0 0 26px rgba(11, 150, 128, 0.28);
}

body.light-mode .university-link {
  background: rgba(7, 48, 40, 0.08);
  border-color: rgba(7, 48, 40, 0.18);
  box-shadow: inset 0 -0.15rem 0 rgba(7, 48, 40, 0.16);
}

body.light-mode .university-link:hover {
  background: rgba(7, 48, 40, 0.14);
  border-color: rgba(7, 48, 40, 0.3);
}

body.light-mode .link a:hover {
  color: #073028;
  border-bottom: 1px solid #073028;
}

/*----------------- Index ------------------*/
.initial-id{
  align-items: center;
  opacity: 0;
  transform: translateY(24px);
  animation: indexFadeIn 0.9s ease-out forwards;
  animation-delay: 0.15s;
}
.part1{
  font-family:  Candal;
  font-size: 6rem;
  -webkit-text-stroke: 1px #ced8d6; 
  color: transparent;
}
.part2{
  font-family: Candal;
  font-size: 6rem;
  color:#ced8d6;
}

.initial-description{
    font-family: Quicksand-light;
    font-size: 1rem;
    color: #ced8d6;
    opacity: 0;
    transform: translateY(24px);
    animation: indexFadeIn 0.9s ease-out forwards;
    animation-delay: 0.3s;
}

.button-group {
    display: flex;
    gap: 3rem; 
    justify-content: center;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.button-link{
  font-family: Quicksand-light;
  font-size: 1.25rem;
  color: #ced8d6;
  opacity: 0;
  transform: translateY(24px);
  animation: indexFadeIn 0.9s ease-out forwards;
  animation-delay: 0.45s;
}

.button-group a:hover {
  color: #ced8d6;
  border-bottom: 1px solid #ced8d6;
}

.home, .initial-wrapper{
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(var(--innerVh, 1vh) *100);
    justify-content: center;
    margin: 0 var(--left-right-margin);
}

.home {
    width: 100%;
    height: inherit;
    justify-content: space-around;
}

.initial-text{
    width: auto;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: indexFadeIn 0.9s ease-out forwards;

}

@keyframes indexFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*-------------- Lightmode-index -----------------*/

body.light-mode .menu-icons{
 color: black;
}

body.light-mode .initial-description {
  color: #073028;
}

body.light-mode .part1{
  -webkit-text-stroke: 2px #073028; 
  color: transparent;
}
body.light-mode .part2{
color: #073028;
}

body.light-mode .button-link{
  color: #073028;

}

body.light-mode .button-group a:hover {
  color: #073028;
  border-bottom: 1px solid #073028;
}

/*----------------- Menu ------------------*/
.principal-menu{
  background-color: transparent;
  padding-top: 3%;
  position: fixed;
  width: 100%;
  z-index: 999;    
}

.menu-wrapper{
  background-color: transparent;
  width: min(90%, 1400px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  --icon--darkmode--menu: url('../assets/sun.svg');
  --icon--toggle--menu: url('../assets/menu-open.svg');
  --transform-menu-show: translate(-100%);
}

.menu-icons{
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.menu-wrapper:has(.nav-input:checked){
  --icon--toggle--menu: url('../assets/menu-close.svg');
  --transform-menu-show: translate(0);
}

.menu-list {
  transform: var(--transform-menu-show);
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 2rem;
  text-align: center;
  padding: 1.5rem 5%;
  background-color: #083c32; 
  list-style: none;
  transition: .5s transform;
  z-index: 100;
  overflow: hidden;
}

.menu-list::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../images/fondo_obscuro.png');
  background-size: clamp(400px, 50%, 600px);
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08; 
  z-index: -1;
}


.menu-figure{
  border: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.menu-logo {
  position: absolute;
  height: 4rem;
  width: auto;
  z-index: 101;
  object-fit: contain;
  transition: opacity 0.5s ease-in-out;
}

.menu-darkmode{
  width: 30px;
  height: 30px;
  background-image: var(--icon--darkmode--menu);
  background-size: cover;
  cursor: pointer;
  transition: background-image 0.5s;
  z-index: 101;
  position: relative;
}

.menu-toggle{
  width: 30px;
  height: 30px;
  background-image: var(--icon--toggle--menu);
  background-size: cover;
  cursor: pointer;
  transition: background-image 0.5s;
  z-index: 101;
  position: relative;
}

.nav-color{
  display: none;
  width: 40px;
  height: 40px;
}

.nav-input{
  display: none;
  width: 40px;
  height: 40px;
}

.menu-link{
  font-size: 2rem;
  color: #ced8d6;
  font-family: Candal;
  transition: transform 0.3s ease;
  display: inline-block;
  text-decoration: none;
}
.menu-link:hover {
  transform: scale(2); 
  text-shadow: 0 0 10px #e6eceb, 0 0 20px #e6eceb;  
}
/*----------------- Menu light-mode ------------------*/
.menu-wrapper:has(.nav-color:checked){
  --icon--darkmode--menu: url('../assets/moon.svg');
  --icon--toggle--menu: url('../assets/menu-open_dark.svg');
}

.light-logo { opacity: 0; }
.dark-logo { opacity: 1; }

body.light-mode .dark-logo { opacity: 0; }
body.light-mode .light-logo { opacity: 1; }

body.light-mode .menu-list{
  background-color: #8acabf;
}
body.light-mode .menu-link{
  color: #073028;
}
body.light-mode .menu-wrapper:has(.nav-input:checked){
  --icon--toggle--menu: url('../assets/menu-close_dark.svg');
}

body.light-mode .menu-list {
  background-color: #8acabf; 
}

body.light-mode .menu-list::before {
  background-image: url('../images/fondo_claro.png');
}

body.light-mode .menu-link:hover {
  text-shadow: 0 0 10px #062a23, 0 0 20px #062a23 
}

/*----------------- Preloader ------------------*/
.preloader{
  position: fixed;
  flex-direction: column;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #083c32;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  }
  
.hidden {
      overflow: hidden;
  }

.preloader {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.initial-load h2 {
    color: #fff;
    font-size: 1.5em;
    padding-top: 1rem;
  }
  
  .lds-roller,
  .lds-roller div,
  .lds-roller div:after {
    box-sizing: border-box;
  }
  .lds-roller {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
  }
  .lds-roller div {
    animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: 40px 40px;
  }
  .lds-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 7.2px;
    height: 7.2px;
    border-radius: 50%;
    background: #ffffff;
    margin: -3.6px 0 0 -3.6px;
  }
  .lds-roller div:nth-child(1) {
    animation-delay: -0.036s;
  }
  .lds-roller div:nth-child(1):after {
    top: 62.62742px;
    left: 62.62742px;
  }
  .lds-roller div:nth-child(2) {
    animation-delay: -0.072s;
  }
  .lds-roller div:nth-child(2):after {
    top: 67.71281px;
    left: 56px;
  }
  .lds-roller div:nth-child(3) {
    animation-delay: -0.108s;
  }
  .lds-roller div:nth-child(3):after {
    top: 70.90963px;
    left: 48.28221px;
  }
  .lds-roller div:nth-child(4) {
    animation-delay: -0.144s;
  }
  .lds-roller div:nth-child(4):after {
    top: 72px;
    left: 40px;
  }
  .lds-roller div:nth-child(5) {
    animation-delay: -0.18s;
  }
  .lds-roller div:nth-child(5):after {
    top: 70.90963px;
    left: 31.71779px;
  }
  .lds-roller div:nth-child(6) {
    animation-delay: -0.216s;
  }
  .lds-roller div:nth-child(6):after {
    top: 67.71281px;
    left: 24px;
  }
  .lds-roller div:nth-child(7) {
    animation-delay: -0.252s;
  }
  .lds-roller div:nth-child(7):after {
    top: 62.62742px;
    left: 17.37258px;
  }
  .lds-roller div:nth-child(8) {
    animation-delay: -0.288s;
  }
  .lds-roller div:nth-child(8):after {
    top: 56px;
    left: 12.28719px;
  }
  @keyframes lds-roller {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

/*----------------- Background ------------------*/
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
}
/*----------------- General ------------------*/
div {
    display: block;
    unicode-bidi: isolate;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body{
    letter-spacing: 1px;
    display: flex;
    background-color: #083c32;
    background-position: center;
    background-size: cover;
}

body.light-mode{
  background-color:#8acabf
}

a {
    text-decoration: none;
}

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