/* RESET y variables globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, #e2e8f0 100%);
    color: var(--dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Header */
header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1002;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navegación desktop */
.nav-header {
    display: flex;
    gap: 2rem;
}

.nav-header a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-header a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-header a:hover::after {
    width: 100%;
}

.nav-header a:hover {
    color: var(--primary-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
    animation: rotarFondo 20s linear infinite;
}

@keyframes rotarFondo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-imagen {
    position: relative;
    text-align: center;
}

.circulo-animado {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.3;
    filter: blur(30px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 0.3;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.5;
    }
}

.foto-perfil {
    width: 100%;
    max-width: 280px;
    border-radius: 32px;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.5);
    border: 3px solid var(--primary);
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s;
}

.foto-perfil:hover {
    transform: scale(1.02);
    border-color: var(--secondary);
}

.datos-sutiles {
    margin-top: 1.5rem;
    text-align: center;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
}

.datos-sutiles p {
    font-size: 0.8rem;
    margin: 0.3rem 0;
    color: #cbd5e1;
}

.datos-sutiles .emoji {
    margin-right: 0.5rem;
}

.datos-sutiles a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.datos-sutiles a:hover {
    color: var(--primary-light);
}

.etiqueta {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.hero-contenido h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--light);
}

.resaltado {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.badge-programador {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 1.2rem 0;
}

.badge {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(236,72,153,0.2));
    border: 1px solid rgba(99,102,241,0.5);
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    transition: all 0.3s;
}

.badge:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(236,72,153,0.4));
    border-color: var(--primary);
}

.hero-descripcion {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.disponibilidad-remoto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.remoto-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #10b981;
    transition: all 0.3s;
}

.remoto-badge:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

/* Secciones */
.seccion {
    padding: 5rem 0;
}

.bg-oscuro {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--light);
}

.bg-acento {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.titulo-seccion {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.titulo-blanco {
    color: white;
}

.resaltado-claro {
    color: #fef08a;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.contenido-texto {
    max-width: 850px;
    margin: 0 auto;
}

.contenido-texto p {
    margin-bottom: 1rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-numero {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-texto {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

.tarjeta-habilidad {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.tarjeta-habilidad:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 30px -15px rgba(0,0,0,0.3);
}

.tarjeta-icono {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tarjeta-habilidad h3 {
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

.tarjeta-habilidad ul {
    list-style: none;
    padding-left: 0;
}

.tarjeta-habilidad li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.tarjeta-habilidad li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Tech icons */
.tech-icons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-item {
    text-align: center;
    transition: transform 0.3s;
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-item img {
    height: 50px;
    width: auto;
}

.tech-item span {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.tech-framework {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 0.2rem;
}

.color-logos .tech-item img {
    filter: none !important;
}

/* Intereses */
.intereses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.interes-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(236,72,153,0.1));
    padding: 1rem 1.5rem;
    border-radius: 16px;
    transition: all 0.3s;
}

.interes-card:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(236,72,153,0.2));
}

.interes-icon {
    font-size: 1.8rem;
}

/* Aptitudes */
.texto-centrado {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--gray);
}

.bg-oscuro .texto-centrado {
    color: #cbd5e1;
}

.aptitudes-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.aptitud-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.aptitud-icono img {
    height: 45px;
    width: auto;
}

.aptitud-barra {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.barra-progreso {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    animation: cargarBarra 1.5s ease-out;
}

@keyframes cargarBarra {
    from { width: 0; }
}

.aptitud-nombre {
    min-width: 100px;
    font-weight: 500;
}

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

.tarjeta-soporte {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    text-align: center;
    padding: 1.8rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.tarjeta-soporte:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.25);
    border-color: white;
}

.soporte-icono {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tarjeta-soporte h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.soporte-imagen {
    margin: 1rem 0;
    border-radius: 16px;
    overflow: hidden;
}

.soporte-imagen img {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    transition: transform 0.3s;
}

.tarjeta-soporte:hover .soporte-imagen img {
    transform: scale(1.05);
}

.btn-ver {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-ver span {
    transition: transform 0.3s;
}

.btn-ver:hover {
    background: var(--dark);
    color: white;
    transform: scale(1.05);
}

.btn-ver:hover span {
    transform: translateX(5px);
}

/* Footer */
footer {
    background: var(--darker);
    color: var(--light);
    padding: 3rem 0;
    text-align: center;
}

.container-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 2rem 0;
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--light);
    transition: all 0.3s;
}

.social-icon img {
    height: 50px;
    width: 50px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    transition: all 0.3s;
}

.social-icon span {
    font-size: 0.8rem;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.social-icon:hover img {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(99,102,241,0.4);
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ============================================ */
/* MENÚ MÓVIL - SALE DESDE LA DERECHA (30%) */
/* ============================================ */
.menu-movil {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-movil span {
    width: 25px;
    height: 2px;
    background: #f8fafc;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-movil.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-movil.active span:nth-child(2) {
    opacity: 0;
}

.menu-movil.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 850px) {
    .menu-movil {
        display: flex;
    }
    
    /* Ocultar navegación desktop */
    .nav-header {
        position: fixed;
        top: 0;
        right: -100%;
        width: 30%;
        max-width: 250px;
        min-width: 180px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.96);
        backdrop-filter: blur(12px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        transition: right 0.35s ease-out;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0,0,0,0.25);
        padding-top: 80px;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-header.active {
        right: 0;
    }
    
    .nav-header a {
        font-size: 0.95rem;
        font-weight: 400;
        padding: 0.8rem 1.5rem;
        width: 100%;
        color: #e2e8f0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        transition: all 0.2s;
    }
    
    .nav-header a:hover {
        background: rgba(99, 102, 241, 0.15);
        padding-left: 2rem;
        color: var(--primary-light);
    }
    
    /* Overlay */
    .nav-header.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.15);
        z-index: -1;
        pointer-events: none;
    }
    
    header {
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1002;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
    }
    
    main {
        padding-top: 70px;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-contenido h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .titulo-seccion {
        font-size: 2rem;
    }
    
    .aptitud-item {
        flex-direction: column;
        text-align: center;
    }
    
    .aptitud-barra {
        width: 100%;
    }
    
    .datos-sutiles {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .badge-programador {
        justify-content: center;
    }
    
    .disponibilidad-remoto {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-header {
        width: 35%;
        max-width: 220px;
        min-width: 160px;
    }
    
    .nav-header a {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
    
    .grid-habilidades, .grid-soportes {
        grid-template-columns: 1fr;
    }
    
    .intereses-grid {
        grid-template-columns: 1fr;
    }
}