/* --- VARIABLES GLOBALES & RESET --- */
:root {
    /* Paleta de Colores "Neon Dark" */
    --bg-main: #0f172a;       /* Fondo principal muy oscuro */
    --bg-alt: #1e293b;        /* Fondo secundario para secciones */
    --text-main: #e2e8f0;     /* Texto blanco roto */
    --text-muted: #94a3b8;    /* Texto secundario gris */
    /* ¡CAMBIA ESTE COLOR SI QUIERES OTRO ACENTO! (ej: #a855f7 para morado) */
    --accent: #3b82f6;        /* Azul eléctrico */
    --accent-hover: #60a5fa;
    
    /* Fuentes & Tamaños */
    --font-main: 'Poppins', sans-serif;
    --nav-height: 70px;
    --section-spacing: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en links */
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul { list-style: none; }

.section { padding: var(--section-spacing) 0; }
.bg-alt { background-color: var(--bg-alt); }

.text-highlight { color: var(--accent); }
.dot { color: var(--accent); }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

/* Botones Genéricos */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 14px -4px var(--accent);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* --- NAVEGACIÓN --- */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9); /* Fondo semi-transparente */
    backdrop-filter: blur(10px); /* Efecto de desenfoque moderno */
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }

.btn-nav {
    border: 2px solid var(--accent);
    padding: 8px 20px !important;
    border-radius: 4px;
    color: var(--accent) !important;
}
.btn-nav:hover {
    background: var(--accent);
    color: white !important;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    /* Fondo con un degradado sutil */
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 40%),
                var(--bg-main);
    padding-top: var(--nav-height);
}

.hero-content h4 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- PROYECTOS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-alt);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
}

.card-image {
    height: 200px;
    background-color: #000;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra el área sin deformarse */
    transition: transform 0.5s ease;
    opacity: 0.8;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
    opacity: 1;
}

.card-content { padding: 25px; }

.card-content h3 { font-size: 1.4rem; margin-bottom: 10px; }
.card-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.card-tech span {
    font-size: 0.8rem;
    background: rgba(59, 130, 246, 0.1); /* Fondo azul transparente */
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
}

.card-links {
    display: flex;
    gap: 20px;
}

.card-links a {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}
.card-links a:hover { color: var(--accent); }
.soon { color: var(--text-muted); font-size: 0.9rem; font-style: italic; }

/* --- SOBRE MÍ --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    /* Un borde sutil brillante */
    box-shadow: 20px 20px 0px rgba(59, 130, 246, 0.1);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.skill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.skill i { color: var(--accent); font-size: 1.2rem; }

/* --- CONTACTO --- */
.contact-container { text-align: center; }
.contact-header p { color: var(--text-muted); max-width: 600px; margin: 0 auto 50px auto; }

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--bg-alt);
    padding: 30px;
    border-radius: 10px;
    width: 250px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(59, 130, 246, 0.05);
}

.contact-card i { font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; }
.contact-card h3 { font-size: 1.2rem; margin-bottom: 5px; }
.contact-card p { color: var(--text-muted); font-size: 0.9rem; }

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- RESPONSIVE (MÓVIL) --- */
@media screen and (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero-content h1 { font-size: 2.8rem; }
    
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        background: var(--bg-alt);
        height: calc(100vh - var(--nav-height));
        width: 70%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease-in-out;
        border-left: 1px solid rgba(255,255,255,0.05);
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 20px 0; }

    .about-container { grid-template-columns: 1fr; }
    .about-img { order: 2; } /* Pone la imagen debajo del texto en móvil */
}
