/* ESTILOS BASE PORTFOLIO*/

body.portfolio {
  margin-left: 150px;
  margin-right: 150px;
}

div.portfolio {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

div.flexbox {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: space-between;
  margin-top: 60px;
}

div.portfolio img {
  width: 100%;
  margin-bottom: 7px;
  transition: 0.3s ease;
}

div.portfolio img:hover {
  filter: brightness(80%);
  cursor: pointer;
  transform: scale(0.98);
}

/* Texto cabecera */
h1 {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 35px;
  margin-bottom: 150px;
}

h2 {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 17px;
  color: #999;
  margin: 5px 0 20px 0;
}

h3 {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 17px;
  margin: 5px 0 0 0;
}

/* Enlaces */
a {
  text-decoration: none;
  color: black;
}
a:hover {
  color: gray;
  transition: 0.3s ease;
}

/* TEXTO INTRODUCCIÓN */
div.header h1 {
  margin-top: 15px;
  margin-bottom: 155px;
  margin-right: 120px;
}

/* Imagenes */
.img1 img {
  margin-top: 80px;
  width: 300px;
}

.img2 img {
  width: 30px;
  margin-bottom: 50px;
  margin-top: 20px;
}

/* FOOTER */
.especial {
  margin-top: 50px;
}

/* Animaciones */
@keyframes slideInUp {
  0% { transform: translateY(50px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.portfolio-item {
  opacity: 0;
  animation: slideInUp 1.2s ease-out forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.6s; }
.portfolio-item:nth-child(2) { animation-delay: 0.8s; }
.portfolio-item:nth-child(3) { animation-delay: 1s; }
.portfolio-item:nth-child(4) { animation-delay: 1.2s; }
.portfolio-item:nth-child(5) { animation-delay: 1.4s; }
.portfolio-item:nth-child(6) { animation-delay: 1.6s; }


/* RESPONSIVE PORTFOLIO*/

@media (min-width: 1280px) {

  body.portfolio {
    margin-right: 150px;
    margin-left: 150px;
  }

  div.portfolio {
    grid-template-columns: 1fr 1fr;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 180px;
    margin-right: 150px;
  }

  .header h1 {
    margin-bottom: 210px;
  }

  footer {
    text-align: margin-left;
  }
}

/* MODO MOVIL PORTFOLIO*/

@media (max-width: 475px) {


  div.flexbox{
    margin-top: 15px;
  }

  body.portfolio {
    margin: 0;
    padding: 0 14px;
    box-sizing: border-box;
  }

  html, body {
    overflow-x: hidden;
  }

  .header h1 {
    font-size: 26px !important;
    margin: 10px 0 !important;
    text-align: left !important;
  }

  div.portfolio {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  h1 { font-size: 28px; line-height: 1.3; }
  h2 { font-size: 25px; margin-bottom: 15px; }
  h3 { font-size: 24px; margin-bottom: 4px; line-height: 1.4; }

  footer {
    margin-top: 30px;
    text-align: left;
    padding-bottom: 40px;
  }

  .img2 img {
    width: 25px;
    margin-top: 10px;
  }
}



/* ESTILOS BASE CV*/

body.cv {
  margin-left: 150px;
  margin-right: 150px;
  background-color: #f5f5f5;
}

body.cv img {
  width: 200px;
}

body.cv h1 {
  margin: 10px 0;
  line-height: 1em;
}

body.cv h2{
  margin-bottom: 5px;
  margin-top: 0px;
}

body.cv h3{
  margin-top: 0px;
  margin-bottom: 0px;
}

body.cv .contenedor {
  display: flex;
}

body.cv .flexbox-margen {
  margin-top: 20px;
}

/*ADAPTATIVE*/
@media (max-width: 1280px) {
  body.cv {
    margin: 50px;
  }

  body.cv .contenedor {
    flex-direction: column;
    align-items: center;
  }

  body.cv h1 {
    font-size: 28px;
  }
}

/* VERSIÓN MOBIL CV*/
@media (max-width: 475px) {

  body.cv .flexbox-margen {
    margin-top: -30px;
  }

  /* Márgenes y tipografía base */
  body.cv {
    margin: 0;
    padding: 0 16px;
    box-sizing: border-box;
    background-color: #f5f5f5;
  }

  html, body {
    overflow-x: hidden;
  }

  /* Flex principal: de 3 columnas a 1 */
  body.cv .flexbox {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  /* Imagen de perfil */
  body.cv img {
    width: 450px;
    margin-bottom: 10px;
    margin-top: 10px;
    align-content: center;
  }

  /* Texto: tamaños más pequeños y alineación izquierda */
  body.cv h1 {
    font-size: 34px;
    text-align: left;
    margin-top: 10px;
    margin-bottom: 0;
  }

  body.cv h2 {
    font-size: 26px;
    margin-top: 5px;
    margin-bottom: 6px;
    text-align: left;
  }

  body.cv h3 {
    font-size: 24px;
    line-height: 1.4;
    text-align: left;
  }

  /* Footer también en columna y alineado */
  body.cv footer {
    width: 100%;
    margin-top: 40px;
    text-align: left;
  }


  body.cv header,
  body.cv main,
  body.cv footer {
    width: 100%;
  }
}



