/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', sans-serif;
    background-color: #5C453C; /* Color marrón de fondo principal */
    color: #F3EBE6; /* Color de texto claro */
    font-size: 16px;
    line-height: 1.5;
}

/* NAVBAR BASE (Fijo en la pantalla) */
.navbar {
    background-color: #2F1F1A; /* Marrón más oscuro superior */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    letter-spacing: 1px;
    
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo-box {
    display: inline-block;
    transition: opacity 0.2s ease;
    order: 1;
}

.logo-box:hover {
    opacity: 0.8;
}

.nav-logo-img {
    height: 32px; 
    width: auto;
    display: block;
}

/* Contenedor de enlaces en versión Escritorio */
.nav-links {
    display: flex;
    justify-content: center;
    order: 2;
}

.nav-links a {
    color: #F3EBE6;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.nav-links a:hover {
    opacity: 0.8;
}

.header-name {
    font-weight: 500;
    color: #F3EBE6;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    order: 3;
}

.header-name:hover {
    opacity: 0.8;
}

/* Escondemos los controladores de la hamburguesa en la versión de escritorio */
.menu-checkbox, .hamburger-label {
    display: none;
}

/* HERO SECTION */
.hero {
    background-color: #2F1F1A;
    min-height: 45vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    margin-top: 72px; /* Espacio para que no lo pise la barra */
}

.hero-portfolio-img {
    max-width: 500px; 
    width: 100%;
    height: auto;
    display: block;
}

/* SECCIÓN PRINCIPAL: ABOUT + VIDEO */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: start;
    scroll-margin-top: 90px;
}

h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: #F8D1CC; 
}

.section-block {
    margin-bottom: 40px;
}

.section-block p {
    font-size: 16px;
    max-width: 550px;
}

/* Contenedor del Video / GIF */
.video-column {
    display: flex;
    justify-content: center;
}

.video-wrapper {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 9 / 14; 
    background-color: #D1D1D1; 
    border-radius: 4px;
    overflow: hidden;
}

.gif-content {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* INFERIOR: GRID */
.info-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 60px 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

.programs-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
}

/* Idiomas */
.lang-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.lang-row span {
    width: 90px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    flex-grow: 1;
    margin-left: 15px;
}

.bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #F3EBE6;
}

.bar-100::after { width: 100%; }
.bar-90::after { width: 88%; }
.bar-85::after { width: 80%; }

/* CV */
.cv-box {
    margin-bottom: 30px;
}

.cv-section {
    margin-bottom: 30px;
}

.cv-item {
    display: flex;
    margin-bottom: 15px;
    font-size: 14px;
}

.cv-item .year {
    width: 90px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Contacto con Iconos Vectoriales Rosas */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-icon-svg {
    width: 22px;
    height: 22px;
    margin-right: 15px;
    flex-shrink: 0;
    color: #F8D1CC; /* Tu color rosa de cabeceras asignado nativamente */
    transition: transform 0.2s ease, color 0.2s ease;
}

.contact-box a {
    color: #F3EBE6;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s ease;
}

/* Efectos hover para dinamizar la caja de redes */
.contact-item:hover .contact-icon-svg {
    transform: scale(1.1);
    color: #FFFFFF; /* Cambia a blanco al posicionar el cursor */
}

.contact-box a:hover {
    text-decoration: underline;
    color: #FFFFFF;
}

/* ==========================================================================
   NUEVA SECCIÓN: WORK (MOSAICO ASIMÉTRICO - REVISADO CON TINTE ROSITA)
   ========================================================================== */

.work-section {
    max-width: 1200px;
    margin: 80px auto 0 auto; 
    padding: 40px 40px 80px 40px;
    scroll-margin-top: 90px;
}

/* Título superior de la sección */
.work-title {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 2px;
    text-align: center;
    color: #F8D1CC; 
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* Definición del grid principal basado en tu boceto */
.work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
}

/* Estructura común para cada tarjeta de proyecto */
.work-item {
    position: relative;
    background-color: #2F1F1A; /* Color de fondo oscuro detrás de la mezcla */
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

/* El div contenedor de la imagen con el nuevo efecto rosita */
.work-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Tono rosita de fondo para fusionar la imagen */
    background-color: #F8D1CC; 
    background-blend-mode: multiply; /* Multiplica y tiñe la foto de rosa */
    
    opacity: 0.65; /* Opacidad perfecta para que se lea el texto y se mantenga el tono */
    filter: saturate(0.8);
    transition: filter 0.4s ease, background-color 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

/* TEXTO SUPERPUESTO (Siempre visible por encima) */
.work-text-overlay {
    position: relative;
    z-index: 5;
    padding: 20px;
    color: #1A1A1A; /* Texto oscuro en estado pasivo sobre el fondo rosa */
    transition: color 0.4s ease;
}

.work-text-overlay h3 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.work-text-overlay .category {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 2px;
}

.work-text-overlay .year {
    font-size: 13px;
    opacity: 0.8;
}

/* INTERACCIÓN HOVER: Al pasar el ratón se quita el rosa y vuelve el color original */
.work-item:hover {
    transform: scale(1.015); /* Efecto suave de elevación */
}

.work-item:hover .work-bg-image {
    background-color: transparent; /* Remueve el tinte rosa */
    filter: saturate(1); /* Devuelve la saturación original */
    opacity: 0.95; /* Sube la claridad visual de la imagen */
    transform: scale(1.04); /* Pequeño zoom dinámico */
}

/* Al quitar el rosa, el texto cambia a blanco para contrastar con las fotos originales */
.work-item:hover .work-text-overlay {
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); /* Sombra de seguridad para asegurar lectura */
}

/* ASIGNACIÓN DE POSICIONES ASIMÉTRICAS */
.msr-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.aura-card {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.hope-card {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}

.nitro-card {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
}

.ruth-card {
    grid-column: 3 / 4;
    grid-row: 2 / 4;
}

.mf77-card {
    grid-column: 4 / 5;
    grid-row: 2 / 4;
}

/* RUTAS DE LAS IMÁGENES */
.msr-card .work-bg-image   { background-image: url('../img/msr/msr02.png'); }
.aura-card .work-bg-image  { background-image: url('../img/aura/aura_estrella.png'); }
.hope-card .work-bg-image  { background-image: url('../img/hopewater/hope_fondo_azul.png'); }
.nitro-card .work-bg-image { background-image: url('../img/2nitro/honda_dibujo.png'); }
.ruth-card .work-bg-image  { background-image: url('../img/ruthasawa/cartel.png'); }
.mf77-card .work-bg-image  { background-image: url('../img/mf77/textura_mf77.png'); }

/* FOOTER */
.main-footer {
    background-color: #2F1F1A; 
    padding: 30px 20px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: rgba(243, 235, 230, 0.7); 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- RESPONSIVE / ADAPTACIÓN A MÓVILES (Menú Hamburguesa) --- */
@media (max-width: 850px) {
    .navbar {
        padding: 15px 20px;
        position: fixed;
    }

    .logo-box { order: 1; }
    .header-name { order: 2; font-size: 12px; }
    .hamburger-label { order: 3; display: flex; }

    .hamburger-label {
        width: 24px;
        height: 18px;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1002;
    }

    .hamburger-label span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #F3EBE6;
        transition: all 0.3s ease;
    }

    .menu-checkbox {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 54px;
        left: 0;
        width: 100%;
        background-color: #2F1F1A;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 999;
        border-bottom: 2px solid #5C453C;
    }

    .nav-links a {
        margin: 0;
        font-size: 16px;
        letter-spacing: 2px;
    }

    .menu-checkbox:checked ~ .nav-links {
        max-height: 200px;
        opacity: 1;
    }

    .menu-checkbox:checked ~ .hamburger-label span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-checkbox:checked ~ .hamburger-label span:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked ~ .hamburger-label span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        margin-top: 54px;
        padding: 40px 20px;
    }

    .hero-portfolio-img {
        max-width: 300px; 
    }

    .main-container {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 40px;
        scroll-margin-top: 70px;
    }

    .video-column {
        order: -1; 
    }

    .info-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 40px 20px;
        gap: 40px;
    }
}

/* REAJUSTE RESPONSIVE PARA EL GRID DE TRABAJOS */
@media (max-width: 850px) {
    .work-section {
        padding: 40px 20px;
        scroll-margin-top: 70px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        gap: 15px;
    }
    
    .work-item {
        grid-column: auto !important;
        grid-row: auto !important;
    }
    
    .work-text-overlay h3 {
        font-size: 18px;
    }
}