/* ================================================= */
/* 1. TIPOGRAFÍA (FUENTE BRUTALISTA)                 */
/* ================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');

/* ================================================= */
/* 2. ESTILOS GENERALES (FONDO NEGRO)                */
/* ================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #000000; /* Negro Absoluto */
    color: #ffffff;            /* Texto Blanco */
    font-family: 'Archivo Black', sans-serif;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
}

/* ================================================= */
/* 3. SPLASH SCREEN (RESTAURADO)                     */
/* ================================================= */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999; /* Z-index muy alto para tapar todo lo demás */
    cursor: pointer;
    background-color: #000; /* Fondo negro por si el video tarda en cargar */
    transition: opacity 1s ease-out; 
}

#portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#click-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5); /* Fondo semitransparente para leer texto */
    padding: 20px 40px;
    border-radius: 0; /* Quitamos bordes redondeados para que coincida con el estilo */
    border: 2px solid white; /* Borde blanco estilo brutalista */
    z-index: 10001; 
}

/* ================================================= */
/* 4. LAYOUT PRINCIPAL (GRID)                        */
/* ================================================= */
#main-content {
    opacity: 0; /* JS debe cambiar esto a 1 */
    transition: opacity 0.5s ease-out;

    min-height: 100vh;
    width: 100%;

    display: grid;
    /* MÓVIL: 1 Columna */
    grid-template-areas:
        "header"
        "project-1"
        "project-2"
        "project-3"
        "footer";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: min-content min-content min-content min-content min-content;

    gap: 30px;
    padding: 30px;
    box-sizing: border-box;
}

#main-content > * {
    min-width: 0;
}

/* ================================================= */
/* 5. HEADER                                         */
/* ================================================= */
header {
    grid-area: header;
    padding: 20px 0;
    text-align: center;
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.header-title:focus {
    outline: 2px solid #FF0000;
    outline-offset: 4px;
}

header h2 {
    font-size: clamp(2.5rem, 10vw, 10rem);
    line-height: 0.9;
    margin: 0;
    letter-spacing: -2px;
}

.bio-indicator {
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1;
    color: #FF0000;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.header-title.open .bio-indicator {
    transform: rotate(45deg);
}

/* Bio panel slide */
.bio-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bio-panel.open {
    max-height: 400px;
}

.bio-content {
    border-top: 3px solid #FF0000;
    margin-top: 24px;
    padding-top: 24px;
    text-align: left;
}

.bio-role {
    font-size: clamp(0.75rem, 3vw, 1rem);
    color: #FF0000;
    letter-spacing: 3px;
    margin: 0 0 16px 0;
}

.bio-text {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    text-transform: none;
    font-family: 'Archivo Black', sans-serif;
}

.bio-location {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    letter-spacing: 3px;
    opacity: 0.5;
    margin: 0;
}

footer {
    grid-area: footer;
    padding: 40px 0;
    text-align: center;
    border-top: 5px solid white;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 16px;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(1rem, 4vw, 1.2rem);
    letter-spacing: 2px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.social-links a:hover {
    border-bottom-color: #FF0000;
    color: #FF0000;
}

.copyright {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.5;
}

/* ================================================= */
/* 6. PROYECTOS (BLOQUES BLANCOS + SOMBRA ROJA)      */
/* ================================================= */

.project-1, .project-2, .project-3 {
    background-color: #ffffff; 
    color: #000000;            
    
    padding: 20px;
    
    /* Sin bordes */
    border: none;
    border-radius: 0;
    outline: none;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    min-height: 300px; 
    min-height: clamp(150px, 25vh, 300px);
    cursor: pointer;
    
    /* Transición rápida */
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Inicialmente sin sombra */
    box-shadow: 0 0 0 transparent;
}

.project-1 h3, .project-2 h3, .project-3 h3 {
    font-size: clamp(2rem, 8vw, 7rem);
    margin: 0;
    line-height: 0.9;
    pointer-events: none;
}

/* EFECTO HOVER Y FOCUS */
.project-1:hover, .project-2:hover, .project-3:hover,
.project-1:focus-within, .project-2:focus-within, .project-3:focus-within {
    transform: translate(-15px, -15px);
    box-shadow: 15px 15px 0 #FF0000;
}

.project-1 a, .project-2 a, .project-3 a {
    outline: none;
}


/* ================================================= */
/* 7. MEDIA QUERY (ESCRITORIO)                       */
/* ================================================= */
@media (min-width: 1024px) {
    #main-content {
        /* 3 Columnas */
        grid-template-areas:
            "header header header"
            "project-1 project-2 project-3"
            "footer footer footer";
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto 1fr auto;
        
        gap: 40px; 
        padding: 60px;
        align-content: center;
    }

    .project-1, .project-2, .project-3 {
        aspect-ratio: 1 / 1;
        min-height: auto;
        height: auto;
        overflow: hidden;
    }

    .project-1 h3, .project-2 h3, .project-3 h3 {
        font-size: clamp(1.5rem, 3vw, 3.5rem);
    }
    
    /* Hover más exagerado en pantalla grande */
    .project-1:hover, .project-2:hover, .project-3:hover {
        transform: translate(-20px, -20px);
        box-shadow: 20px 20px 0 #FF0000; 
    }
}