/* =========================================================================
   RESET Y VARIABLES GLOBALES
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --bg-color: #0A0A0A;
    --surface-color: #16161A;
    --text-color: #FFFFFF;
    --text-muted: #A0A0A0;
    --placeholder-color: #707070;
    --accent-bg: #9D4EDD;
    /* Bright Violet */
    --hover-color: #C77DFF;
    /* Lighter Violet for hover */
    --accent-text: #FFFFFF;
    --footer-bg: #120E1A;
    /* Very dark purple/black */
    --border-color: #2A2A2A;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    color: var(--text-color);
    line-height: 1.5;
}

/* =========================================================================
   PANTALLA DE CARGA (LOADER)
   ========================================================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    animation: pulse 1.5s infinite alternate;
}

.loader-logo svg {
    max-width: 150px;
    height: auto;
    fill: var(--text-color) !important;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--text-color);
    color: #000;
    font-size: 1.2rem;
    margin-right: 12px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    background-color: var(--accent-bg);
    color: #FFF;
}

.social-text {
    display: block;
    margin-bottom: 15px;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.social-text strong {
    font-weight: 900;
}

.btn {
    display: inline-block;
    background-color: var(--accent-bg);
    color: var(--accent-text);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
    background-color: var(--hover-color);
    color: #FFF;
}

.slide-section {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
    /* increased to stay above videos */
}

/* Videos Backgrounds */
.bg-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bg-video-container iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

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

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    height: 100vh;
    /* Foto de muestra: chico portrait oscuro */
    background-image: url('https://images.unsplash.com/photo-1544078755-90050868a2ce?q=80&w=1920&auto=format&fit=crop');
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-left: 5%;
    /* Para dejarlo algo a la izquierda */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    font-size: 7rem;
    /* LOGO MUY GRANDE */
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    line-height: 1;
}

.hero .social-block {
    margin-bottom: 2rem;
}

.hero-buttons .btn {
    margin-right: 15px;
    margin-bottom: 10px;
}

/* =========================================================================
   PROJECTS SECTION
   ========================================================================= */
.projects {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1511632765486-a01980e01a18?q=80&w=1920&auto=format&fit=crop');
    /* Placeholder grupal */
    background-position: top center;
}

.projects .overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #FFF;
    font-size: 3rem;
    cursor: pointer;
    z-index: 5;
    padding: 20px;
    transition: transform 0.3s;
}

.slider-btn:hover {
    transform: translateY(-50%) scale(1.2);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.relative-container {
    position: relative;
    z-index: 2;
    height: 100%;
}

.projects-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 50px;
    width: 80%;
}

.projects-info {
    max-width: 500px;
}

.projects-info h2 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.projects-info p {
    font-size: 1rem;
    opacity: 0.9;
}

.projects-social {
    text-align: right;
}

/* =========================================================================
   CONTACT SECTION
   ========================================================================= */
.contact {
    height: 100vh;
    background-color: #222;
    background-image: url('https://images.unsplash.com/photo-1544078755-90050868a2ce?q=80&w=1920&auto=format&fit=crop');
    /* Mismo placeholder que el hero de momento */
    background-position: left center;
    background-size: cover;
}

.gradient-overlay {
    background: linear-gradient(90deg, var(--contact-overlay, rgba(10, 10, 10, 0.5)) 0%, var(--bg-color) 70%);
}

.contact-container {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    align-items: center;
}

.contact-left {
    flex: 1;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 10vh;
    /* Ubicación de las redes */
}

.contact-right {
    flex: 1;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.form-header p {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #CCC;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #FFF;
    border: none;
    color: #000;
    font-family: inherit;
    font-weight: 700;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--placeholder-color);
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row input {
    flex: 1;
}

.btn-submit {
    float: right;
    padding: 12px 40px;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background-color: var(--footer-bg);
    padding: 30px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-icons a {
    margin-right: 20px;
    /* Increased margin for more space */
}

.footer-icons a:last-child {
    margin-right: 0;
}

.footer-logo {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* =========================================================================
   PÁGINAS INTERNAS (BIO Y PROYECTOS)
   ========================================================================= */
.simple-header {
    padding: 20px 0;
    background-color: #111;
    border-bottom: 1px solid #333;
}

.simple-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-small {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0;
}

.btn-back {
    font-size: 0.9rem;
    font-weight: 700;
    color: #000;
    background-color: #FFF;
    padding: 8px 20px;
}

.page-content {
    padding: 80px 0;
    min-height: calc(100vh - 100px - 150px);
}

/* BIO */
.bio-content {
    max-width: 800px;
    margin: 0 auto;
}

.bio-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.bio-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 40px;
}

.bio-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #DDD;
    margin-bottom: 20px;
}

/* PROYECTOS GRID */
.projects-list-header {
    text-align: center;
    margin-bottom: 60px;
}

.projects-list-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.projects-list-header p {
    font-size: 1.2rem;
    color: #CCC;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    position: relative;
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: block;
    /* Para poder usarlo como enlace <a> */
    color: inherit;
    text-decoration: none;
}

.card-ext-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--surface-color);
    color: var(--accent-bg);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 3;
}

.project-card:hover .card-ext-icon {
    background: var(--accent-bg);
    color: #FFF;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.project-info p {
    color: #CCC;
    font-size: 0.95rem;
}

/* =========================================================================
   RESPONSIVENESS
   ========================================================================= */
@media (max-width: 992px) {
    .logo-text {
        font-size: 5rem;
    }

    .projects-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .projects-social {
        text-align: left;
    }

    .contact-container {
        flex-direction: column;
    }

    .gradient-overlay {
        background: var(--contact-overlay, rgba(0, 0, 0, 0.8));
    }

    .contact-left {
        display: none;
    }

    /* Ocultar imagen/redes de la izq en móvil para simplificar, o dejarlas inline */
    .contact-right {
        margin-top: 50px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 50px 0;
    }

    .bio-content h1,
    .projects-list-header h1 {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 4rem;
    }

    .logo-small {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}