/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a1a1a; /* Fondo oscuro */
    color: #f0f0f0; /* Texto claro */
    line-height: 1.6;
}

/* =========================================
   NAVEGACIÓN (NAVBAR)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #252525;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.logo span {
    color: #8a2be2; /* Violeta gamer */
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 300;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-links a:hover {
    color: #8a2be2;
}

/* IMPORTANTE: Ocultamos el botón del menú en PC por defecto */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* =========================================
   SECCIÓN HERO (PORTADA)
   ========================================= */
.hero {
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #2a2a2a 0%, #1a1a1a 100%);
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.highlight {
    color: #8a2be2;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: #ccc;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem; /* Un poco más grande para el efecto */
    margin-bottom: 2rem;
    color: #aaa;
    min-height: 1.5em; /* Evita saltos si el texto se borra todo */
}

.btn {
    padding: 12px 30px;
    background-color: #8a2be2;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-block;
}

.btn:hover {
    background-color: #691bb8;
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
.container {
    padding: 4rem 10%;
}

h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #8a2be2;
    margin: 10px auto;
}

/* =========================================
   GRID SOBRE MÍ
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.skill-tag {
    display: inline-block;
    background: #333;
    padding: 5px 15px;
    margin: 5px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #8a2be2;
    color: #e0e0e0;
}

/* =========================================
   GRID DE PROYECTOS
   ========================================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: #252525;
    padding: 25px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #8a2be2;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.project-card p {
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.tech-stack span {
    font-size: 0.8rem;
    background: #1a1a1a;
    padding: 4px 10px;
    margin-right: 5px;
    border-radius: 4px;
    color: #ccc;
    display: inline-block;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: #111;
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid #333;
}

footer p {
    color: #888;
    margin-bottom: 0.5rem;
}

/* =========================================
   ESTILOS EFECTO ESCRITURA (TYPEWRITER)
   ========================================= */
.cursor {
    display: inline-block;
    background-color: transparent;
    color: #8a2be2;
    animation: blink 1s infinite;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.typed-text {
    color: #e0e0e0;
    font-weight: 400;
}

/* =========================================
   RESPONSIVE (CELULARES)
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; 
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: #252525;
        text-align: center;
        padding: 20px 0;
        border-top: 1px solid #333;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 4rem 5%;
    }
}