/* Variables de color y diseño */
:root {
    --bg-dark: #050505; /* Fondo más oscuro para que resalte la red neuronal */
    --bg-card: rgba(20, 20, 20, 0.8);
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --neon-green: #00ff66;
    --neon-green-glow: rgba(0, 255, 102, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Configuración del Canvas (Fondo interactivo) */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Para que quede detrás de todo el contenido */
    pointer-events: none; /* Para no interferir con los clics en la página */
}

/* Envoltura para el contenido (para que no se pegue a los bordes) */
.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Navegación Fija */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(10px);
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo span { color: var(--neon-green); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--neon-green); }

/* Estructura de Secciones */
section {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-left: 4px solid var(--neon-green);
    padding-left: 1rem;
}

/* Inicio / Hero Section */
.hero-subtitle {
    color: var(--neon-green);
    font-family: monospace;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.text-muted { color: var(--text-muted); }

.hero-desc {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: rgba(0, 255, 102, 0.05);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.btn:hover {
    background: var(--neon-green-glow);
    box-shadow: 0 0 15px var(--neon-green-glow);
}

/* Sobre Mí & Tecnologías */
.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #ccc;
    max-width: 800px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    background: var(--bg-card);
    border: 1px solid #222;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: transform 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
}

.tech-item i {
    font-size: 1.8rem;
}

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #222;
    transition: transform 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-green);
    box-shadow: 0 10px 30px -15px rgba(0,255,102,0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.project-tech span {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

/* Contacto */
#contacto {
    min-height: 60vh;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(5px);
    color: #555;
    font-family: monospace;
    border-top: 1px solid #111;
    position: relative;
    z-index: 10;
}

/* Botones de Redes Sociales / Canales */
.btn-main {
    margin-bottom: 2rem;
}

.social-channels {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.5rem;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid #333;
    text-decoration: none;
    font-weight: 500;
    font-family: monospace;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.channel-link i {
    font-size: 1.2rem;
}

.channel-link:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 102, 0.1);
}

/* Estilos del Botón Hamburguesa (Oculto en PC) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

/* Responsivo (Pantallas Móviles) */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    
    /* Mostrar botón hamburguesa */
    .menu-toggle { display: flex; }

    /* Contenedor del menú desplegable */
    .nav-links {
        position: absolute;
        top: 100%; /* Se coloca justo debajo de la barra de navegación */
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 2px solid var(--neon-green);
        
        /* Lista en formato horizontal como solicitaste */
        display: flex;
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        padding: 1rem;
        
        /* Ajuste de altura dinámica (solo lo que ocupa el texto) */
        height: max-content;
        
        /* Efecto de aparición */
        transform: translateY(-200%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 999;
    }

    /* Clase que se activa con JavaScript */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    /* Animación del botón a una "X" al abrir */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--neon-green);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--neon-green);
    }
}