/* =======================================================
   CONFIGURACIÓN GLOBAL
   ======================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* =======================================================
   NAVEGACIÓN (PC Y MÓVIL)
   ======================================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    padding: 20px 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
}

.nav-links a:hover {
    color: #667eea;
}

/* Dropdowns */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 120%;
    left: 0;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    list-style: none;
    padding: 10px 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.25s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
}

.menu-toggle {
    display: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
}

/* =======================================================
   ESTRUCTURA DE CONTENEDORES Y HEADERS
   ======================================================= */
.container {
    padding: 120px 5% 50px;
    max-width: 1100px; /* Un poco más estrecho para lectura óptima */
    margin: 0 auto;
}

.project-header {
    margin-bottom: 80px;
    text-align: center;
}

.project-titles {
    font-size: clamp(40px, 8vw, 72px);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-subtitle {
    font-size: 20px;
    color: #888;
}

/* =======================================================
   SECCIONES DE HOBBIES (BEYOND THE LAB)
   ======================================================= */
.project-section {
    margin-bottom: 120px;
    scroll-margin-top: 120px;
}

.section-title {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.5) 0%, rgba(42, 42, 42, 0.5) 100%);
    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.section-content p {
    color: #ccc;
    font-size: 18px;
    margin-bottom: 20px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* =======================================================
   IMÁGENES DE PROYECTOS / HOBBIES
   ======================================================= */
.project-image-section {
    margin-bottom: 30px;
}

.project-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    transition: transform 0.5s ease;
}

.project-image:hover {
    transform: scale(1.01);
}

.image-caption {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
    font-style: italic;
}

/* Clases específicas para tus fotos */
.hobby-sim { background-image: url('Images/simulator.png'); }
.hobby-football { background-image: url('Images/virgen_foto.jpeg'); }
.hobby-math { background-image: url('Images/setup_antiguo.png'); }

/* =======================================================
   FOOTER
   ======================================================= */
footer {
    background: #050505;
    padding: 60px 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: #666;
    font-size: 14px;
}

/* =======================================================
   RESPONSIVE (MÓVILES Y TABLETS)
   ======================================================= */

@media (max-width: 968px) {
    /* --- NAVEGACIÓN --- */
    .menu-toggle {
        display: block;
    }
    .nav-content{
        margin-right: 20px;
        margin-left: 20px;
    }

    .nav-links {
        display: none; /* Se activa con JS (.active) */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        padding: 20px 5% 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 0;
        max-height: 85vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100%;
        position: relative;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* --- SUBMENÚS EN MÓVIL (Integrados para que no muevan el diseño) --- */
    .dropdown-menu {
        position: relative; /* Ya no flota sobre el contenido */
        top: 0;
        left: 0;
        display: block; /* Visible por defecto dentro del menú desplegado */
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-left: 3px solid #667eea;
        margin: 5px 0 10px 15px;
        padding: 5px 0;
        min-width: auto;
        box-shadow: none;
    }

    .dropdown-menu li {
        border: none;
    }

    .dropdown-menu a {
        padding: 10px 20px !important;
        font-size: 14px !important;
        border: none;
    }

    /* --- HERO SECTION --- */
    .hero {
        padding: 120px 5% 60px;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 50px;
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
        padding-left: 50px;
        padding-right: 50px;
    }

    .profile-card {
        max-width: 300px;
        max-height: 300px;
        margin: 0 auto;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    /* --- SOBRE MÍ --- */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image img {
        max-width: 280px;
    }

    .about-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .stat-card {
        width: 100%;
        max-width: 320px;
    }

    /* --- SKILLS & PROYECTOS --- */
    .skills-grid-new, 
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        max-width: 500px;
        margin: 0 auto;
    }

    /* --- TIMELINE (EXPERIENCIA) --- */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        margin-bottom: 40px;
    }

    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px;
    }

    .timeline-dot {
        left: 20px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 34px;
    }

    .hobby-sim { background-image: url('Images/sim_little.jpg'); }
}