@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-v26-latin-regular.woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Architects";
  src: url("../fonts/ArchitectsDaughter-Regular.ttf");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Agrandir";
  src: url("../fonts/agrandir-grand.ttf");
  font-weight: 200;
  font-style: normal;
  font-display: block;
}

/* Variables de color */
:root {
  --primary-color: #333333; /* Negro */
  /* --secondary-color: #ffd5a4; Peach claro */
  --secondary-color: #f0ac75; /* Peach claro */
  --accent-color: #c8906a; /* Marrón */
  --background-color: #ffffff; /* Blanco */
  --text-color: #3b3b3b; /* Negro */
  --light-text-color: #f8eeec; /* Beige mas claro */
  --highlight-color: #ffbe98; /* Peach */
  --card-background: #f8f1ec; /* Beige claro */
  --border-color: #dadada; /* Gris claro */
  --hover-color: #a4ae9c; /* Verde grisáceo */
}

*,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  background-color: var(--card-background);
}

html::-webkit-scrollbar {
  width: 12px;
  background-color: var(--background-color);
}

html::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: var(--primary-color);
}

/* Estilo base del cuerpo */
body {
  width: 100%;
  font-family: "Montserrat", sans-serif;
  color: var(--primary-color);
  background-color: var(--background-color);
  scrollbar-color: var(--highlight-color);
}

/* Estilo del encabezado */
header {
  display: flex;
  position: fixed;
  top: 0;
  z-index: 1000;
  max-width: 100%;
  width: 100%;
  height: 4rem;
  padding-block: 1rem;
  box-sizing: border-box;
  background-color: var(--primary-color);
  color: white;
  align-items: center;
  justify-content: center;
  animation-duration: 2s;
  animation-name: slidein;
}

@keyframes slidein {
  from {
    margin-top: -4rem;
    width: 100%;
  }

  to {
    margin-top: 0;
    width: 100%;
  }
}

/* Estilo básico de los enlaces */
a {
  font-weight: 400;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

a:hover {
  font-weight: bold;
}
a.custom-link {
    text-decoration: underline; /* subrayado */
    font-weight: normal;
    transition: color 0.3s ease;
}
a.custom-link:hover {
  font-weight: bold;
}

/* Estilo de los enlaces dentro de la navegación */
nav a {
  position: relative;
  color: var(--light-text-color);
}

nav a:hover,
nav a.active {
  font-weight: bold;
  color: var(--accent-color);
}

/* Efecto de subrayado personalizado en hover y enlace activo */
nav a.active::after,
nav a:hover::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-color);
  transition: background-color 0.3s ease;
}

/* Estructura de navegación */
nav ul {
  display: flex;
  max-width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 2rem;
  justify-content: center;
}

nav ul li a {
  display: flex;
  flex-grow: 1;
  justify-content: center;
  align-items: center; /* Alinea vertical y horizontalmente */
}

.header-shadow {
  /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 0, 0, 0.3) inset; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease-in-out;
}

/* Sección de parallax */
.parallax {
  position: relative;
  height: 230px;
  background-image: url("../img/image/3.webp"); /* Ruta de la imagen */
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.parallaxDos {
  position: relative;
  height: 230px;
  background-image: url("../img//image/5a.webp"); /* Ruta de la imagen */
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Parallax para iOs Desactivado, imagen fija */

@supports (-webkit-touch-callout: none) {
  .parallax {
    background-attachment: scroll; /* Fallback sin parallax */
    background-position: center center; /* Imagen fija centrada */
    background-repeat: no-repeat; /* Evitar que se repita */
    background-size: cover; /* Asegurar que ocupe todo el contenedor */
  }
  .parallaxDos {
    background-attachment: scroll; /* Fallback sin parallax */
    background-position: center center; /* Imagen fija centrada */
    background-repeat: no-repeat; /* Evitar que se repita */
    background-size: cover; /* Asegurar que ocupe todo el contenedor */
  }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5); /* Oscurece la imagen de fondo */
}

/* Estilo del contenido principal */
main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* padding-top: 100px; */
  justify-content: center;
  align-items: center;
  text-align: center;
}

.intro {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* background-image:  */
}

.intro-text {
  max-width: 600px;
}

/* Sección de descripción */
.intro-text--p {
  font-size: 1.1rem;
  /* padding: 0rem 2rem; */
  margin-top: 1rem;
  line-height: 1.8rem;
  color: var(--text-color);
  text-wrap: pretty;
  font-weight: normal;
}

.intro-text--h1 {
  font-family: "Agrandir", "Montserrat";
  font-size: 2.1rem;
  letter-spacing: 0.1rem;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.intro-text--h2 {
  font-family: "Architects", "Montserrat";
  font-size: 1.8rem;
  color: #de9962;
  margin-top: -0.6rem;
  /* padding-left: 1rem;
  padding-right: 1rem; */
  text-wrap: balance;
  font-weight: normal;
}

.intro-image img {
  width: 380px;
  height: 380px;
  object-fit: cover;
}

/* Estilo de disponibilidad para trabajar */
/* .availability {
  font-size: 1.4rem;
  margin-top: 2rem;
  color: rgb(165, 199, 151);
  animation: blink 1s infinite;
} */

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Estilo de textos */
.titulos {
  display: block;
  padding: 1.5rem 0;
  font-family: "Agrandir";
  font-size: 1.4em;
  font-weight: bold;
  letter-spacing: 0.15rem;
  unicode-bidi: isolate;
}

/* Estilo de texto sobre mí */
.text-sep {
  line-height: 1.8rem;
  text-wrap: pretty;
}

.text-peq {
  line-height: 1.6rem;
  font-size: 0.95rem;
  text-wrap: pretty;
  text-align: justify;
}

/* Contenedor de enlaces a redes sociales */
.social-links {
  display: flex;
  margin: 2.5rem 0;
  padding-inline: 1rem; /* Mejor manejo del relleno horizontal */
  justify-content: space-around;
  gap: 1rem;
}

.social-links a {
  display: flex;
  font-weight: bold;
  color: var(--primary-color);

  text-decoration: none;
  align-items: center;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.social-links img {
  width: 25px;
  height: 25px;
  margin-right: 0.5rem;
}

/* Efecto hover en los enlaces */
.social-links a:hover {
  font-weight: 500; /* Reduce el peso en lugar de quitarlo completamente */
  color: var(--accent-color); /* Añade un color de acento en hover */
}

/* Sección sobre mí */
#about {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 6rem 2rem;
  padding-bottom: 6.5rem;
  background-color: var(--card-background);
  place-items: center;
  min-height: 890px;
}

.about-container {
  max-width: 900px;
  text-align: left;
}

/* Sección de formación */
#formacion {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 6rem 2rem;
  background-color: var(--background-color);
  place-items: center;
}

/* Sección de habilidades */
#skills {
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem;
  place-items: center;
  background-color: var(--card-background);
  border-top: 15px double var(--background-color);
  /* max-width: 60%; 
  margin: 0 auto; Para centrar el contenedor y ancho al 60%*/
}

.skills {
  display: flex;
  flex-wrap: wrap; /* Permite que los elementos de habilidades se envuelvan */
  justify-content: center;
  gap: 1rem;
}

.skills span {
  display: inline-block;
  padding: 0.5rem;
  color: white;
  background-color: var(--hover-color);
  border-radius: 4px;
  text-align: center;
 
}

details {
  width: 100%;
  position: relative;
  list-style: none;
}

details[open] {
  background: #ffffff; /* color de fondo cuando está desplegado */
}

details summary {
  padding-left: 1rem;
  font-weight: 600;
  color: #de9962;
  text-decoration: underline; /* subrayado por defecto */
  list-style: none; /* ocultamos la flecha */
  cursor: pointer; /* cambia el cursor del puntero */
}

details[open] summary {
  text-decoration: none; /* sin subrayado cuando está abierto */
}

details summary::before {
  position: absolute;
  top: -5px;
  left: 0px;
  content: "➧";
  font-size: 1.3rem;
}

details[open] summary::before {
  -webkit-animation: rotate-emoji 0.6s ease-in-out both;
  animation: rotate-emoji 0.6s ease-in-out both;
}

@-webkit-keyframes rotate-emoji {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }

  100% {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
  }
}
@keyframes rotate-emoji {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }

  100% {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
  }
}

.certifications {
  padding-top: 3rem;
}

.certification {
  display: flex;
  padding-bottom: 2rem;
  align-items: flex-start;
}

.certification img {
  width: 70px;
  height: 70px;
  margin-right: 1rem;
}

.certification-details {
  flex-grow: 1;
}

.certification h3 {
  padding: 0 0 0.5rem 0;
}

.certification p {
  padding: 0.2rem 0;
}

.linkedin-button {
  display: flex;
  padding: 1rem;
  /* margin-top: 3rem; */
  /* margin-bottom: 2rem; */
  justify-content: center;
  color: var(--primary-color);
  gap: 1rem;
}

.button {
  display: flex;
  position: relative;
  padding: 0.5rem 1rem;
  overflow: hidden;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  background-color: var(--background-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  align-items: center;
  gap: 1rem;
  transition: background-color 0.3s ease, font-weight 0.3s ease,
    transform 0.3s ease;
}

.button img {
  width: 25px;
  height: 25px;
}

.button span {
  letter-spacing: 1px;
}

.button:hover {
  backdrop-filter: blur(5px);
  background-color: var(--border-color);
}

.button:hover span {
  font-weight: bolder;
}

.button:hover img {
  animation: blink 0.5s ease 0.1s;
}
.btn {
  margin-top: 2rem;
  background-color: var(--card-background);
}

/* Reutilización de keyframes */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Contenedor de habilidades */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  padding-top: 20px;
  justify-content: center;
  gap: 20px;
}

.skill {
  display: flex;
  position: relative;
  width: 7rem;
  height: 7rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.skill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.skill span {
  position: absolute;
  padding: 5px;
  font-size: 1rem;
  font-weight: bold;
  color: white;
  text-align: center;
  background: var(--primary-color);
  backdrop-filter: blur(5px);
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

h2 {
  font-size: 1rem;
  font-weight: bold;
  color: white;
  text-align: center;
}

.skill:hover img {
  opacity: 0;
}

.skill:hover span {
  opacity: 1;
}

/* Sección de proyectos */
#projects {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 6rem 2rem;
  text-align: center;
  background-color: var(--background-color);
  align-items: center;
  justify-content: center;
}

.projects-container {
  width: 100%;
  max-width: 900px; /* Ancho máximo para dispositivos grandes */
  margin: 0 auto; /* Centra el contenido en pantallas grandes */
  padding: 1 1rem; /* Espacio a los lados para dispositivos móviles */
  box-sizing: border-box;
  text-align: left;
}

.projects-gallery {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: 3rem;
  gap: 5rem;
}

.project {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  padding: 1rem;
  padding-top: 2rem;
  box-sizing: border-box;
  background-color: var(--card-background);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  align-items: center;
  gap: 1rem;
}

.project-image {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--card-background);
  border-radius: 8px;
}

.project-image .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-image img:hover {
  transform: scale(1.05);
}

.project-description {
  width: 100%;
  flex: 1;
  padding: 0.5rem;
  line-height: 1.5rem;
}

.project-description p {
  padding: 0.5rem;
  padding-bottom: 1rem;
  text-wrap: pretty;
  text-align: justify;
}

.project-description h3 {
  padding: 0.5rem;
}

.project-buttons {
  width: 100%;
  text-align: center;
  display: flex; /* Permite que los botones estén en la misma línea */
  justify-content: center; /* Centra los botones en la sección */
}

.slider-controls {
  display: flex;
  position: absolute;
  top: 50%;
  width: 100%;
  justify-content: space-between;
  transform: translateY(-50%);
}

.slider-controls button {
  padding: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.3s ease;
}

.slider-controls button:hover {
  background: rgba(255, 255, 255, 1);
}

/* Estilo del pie de página */
footer {
  min-height: 15vh;
  padding: 3rem 4rem 2rem 2rem;
  text-align: center;
  background-color: var(--accent-color);
  place-content: center;
}

.footer-links {
  display: flex;
  margin: 2rem 0rem;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  display: flex;
  color: var(--primary-color);
  text-decoration: none;
  align-items: center;
  transition: color 0.3s ease;
}

.footer-links img {
  width: 25px;
  height: 25px;
  margin-right: 0.5rem;
}

.footer-links a:hover {
  font-weight: bolder;
  color: var(--primary-color);
}

/* Slider */
.slider {
  position: relative;
}

.slide {
  display: none;
}

.slide.active {
  display: block;
}

/* Modal */
.modal {
  display: flex;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  display: flex;
  position: relative;
  max-width: 90%;
  max-height: 90%;
  padding: 0.5rem;
  overflow: hidden;
  background-color: var(--card-background);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 4rem;
  color: var(--primary-color);
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.3);
  padding: 0.5rem;
  filter: drop-shadow(6px 8px 15px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease, color 0.2s ease;
}

.modal-slider {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.modal-slide {
  display: none;
  width: 100%;
  height: 100%;
}

.modal-slide.active {
  display: block;
}

.modal-prev,
.modal-next {
  position: absolute;
  top: 50%;
  padding: 10px;
  border: none;
  color: black;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.3s ease;
  transform: translateY(-50%);
}

.modal-prev:hover,
.modal-next:hover {
  background: rgba(255, 255, 255, 1);
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

/* Estilos responsivos */
@media (width <= 1024px) {
  .parallax {
    height: 150px;
  }
  .parallaxDos {
    height: 150px;
  }

  .intro-text h1 {
    font-size: 2rem;
  }

  .intro-text h2 {
    font-size: 1.7rem;
  }
}

@media (width <= 900px) {
  .intro {
    flex-direction: column-reverse;
  }

  .intro-image img {
    width: 300px;
    height: 300px;
  }

  #about {
    padding-bottom: 4rem;
  }

  .project {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .project-description {
    padding-top: 2rem;
  }

  .project-image {
    width: 100%;
    height: auto;
  }

  .skill {
    width: 5em;
    height: 5rem;
  }
}

@media (width <= 600px) {
  main {
    min-height: 100vh;
    height: auto;
    padding-top: 0.5rem;
  }

  nav ul {
    flex-wrap: wrap;
    max-width: 100%;
    font-size: 0.8rem;
    gap: 0.8rem;
  }
  

  .intro-text h1 {
    font-size: 1.3rem;
  }

  .intro-text h2 {
    /* padding-bottom: 3rem; */
    font-size: 1.2rem;
  }
  .intro-text--p {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.8rem;
  }

  #descripcion {
    margin-top: -3rem;
    line-height: 1.7rem;
  }
  .social-links {
    margin-top: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  #about {
    padding-bottom: 4rem;
  }

  .text-just {
    position: relative;
    left: -5rem;
    width: calc(100% + 5rem);
    margin: 0;
    text-wrap: pretty;
    text-align: justify;
  }

  .projects-gallery {
    padding-top: 3rem;
    gap: 3rem;
  }
  .project-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
@media (width <= 430px) {

  .intro-image img {
    width: 210px;
    height: 210px;
  }
  .intro-text--p {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.3rem;
    padding: 0rem 1rem;
  }
  .intro-text h1 {
    font-size: 1rem;
  }

  .intro-text h2 {
    /* padding-bottom: 3rem; */
    font-size: 0.9rem;
  }
  .intro-text--p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    line-height: 1.5rem;
  }
}
