        /* Modern color scheme and base styles */
        :root {
            --primary: #2563eb;
            --secondary: #4f46e5;
            --background: #0f172a;
            --surface: #1e293b;
            --text: #f8fafc;
            --text-secondary: #94a3b8;
            --mobile: 480px;
            --tablet: 768px;
            --desktop: 1024px;
        }
        /* Micro-interacciones para botones */
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            margin: 0;
            padding: 0;
            background: var(--background);
            color: var(--text);
            min-height: 100vh;
            line-height: 1.6;
        }

        /* Enhanced header with glassmorphism */
        header {
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(10px);
            position: fixed;
            width: 100%;
            z-index: 1000;
            top: 0;
            left: 0;
        }

        nav {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 2rem;
            background: transparent;
            border-bottom: none;
            position: relative;
        }

        nav h1 {
            font-size: 1.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        nav a {
            color: var(--text);
            text-decoration: none;
            margin-left: 2rem;
            font-weight: 500;
            .button {
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }
    
            .button:hover {
                transform: translateY(-2px);
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            }
    
            .button:active {
                transform: translateY(0);
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            transition: all 0.3s ease;
            position: relative;
            padding: 0.5rem 1rem;
        }
        .skill-bar {
            height: 10px;
            background: var(--surface);
            border-radius: 5px;
            overflow: hidden;
        }
        
        .skill-progress {
            height: 100%;
            background: var(--primary);
            width: 0;
            transition: width 1s ease;
        }

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

        nav a:hover::after {
            width: 100%;
        }

        /* Enhanced main content */
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 80px 1rem 0;
            min-height: calc(100vh - 200px);
        }

        /* Improved hero section */
        .hero {
            min-height: calc(100vh - 80px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative;
            overflow: hidden;
            padding-top: 0;
            background: linear-gradient(
                rgba(15, 23, 42, 0.9),
                rgba(15, 23, 42, 0.7)
            ),
            url('img/code-bg.jpg') center/cover;
        }

        .hero::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            background: radial-gradient(
                circle at center,
                var(--primary) 0%,
                transparent 70%
            );
            opacity: 0.1;
            animation: pulse 4s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); opacity: 0.1; }
            50% { transform: scale(1.2); opacity: 0.2; }
        }

        .hero h2 {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #fff, var(--primary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: slideIn 1s ease-out;
        }

        .hero p {
            font-size: 1.5rem;
            max-width: 600px;
            line-height: 1.6;
            color: var(--text-secondary);
            margin-bottom: 2rem;
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 0.5s 0.2s forwards;
        }

        /* About section */
        .about {
            margin: 4rem auto;
            width: 100%;
            max-width: 1200px;
            padding: 4rem 1rem;
            background: var(--surface);
            border-radius: 2rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }

        .about-content {
            max-width: 800px;
            margin: 0 auto;
            padding: 0 2rem;
            text-align: center;
        }

        .about h2 {
            font-size: 2.5rem;
            margin-bottom: 2rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .about p {
            font-size: 1.2rem;
            color: var(--text-secondary);
            line-height: 1.8;
            margin-bottom: 2rem;
        }

        /* Projects section */
        .projects {
            margin: 4rem auto;
            width: 100%;
            max-width: 1200px;
            padding: 4rem 1rem;
            opacity: 1;
            visibility: visible;
        }

        .project-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            width: 100%;
            opacity: 1;
            visibility: visible;
        }

        .projects h2 {
            font-size: 2.5rem;
            text-align: center;
            margin-bottom: 2.5rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Enhanced project cards */
        .project-card {
            background: rgba(30, 41, 59, 0.5);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 1rem;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.5s ease forwards;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

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

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

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

        .project-content {
            padding: 1.5rem 2rem 2rem;
            background: linear-gradient(
                to bottom,
                rgba(30, 41, 59, 0),
                rgba(30, 41, 59, 0.8)
            );
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .project-content > div {
            margin-bottom: auto;
        }

        .project-content h3 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: var(--text);
        }

        .project-content p {
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }
        .project-buttons {
            margin-top: 1.5rem;
            display: flex;
            gap: 1.25rem;
        }
        
        .view-details,
        .project-link {
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            font-size: 0.9rem;
            font-weight: 500;
            text-align: center;
            transition: all 0.3s ease;
            flex: 1;
        }
        
        .view-details {
            background: var(--primary);
            color: white;
            border: none;
            cursor: pointer;
        }
        
        .project-link {
            background: transparent;
            color: var(--primary);
            border: 1px solid var(--primary);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .view-details:hover,
        .project-link:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }

        /* Tech tags */
        .tech-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 2rem;
            padding: 0.25rem 0;
        }

        .tech-tag {
            background: rgba(37, 99, 235, 0.1);
            border: 1px solid var(--primary);
            color: var(--primary);
            padding: 0.5rem 1.25rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            backdrop-filter: blur(4px);
            transition: all 0.3s ease;
        }

        .tech-tag:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-2px);
        }

        /* View details button */
        .view-details {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            cursor: pointer;
            font-weight: 500;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .view-details:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        /* Modal styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 1100;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            overflow-y: auto;
            padding: 2rem 1rem;
        }

        .modal-content {
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 24px;
            width: 95%;
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        }

        .modal-grid {
            display: flex;
            flex-direction: column;
            padding: 2rem;
            gap: 2rem;
        }

        /* Carrusel */
        .modal-carousel {
            position: relative;
            width: 100%;
            overflow: hidden;
            margin-bottom: 2rem;
        }

        .carousel-container {
            width: 100%;
            position: relative;
        }

        .carousel-slide {
            width: 100%;
            display: none; /* Todas las slides empiezan ocultas */
        }

        .carousel-slide.active {
            display: block; /* Solo la slide activa se muestra */
        }

        .carousel-slide img {
            width: 100%;
            height: auto;
            max-height: 500px;
            object-fit: contain;
        }

        .carousel-button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            padding: 1rem;
            cursor: pointer;
            z-index: 1;
        }

        .carousel-button.prev {
            left: 0;
        }

        .carousel-button.next {
            right: 0;
        }

        /* Información */
        .modal-info {
            padding: 0 1rem;
        }

        #modalTitle {
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: var(--text);
        }

        #modalDescription {
            color: var(--text);
            line-height: 1.8;
            font-size: 1.1rem;
            margin-bottom: 2rem;
        }

        #modalTechTags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-bottom: 2rem;
        }

        .modal-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1rem;
        }

        #modalImpact,
        #modalChallenges,
        #modalSolution {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 1.5rem;
            border-radius: 12px;
            color: var(--text);
        }

        /* Botones del carrusel */
        .carousel-button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.5);
            color: white;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 100;
            backdrop-filter: blur(4px);
            opacity: 0;
        }

        /* Animación de entrada de los botones */
        .modal-carousel:hover .carousel-button {
            opacity: 1;
        }

        .carousel-button:hover {
            background: var(--primary);
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
        }

        .carousel-button:active {
            transform: translateY(-50%) scale(0.95);
        }

        .carousel-button.prev {
            left: -50px;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s ease;
        }

        .carousel-button.next {
            right: -50px;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s ease;
        }

        /* Animación de entrada de los botones al hover */
        .modal-carousel:hover .carousel-button.prev {
            left: 20px;
        }

        .modal-carousel:hover .carousel-button.next {
            right: 20px;
        }

        /* Animación del contenedor del carrusel */
        .modal-carousel {
            transition: transform 0.3s ease;
        }

        .modal-carousel:hover {
            transform: scale(1.01);
        }

        /* Botón de cerrar */
        .close {
            position: absolute;
            right: 1.5rem;
            top: 1.5rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            z-index: 101;
        }

        .close:hover {
            background: rgba(255, 0, 0, 0.2);
            transform: rotate(90deg);
        }

        /* Responsive */
        @media (max-width: 968px) {
            .modal {
                padding: 1rem;
            }
            
            .modal-carousel {
                height: 400px;
            }
            
            #modalTitle {
                font-size: 2rem;
            }
        }

        @media (max-width: 480px) {
            .modal-carousel {
                height: 300px;
            }
            
            .modal-grid {
                padding: 1rem;
            }
            
            #modalTitle {
                font-size: 1.75rem;
            }
            
            .modal-info {
                padding: 0;
            }
            
            .carousel-button {
                width: 35px;
                height: 35px;
                font-size: 1rem;
            }
        }

        /* Image carousel */
        .image-carousel {
            position: relative;
            width: 100%;
            height: 400px;
            overflow: hidden;
            margin-bottom: 2rem;
            border-radius: 0.5rem;
        }

        .carousel-images {
            display: flex;
            transition: transform 0.5s ease;
            height: 100%;
        }

        .carousel-image {
            min-width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .carousel-button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(37, 99, 235, 0.8);
            color: white;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(4px);
            z-index: 2;
        }

        .carousel-button:hover {
            background: var(--primary);
            transform: translateY(-50%) scale(1.1);
        }

        .carousel-button.prev {
            left: 1rem;
        }

        .carousel-button.next {
            right: 1rem;
        }

        /* Enhanced footer */
        footer {
            width: 100%;
            padding: 3rem 0;
            margin-top: 4rem;
            background: linear-gradient(
                to bottom,
                var(--surface),
                rgba(15, 23, 42, 0.95)
            );
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }

        footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(
                circle at 50% 0%,
                var(--primary) 0%,
                transparent 50%
            );
            opacity: 0.1;
            pointer-events: none;
        }

        footer h2 {
            font-size: 2rem;
            margin-bottom: 2rem;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-align: center;
            position: relative;
        }

        footer .social-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin: 0 auto 2rem;
            position: relative;
            max-width: 300px;
        }

        footer .social-links a {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 0.75rem;
            border-radius: 50%;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        footer .social-links a::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: var(--primary);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            opacity: 0;
            transition: all 0.4s ease;
        }

        footer .social-links a:hover::before {
            width: 150%;
            height: 150%;
            opacity: 0.1;
        }

        footer .social-links a:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            background: rgba(37, 99, 235, 0.1);
        }

        footer .social-links svg {
            width: 20px;
            height: 20px;
            position: relative;
            z-index: 1;
            transition: all 0.3s ease;
            color: var(--text);
        }

        footer .social-links a:hover svg {
            color: var(--primary);
            transform: scale(1.1);
        }

        footer .copyright {
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.875rem;
            margin-top: 2rem;
            padding: 0 1rem;
            position: relative;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        footer .copyright::before,
        footer .copyright::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 30%;
            height: 1px;
            background: linear-gradient(
                to var(--direction, right),
                transparent,
                rgba(255, 255, 255, 0.1)
            );
        }

        footer .copyright::before {
            left: 0;
            --direction: right;
        }

        footer .copyright::after {
            right: 0;
            --direction: left;
        }

        /* Animación para los iconos sociales */
        @keyframes pulseGlow {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
            }
            50% {
                box-shadow: 0 0 20px 0 rgba(37, 99, 235, 0.2);
            }
        }

        footer .social-links a {
            animation: pulseGlow 3s infinite;
            animation-delay: calc(var(--i) * 0.5s);
        }

        /* Responsive adjustments for footer */
        @media (max-width: 768px) {
            footer {
                padding: 4rem 0;
            }

            footer h2 {
                font-size: 2rem;
                margin-bottom: 2rem;
            }

            footer .social-links {
                gap: 1.5rem;
            }
        }

        @media (max-width: 480px) {
            footer .social-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 1rem;
            }

            footer .copyright::before,
            footer .copyright::after {
                width: 20%;
            }
        }

        /* Animations */
        @keyframes fadeInDown {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .hero h2 {
                font-size: 3rem;
            }

            .about {
                padding: 4rem 0;
                margin: 2rem 0;
            }

            .modal-content {
                margin: 10% auto;
                width: 95%;
            }

            .image-carousel {
                height: 300px;
            }
        }

        @media (max-width: 480px) {
            .hero h2 {
                font-size: 2rem;
            }

            nav a {
                margin-left: 1rem;
            }

            .about-content {
                padding: 0 1rem;
            }

            .image-carousel {
                height: 250px;
            }
        }
/* Technologies Section Styles */
.technologies {
    padding: 4rem 2rem;
    margin: 2rem auto;
    background: var(--surface);
    border-radius: 1rem;
    max-width: 1200px;
}

.tech-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Forzar 4 columnas */
    gap: 2rem;
    margin: 0 auto;
}

.tech-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    height: auto;
}

.tech-category h3 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.tech-name {
    flex-grow: 1;
    font-weight: 500;
}

.tech-level {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    white-space: nowrap;
}

/* Responsive para tecnologías */
@media (max-width: 1200px) {
    .tech-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .technologies {
        padding: 2rem 1rem;
    }
    
    .tech-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tech-item {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }

    .tech-name {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0;
    }

    .tech-level {
        width: auto;
    }
}
@media (max-width: 480px) {
    .project-buttons {
        flex-direction: column;
    }
}
/* Animación de entrada para las tarjetas de proyectos */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

/* Transición suave para los elementos de tecnología */
.tech-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
}

.dark-mode {
    --background: #1a1a1a;
    --surface: #2a2a2a;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
}
/* Personalización de la barra de desplazamiento */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Agregar animaciones más suaves */
.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Agregar loading spinner */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid var(--surface);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mejorar responsive design */
@media (max-width: var(--mobile)) {
    .tech-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.carousel-button {
    background: rgba(37, 99, 235, 0.8);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.carousel-button:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Completar estilos del carrusel */
.carousel-images {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-image {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(37, 99, 235, 0.8);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.carousel-button:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 1rem;
}

.carousel-button.next {
    right: 1rem;
}

/* Media queries completas */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2.5rem;
    }

    .about, .technologies {
        padding: 3rem 0;
        margin: 1.5rem 0;
    }

    .tech-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 5% auto;
        width: 90%;
    }

    .image-carousel {
        height: 250px;
    }

    nav {
        padding: 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 2rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav div {
        margin-top: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    nav a {
        margin-left: 0;
        margin-right: 1rem;
    }

    .about-content, .tech-container {
        padding: 0 1rem;
    }

    .tech-item {
        flex-wrap: wrap;
    }

    .tech-level {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }

    .image-carousel {
        height: 200px;
    }

    .project-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* Asegurar que las animaciones sean suaves en dispositivos móviles */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Ajustar el footer */
footer {
    width: 100%;
    padding: 4rem 1rem;
    margin-top: 4rem;
}

/* Corregir el contenedor de tecnologías */
.tech-category {
    width: 100%;
    box-sizing: border-box;
}

/* Asegurar que todos los elementos usen border-box */
* {
    box-sizing: border-box;
}

/* Ajustar las secciones para mantener márgenes consistentes */
.about,
.technologies,
.projects {
    margin: 4rem auto;
    width: 100%;
    max-width: 1200px;
    padding: 4rem 1rem;
}

/* Ajustar el grid de proyectos */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0;
    width: 100%;
}

/* Ajustar el contenedor de tecnologías */
.tech-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
    padding: 0;
}

/* Ajustar el modal para centrado correcto */
.modal-content {
    max-width: 800px;
    width: 90%;
    margin: 2rem auto;
    position: relative;
    padding: 2rem;
}

/* Mejorar responsive design */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    .about,
    .technologies,
    .projects {
        padding: 3rem 1rem;
        margin: 2rem auto;
    }

    .tech-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.5rem 1rem;
    }

    nav div {
        margin-top: 0.5rem;
    }

    .hero h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .about,
    .technologies,
    .projects {
        padding: 2rem 1rem;
        margin: 1rem auto;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
        padding: 1rem;
    }
}

/* Asegurar que las imágenes no se desborden */
img {
    max-width: 100%;
    height: auto;
}

/* Agregar estilos para las nuevas secciones */
.achievements {
    padding: 4rem 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.timeline-item {
    position: relative;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-date {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.tech-icon {
    position: relative;
    display: inline-block;
    margin: 0.5rem;
}

.tech-icon img {
    transition: transform 0.3s ease;
}

.tech-icon:hover img {
    transform: scale(1.1);
}

.tech-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tech-icon:hover::after {
    opacity: 1;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 5px;
    transition: all 0.3s ease;
}

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--background);
        padding: 1rem 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    nav a {
        margin: 0;
        padding: 1rem;
        text-align: center;
        width: 100%;
        color: var(--text);
        text-decoration: none;
        transition: background 0.3s ease;
    }

    nav a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Actualizar estilos de los botones del carrusel */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

/* Ajustar el contenedor del carrusel y la información */
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#carouselImages {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Asegurar que la solución esté por debajo de los botones */
#modalSolution {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .carousel-button {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    #carouselImages {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .carousel-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    #carouselImages {
        height: 250px;
    }
}
