 :root {
    --primary: #00f2ff;
    --secondary: #7000ff;
    --bg: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text: #ffffff;
    --text-dim: #b0b0b0;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.main-header { padding: 2rem 0; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Orbitron'; font-size: 1.2rem; color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 400; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }

/* Hero */
.hero-section { height: 80vh; display: flex; align-items: center; }
h1 { font-family: 'Orbitron'; font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.text-gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: 1.2rem; color: var(--text-dim); max-width: 600px; margin-bottom: 2rem; }

/* Botones */
.btn-primary { 
    background: var(--gradient); 
    color: white; 
    padding: 1rem 2rem; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: bold; 
    transition: 0.3s;
    display: inline-block;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2); }

/* Proyectos */
.section-title { font-family: 'Orbitron'; margin-bottom: 3rem; text-align: center; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.project-card { 
    background: var(--card-bg); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 20px; 
    overflow: hidden; 
    transition: 0.4s;
    backdrop-filter: blur(10px);
}
.project-card:hover { transform: translateY(-10px); border-color: var(--primary); }
.project-media { height: 200px; background: #111; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: 0.5s; }
.project-card:hover img { opacity: 1; transform: scale(1.1); }
.project-info { padding: 1.5rem; }
.tags { display: flex; gap: 0.5rem; margin-top: 1rem; }
.tags span { font-size: 0.7rem; background: rgba(0, 242, 255, 0.1); color: var(--primary); padding: 4px 10px; border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
}
/* Skills */
.skills-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}
.skill-category {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    flex: 1;
    min-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.skill-category h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--primary);
    display: inline-block;
}

/* Servicios */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.servicio-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border-radius: 20px;
    transition: var(--transition);
}
.servicio-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.servicio-card:hover { background: rgba(0, 242, 255, 0.05); }

/* Contacto */
.contacto-section {
    padding: 100px 20px;
    text-align: center;
}
.contacto-wrapper {
    background: var(--card-bg);
    padding: 4rem 2rem;
    border-radius: 30px;
    border: 1px solid var(--primary);
}
.contacto-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-secondary {
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s;
}
.btn-secondary:hover { background: var(--primary); color: #000; }
/* Estilos para el Logo con Imagen */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    width: 45px;      /* Tamaño del logo circular */
    height: 45px;
    border-radius: 50%; /* Lo hace redondo */
    object-fit: cover;
    border: 2px solid var(--primary); /* Un borde neón sutil */
    transition: var(--transition);
}

.logo-container:hover .nav-logo {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 0 15px var(--primary);
}

.logo-text {
    font-family: 'Orbitron';
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

/* Para quitar el warning amarillo de VS Code (opcional) */
.text-gradient {
    background: var(--gradient);
    background-clip: text; /* Propiedad estándar */
    -webkit-background-clip: text; /* Mantén esta para Chrome/Safari */
    -webkit-text-fill-color: transparent;
}

/* Ajuste de Secciones */
section {
    padding: 80px 0; /* Espaciado uniforme entre secciones */
}

/* Asegurar que las imágenes llenen su contenedor */
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto evita que se deformen */
    display: block;
}
/* Servicios con Imagen de Fondo */
.servicio-card {
    position: relative;
    height: 300px; /* Altura fija para que luzca la foto */
    display: flex;
    align-items: flex-end; /* Texto al final */
    padding: 2rem;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

/* Capa oscura para que el texto se lea (Overlay) */
.servicio-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.servicio-content {
    position: relative;
    z-index: 2; /* Por encima de la capa oscura */
}

.servicio-card h3 {
    color: var(--primary);
    font-family: 'Orbitron';
    margin-bottom: 0.5rem;
}

.servicio-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.servicio-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
}

/* Asignación de imágenes (Asegúrate de que existan estos archivos) */
.srv-web { background-image: url('../assets/imagenes/htmlfondo.jpeg'); }
.srv-design { background-image: url('../assets/imagenes/htmlfondo.jpeg'); }
.srv-deploy { background-image: url('../assets/imagenes/htmlfondo.jpeg'); }
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float img { width: 35px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
    background: var(--gradient); 
    border-radius: 10px; 
}
/* Sección Sobre Mí */
.about-section {
    padding: 100px 20px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* El texto ocupa más espacio que las stats */
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

/* Contenedor de Estadísticas */
.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.stat-item:hover {
    transform: translateX(10px);
    border-color: var(--secondary);
    box-shadow: -5px 5px 20px rgba(112, 0, 255, 0.1);
}

.stat-item span {
    display: block;
    font-family: 'Orbitron';
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    margin: 0;
}

/* Responsive para tablets y celulares */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr; /* Se apila uno arriba del otro */
        gap: 3rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-text h2 {
        text-align: center !important;
        font-size: 2rem;
    }

    .about-stats {
        flex-direction: row; /* Las stats se ponen una al lado de la otra */
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .about-stats {
        flex-direction: column;
    }
}
/* Footer Profesional */
.main-footer {
    padding: 60px 0 40px;
    background: linear-gradient(to top, #080808, var(--bg));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Tech Stack en Footer */
.footer-tech {
    text-align: center;
}

.tech-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.tech-stack-footer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tech-stack-footer span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0.6;
    transition: 0.3s;
    font-family: 'Orbitron', sans-serif;
}

.tech-stack-footer span:hover {
    opacity: 1;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

/* Info de Copyright */
.footer-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-divider {
    color: var(--primary);
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .footer-info {
        flex-direction: column;
        gap: 5px;
    }
    .footer-divider {
        display: none;
    }
    .tech-stack-footer {
        gap: 15px;
    }
}
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.step {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}
.step:hover {
    border-bottom-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}
.step-num {
    font-family: 'Orbitron';
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}
.step h3 { margin: 1rem 0; font-size: 1.2rem; }
.step p { font-size: 0.9rem; color: var(--text-dim); }
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient);
    z-index: 1001;
    box-shadow: 0 0 10px var(--primary);
}
/* Sección de Idiomas */
.languages-section {
    padding: 60px 0;
    margin-bottom: 50px;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.lang-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.lang-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-5px);
}

.lang-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lang-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.lang-level {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Barra de progreso de idioma */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}
.tech-stack-footer {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.tech-item i {
    font-size: 1.1rem;
    color: var(--primary); /* El color verde o azul que estés usando */
}

.tech-item:hover {
    color: #fff;
}

.footer-info {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    opacity: 0.6;
}
.progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary);
    /* Aseguramos que el ancho definido en el HTML se respete */
    display: block !important; 
    transition: width 1s ease-in-out; /* Animación fluida por si falla GSAP */
} 
.lang-switch {
    margin-left: 20px;
    display: flex;
    gap: 5px;
    align-items: center;
}
.lang-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 5px;
    transition: 0.3s;
}
.lang-btn.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
}
.divider { color: rgba(255,255,255,0.2); font-size: 0.7rem; }
/* --- FIX DE ANIMACIONES GSAP (Versión Segura) --- */

/* Solo ocultamos si el navegador soporta JS y las animaciones están listas */
.reveal, 
.step, 
.lang-card, 
.project-card, 
.skill-category, 
.servicio-card {
    /* Bajamos la opacidad pero no a 0 total para testear, 
       o mejor, la dejamos en 1 y que el JS la baje al cargar */
    opacity: 1 !important; 
    will-change: transform, opacity;
}

/* Forzamos que las secciones existan para el ScrollTrigger */
#workflow, 
#languages, 
.about-section, 
.contacto-section {
    display: block !important;
    min-height: 100px;
    visibility: visible !important;
}

/* Si quieres que GSAP maneje la entrada, el JS se encargará de ponerlos en 0 
   apenas cargue, pero si el JS falla, el usuario igual verá tu contenido. */