/* GENERAL */

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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1e1e2e 100%);
  color: #f0f0f0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

p {
  color: #b8b8b8;
}

/* TRANSITION */

a,
.btn {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(100, 108, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: #f0f0f0;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
}

a:hover {
  background: rgba(18, 20, 57, 0.1);
  color: #395990;
  transform: translateY(-2px);
}

.logo {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4f668b, #3037c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
/*Added*/
.logo::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(135deg, #4f668b, #3037c0);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.logo:hover::after {
  transform: scaleX(1);
}

/**/


.logo:hover {
  cursor: default;
  transform: scale(1.05);
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg,#4f668b, #3037c0);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgba(20, 20, 30, 0.95);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease-in-out;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.3rem;
  color: #f0f0f0;
  text-decoration: none;
  transition: all 0.3 ease-in-out;
}


.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}


/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  max-width: 62rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  height: 80vh;
  position: relative;
}

.section__pic-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(80vw, 400px);
  aspect-ratio: 1 / 1; /* mantiene forma cuadrada sin importar el tamaño */
  margin: auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 50px rgba(100, 108, 255, 0.4),
    inset 0 0 50px rgba(100, 108, 255, 0.2);
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* recorta la imagen sin deformarla */
  border-radius: 50%;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
  #profile {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: auto;
    margin: 0.5rem 0;
  }

  .section__pic-container {
    width: 60vw;
  }
}

.section__text {
  align-self: center;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-left: 1rem;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
  color: #395990;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.section__text__p2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #b8b8b8;
  background: linear-gradient(135deg,#4f668b, #3037c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title {
  font-size: 3.5rem;
  text-align: center;
  background: linear-gradient(135deg, #ffffff,#4f668b, #3037c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  font-weight: 700;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 1.5rem;
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  
}

.icon:hover {
  background: rgba(100, 108, 255, 0.2);
  box-shadow: 0 10px 25px rgba(100, 108, 255, 0.3);
}
/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn {
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 1.2rem 2.5rem;
  width: auto;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #4e518f, transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-color-1 {
  background: linear-gradient(135deg, #4e518f, #61a0d3);
  color: white;
  box-shadow: 0 5px 20px  #4e518f;
}

.btn-color-2 {
  background: transparent;
  border: 2px solid #4e518f;
  color: #4e518f;
  backdrop-filter: blur(10px);
}

.btn-color-1:hover,
.btn-color-2:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px  #4e518f;
}

.btn-color-2:hover {
  background: linear-gradient(135deg, #4e518f, #61a0d3);
  color: white;
  border-color: transparent;
}



.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(100, 108, 255, 0.3);
  border: 2px solid rgba(100, 108, 255, 0.3);
  transition: all 0.3s ease;
}

.about-pic:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(100, 108, 255, 0.4);
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(42, 42, 62, 0.8));
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
  backdrop-filter: blur(15px);
  transition: all 0.4s ease;
  position: relative;
  
}


.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container-2 {
  display: flex;
  height: 400px;
  width: 400px;
  position: relative;
  justify-content: center;
  align-items: center;
  width: min(80vw, 400px);
  aspect-ratio: 1 / 1; /* mantiene forma cuadrada sin importar el tamaño */
  margin: auto;
  box-shadow:
    0 0 50px rgba(100, 108, 255, 0.4),
    inset 0 0 50px rgba(100, 108, 255, 0.2);
}

.section__pic-container-2 img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* recorta la imagen sin deformarla */
}


/* 🔽 Cuando la pantalla sea igual o menor a 768px */
@media (max-width: 768px) {
  .section__pic-container-2 {
    width: 60vw;
    height: auto; /* ajusta la altura automáticamente */
    margin: 1.5rem auto;
  }

  .section__pic-container-2 img {
    width: 100%;
    height: auto;
  }
}


/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: #395990;;
  font-weight: 600;
  font-size: 2rem;
  margin-bottom: 3rem;
  text-align: center;
  background: #395990;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  align-items: center; /* alinea icono y texto verticalmente */
  justify-content: flex-start; /* mantiene todo alineado a la izquierda */
  gap: 0.75rem; /* espacio uniforme entre icono y texto */
  width: 10rem;
}

article .icon {
  cursor: default;
}


/* PROJECTS SECTION */
#projects {
  position: relative;
}

.technology-icons {
  display: flex;
  gap: 1rem; /* Espacio entre imágenes */
}

/* 🔧 Cada tarjeta del proyecto */
.color-container {
  border-color: rgb(163, 163, 163);
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.9), rgba(42, 42, 62, 0.9));
  border-radius: 2rem;
  padding: 2rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(15px);
  border: 3px solid rgb(163, 163, 163);
  position: relative;

  /* estructura consistente */
  display: flex;
  flex-direction: column;
  align-items: center; /* centramos todo horizontalmente */
  min-height: 420px; /* fuerza misma altura visual */
  flex: 1 1 300px;
}

/* 🔧 Imagen del proyecto */
.project-img {
  width: 100%;
  /*max-height: 200px; /* fija una altura visual parecida */
  height: auto;
  object-fit: contain; /* muestra toda la imagen sin recorte */
  border-radius: 1rem;
  border: 1px solid rgba(100, 108, 255, 0.2);
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

/* 🔧 Título del proyecto */
.project-title {
  margin-top: auto; /* 🔥 empuja el título hacia la misma altura relativa */
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-size: 1.4rem;
  background: #ffffff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  text-align: center;
}

/* 🔧 Botones */
.project-btn {
  color: #ffffff;
  border-color: #ffffff;
  background: transparent;
  transition: all 0.3s ease;
}

.project-btn:hover {
  background: linear-gradient(135deg, #4f668b, #3037c0);
  color: white;
  border-color: transparent;
}

/* 🔧 Contenedor de botones */
.project-btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: auto;
}

/* 🔧 Contenedor general */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start; /* 🔥 alinea todas las tarjetas por arriba */
  gap: 2rem;
}

/* CONTACT */
#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: (250, 250, 250);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}
