@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Libre+Franklin:ital,wght@0,100..900;1,100..900&family=Passion+One:wght@400;700;900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Special+Elite&display=swap');

/* GENERAL */

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

body { font-family: 'Inter', sans-serif; cursor: crosshair; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; background-color: var(--bg-color); color: var(--text-color); transition: background-color 0.3s ease, color 0.3s ease;  }

h2 { font-size: 64px; font-weight: 600; margin-bottom: 10px; }
h3 { font-size: 10px; line-height: 16px; letter-spacing: 4px; font-weight: 900; margin: 0px 0 10px 0; text-transform: uppercase; }
h4 { font-size: 32px; font-style: normal; font-weight: 200; line-height: normal; margin: -10px 0 10px 0;}
h5 { font-size: 32px; font-style: normal; font-weight: 600; line-height: 42px; max-width: 500px; }
h6 { font-weight: 500; line-height: 16px; letter-spacing: 2.4px; color: var(--accent-color); text-transform: uppercase; }

p { font-family: "Roboto", sans-serif; font-weight: 400; font-size: 16px; line-height: 1.8; max-width: 450px; opacity: 0.9; margin-bottom: 30px;}
li { font-family: "Roboto", sans-serif; font-weight: 400; font-size: 16px; line-height: 1.4; max-width: 450px; opacity: 0.9; margin-bottom: 8px;  }
ul { font-family: "Roboto", sans-serif; font-weight: 400; font-size: 16px; line-height: 1.4; max-width: 450px; opacity: 0.9; list-style: none; margin-bottom: 30px; }

a { color:  var(--bg-color); text-decoration: none; transition: opacity 0.3s ease;}
a:hover { color:  var(--accent-color); }

h6 a {color: var(--accent-color); }
h6 a:hover {font-weight: 900; }

/* Estilo para cuando el usuario navega con el tabulador */
a:focus-visible, button:focus-visible { outline: 2px solid #F9C644; outline-offset: 4px; background-color: rgba(249, 198, 68, 0.1); border-radius: 2px; }

a, button, .menu-toggle { cursor: pointer !important;}


/* 1. Definir variables en el estado normal (Oscuro por defecto) */
:root {
  --bg-color: #1e1e1e;
  --text-color: #e7e7e7;
  --accent-color: #F9C644;
  --header-bg: rgba(0, 0, 0, 0.8);
}

/* 2. Definir variables para el modo claro */
[data-theme="light"] {
  --bg-color: #f2f2f2;
  --text-color: #1e1e1e;
  --accent-color: #041b9e;
  --header-bg: rgba(244, 244, 244, 0.8);
}

/* 3. Aplicar variables a los elementos existentes */
body {  background: var(--bg-color); color: var(--text-color); transition: background 0.3s ease, color 0.3s ease; }

.header { background-color: var(--header-bg); }
a { color: var(--text-color); }
h6 a, .project-title-group h6 a { color: var(--accent-color); }

/* Estilo del nuevo variantes */
.theme-btn { background: none; border: 1px solid var(--text-color); color: var(--text-color); font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 900; letter-spacing: 2px; padding: 4px 8px; margin-right: 60px; cursor: pointer; transition: all 0.3s ease; border-radius: 2px; align-self: center; }

.theme-btn:hover { background: var(--text-color); color: var(--bg-color); }


/* Colores por defecto (Oscuro) */
:root {
  --bg-color: #1e1e1e;
  --text-color: #e7e7e7;
}

/* Colores Modo Claro */
[data-theme="light"] {
  --bg-color: #f2f2f2;
  --text-color: #1e1e1e;
}



/* HEADER */

.header { display: flex; justify-content: space-between; padding: 20px 30px; font-size: 12px; letter-spacing: 2px; position: fixed; top: 0; left: 0; width: 100%; z-index: 250; background-color: var(--bg-color); backdrop-filter: blur(10px); opacity: 0.9; }
.logo { display: flex; flex-direction: column; }
.role { opacity: 0.7; font-size: 10px; line-height: 20px; }
.name { font-weight: 800; }

/* MENU */

.menu-overlay { position: fixed; inset: 0; background: var(--bg-color); display: flex; justify-content: center; align-items: center; transform: translateY(-100%); transition: 0.5s ease; z-index: 200; }

.menu-overlay.active { transform: translateY(0);}

.menu-overlay p { font-size: 12px; font-style: normal; font-weight: 900; line-height: 16px; letter-spacing: 2.4px; margin-top: 24px; }


/* ESTILOS ICONO HAMBURGUESA */

.menu-toggle { cursor: pointer; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-top: -6px; }

.hamburger { width: 30px; height: 20px; position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.hamburger span { display: block; height: 2px; width: 100%; background-color: var(--text-color); border-radius: 2px; transition: all 0.3s ease-in-out; }

body.menu-open { overflow: hidden; }
.menu-overlay a { display: block; margin: 8px; }


.menu-toggle { position: fixed; top: 20px;right: 25px; z-index: 2000; cursor: pointer; background: none; border: none; padding: 0; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.menu-toggle:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 5px; border-radius: 4px }

.menu-overlay a.active-link { font-weight: 300; color: #9c9c9c; }


/* ANIMACIÓN ESCALONADA MENU */

/* 1. Definimos la animación: de abajo hacia arriba y opacidad 0 a 1 */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); /* Empieza un poco más abajo */ }
  to { opacity: 1; transform: translateY(0); /* Termina en su sitio */ }
}

/* 2. Preparamos el estado inicial de los elementos (ocultos) */
.menu-overlay nav h1,
.menu-overlay nav p {
  opacity: 0; /* Ocultos por defecto */
  transform: translateY(30px);
  /* Definimos la animación pero la pausamos */
  animation-name: slideInUp;
  animation-duration: 0.5s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards; /* Mantiene el estado final de la animación */
}

/* 3. Activamos la animación y calculamos el retraso cuando el menú está abierto */
.menu-overlay.active nav h1,
.menu-overlay.active nav p { animation-delay: calc(var(--i) * 0.1s + 0.5s); }

/* Transformación a "X" cuando el menú está abierto */
.menu-open .hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-open .hamburger span:nth-child(2) { opacity: 0; }
.menu-open .hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg);}

.menu-toggle:hover .hamburger span { background-color: var(--accent-color);}



/* FOOTER */

.footer { position: fixed; bottom: 16px; left: 40px; right: 40px; width: auto; z-index: 100; pointer-events: none; }
.footer h3 { font-weight: 500; line-height: 16px; letter-spacing: 2.4px; opacity: 0.8;}
.footer a { pointer-events: auto; }



/* HOME */

.section { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 80px 40px; padding-left: 8%; min-height: 95vh; position: relative; z-index: 5; }

.section-left p { font-size: 12px; font-style: normal; font-weight: 900; line-height: 16px; letter-spacing: 2.4px; margin-top: 24px; max-width: 500px; }
.section-right { margin-right: 14%; height: 180px; width: 50%; }
.section-right img { width: 100%;   }


/* 7 IMÁGENES HOME */

.projects { position: fixed;bottom: 0; left: 0; width: 100%; height: 35vh; display: flex; background: var(--bg-color); z-index: 10; margin: 0; padding: 0; }

.project-item { width: calc(100vw / 7); height: 100%; display: flex; justify-content: center; align-items: center; margin: 0; padding: 0; }
.project-item img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(100%); transition: filter 0.5s ease; }
.project-item:hover img { filter: grayscale(0%); }





/* PAGINA INTERMEDIA (P.I.) */
.category-container { display: flex; height: calc(100vh - 70px); /* Resta el espacio aproximado de header y footer */ padding: 60px 7% 0px 7%; align-items: flex-start; gap: 50px; overflow: hidden; margin-top: 100px; }

body.work-category-page { overflow: hidden; }  /* Desactiva el scroll de toda la página en desktop */

/* P.I. TÍTULO SECCIÓN */
.vertical-title-container { display: flex; align-items: flex-end; min-width: 150px; height: 72vh; margin-left: 20%; }

.vertical-title { font-size: 70px; font-weight: 600; line-height: 0.9; text-transform: none; transform: rotate(-90deg); transform-origin: left bottom; white-space: nowrap; }

/* P.I. GRID PROYECTOS */

.project-grid {
  display: grid;
  /* Creamos 3 columnas exactamente iguales con el gap de 16px */
  grid-template-columns: repeat(3, 1fr); gap: 16px;  width: 100%; margin-left: 0px; align-items: end; }

/* Posicionamiento manual para la fila de arriba (2 imágenes) */
.project-grid .image-container:nth-child(1) { grid-column: 2; }
.project-grid .image-container:nth-child(2) { grid-column: 3; }
.project-grid .image-container img { width: 100%; height: auto; display: block; object-fit: contain; }


/* Contenedor relativo para posicionar el texto encima */
.image-container { position: relative; overflow: hidden; display: block; border-radius: 8px; }

.image-container img { width: 100%; height: auto; display: block; transition: opacity 0.4s ease; transform 0.6s ease;}

/* Estado del overlay (oculto por defecto) */
.project-overlay { position: absolute; top: 100px; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; text-align: center; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }

/* Estilos de los textos dentro del overlay */
.project-overlay h2 { font-size: 24px; font-weight: 900; margin: 0; color: var(--text-color); }
.project-overlay h3 { font-size: 10px; margin-bottom: 6px; color: var(--text-color); }



/* EFECTO HOVER */
.image-container:hover img { opacity: 0.2; }
.image-container:hover .project-overlay { opacity: 1; }

.project-grid .image-container { align-self: start; }




/* SOBRE MI */

.contact-container { max-width: 1200px; margin: 0 auto; padding: 160px 40px; display: flex; flex-direction: column; gap: 80px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }

/* Iconos de contacto */
.social-icons { display: flex; gap: 20px; margin-top: 30px; }
.social-icons img { width: 46px; height: 46px; color:var(--bg-color); }
.social-icons img a { color: var(--accent-color); }

/* Formación y Experiencia */
.info-item { margin-bottom: 25px;}


/* Invertir colores de iconos e imágenes de marca en modo claro */
[data-theme="light"] .section-right img,
[data-theme="light"] .social-icons img { filter: invert(1); }


.section-right img, .social-icons .icon img { transition: filter 0.3s ease; }

.social-icons .icon img { transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease; }
.social-icons .icon:hover img { opacity: 0.6; }



/* PF */

.project { width: 100%; padding: 100px 6%; min-height: 60vh; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }

.project-content { width: 100%; display: flex; flex-direction: column; gap: 40px; padding-left: 20%; padding-right: 20%; }

.project-visual { width: 35%; display: flex; justify-content: flex-end; align-items: center; }
.project-visual img { width: 100%; height: auto; object-fit: contain; border-radius: 8px; }

.project-title-group { width: 100%; margin-bottom: 20px; }

.project-description-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; width: 100%; }
.project-description-grid p { max-width: 100%; }

.full-width-visuals { width: 100%; display: flex; flex-direction: column; gap: 0; margin-top: 40px; }

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

.full-intro-visuals { width: 100%; display: flex; flex-direction: column; gap: 0; margin-top: 80px; }






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

/* RESPONSIVE HOME */

@media (min-width: 1900px){
    
.category-container { padding: 0px 10% 0px 10%;}
.vertical-title-container { height: 70vh; margin-right: 100px;}
}


@media (max-width: 1200px) {

  .section { width: 100%; flex-direction: row-reverse; margin-left: -8%; padding: 60px 40px; gap: 40px; }
  
  .section-right { margin: auto;  width: auto; }    
  .section-right img { transform: rotate(-90deg); transform-origin: center; width: 500px; margin-top: 120px; margin-left: 0; }
    
  .section-left { margin-right: 5%; margin-left: -200px; margin-top: 200px; }
    
  .projects { display: none; }
  .project-grid { display: flex; flex-direction: column; width: 100%; align-items: center; }
    
  body.work-category-page { overflow: auto; /* Reactiva el scroll en móvil */ }

  .category-container { height: auto; overflow: visible; flex-direction: column; padding-top: 40px; }

  .footer { position: relative; bottom: 0; padding: 40px 0; text-align: center; }
}        

@media (max-width: 1000px) {
    
   .section { width: 100%; flex-direction: row-reverse; margin-left: -5%; }
   .section-left { width: 500px; margin-right: 0; }
   .section-left h1 { font-size: 28px;}
}
    
@media (max-width: 600px) {
    
  .header {  padding: 20px 20px; }
  .menu-toggle { margin-top: -6px; margin-right: -10px;}
    
  .section { flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px; margin-left: 0; gap: 20px; text-align: center; }

  .section-left { display: none; }
  .section-right { width: 100%; margin-right: 0; display: flex; justify-content: center; }
  .section-right img { transform: rotate(-90deg); transform-origin: center; width: 500px; margin-top: 100px; margin-left: 0; }
}



/* RESPONSIVE PAGINA INTERMEDIA */

@media (max-width: 1900px) { 
    .category-container{ margin-top: 16px; }   
}

@media (max-width: 1800px) {    
   .project-overlay { top: 70px;} 
   .project-overlay h2 { font-size: 20px;  }
}

@media (max-width: 1400px) {
  .category-container { overflow-y: auto; /* Permitimos scroll si las fotos crecen */ height: auto; padding-bottom: 100px; }
    
  body.work-category-page { overflow: auto; } /* Activamos scroll general */ 
    
  .project-grid { grid-template-columns: repeat(2, 1fr); width: 100%; } /* Pasa a 2 columnas */
  .project-grid .image-container:nth-child(1) { grid-column: auto; }
  .project-grid .image-container:nth-child(2) { grid-column: auto; }   
}

@media (max-width: 1200px) {
  .category-container { flex-direction: column; align-items: normal; padding: 0;  height: auto;  overflow: visible; }

  .vertical-title-container { margin: 0 0 60px 0; padding-top: 200px; padding-left: 25px; height: auto; transform: none; min-width: unset; }
  .vertical-title { transform: none; font-size: 70px; white-space: normal; text-align: left; }

  .project-grid { display: grid; grid-template-columns: repeat(3, 2fr); gap: 8px; width: 100%; align-items: start; }
  .project-grid .image-container { width: 100%; }

  .footer { position: relative; bottom: 0; left: 0; text-align: center; padding: 40px 0;  }
    
  .project-grid .image-container:nth-child(1),
  .project-grid .image-container:nth-child(2) { grid-column: auto; }
}

@media (max-width: 600px) { 
  .category-container { align-items: center;}
  .image-container { border-radius: 0px; }
  .vertical-title-container { padding-top: 100px;  padding-left: 0; }    
  .vertical-title { font-size: 48px; white-space: normal; text-align: left; transform: rotate(-90deg); transform-origin: center;  margin-left: 0; margin-bottom: 100px; margin-top: 200px;}

  
  .project-grid { grid-template-columns: 1fr; margin-top: 50px; gap: 2px; width: 100%; }
}




/* RESPONSIVE SOBRE MÍ */

@media (max-width: 900px) {
  .contact-row { grid-template-columns: 1fr; gap: 60px; }
  .contact-container { padding: 100px 20px; }
  .contact-block h2 { font-size: 48px;}
}



/* RESPONSIVE PF */
@media (max-width: 1800px) {
 .project-content { padding-left: 15%; padding-right: 15%; }   
}


@media (max-width: 1200px) {
  .project { flex-direction: column; align-items: flex-start; padding: 160px 20px;}

  .project-content, .project-visual { padding-left: 10%; padding-right: 10%; }
  .project-visual { justify-content: center; margin-top: 60px; }
  .project-description-grid { grid-template-columns: 1fr; }
  .project-description-grid .desc-col{ margin-bottom: -60px;}
  .full-width-visuals { margin-top: 0px;}
}


@media (max-width: 800px) { 
  .project-title-group h2 {font-size: 46px; }
  .project { padding: 80px 0px 100px 0px;}
  .project-content { padding-left: 20px; padding-right:  20px; }   
  .full-image img { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
  .project-description-grid .desc-col{ margin-bottom: -60px;}
  .full-width-visuals { margin-top: 0px;}
}


