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

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
}

/* Contenedor principal que fuerza la división exacta al 50% */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ==========================================================================
   PANEL IZQUIERDO: FIJO E INFORMATIVO
   ========================================================================== */
.panel-left {
    width: 50%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 3.5rem;
    border-right: 1px solid #1c1c1c;
    background-color: #000000;
    overflow-y: auto;
}

.brand-header {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 0.4rem;
}

.sub-logo {
    font-size: 1.2rem;
    font-weight: 300;
    color: #888888;
    letter-spacing: -0.01em;
}

/* Línea divisoria fina de estilo técnico minimalista */
.section-divider {
    border: none;
    border-top: 1px solid #1c1c1c;
    margin: 2.5rem 0;
    width: 100%;
}

.work-section-title {
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.project-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: auto; /* Empuja el footer firmemente hacia abajo */
    padding-bottom: 3rem;
}

/* Botones estilo píldora/etiqueta */
.tag-btn {
    background: transparent;
    color: #ffffff;
    border: 1px solid #333333;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    cursor: pointer;
    transform: scale(1);
    /* Transición limpia para que no salte bruscamente al agrandarse */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.25s ease, 
                color 0.25s ease, 
                border-color 0.25s ease;
}

.tag-btn:hover {
    border-color: #888888;
}

/* Estado activo: se invierten los colores y se agranda un 8% */
.tag-btn.active {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 600;
    transform: scale(1.08); 
}

/* Estilo desactivado para los placeholders */
.placeholder-btn {
    opacity: 0.25;
    border-style: dashed;
    cursor: default;
}

.placeholder-btn:hover {
    border-color: #333333;
}

/* Footer del panel izquierdo */
.info-footer {
    border-top: 1px solid #1c1c1c;
    padding-top: 2rem;
}

.info-title {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
}

.contact-email a {
    color: #888888;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 300;
    transition: color 0.2s;
}

.contact-email a:hover {
    color: #ffffff;
}

.social-links {
    margin-top: 1.2rem;
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: #555555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #ffffff;
}

/* ==========================================================================
   PANEL DERECHO: VISOR DE RENDERS CON SCROLL CONTINUO Y REACCIONARIO
   ========================================================================== */
.panel-right {
    width: 50%;
    height: 100vh;
    background-color: #000000;
    overflow-y: auto;
    position: relative; /* Permite fijar las capas de degradado encima */
}

/* Esconde la barra de scroll nativa para potenciar el efecto automatizado */
.panel-right::-webkit-scrollbar {
    display: none;
}

/* Capas fijas para los degradados de los bordes (Fades) */
.edge-fade {
    position: absolute; /* CAMBIADO: De fixed a absolute */
    right: 0;
    width: 100%; /* CAMBIADO: Ahora ocupa el 100% de su contenedor derecho */
    height: 12vh;
    z-index: 10;
    pointer-events: none; 
}

.fade-top {
    top: 0;
    background: linear-gradient(to bottom, #000000 0%, transparent 100%);
    opacity: 0; /* JS lo activa solo cuando te desplazas hacia abajo */
    transition: opacity 0.4s ease;
}

.fade-bottom {
    bottom: 0;
    background: linear-gradient(to top, #000000 0%, transparent 100%);
    opacity: 1; /* JS lo apaga solo cuando tocas el fondo */
    transition: opacity 0.4s ease;
}

.project-images-scroll-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Contenedor de cada imagen individual */
.scroll-image-link {
    width: 100%;
    display: block;
    position: relative;
    /* Separador fino e industrial debajo de cada render */
    border-bottom: 1px solid #111111; 
}

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

.no-data {
    color: #444444;
    font-size: 1rem;
    text-align: center;
    margin-top: 45vh;
    font-weight: 300;
}

/* ==========================================================================
   RESPONSIVE: ADAPTACIÓN PARA TABLETS Y MÓVILES
   ========================================================================== */
@media (max-width: 900px) {
    .split-container {
        flex-direction: column;
        overflow-y: auto;
    }
    
    .panel-left, .panel-right {
        width: 100%;
        height: auto;
    }
    
    .panel-left {
        border-right: none;
        border-bottom: 1px solid #1c1c1c;
        padding: 2.5rem 2rem;
    }
    
    .edge-fade {
        width: 100%; /* Ajusta los degradados al ancho completo en celulares */
    }
}

/* ==========================================================================
   MURO DE CONTRASEÑA (PANTALLA COMPLETA)
   ========================================================================== */
#gatekeeper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 99999; /* Se posiciona por encima de todo el split-container */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.gatekeeper-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    padding: 1rem;
}

.gatekeeper-box label {
    font-size: 0.95rem;
    font-weight: 300;
    color: #888888;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

#gatekeeper-pass {
    background: transparent;
    color: #ffffff;
    border: none;
    border-bottom: 1px solid #333333;
    padding: 0.6rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#gatekeeper-pass:focus {
    border-color: #ffffff;
}

#gatekeeper-error {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
