/* =========================================
   1. VARIABLES & RESET
   ========================================= */
   :root {
    --color-primario: #2A2A2A;
    --color-secundario: #5459f0;
    --color-fondo: #F5F5F5;
    --color-texto: #333;
    --sombra: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-texto);
    background: var(--color-fondo);
    overflow-x: hidden;
}

/* =========================================
   2. UI ELEMENTS & COMPONENTES GLOBALES
   ========================================= */

/* --- Botones CTA --- */
.cta-button {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.cta-primary {
    background: var(--color-secundario);
    color: white;
    box-shadow: 0 10px 20px rgba(84,89,240,0.3);
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(84,89,240,0.4);
}

.cta-secondary {
    border: 2px solid var(--color-secundario);
    color: var(--color-secundario);
    background: transparent;
}

.cta-secondary:hover {
    background: rgba(84,89,240,0.05);
    transform: translateY(-3px);
}

/* --- Títulos de Sección --- */
.section-title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-primario);
}

.section-title1 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--color-fondo);
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F5;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.9s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-spinner {
    position: relative;
    width: 300px;
    height: 300px;
}

.preloader-logo {
    position: absolute;
    width: 90px;
    height: 90px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: logo-pulse 2.0s ease-in-out infinite;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-secundario);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

/* =========================================
   3. HEADER & NAV
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    z-index: 1000;
    box-shadow: var(--sombra);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 45px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(-15deg);
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--color-primario);
    font-size: 1.25rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-primario);
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secundario);
    transition: width 0.3s ease;
}

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

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    margin-top: 80px;
    min-height: 100vh;
    padding: 4rem 2rem;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--color-fondo) 60%, rgba(84,89,240,0.1));
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--color-secundario);
    opacity: 0.05;
    border-radius: 50%;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

.hero-content {
    max-width: 600px;
    position: relative;
    margin-left: 80px; /* Espacio para iconos sociales en desktop */
}

.hero-avatar {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    border: 8px solid white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    justify-self: center;
}

.hero-avatar:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(45deg, var(--color-primario) 30%, var(--color-secundario));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

/* Nota: Se eliminaron los ::after y ::before conflictivos */

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-primario);
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.hero a {
    text-decoration: none;
    border: none;
}

/* --- Social Links (Hero) --- */
.social-links {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(84,89,240,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sombra);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-link i {
    color: var(--color-primario);
    transition: color 0.3s ease;
}

.social-link:hover {
    transform: scale(1.15) translateX(10px);
    background: var(--color-secundario);
    box-shadow: 0 8px 20px rgba(84,89,240,0.3);
}

.social-link:hover i {
    color: white;
}

/* --- Typewriter Effect --- */
.typewriter-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.section-logo {
    width: 80px;
    height: 80px;
    filter: brightness(0) invert(1);
    animation: logoFloat 3s ease-in-out infinite;
    margin-top: -5px;
}

/* =========================================
   5. LOGOS SLIDER (INFINITE)
   ========================================= */
.logos-slider {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    margin: 2rem 0;
}

.slider-track {
    display: flex;
    animation: slide 150s linear infinite;
    width: max-content;
    will-change: transform;
}

.logo-item {
    flex-shrink: 0;
    margin: 0 4rem;
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo-item img {
    height: 100px;
    width: auto;
    transition: all 0.20s ease;
    filter: grayscale(2) sepia(1) saturate(5) hue-rotate(200deg) brightness(1.5) opacity(0.4);
}

.logo-item:hover img,
.logo-item:active img {
    filter: none;
}

.slider-container::before,
.slider-container::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.slider-container::before { left: 0; background: linear-gradient(90deg, white 20%, transparent); }
.slider-container::after { right: 0; background: linear-gradient(-90deg, white 20%, transparent); }

/* =========================================
   6. PROYECTOS SECTION
   ========================================= */
.proyectos {
    padding: 4rem 2rem;
}

.filtros-proyectos {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.filtro-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--color-secundario);
    border-radius: 30px;
    background: transparent;
    color: var(--color-secundario);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.filtro-btn:hover,
.filtro-btn.active {
    background: var(--color-secundario);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(84,89,240,0.3);
}

.proyectos-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
    position: relative;
}

.proyecto-card {
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.proyecto-card.fade-out {
    opacity: 0;
    transform: translateY(40px);
}

.proyecto-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.proyecto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(84,89,240,0.1), transparent);
    transition: 0.6s;
}

.proyecto-card:hover::before { left: 100%; }

.card-content {
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.proyecto-card:hover .card-content { transform: translateY(-10px); }

.card-content h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5rem;
    color: var(--color-primario);
}

.card-content p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #666;
}

.proyecto-link {
    display: inline-block;
    color: var(--color-secundario);
    text-decoration: none;
    margin: 0.3rem 0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.proyecto-link:hover {
    text-decoration: underline;
    transform: translateX(5px);
}

.proyecto-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.software-icons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.software-icons img {
    width: 45px;
    height: 45px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.software-icons img:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.proyecto-year {
    font-size: 1rem;
    color: #161225;
    font-weight: bold;
    font-family: 'Roboto';
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: var(--color-secundario);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* =========================================
   7. HABILIDADES (SKILLS)
   ========================================= */
.habilidades {
    padding: 4rem 2rem;
    background: rgb(245, 245, 245);
}

.habilidad-categoria {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.habilidad-categoria h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-primario);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.software-list {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primario);
    padding: 0.5rem 0;
}

.skill-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-right: 2rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.skill-item:hover .skill-icon {
    animation: icon-bounce 0.6s ease;
}

.skill-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--color-secundario);
    border-radius: 4px;
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    transition: width 1.5s cubic-bezier(0.34, -0.55, 0.27, 1.20) 0.1s;
}

.skill-progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: rgba(255,255,255,0.3);
}

.skill-item:hover .skill-progress {
    animation: progress-pulse 1s ease infinite;
}

.skill-percent {
    margin-left: auto;
    font-weight: 600;
    color: var(--color-secundario);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--color-secundario);
    color: rgba(255, 255, 255, 0.893);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-tag:hover {
    background: transparent;
    color: var(--color-secundario);
    border-color: var(--color-secundario);
    transform: translateY(-2px);
}

/* =========================================
   8. AI & DEVELOPER SECTION
   ========================================= */
.developer-ai {
    padding: 4rem 2rem;
    background: linear-gradient(45deg, #141414f3 0%, #1a1a1afd 100%);
    color: white;
}

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

.ai-feature-card {
    background: rgba(230, 230, 230, 0.1);
    padding: 2rem;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

.ai-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.ai-icon .fa-robot {
    font-size: 3rem;
    color: var(--color-secundario);
    position: relative;
    z-index: 2;
}

.ai-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--color-secundario);
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.2;
}

.ai-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    column-count: 3;
    column-gap: 2rem;
}

.ai-project-card {
    background: #0f0f0f;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    /* Evitar que se parta en columnas */
    break-inside: avoid; 
    margin-bottom: 2rem;
}

.ai-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.ai-project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.ai-project-content {
    padding: 1.5rem;
    background: rgba(32, 32, 32, 0.85);
}

.ai-project-content h4 {
    color: var(--color-secundario);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.ai-project-content p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.5s 0.3s forwards;
}

.ai-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.ai-technologies {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: var(--color-secundario);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.ai-model {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(84,89,240,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--color-secundario);
}

.ai-project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ai-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-fondo);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-link:hover {
    color: var(--color-secundario);
    transform: translateX(5px);
}

.ai-tech-stack {
    text-align: center;
    margin-top: 4rem;
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tech-item img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.tech-item:hover img {
    transform: scale(1.2);
}

/* Componentes específicos AI */
.ai-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.ai-technologies {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: var(--color-secundario);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.ai-model {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(84,89,240,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--color-secundario);
}

.ai-project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ai-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-fondo);
    text-decoration: none;
    transition: all 0.3s ease;
}

.ai-link:hover {
    color: var(--color-secundario);
    transform: translateX(5px);
}

/* =========================================
   9. MOBILE VIDEOS SECTION (CLEANED)
   ========================================= */
.mobile-videos {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.phone-mockup-container {
    max-width: 1200px;
    margin: 0 auto 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 0;
}

/* Mockup */
.phone-mockup {
    position: relative;
    width: 280px;
    height: 568px; /* Ratio 9:16 */
    z-index: 2;
}

.phone-frame {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 8px;
    box-shadow: 
        0 25px 50px rgba(0,0,0,0.25),
        0 0 0 2px rgba(255,255,255,0.1),
        inset 0 0 20px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Borde gradiente animado */
.phone-frame::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    border-radius: 43px;
    z-index: -1;
    animation: gradient-border 3s ease infinite;
    background-size: 400% 400%;
}

.phone-notch {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 16px;
    background: #1a1a1a;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    z-index: 3;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

/* Contenedor y Videos */
.video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.mobile-video {
    display: none !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-video.active {
    display: block !important;
}

/* Navegación Slider */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    font-size: 1.5rem;
    color: #333;
}

.slider-nav:hover {
    background: var(--color-secundario);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev { left: -80px; }
.slider-nav.next { right: -80px; }

/* Info Video */
.video-info {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
}

.video-info p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #666;
    margin-bottom: 2.5rem;
}

.video-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 120px;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-secundario);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.video-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.video-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-indicator.active,
.video-indicator:hover {
    background: var(--color-secundario);
    transform: scale(1.2);
}

/* =========================================
   10. LIGHTBOX & MODALES
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.lightbox.active { display: flex; }

.lightbox-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.lightbox-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-slider img {
    width: 100%;
    min-width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    flex-shrink: 0;
}

.lightbox button {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox button:hover { background: var(--color-secundario); }

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-indicators {
    position: absolute;
    bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.lightbox-indicators span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-indicators span.active {
    background: var(--color-secundario);
    transform: scale(1.3);
}

/* --- Bio Modal --- */
.bio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.bio-modal.active {
    opacity: 1;
    visibility: visible;
}

.bio-modal-content {
    background: rgba(30, 30, 30, 0.95);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    transform: translateY(50px);
    transition: transform 0.4s ease;
}

.bio-modal.active .bio-modal-content { transform: translateY(0); }

.bio-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.bio-modal-close:hover { color: var(--color-secundario); }

.bio-modal-content h2 {
    color: white;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.bio-modal-content p, 
.bio-details {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Scrollbar Custom para Modal */
.bio-modal-content::-webkit-scrollbar { width: 8px; }
.bio-modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 10px; }
.bio-modal-content::-webkit-scrollbar-thumb { background: var(--color-secundario); border-radius: 10px; }

/* =========================================
   11. FOOTER
   ========================================= */
.main-footer {
    background: var(--color-primario);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--color-secundario);
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.footer-col a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.footer-col a:hover { color: var(--color-secundario); }

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-icons a { font-size: 1.5rem; }

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* =========================================
   12. ANIMACIONES (Keyframes)
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(-50%) scale(1) rotate(0deg); }
    50% { transform: translateY(-53%) scale(1.03) rotate(3deg); }
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes progress-pulse {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); }
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(0.8); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
    50% { transform: scale(1.1) rotate(-10deg); opacity: 1; }
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes gradient-border {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes social-entrance {
    from { opacity: 0; transform: translateY(-50%) translateX(-20px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* =========================================
   13. MEDIA QUERIES GLOBALES (Responsive)
   ========================================= */

/* Desktop Specific */
@media (min-width: 1025px) {
    .social-links {
        left: 1.5rem;
        gap: 2rem;
        animation: social-entrance 0.8s ease-out forwards;
    }
    
    .social-link {
        margin: 10px 0;
        padding: 12px;
    }
    
    .social-link i {
        color: var(--color-primario);
    }
}

/* Tablet & Smaller (1200px and down) */
@media (max-width: 1200px) {
    .ai-projects-grid {
        column-count: 2;
    }
}

/* Laptop & Tablet (1024px and down) */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 6rem;
    }
    
    .hero-content {
        max-width: 100%;
        margin-left: 0;
        margin-bottom: 3rem;
    }
    
    .hero-avatar {
        width: 300px;
        height: 300px;
        justify-self: center;
    }
    
    .hero-title { font-size: 2.5rem; }
    
    .hero-subtitle {
        padding-left: 0;
        text-align: center;
    }
    
    .hero-cta { justify-content: center; }
    
    /* Social links en horizontal */
    .social-links {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 3rem;
        gap: 1.5rem;
        padding: 0 15px;
        transform: none;
    }
    
    .social-link {
        background: var(--color-secundario) !important;
        box-shadow: 0 4px 12px rgba(84,89,240,0.3);
        margin: 0 5px;
        padding: 10px;
    }
    
    .social-link i {
        color: white !important;
    }
}

/* Mobile Standard (768px and down) */
@media (max-width: 768px) {
    html { font-size: 14px; }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-title { font-size: 2rem; }

    /* Proyectos en 1 columna */
    .proyectos-grid { grid-template-columns: 1fr; }

    /* Lightbox Ajustes */
    .lightbox-content {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lightbox button {
        padding: 0.75rem;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-slider img {
        max-height: 60vh;
        margin: 0 auto;
    }

    /* Preloader size */
    .preloader-spinner { width: 160px; height: 160px; }
    .preloader-logo { width: 60px; height: 60px; }
    .spinner { border-width: 3px; }

    /* Video Móvil */
    .phone-mockup { width: 250px; height: 500px; }
    .phone-frame { border-radius: 35px; padding: 6px; }
    .phone-screen { border-radius: 28px; }
    
    .slider-nav {
        width: 50px;
        height: 50px;
        background: rgba(255, 255, 255, 0.95) !important;
    }
    
    .slider-nav.prev { left: 10px !important; }
    .slider-nav.next { right: 10px !important; }
    
    .video-stats { gap: 2rem; }
    .stat { min-width: 100px; padding: 1rem; }
    .stat-number { font-size: 2rem; }

    /* AI Section */
    .ai-project-card { margin-bottom: 2rem; }
    .ai-project-card img { height: 200px; }
    .ai-project-content { padding: 1rem; }
    
    .title-logo-container { flex-direction: column; gap: 1rem; }
    .section-logo { width: 50px; height: 50px; }
}

/* Small Mobile (480px and down) */
@media (max-width: 480px) {
    .hero-avatar { width: 180px; height: 180px; }
    
    .phone-mockup { width: 220px; height: 440px; }
    .phone-frame { border-radius: 30px; padding: 5px; }
    .phone-screen { border-radius: 24px; }
    
    .slider-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .slider-nav.prev { left: -40px; }
    .slider-nav.next { right: -40px; }
    
    .stat { min-width: 80px; padding: 0.8rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-label { font-size: 0.8rem; }
}

/* Landscape Mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .preloader-spinner { transform: scale(0.7); }
}

@media (hover: none) {
    .logo-item:active img { filter: none; }
}