/* ==========================================================================
   VARIABLES DE MARCA OFICIALES (Estrictas según Brandbook)
   ========================================================================== */
:root {
    --bg-pure: #0B0B0B;
    --text-clear: #F5F5F5;
    --gray-muted: #A0A0A0;
    --gray-dark: #161616;
    --accent-orange: #FF6A00;
    --secondary-red: #B02A2A;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* RESET E INSTANCIAS BASE MÓVIL-FIRST */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-pure);
    color: var(--text-clear);
    font-family: var(--font-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* REGLAS DE ESPACIADO Y AIRE (Menos es más) */
section {
    padding: 8rem 6% 4rem;
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 1.5rem;
}

/* NAVEGACIÓN FIJA CON BLUR (Inspiración Portafolio de Cine) */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(11, 11, 11, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Menú Hamburguesa Móvil por Hardware */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-clear);
    transition: var(--transition-smooth);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-pure);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: var(--transition-smooth);
    z-index: 1050;
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    font-family: var(--font-serif);
    color: var(--text-clear);
    text-decoration: none;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-orange);
}

/* BIENVENIDA (Hero Inmersivo) */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 6%;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-pure) 10%, rgba(11, 11, 11, 0.5) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 750px;
}

.hero-tag {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray-muted);
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--gray-muted);
    font-weight: 300;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.highlight {
    color: var(--text-clear);
    border-bottom: 2px solid var(--accent-orange);
    font-weight: 400;
}

/* BOTONES HUMANOS CON IDENTIDAD */
.btn-minimal {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-clear);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-minimal:hover {
    color: var(--accent-orange);
}

.btn-minimal .arrow {
    transition: var(--transition-smooth);
}

.btn-minimal:hover .arrow {
    transform: translateY(5px);
}

/* MANIFIESTO (Sección de Criterio Profundo) */
.manifesto-section {
    background-color: var(--bg-pure);
    padding: 6rem 6%;
}

.manifesto-container {
    max-width: 850px;
}

.manifesto-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    line-height: 1.3;
    color: var(--text-clear);
}

.manifesto-text strong {
    font-weight: 400;
    font-style: italic;
    color: var(--accent-orange);
}

/* PORTAFOLIO (Estructura de Lista Asimétrica Cinematográfica) */
.projects-section {
    background-color: var(--bg-pure);
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 7rem;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-year {
    font-size: 0.85rem;
    color: var(--gray-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.project-name {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.project-description {
    color: var(--gray-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* FACHADA DE VIDEO INTELIGENTE */
.video-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(40%) contrast(110%);
    transition: var(--transition-smooth);
}

.video-facade:hover .video-thumbnail {
    filter: grayscale(0%) scale(1.02);
}

.play-trigger {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(11, 11, 11, 0.85);
    padding: 0.8rem 1.5rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.play-text {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--accent-orange);
}

.video-facade:hover .play-trigger {
    background: var(--accent-orange);
    color: var(--bg-pure);
}

.video-facade:hover .play-icon {
    border-left-color: var(--bg-pure);
}

.video-facade iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* SOBRE MÍ (Diseño de Criterio Maduro) */
.about-section {
    background-color: var(--gray-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.profile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%);
    transition: var(--transition-smooth);
}

.about-grid:hover .profile-img {
    filter: grayscale(0%) contrast(100%);
}

.about-headline {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 400;
}

.about-paragraph {
    color: var(--gray-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-note {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent-orange);
    margin-top: 2rem;
}

/* FOTOGRAFÍA (Masonry & Stills Cinematográficos) */
.photo-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    filter: grayscale(100%) brightness(70%);
    transition: var(--transition-smooth);
}

.photo-wrapper:hover .gallery-img {
    filter: grayscale(0%) brightness(100%);
    transform: scale(1.03);
}

.photo-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-clear);
    opacity: 0.8;
    transition: var(--transition-smooth);
}

/* CONTACTO (Alta Conversión Limpia) */
.contact-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 10rem 6%;
}

.contact-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.contact-desc {
    color: var(--gray-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 4rem;
}

.btn-accent {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background-color: var(--text-clear);
    color: var(--bg-pure);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    transition: var(--transition-smooth);
}

.btn-accent:hover {
    background-color: var(--accent-orange);
    color: var(--text-clear);
    transform: translateY(-4px);
}

/* ==========================================================================
   MEDIA QUERIES (Adaptabilidad Escalada y Desktop)
   ========================================================================== */
@media (min-width: 768px) {
    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        background: none;
        gap: 2rem;
    }
    
    .nav-menu a {
        font-family: var(--font-sans);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        font-weight: 500;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .project-item {
        grid-template-columns: 1fr 1.2fr;
        gap: 4rem;
        align-items: center;
    }
    
    .project-item:nth-child(even) .project-meta {
        order: 2;
    }
    
    .about-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
    
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ==========================================================================
   ANIMACIONES, CURSOR Y NUEVOS EFECTOS (Magia Cinematográfica)
   ========================================================================== */

/* Cursor Personalizado */
body {
    cursor: none; /* Oculta el cursor de Windows/Mac */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-orange);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference; /* Efecto inverso al pasar por zonas blancas */
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    will-change: transform;
}

.cursor-grow {
    width: 60px;
    height: 60px;
    background-color: var(--text-clear);
    margin-top: -20px;
    margin-left: -20px;
}

/* Ocultar cursor custom en móviles */
@media (max-width: 768px) {
    body { cursor: auto; }
    .custom-cursor { display: none; }
}

/* Logo Fix (quitar aspecto de link) */
a.logo {
    color: var(--text-clear);
    text-decoration: none;
    transition: color 0.3s ease;
}
a.logo:hover {
    color: var(--accent-orange);
}

/* Animaciones Reveal (Scroll) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Galería Interactiva Avanzada */
.photo-wrapper {
    cursor: none;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.photo-wrapper:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    z-index: 10;
}

.photo-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 106, 0, 0.8); /* Naranja acento */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.photo-wrapper:hover .photo-overlay {
    opacity: 1;
}

.photo-view-text {
    font-family: var(--font-sans);
    color: var(--bg-pure);
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.photo-wrapper:hover .photo-view-text {
    transform: translateY(0);
}

/* Footer & Redes Sociales */
.social-links {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.social-item {
    font-family: var(--font-sans);
    color: var(--text-clear);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 5px;
}

.social-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--accent-orange);
    transition: width 0.3s ease;
}

.social-item:hover::after {
    width: 100%;
}

.separator {
    color: var(--gray-muted);
    font-weight: 300;
}

.copyright {
    margin-top: 3rem;
    font-size: 0.75rem;
    color: var(--gray-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================================================
   INTERACTIVIDAD AVANZADA (Grano, Masonry y Lightbox)
   ========================================================================== */

/* 1. Efecto Grano de Película (Film Grain) */
body::before {
    content: "";
    position: fixed;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    width: 200%; height: 200%;
    background: transparent url('https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Dissolve_Noise_Texture.png') repeat 0 0;
    opacity: 0.04;
    animation: filmNoise 0.2s infinite;
    pointer-events: none;
    z-index: 9999;
}

@keyframes filmNoise {
    0% { transform: translate(0,0); }
    10% { transform: translate(-5%,-5%); }
    20% { transform: translate(-10%,5%); }
    30% { transform: translate(5%,-10%); }
    40% { transform: translate(-5%,15%); }
    50% { transform: translate(-10%,5%); }
    60% { transform: translate(15%,0); }
    70% { transform: translate(0,15%); }
    80% { transform: translate(3%,35%); }
    90% { transform: translate(-10%,10%); }
}

/* 2. Masonry Gallery (CSS Puro) */
.masonry-gallery {
    column-count: 1;
    column-gap: 2rem;
}

@media (min-width: 768px) {
    .masonry-gallery { column-count: 2; }
}

@media (min-width: 1024px) {
    .masonry-gallery { column-count: 3; }
}

.masonry-gallery .photo-wrapper {
    break-inside: avoid;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

/* 3. Lightbox Cinematográfico con Lupa */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(11, 11, 11, 0.98);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 2rem; right: 3rem;
    color: var(--text-clear);
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    z-index: 10001;
    cursor: none;
    transition: color 0.3s;
}

.lightbox-close:hover { color: var(--accent-orange); }

.lightbox-content {
    width: 90%;
    height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.cursor-zoom {
    cursor: zoom-in !important; /* Lupa por defecto del SO como backup */
}

.zoomed-in #lightbox-img {
    transform: scale(2); /* Nivel de acercamiento */
    cursor: zoom-out !important;
}

/* 4. Footer Magnético */
.social-massive {
    margin: 6rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.magnetic-link {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 7rem);
    color: transparent;
    -webkit-text-stroke: 1px var(--gray-muted);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.4s ease;
    display: inline-block;
    line-height: 1;
}

.magnetic-link:hover {
    color: var(--text-clear);
    -webkit-text-stroke: 1px var(--text-clear);
    transform: scale(1.05); /* Efecto de acercamiento magnético */
}

/* Preloader */
#cinematic-preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-pure);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}
#cinematic-preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.monogram-g {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 6rem;
    color: var(--accent-orange);
    opacity: 0;
    animation: pulseG 1.5s ease-in-out forwards;
}
@keyframes pulseG {
    0% { opacity: 0; filter: blur(10px); transform: scale(0.9); }
    50% { opacity: 1; filter: blur(0px); transform: scale(1); }
    100% { opacity: 0.8; }
}

/* Split Screen Dinámico */
.split-section {
    margin: 8rem 0;
}
.split-container {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: #111;
    overflow: hidden;
    cursor: ew-resize; /* Cursor de arrastre horizontal */
    border-radius: 4px;
}
.split-side {
    position: absolute;
    top: 0; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.split-left {
    left: 0; width: 50%;
    z-index: 2;
    border-right: 2px solid var(--accent-orange);
    transition: width 0.1s ease-out; /* Suaviza el movimiento del mouse */
}
.split-right {
    right: 0; width: 100%; /* Ocupa todo el fondo */
    z-index: 1;
}
.split-side img {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; /* Evita que la imagen se encoja */
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
.split-left img { filter: grayscale(100%); } /* Contraste dramático entre lados */
.split-content {
    position: relative;
    z-index: 3;
    text-align: center;
}
.split-content h3 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--text-clear);
    margin-bottom: 0.5rem;
}
.split-content p {
    font-family: var(--font-sans);
    color: var(--accent-orange);
    letter-spacing: 2px;
    font-size: 0.9rem;
}
@media (max-width: 768px) {
    .split-container { height: 40vh; pointer-events: none; } /* En móvil queda 50/50 estático */
}

/* Animación Cinematográfica para Logo en Preloader */
.logo-text {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-clear);
    letter-spacing: 2px;
    animation: cinematicFadeInOut 2.5s ease-in-out forwards;
}

.logo-image {
    width: 200px;
    height: auto;
    animation: cinematicFadeInOut 2.5s ease-in-out forwards;
}

@keyframes cinematicFadeInOut {
    0% { opacity: 0; filter: blur(10px); transform: scale(0.95); }
    30% { opacity: 1; filter: blur(0px); transform: scale(1); }
    70% { opacity: 1; filter: blur(0px); transform: scale(1); }
    100% { opacity: 0; filter: blur(10px); transform: scale(1.05); }
}

.magnetic-container {
    display: inline-block;
    padding: 20px; /* Espacio de protección para el movimiento */
    pointer-events: auto; /* Asegura que el contenedor reciba el hover */
}

.magnetic-link {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); /* Curva suave cinematográfica */
    will-change: transform;
}

/* Evitar que el cursor personalizado afecte el layout */
.custom-cursor {
    pointer-events: none; /* Crucial: el cursor no debe interactuar con los elementos */
    position: fixed;
    z-index: 999999;
}

/* Estabilización del Split-Screen */
.split-side {
    background-color: #0B0B0B; /* Mantiene el tono base de la guía  */
}

.split-container {
    border: 1px solid rgba(255, 255, 255, 0.05); /* Definimos el borde para que no se pierda en el negro */
}

/* =========================================
   [ SECCIÓN PORTAFOLIO - GRID CINEMATOGRÁFICO ]
   ========================================= */

.portfolio-section {
    padding: 6rem 5%;
    background-color: #0B0B0B; /* Fondo profundo para inmersión */
}

/* El sistema de columnas automáticas */
.portfolio-grid {
    display: grid;
    /* Crea columnas que se adaptan al tamaño de la pantalla, mínimo 320px */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem; /* Espacio negativo vital (aire) entre proyectos */
    margin-top: 3rem;
}

/* El contenedor de cada proyecto */
.portfolio-card {
    display: block;
    text-decoration: none; /* Quitamos el subrayado feo de los enlaces */
    color: #ffffff;
    cursor: pointer;
}

/* El marco de la imagen (Pantalla 16:9) */
.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Fuerza el formato cinematográfico */
    overflow: hidden; /* Corta lo que se salga del marco */
    background-color: #1a1a1a; /* Color de carga por si la imagen tarda */
}

/* La fotografía en sí */
.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Llena el marco sin deformarse */
    /* Transición lenta y elegante de 0.8s */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* La capa oscura que aparece al pasar el ratón */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 11, 11, 0.75); /* Oscurece la foto */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Invisible por defecto */
    transition: opacity 0.4s ease;
}

/* --- INTERACCIONES HOVER (La magia) --- */
.portfolio-card:hover .image-wrapper img {
    transform: scale(1.05); /* Acercamiento sutil tipo "Dolly in" */
}

.portfolio-card:hover .card-overlay {
    opacity: 1; /* Revela la capa oscura y el botón */
}

/* --- TIPOGRAFÍA DE LA TARJETA --- */
.project-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-top: 1.2rem;
    margin-bottom: 0.2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.project-role {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #FF6A00; /* Color acento para guiar el ojo */
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =========================================
   [ SPLIT SCREEN CINEMATOGRÁFICO ]
   ========================================= */
.split-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    aspect-ratio: 16 / 9; /* Formato cine estricto */
    overflow: hidden;
    background-color: #0B0B0B;
}

.split-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.split-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* La capa de la izquierda oculta lo que sobra */
.split-left {
    width: 50%; /* Posición inicial en el medio */
    overflow: hidden;
    z-index: 2;
    border-right: 1px solid rgba(255, 106, 0, 0.3);
}

.split-content {
    position: absolute;
    bottom: 2rem;
    z-index: 3;
    color: #F5F5F5;
    text-shadow: 0px 4px 15px rgba(0,0,0,0.9);
}

/* Posicionar textos para que no se pisen */
.left-content { left: 2rem; }
.right-content { right: 2rem; text-align: right; }

.split-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #FF6A00;
    margin-bottom: 0.5rem;
}

.split-content p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

/* El controlador táctil */
.split-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Posición inicial */
    width: 2px;
    background-color: #FF6A00;
    z-index: 4;
    cursor: ew-resize;
    transform: translateX(-50%);
    touch-action: none; /* Bloquea gestos nativos del navegador móvil para evitar fallos */
}

/* Ícono de arrastre central */
.split-divider::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0B0B0B;
    color: #FF6A00;
    padding: 6px 10px;
    border: 1px solid #FF6A00;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}