:root {
    --bg-dark: #0f1215;
    --accent: #8fa1b3;
    --accent-glow: rgba(143, 161, 179, 0.4);
    --btn-shadow: rgba(0, 0, 0, 0.3);
}

/* 1. FONDO GRADIENTE QUE SE MUEVE */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #0f1215, #1a1e23, #0d1117, #262423);
    background-size: 400% 400%;
    animation: moveGradient 15s ease infinite;
    color: #e2e8f0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.navbar-container {
    position: sticky;
    top: 20px; /* Separación del borde superior */
    z-index: 1000;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    pointer-events: none; /* Permite que el fondo sea clickeable fuera del nav */
}

.navbar {
    pointer-events: auto; /* Reactiva los clicks solo en la barra */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 30, 35, 0.65); /* Más oscuro y elegante */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 30px;
    border-radius: 100px; /* Bordes totalmente redondos */
    width: 1000%;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar:hover {
    border: 1px solid rgba(143, 161, 179, 0.3);
    transform: translateY(2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
}

.logo span {
    color: var(--accent);
    margin-left: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-btn {
    padding: 8px 20px !important;
    font-size: 0.75rem !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 0 #0a0c0e, 0 8px 15px rgba(0,0,0,0.3) !important;
}

.nav-btn:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 0 #0a0c0e !important;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 2. EL EFECTO AURA */
.aura-text {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow), 0 0 25px var(--accent-glow);
    animation: glowPulse 3s infinite alternate;
}

@keyframes glowPulse {
    from { text-shadow: 0 0 10px var(--accent-glow); }
    to { text-shadow: 0 0 25px var(--accent-glow), 0 0 40px var(--accent-glow); }
}

/* 3. BOTONES "DE VERDAD" (Real Buttons) */
.btn-real {
    padding: 14px 30px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: #1a1e23;
    color: var(--accent);
    /* Sombra que da volumen (el "cuerpo" del botón) */
    box-shadow: 0 6px 0 #0a0c0e, 0 12px 20px rgba(0,0,0,0.4);
    transition: all 0.1s ease; /* Transición rápida para que se sienta mecánico */
}

.btn-real:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #0a0c0e, 0 15px 25px var(--btn-shadow);
    color: #fff;
}

.btn-real:active {
    transform: translateY(4px); /* Se hunde */
    box-shadow: 0 2px 0 #0a0c0e, 0 5px 10px rgba(0,0,0,0.4); /* La sombra se achica */
}

/* Variante botón primario con aura */
.btn-real.primary {
    background: var(--accent);
    color: #0f1215;
    box-shadow: 0 6px 0 #5f6e7d, 0 12px 20px rgba(143, 161, 179, 0.2);
}

.btn-real.primary:hover {
    background: #a5b4c4;
}

.btn-real.primary:active {
    box-shadow: 0 2px 0 #5f6e7d;
}

/* Hero Styles */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
}

.hero .navbar-container{
    max-width: 1000px;
    transform: scale(2.1);
}

.hero h1 { 
    font-size: 4rem; 
    line-height: 1.1; 
    margin-bottom: 20px; 
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding-bottom: 20px; /* Espacio extra para que la sombra del botón no se corte */
}

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN - MOBILE & TABLET
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Ajuste del Navbar Flotante */
    .navbar-container {
        top: 10px;
        padding: 0 10px;
    }

    .navbar {
        padding: 8px 20px;
    }

    .nav-links {
        gap: 15px; /* Menos espacio entre links */
    }

    .nav-links a {
        font-size: 0.7rem; /* Texto más pequeño */
    }

    /* Ajuste del Hero para pantallas pequeñas */
    .hero {
        padding: 0 5%;
    }

    .hero h1 {
        font-size: 2.8rem; /* Tamaño manejable para móvil */
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Botones en columna si es necesario */
    .hero-btns {
        flex-direction: column; /* Uno arriba del otro */
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 40px auto 0;
    }

    .btn-real {
        width: 100%; /* Botones de ancho completo en móvil */
        justify-content: center;
        padding: 15px 0;
    }

    /* Ajuste de Proyectos */
    .project-grid {
        grid-template-columns: 1fr; /* Una sola columna de proyectos */
        gap: 20px;
    }

    .project-img {
        height: 200px; /* Menos altura en móvil */
    }
}

/* Ajuste para teléfonos muy pequeños (iPhone SE, etc.) */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .logo {
        font-size: 0.9rem;
    }
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto evita que la imagen se estire feo */
    border-radius: 24px 24px 0 0;
}