/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Estilos generales */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

/* Animación del gradiente de fondo */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Partículas flotantes */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

/* Iconos flotantes de tecnologías */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: floatIcon 8s ease-in-out infinite;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(-15px) rotate(240deg); }
}

.hero-content {
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

/* Efecto Typewriter */
.typewriter {
    display: inline-block;
    position: relative;
}

.typewriter-cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--secondary-color);
    font-weight: 100;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Estadísticas animadas */
.hero-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    width: 100%;
    justify-content: flex-start;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    flex: 1;
    max-width: 150px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Badges tecnológicos dinámicos */
.hero-tech-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    width: 100%;
    justify-content: flex-start;
}

.hero-tech-badge {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: badgeFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
    cursor: default;
}

.hero-tech-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* Secciones */
.section-title {
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    display: block;
    margin: 1rem auto;
}

/* Timeline de experiencia */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--secondary-color);
    border-radius: 50%;
    border: 3px solid white;
    z-index: 2;
}

/* Fondo de empresa opcional */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--company-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
    transition: opacity 0.3s ease;
}

.timeline-item:hover::after {
    opacity: 0.05;
}

.timeline-content {
    position: relative;
    z-index: 1;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.timeline-info {
    flex: 1;
}

.timeline-company-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.timeline-company-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.timeline-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.timeline-company {
    color: var(--text-light);
    font-weight: 500;
    margin: 0.25rem 0 0.75rem 0;
    font-size: 1rem;
}

.timeline-description {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Variante con logo prominente */
.timeline-item.has-logo .timeline-company-logo {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    padding: 0;
    background-color: #ffffff;
}

/* Badge de ubicación opcional */
.timeline-location {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.timeline-location i {
    font-size: 0.7rem;
}

/* Tabs Unificados */
.unified-tabs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.unified-tabs {
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
    border: none;
    margin-bottom: 3rem;
}

.unified-tabs .nav-link {
    border: none;
    border-radius: 40px;
    padding: 1rem 2rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    background: transparent;
}

.unified-tabs .nav-link:hover {
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
}

.unified-tabs .nav-link.active {
    background: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow);
}

/* Educación - Diseño mejorado */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.education-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    border-left: 4px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-radius: 50%;
    z-index: 0;
}

.education-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.education-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    min-width: 40px;
    text-align: center;
}

.education-content {
    flex: 1;
}

.education-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.3;
}

.education-institution {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.education-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.education-date {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.education-level {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Variaciones de color para diferentes niveles */
.education-level.universitario {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.education-level.profesional {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.education-level.especializacion {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.education-level.metodologia {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.education-level.curso-online {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Categorización visual */
.education-card.degree {
    border-left-color: #8e44ad;
}

.education-card.certification.profesional {
    border-left-color: #e74c3c;
}

.education-card.certification.especializacion {
    border-left-color: #f39c12;
}

.education-card.certification.metodologia {
    border-left-color: #27ae60;
}

.education-card.certification.curso-online {
    border-left-color: #3498db;
}

/* Tech Stack Unificado - Sin categorías */
.tech-stack-unified {
    max-width: 1200px;
    margin: 0 auto;
}

.tech-skills-grid-unified {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.tech-skill-card-unified {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: auto;
    border-left: 4px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.tech-skill-card-unified:hover {
    transform: translateY(-8px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tech-skill-card-unified::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-radius: 50%;
    z-index: 0;
}

.tech-skill-header-unified {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.tech-skill-icon-unified {
    font-size: 1.8rem;
    min-width: 35px;
    text-align: center;
    color: var(--skill-color, #3498db);
}

.tech-skill-content-unified {
    flex: 1;
}

.tech-skill-name-unified {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.1rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

.tech-skill-level-text-unified {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0;
    font-size: 0.8rem;
}

.tech-skill-progress-unified {
    position: relative;
    width: 50px;
    height: 50px;
    margin-left: auto;
}

.progress-circle-unified {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--skill-color, #3498db) 0deg,
        var(--skill-color, #3498db) var(--progress-deg, 0deg),
        #f0f0f0 var(--progress-deg, 0deg),
        #f0f0f0 360deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.6s ease;
}

.progress-circle-unified::before {
    content: '';
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.progress-text-unified {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* Animación de pulso para las mejores habilidades */
.tech-skill-card-unified.expert {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

/* Botones personalizados */
.btn-primary {
    background: var(--secondary-color);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
}

.btn-primary:hover {
    background: var(--primary-color);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
}

.btn-outline-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0;
        min-height: auto;
    }

    .hero-name-elegant {
        font-size: clamp(2.5rem, 7vw, 4.5rem);
    }

    .hero-title-elegant {
        font-size: clamp(1.2rem, 3.5vw, 2rem);
    }

    .hero-description-elegant {
        font-size: clamp(1rem, 2vw, 1.2rem);
    }

    .floating-icon {
        font-size: 1.5rem;
    }

    .tech-skills-grid-minimal {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }
    
    .tech-skill-card-minimal {
        padding: 0.6rem;
        min-height: 65px;
    }
    
    .tech-skill-top {
        gap: 0.5rem;
    }
    
    .tech-skill-icon-minimal {
        font-size: 1.4rem;
    }
    
    .tech-skill-name-minimal {
        font-size: 0.75rem;
    }
    
    .tech-skill-category {
        font-size: 0.6rem;
    }
}

@media (max-width: 576px) {
    .hero-name-elegant {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .hero-title-elegant {
        font-size: clamp(1rem, 3vw, 1.8rem);
        letter-spacing: 0.05em;
    }

    .hero-description-elegant {
        font-size: clamp(0.95rem, 2vw, 1.1rem);
    }

    .name-underline {
        width: 150px;
        height: 3px;
    }

    .tech-skills-grid-minimal {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
    }
    
    .tech-skill-card-minimal {
        padding: 0.5rem;
        min-height: 60px;
    }
    
    .tech-skill-top {
        gap: 0.4rem;
    }
    
    .tech-skill-icon-minimal {
        font-size: 1.2rem;
    }
    
    .tech-skill-name-minimal {
        font-size: 0.7rem;
    }
    
    .tech-skill-category {
        font-size: 0.55rem;
    }
}

/* Proyectos Personales */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(155, 89, 182, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.project-status.completed {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.project-status.in-progress {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.project-status.planning {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-description {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-technologies {
    margin-bottom: 1.5rem;
}

.project-tech-title {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.project-tech-tag {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.project-tech-tag:hover {
    transform: scale(1.05);
}

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

.project-link {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.project-link.github {
    background: #24292e;
    color: white;
}

.project-link.github:hover {
    background: #1a1e22;
    color: white;
    transform: translateY(-2px);
}

.project-link.demo {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
}

.project-link.demo:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
}

.project-link.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.project-link.disabled:hover {
    transform: none;
    background: #e9ecef;
    color: #6c757d;
}

/* Animación de entrada para proyectos */
.project-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Botones mejorados */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-enhanced.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-enhanced.btn-outline-primary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-content {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.btn-enhanced:hover .btn-glow {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-buttons .btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.social-links a {
    display: inline-block;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hero Content Compacto */
.hero-content-compact {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Layout Principal - 2 Columnas */
.hero-main-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
}

/* Sección de Texto (Izquierda) */
.hero-text-section {
    text-align: left;
}

.hero-name-container {
    margin-bottom: 1.5rem;
}

.hero-name-elegant {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 25%, #e9ecef 50%, #ffffff 75%, #f1f3f4 100%);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientTextShift 8s ease infinite;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

.name-underline {
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    margin: 1rem 0;
    border-radius: 2px;
    animation: underlineGlow 3s ease-in-out infinite;
}

.hero-title-container {
    margin-bottom: 1.5rem;
}

.hero-title-elegant {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-description-container {
    margin-bottom: 1rem;
}

.hero-description-elegant {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1.5s ease 0.5s both;
}

/* Sección de Estadísticas (Derecha) */
.hero-stats-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 450px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

/* Layout Inferior */
.hero-bottom-content {
    width: 100%;
    text-align: center;
}

/* Tech badges compactos */
.hero-tech-badges {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.hero-tech-badge {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.hero-tech-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.hero-tech-badge:hover::before {
    left: 100%;
}

.hero-tech-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

/* Acciones del Hero */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    padding: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* Responsive para el layout compacto */
@media (max-width: 992px) {
    .hero-main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text-section {
        text-align: center;
    }
    
    .name-underline {
        margin: 1rem auto;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .hero-content-compact {
        padding: 1.5rem 1rem;
        height: 100vh;
        justify-content: space-evenly;
    }
    
    .hero-main-content {
        margin-bottom: 1rem;
    }
    
    .hero-name-elegant {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-title-elegant {
        font-size: clamp(1rem, 3vw, 1.4rem);
    }
    
    .hero-description-elegant {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .hero-tech-badges {
        gap: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .hero-tech-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        max-width: 280px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .social-links a {
        font-size: 1.3rem;
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content-compact {
        padding: 1rem;
        justify-content: space-around;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        max-width: 100%;
    }
    
    .stat-item {
        padding: 0.7rem 0.3rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* ============================================
   NUEVAS FUNCIONALIDADES AVANZADAS
   ============================================ */

/* Navegación Sticky */
.navbar-sticky {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-sticky.visible {
    top: 0;
    transform: translateY(0);
}

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

.navbar-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.navbar-menu .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.navbar-menu .nav-link:hover::before {
    left: 100%;
}

.navbar-menu .nav-link:hover,
.navbar-menu .nav-link.active {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.navbar-menu .nav-link i {
    font-size: 0.9rem;
}

.navbar-toggle {
    display: flex;
    align-items: center;
}

/* Toggle Modo Oscuro */
.theme-toggle {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(180deg);
}

/* Dark mode styles */
body.dark-mode .theme-toggle {
    background: linear-gradient(135deg, #3f51b5, #303f9f);
    box-shadow: 0 4px 15px rgba(63, 81, 181, 0.3);
}

body.dark-mode .theme-toggle .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-180deg);
}

body.dark-mode .theme-toggle .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Botón Volver Arriba */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Animaciones de Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Hero */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

/* Microinteracciones Mejoradas */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    border: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.btn-enhanced:active {
    transform: translateY(-1px) scale(0.98);
}

/* Cards con efectos mejorados */
.timeline-item,
.education-card,
.tech-skill-card-unified,
.project-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.timeline-item:hover,
.education-card:hover,
.tech-skill-card-unified:hover,
.project-card:hover {
    transform: translateY(-8px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Estadísticas con efectos de pulso */
.stat-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.stat-item:hover {
    transform: translateY(-8px) scale(1.05) rotateY(5deg);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.2);
}

/* Tech badges con efectos mejorados */
.hero-tech-badge {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.hero-tech-badge:hover {
    transform: translateY(-5px) scale(1.1) rotateZ(2deg);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Enlaces sociales con efectos avanzados */
.social-links a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.2) rotate(10deg);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* Responsive para navegación */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
    }
    
    .navbar-menu {
        gap: 1rem;
    }
    
    .navbar-menu .nav-link span {
        display: none;
    }
    
    .navbar-menu .nav-link {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
}

/* Modo Oscuro - Variables y Estilos Globales */
body.dark-mode {
    --primary-color: #e3f2fd;
    --secondary-color: #64b5f6;
    --accent-color: #ff7043;
    --text-dark: #e3f2fd;
    --text-light: #b0bec5;
    --bg-light: #1e1e1e;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.4);
    
    background-color: #121212;
    color: #e3f2fd;
    transition: all 0.3s ease;
}

body.dark-mode .navbar-sticky {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .bg-light {
    background-color: #1e1e1e !important;
}

body.dark-mode .timeline-item,
body.dark-mode .education-card,
body.dark-mode .tech-skill-card-unified,
body.dark-mode .project-card {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .unified-tabs {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode footer {
    background-color: #0d1117 !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Optimizaciones de Performance */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-section,
.particles-container,
.floating-icons {
    will-change: transform;
    transform: translateZ(0);
}

/* Mejoras en animaciones para móviles */
@media (max-width: 768px) {
    .animate-on-scroll {
        transition: all 0.6s ease;
    }
    
    .timeline-item:hover,
    .education-card:hover,
    .tech-skill-card-unified:hover,
    .project-card:hover {
        transform: translateY(-5px);
    }
    
    .stat-item:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .hero-tech-badge:hover {
        transform: translateY(-3px) scale(1.05);
    }
    
    .social-links a:hover {
        transform: translateY(-3px) scale(1.1);
    }
}

/* Tech Stack Minimalista - Solo nombre e icono */
.tech-stack-unified {
    max-width: 1200px;
    margin: 0 auto;
}

.tech-skills-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    padding: 1rem 0;
}

.tech-skill-card-minimal {
    background: white;
    border-radius: 10px;
    padding: 0.8rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: auto;
    border-left: 3px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    text-align: left;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-skill-card-minimal:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.tech-skill-card-minimal::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--skill-color, #3498db) 0%, transparent 70%);
    opacity: 0.03;
    border-radius: 50%;
    z-index: 0;
    transition: all 0.3s ease;
}

.tech-skill-card-minimal:hover::before {
    opacity: 0.08;
    transform: scale(1.2);
}

.tech-skill-content-minimal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.tech-skill-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
}

.tech-skill-icon-minimal {
    font-size: 1.6rem;
    color: var(--skill-color, #3498db);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tech-skill-name-minimal {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.1;
    text-align: left;
    flex: 1;
}

.tech-skill-category {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-top: 0.1rem;
}

/* Efectos especiales para expertos */
.tech-skill-card-minimal.expert {
    border-left-width: 6px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.02), white);
}

.tech-skill-card-minimal.expert:hover {
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15);
}

.tech-skill-card-minimal.expert .tech-skill-icon-minimal {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

.tech-skill-card-minimal:hover .tech-skill-icon-minimal {
    transform: scale(1.15) rotate(5deg);
}

/* Modo oscuro para cards minimalistas */
body.dark-mode .tech-skill-card-minimal {
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .tech-skill-name-minimal {
    color: #e3f2fd;
}

body.dark-mode .tech-skill-category {
    color: #b0bec5;
} 