.home
/* ================= RESET ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:"Poppins",sans-serif;
}

body{
  background:#ffffff;
  color:#333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================= HEADER ================= */
header {
  position: relative;
  top: 0;
  width: 100%;
  height: 70px;
  background: #eaeceb; /* Rosa suave */
  z-index: 9999;
  transition: top 0.3s ease-in-out; /* Para animar el movimiento hacia arriba */
}

.nav{
  max-width:1200px;
  width:90%;
  height:100%;
  margin:auto;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
}

/* Definir la animación de entrada desde arriba */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-40px); /* Empuja el logo desde arriba */
  }
  100% {
    opacity: 1;
    transform: translateY(0); /* Logo en su posición final */
  }
}

.logo{
  color:#555;
  font-weight:60;
  font-size: 15px;
  animation: slideDown 0.55s ease-out forwards; /* Animación con duración de 0.8 segundos */

}

nav ul{
  display:flex;
  justify-content:center;
  gap:36px;
  list-style:none;
}

nav li{
  color:#555;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
  position:relative;
}

nav li.active{
  font-weight:700;
}

nav li::after{
  content:"";
  position:absolute;
  bottom:-6px;
  left:0;
  width:0;
  height:1px;
  background:#000;
  transition:.25s;
}

nav li:hover::after {
  width: 100%; /* Efecto de subrayado al pasar el cursor */
}

.lang {
  display: flex;
  gap: 6px;
}

.lang button {
  background: transparent;
  border: 1px solid #d0d0d0;
  color: #777;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}


/* Idioma activo */
.lang button.active {
  background: #c7c9c8;
  color: #fff;
  border-color: #c7c9c8;
}
/* ================= LAYOUT ================= */
main{
  padding-top:70px;
  flex-grow: 1;
}


.container{
  width:90%;
  max-width:960px;
  margin:auto;
}

.spaced{
  padding:90px 0;
}

/* ================= TYPO ================= */
h1{
  font-size:29px;
  font-weight:500;
  margin-bottom:28px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInSlideUp 0.8s ease-out forwards;
}

h2{
  font-size:16px;
  margin-bottom:10px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInSlideUp 0.8s ease-out forwards;
}

p, li{
  font-size:15px;
  line-height:1.6;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInSlideUp 0.8s ease-out forwards;
}

/* ================= HERO ================= */


.hero{
  min-height:75vh;
  display:flex;
  align-items:center;
}

.hero-box{
  background:rgba(0,0,0,.88);
  color:#fff;
  padding:40px;
  max-width:900px;
  margin-left: 240px;  /* Ajusta para mover el cuadro hacia la derecha */
  opacity:0;
  transform:translateY(40px);
  animation: fadeInSlideUp 0.8s ease-out forwards;
  border-radius: 6px;  /* Añadir este valor para redondear las esquinas */

}

.hero-cta{
  margin-top:24px;
  display:flex;
  gap:16px;
}

.btn{
  padding:12px 26px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  text-decoration:none;
  cursor:pointer;
  border-radius:4px;
}

.primary{
  background:#fff;
  color:#555;
}

.secondary{
  border:1px solid #fff;
  color:#555;
}

/* ================= Animación de Fade In + Slide Up ================= */
@keyframes fadeInSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= CV ================= */

/* Caja de la sección de "Formación y experiencia" */
#cv-profile-section {
  margin-top: 30px;  /* Separación superior de la caja */
  margin-bottom: 30px;  /* Separación inferior de la caja */
  padding: 20px;  /* Espacio interno de la caja */
  background-color: #f8f8f8; /* Fondo opcional para la caja */
  border-radius: 6px;  /* Bordes redondeados */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra opcional */
}

/* Estilo para el título de la sección "Formación y experiencia" */
#cv-profile-title {
  margin-top: 0;  /* Eliminar margen superior */
  margin-bottom: 15px; /* Separación entre el título y el texto */
  line-height: 1.6; /* Ajuste de interlineado */
}

/* Estilo para el texto de "Formación y experiencia" */
#cv-profile-text {
  margin-top: 0; /* Eliminar margen superior */
  margin-bottom: 20px; /* Espacio entre el texto y la siguiente sección */
  line-height: 1.6; /* Ajuste de interlineado */
}

/* Caja de la sección de "Habilidades" */
#cv-skills-section {
  margin-top: 30px;
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f8f8;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilo para el título de la sección "Habilidades" */
#cv-skills-title {
  margin-top: 0;
  margin-bottom: 15px; /* Separación entre el título y el texto */
  line-height: 1.6;
}

/* Estilo para la lista de habilidades */
#cv-skills {
  margin-top: 10px;
  margin-bottom: 20px;
  padding-left: 20px;  /* Espacio a la izquierda de la lista */
}

/* Estilo para los elementos de la lista de habilidades */
.list li {
  margin-bottom: 6px;
}

/* Caja de la sección de "Idiomas" */
#cv-languages-section {
  margin-top: 30px;
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f8f8;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilo para el título de la sección "Idiomas" */
#cv-languages-title {
  margin-top: 0;
  margin-bottom: 15px;
  line-height: 1.6;
}

/* Estilo para la lista de idiomas */
#cv-education {
  margin-top: 10px;
  margin-bottom: 20px;
  padding-left: 20px;  /* Espacio a la izquierda de la lista */
}

/* Estilo para los elementos de la lista de idiomas */
#cv-education li {
  margin-bottom: 6px;
}

/* Estilo para el botón de descarga */
.download {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 26px;
  background: #000;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
}
/* ================= PORTFOLIO ================= */
.grid-3{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:32px;
}

.case{
  border-top:1px solid #ddd;
  padding-top:16px;
}

.case span{
  font-size:12px;
  color:#666;
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: #555;
  background-color: #eaeceb;
  margin-top: 0;          /* 👈 ELIMINADO */
}

/* ================= RESPONSIVE ================= */
@media(max-width:900px){
  .cv{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
}

/* ================= Ajuste de imagen en "Sobre mí" ================= */
.about-content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.about-image {
  width: auto;
  max-width: 280px; /* Aumentado el tamaño máximo de la imagen */
  height: auto;
  margin-left: auto; /* Empuja la imagen hacia la derecha */
  margin-right: 20px; /* Agrega algo de espacio a la derecha */
  margin-bottom: 70px; /* Espacio adicional abajo */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Sombra suave alrededor de la imagen */
  animation: slideInFromRight 0.6s ease-out forwards;
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(40%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ================= Estilo de texto en "Sobre mí" ================= */
#about-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 50px;
  max-width: 550px;
  color: #555;
  text-align: justify;
}


/* ================= CV VERTICAL ================= */

.cv-block {
  display: flex;
  align-items: center;          /* centra verticalmente */
  gap: 56px;                    /* MÁS separación imagen-texto */
  margin-top: 64px;             /* MÁS espacio entre bloques */
}

.cv-block-image {
  flex: 0 0 200px;              /* imagen mucho más grande */
  display: flex;
  justify-content: center;
  align-items: center;
}

.cv-block-image img {
  width: 100%;
  max-width: 200px;
  height: auto;
}

.cv-block-text {
  flex: 1;
  max-width: 700px;             /* evita textos demasiado largos */
}

.cv-block-text h2 {
  margin-bottom: 14px;
  font-weight: 700;
}

.cv-block-text p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;             /* más aire vertical */
}

/* Espacio grande entre secciones */
.cv-section-separator {
  height: 120px;                /* separación clara entre Formación / Experiencia */
}

/* ================= RESPONSIVE ================= */

@media (max-width: 700px) {
  .cv-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .cv-block-image {
    flex: none;
  }

  .cv-block-text {
    max-width: 100%;
  }
}

.cv-main-title {
  font-size: 30px;
  margin-bottom: 74px;
  font-weight: 300;
}

/* Títulos de sección */
.cv-section-title {
  font-size: 22px;
  font-weight: 200; 
  margin-bottom: 30px;
  margin-top: 0;
}

.cv-block-image img {
  opacity: 0;
  transform: translateX(-40px);
  animation: fadeInFromLeft 0.8s ease-out forwards;
}

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


/* ================= BOTÓN DESCARGAR CV ================= */

.cv-download-wrapper {
  margin-top: 115px;        /* MÁS abajo del bloque */
}

.cv-download-btn {
  display: inline-block;
  background-color: #000;  /* fondo negro */
  color: #fff;             /* texto blanco */
  padding: 12px 30px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 8px;      /* esquinas redondeadas */
  transition: background-color 0.3s ease;
}

.cv-download-btn:hover {
  background-color: #333;
}

/* Responsive */
@media (max-width: 700px) {
  .cv-download-wrapper {
    margin-left: 0;
  }
}


#about-title,
#portfolio-title,
.contact-title,
.cv-main-title {
  font-weight: 500;
}

/* ================= PORTFOLIO ================= */

#portfolio-title {
  font-weight: 300;
  margin-bottom: 40px;
}

.portfolio-intro {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 80px;
  color: #555;
}

/* GRID */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

/* CAJA */
.portfolio-item {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.portfolio-link:hover .portfolio-item {
  transform: scale(1.05);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

.portfolio-link {
  display: block;
  transition: transform 0.35s ease;
}

.portfolio-link:hover {
  transform: scale(1.05);
}

/* Sombra sigue en el item */
.portfolio-link:hover .portfolio-item {
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

/* IMAGEN */
.portfolio-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

/* CONTENIDO (AQUÍ VA LO QUE PREGUNTABAS 👇) */
.portfolio-content {
  padding: 20px 24px 28px;
  padding-left: 16px;
  padding-bottom: 8px;
}

/* TEXTO */
.portfolio-item h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.portfolio-item span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
}

.portfolio-item p {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

.portfolio-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* === Animación base portfolio === */
@keyframes portfolioFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portfolio-item {
  opacity: 0;
  animation: portfolioFadeUp 0.8s ease forwards;
}

/* Delay progresivo */
.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.25s; }
.portfolio-item:nth-child(3) { animation-delay: 0.4s; }
.portfolio-item:nth-child(4) { animation-delay: 0.55s; }
.portfolio-item:nth-child(5) { animation-delay: 0.7s; }
.portfolio-item:nth-child(6) { animation-delay: 0.85s; }
.portfolio-item:nth-child(7) { animation-delay: 1s; }

/* ================= ANIMACIÓN CV HORIZONTAL ================= */

@keyframes cvSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cv-block {
  opacity: 0;
  animation: cvSlideIn 0.8s ease forwards;
}

/* Delay progresivo */
.cv-block:nth-of-type(1) { animation-delay: 0.1s; }
.cv-block:nth-of-type(2) { animation-delay: 0.3s; }
.cv-block:nth-of-type(3) { animation-delay: 0.5s; }
.cv-block:nth-of-type(4) { animation-delay: 0.7s; }

/* ================= AJUSTE GLOBAL DE ANIMACIONES ================= */

/* Textos y títulos */
h1,
h2,
p,
li {
  animation-duration: 0.5s !important;
}

/* Hero */
.hero-box {
  animation-duration: 0.5s !important;
}

/* Sobre mí */
#about-title,
#about-text, {
  animation-duration: 0.5s !important;
}

.about-image {
  animation-duration: 0.6s;
}

/* Portfolio */
.portfolio-item {
  animation-duration: 0.45s !important;
}

/* CV */
.cv-main-title,
.cv-block,
.cv-block-image img {
  animation-duration: 0.5s !important;
}

/* ================= HOME FONDO ARTÍSTICO ================= */

.home {
  position: relative;
  height: calc(100vh - 70px); /* resta el header */
  overflow: hidden;
  background: #ffffff; /* 👈 fondo blanco real */
}

/* Overlay opcional */


/* Contenedor del fondo */
.home-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px;
  z-index: 1;
  align-items: center;
  pointer-events: none;
}

/* Imágenes de fondo */
.home-bg img {
  opacity: 0.7; /* Cambia de 0 a 0.5 para que las imágenes sean menos transparentes */
  width: 95%;
  height: 80%;
  object-fit: cover;

  opacity: 0; /* empiezan invisibles */
  border-radius: 0;

  animation-fill-mode: forwards;
}


/* Hero por encima */
.hero {
  position: relative;
  z-index: 3;
}




#home {
  padding: 0 !important;
  margin: 0 !important;
}

/* ================= RESET TOTAL SOLO PARA INICIO ================= */



/* Quitar padding superior heredado del main */
#home.active .hero {
  min-height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

/* El contenedor no añade margen vertical en inicio */
#home.active .container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Evitar espacios por textos */
#home.active h1,
#home.active p {
  margin-top: 0;
  margin-bottom: 0;
}

#home.active {
  height: calc(100vh - 70px);
  overflow: hidden;
}

body:has(#home.active) {
  overflow: hidden;
}

#home.active .hero-box {
  margin-left: 250px; /* 👈 ajusta este valor a tu gusto */
}

.home-bg img:nth-child(1) {
  transform: translateY(-30px);
}

.home-bg img:nth-child(2) {
  transform: translateY(10px);
}

.home-bg img:nth-child(3) {
  transform: translateY(-10px);
}

.home-bg img:nth-child(4) {
  transform: translateY(25px);
}

@keyframes floatSoft {
  0%   { transform: translateY(var(--offset)); }
  50%  { transform: translateY(calc(var(--offset) - 12px)); }
  100% { transform: translateY(var(--offset)); }
}

.home-bg img:nth-child(1) {
  --offset: -30px;
  animation-delay: 0s;
}

.home-bg img:nth-child(2) {
  --offset: 10px;
  animation-delay: 1.5s;
}

.home-bg img:nth-child(3) {
  --offset: -10px;
  animation-delay: 3s;
}

.home-bg img:nth-child(4) {
  --offset: 25px;
  animation-delay: 4.5s;
}

body:has(#home.active) footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

/* Entrada desde arriba */
@keyframes enterFromTop {
  0% {
    opacity: 0;
    transform: translateY(-80px);
  }
  100% {
    opacity: 0.5;
    transform: translateY(var(--offset));
  }
}

/* Entrada desde abajo */
@keyframes enterFromBottom {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  100% {
    opacity: 0.5;
    transform: translateY(var(--offset));
  }
}

/* Flotación suave */
@keyframes floatSoft {
  0%   { transform: translateY(var(--offset)); }
  50%  { transform: translateY(calc(var(--offset) - 12px)); }
  100% { transform: translateY(var(--offset)); }
}

/* FOTO 1 */
.home-bg img:nth-child(1) {
  --offset: -30px;

  animation:
    enterFromTop 1.2s ease-out forwards,
    floatSoft 7s ease-in-out infinite;

  animation-delay: 0.6s, 1.8s;
}

/* FOTO 2 */
.home-bg img:nth-child(2) {
  --offset: 15px;

  animation:
    enterFromBottom 1.2s ease-out forwards,
    floatSoft 7s ease-in-out infinite;

  animation-delay: 0.75s, 1.95s;
}

/* FOTO 3 */
.home-bg img:nth-child(3) {
  --offset: -10px;

  animation:
    enterFromTop 1.2s ease-out forwards,
    floatSoft 7s ease-in-out infinite;

  animation-delay: 0.9s, 2.1s;
}

/* FOTO 4 */
.home-bg img:nth-child(4) {
  --offset: 25px;

  animation:
    enterFromBottom 1.2s ease-out forwards,
    floatSoft 7s ease-in-out infinite;

  animation-delay: 1.05s, 2.25s;
}

header,
header * {
  pointer-events: auto !important;
}

header {
  position: relative;
  z-index: 10000 !important;
}

/* Bloqueamos clics SOLO en el fondo */
.home-bg,
.home-bg * {
  pointer-events: none;
}

/* Permitimos clics en el hero */
.hero,
.hero * {
  pointer-events: auto;
}

/* Reactivamos solo la caja negra */
.hero-box,
.hero-box * {
  pointer-events: auto;
}
