        :root {
            --bg: #f8f9fa;
            --text: #1a1a1a;
            --card: #fff;
            --accent: #2563eb;
            --accent-hover: #1e40af;
            --hero-bg: linear-gradient(-45deg, #2563eb, #1e3a8a, #0f172a, #1d4ed8);
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        body.dark {
            --bg: #0f172a;
            --text: #f1f5f9;
            --card: #1e293b;
            --accent: #3b82f6;
            --accent-hover: #60a5fa;
            --hero-bg: linear-gradient(-45deg, #0f172a, #1e293b, #334155, #475569);
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            transition: var(--transition);
            overflow-x: hidden;
        }

        /* CABECERA DE NAVEGACIÓN MEJORADA */
        .main-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            transition: var(--transition);
        }

        body.dark .main-header {
            background: rgba(15, 23, 42, 0.95);
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
        }

        /* NAV CON ELEMENTOS CENTRADOS 
         .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0.8rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        } */


        /* NAV CON ELEMENTOS A LOS LADOS */
        .nav-container {
            padding: 0.8rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }


        .nav-menu {
            display: flex;
            gap: 2rem;
            list-style: none;
        }

        .nav-link {
            color: var(--text);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            position: relative;
            padding: 0.5rem 0;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--accent);
            transition: width 0.3s ease;
        }

        .nav-link:hover::after,
        .nav-link.active::after {
            width: 100%;
        }

        .nav-link:hover,
        .nav-link.active {
            color: var(--accent);
        }

        @media (max-width: 768px) {
            .nav-menu {
                display: none;
            }
        }

        /* Header y Navegación - PORTADA REDISEÑADA */
        header.hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--hero-bg);
            background-size: 400% 400%;
            animation: gradientShift 15s ease infinite;
            color: #fff;
            padding: 2rem;
            position: relative;
            overflow: hidden;
            margin-top: 70px;
            /* Para compensar la cabecera fija */
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 1;
        }

        /* Partículas de fondo */
        .particles {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }

        .particle {
            position: absolute;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            animation: float 15s infinite ease-in-out;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0) rotate(0deg);
            }

            50% {
                transform: translateY(-20px) rotate(180deg);
            }
        }

        .hero-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2.5rem;
            max-width: 1200px;
            width: 100%;
            position: relative;
            z-index: 2;
            text-align: center;
        }

        @media (min-width: 900px) {
            .hero-content {
                flex-direction: row;
                justify-content: space-between;
                text-align: left;
            }
        }

        .hero-image-container {
            position: relative;
            width: 280px;
            height: 280px;
            flex-shrink: 0;
        }

        .hero-image {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            overflow: hidden;
            border: 4px solid rgba(255, 255, 255, 0.8);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
            transition: transform 0.5s ease, box-shadow 0.5s ease;
            position: relative;
        }

        .hero-image::before {
            content: '';
            position: absolute;
            top: -10px;
            left: -10px;
            right: -10px;
            bottom: -10px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.2);
            animation: pulse 2s infinite ease-in-out;
            z-index: -1;
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
                opacity: 0.5;
            }

            50% {
                transform: scale(1.05);
                opacity: 0.8;
            }
        }

        .hero-image:hover {
            transform: scale(1.05);
            border-color: var(--accent);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 10px rgba(37, 99, 235, 0.1);
        }

        .hero-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s ease;
        }

        .hero-image:hover img {
            transform: scale(1.1);
        }

        .hero-text {
            max-width: 650px;
            position: relative;
        }

        .hero-text h1 {
            font-size: 3.8rem;
            margin-bottom: 1.2rem;
            line-height: 1.2;
            font-weight: 800;
            min-height: 4.2rem;
            letter-spacing: -0.5px;
            background: linear-gradient(to right, #fff, #e0e7ff);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
            display: inline-block;
        }

        .hero-text h1::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 0;
            width: 100px;
            height: 4px;
            background: var(--accent);
            border-radius: 2px;
            transition: width 0.5s ease;
        }

        .hero-text:hover h1::after {
            width: 150px;
        }

        .hero-text p {
            font-size: 1.3rem;
            line-height: 1.8;
            margin-bottom: 2.5rem;
            opacity: 0.9;
            min-height: 8rem;
            font-weight: 300;
        }

        .cta-buttons {
            display: flex;
            gap: 1.2rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        @media (min-width: 900px) {
            .cta-buttons {
                justify-content: flex-start;
            }
        }

        .cta-buttons a {
            padding: 1rem 2rem;
            border-radius: 50px;
            background: var(--accent);
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            position: relative;
            overflow: hidden;
        }

        .cta-buttons a::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.7s ease;
        }

        .cta-buttons a:hover::before {
            left: 100%;
        }

        .cta-buttons a:hover {
            background: var(--accent-hover);
            transform: translateY(-3px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        }

        .cta-buttons a:last-child {
            background: transparent;
            border: 2px solid rgba(255, 255, 255, 0.7);
        }

        .cta-buttons a:last-child:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: white;
        }

        /* Indicador de redes sociales */
        .social-sidebar {
            position: fixed;
            left: 30px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            flex-direction: column;
            gap: 20px;
            z-index: 100;
        }

        @media (max-width: 768px) {
            .social-sidebar {
                display: none;
            }
        }

        .social-sidebar a {
            color: var(--text);
            font-size: 1.4rem;
            transition: var(--transition);
            background: var(--card);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
        }

        .social-sidebar a:hover {
            color: var(--accent);
            transform: translateY(-5px);
        }

        /* Menú móvil - MEJORADO CON ENLACES DE NAVEGACIÓN */
        .mobile-menu-btn {
            display: none;
            position: fixed;
            top: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--accent);
            color: white;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1000;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        @media (max-width: 768px) {
            .mobile-menu-btn {
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }

        .mobile-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 70%;
            height: 100%;
            background: var(--card);
            z-index: 999;
            transition: right 0.4s ease;
            padding: 80px 30px 30px;
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            gap: 20px;
            overflow-y: auto;
        }

        .mobile-menu.open {
            right: 0;
        }

        .mobile-menu a {
            color: var(--text);
            font-size: 1.2rem;
            text-decoration: none;
            padding: 15px;
            border-radius: 8px;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .mobile-menu a:hover {
            background: var(--accent);
            color: white;
        }

        .mobile-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 998;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }

        .mobile-menu-overlay.open {
            opacity: 1;
            visibility: visible;
        }

        /* ESTILOS UNIFICADOS PARA SECCIONES SKILLS AND PROJECTS */
        section.content-section {
            padding: 5rem 2rem;
            background: var(--bg);
            position: relative;
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 1s ease, transform 1s ease;
        }

        section.content-section.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .section-container-wrapper {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            padding: 2rem;
            border-radius: 20px;
            transition: all 0.5s ease;
        }

        .section-container-wrapper::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, transparent 100%);
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: -1;
        }

        body.dark .section-container-wrapper::before {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
        }

        .section-container-wrapper:hover::before {
            opacity: 1;
        }

        .section-header {
            text-align: center;
            margin-bottom: 3.5rem;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }

        .section-header.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .section-header h2 {
            font-size: 2.8rem;
            margin-bottom: 1rem;
            color: var(--text);
            position: relative;
            display: inline-block;
        }

        .section-header h2::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 70px;
            height: 4px;
            background: var(--accent);
            border-radius: 2px;
            transition: width 0.5s ease;
        }

        .section-header:hover h2::after {
            width: 120px;
        }

        .section-header p {
            font-size: 1.2rem;
            color: var(--text);
            opacity: 0.8;
            max-width: 600px;
            margin: 0 auto;
        }

        /* Grid para ambas secciones */
        .section-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2.5rem;
        }

        /* Tarjetas para ambas secciones */
        .section-card {
            background: var(--card);
            border-radius: 1.2rem;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            opacity: 0;
            transform: translateY(50px) scale(0.95);
            border: 1px solid rgba(0, 0, 0, 0.05);
            transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
        }

        .section-card.visible {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        .section-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        }

        /* Estilos específicos para Skills */
        .skill-category {
            padding: 2rem;
            position: relative;
            overflow: hidden;
        }

        .skill-category::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 5px;
            height: 100%;
            background: var(--accent);
            transition: width 0.3s ease;
        }

        .skill-category:hover::before {
            width: 8px;
        }

        .skill-category h3 {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--text);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .skill-category h3 i {
            color: var(--accent);
            font-size: 1.3rem;
            background: rgba(37, 99, 235, 0.1);
            width: 45px;
            height: 45px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: var(--transition);
        }

        .skill-category:hover h3 i {
            background: var(--accent);
            color: white;
        }

        .skills-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            gap: 1rem;
        }

        .skill-item {
            background: rgba(37, 99, 235, 0.1);
            color: var(--accent);
            padding: 1rem;
            border-radius: 0.8rem;
            font-size: 0.95rem;
            font-weight: 500;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
            text-align: center;
            min-height: 100px;
            position: relative;
            overflow: hidden;
        }

        .skill-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
            z-index: 0;
        }

        .skill-item i {
            font-size: 1.5rem;
            z-index: 1;
        }

        .skill-item span {
            z-index: 1;
        }

        .skill-item:hover {
            background: var(--accent);
            color: white;
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
        }

        /* Estilos específicos para Projects */
        .project-img {
            width: 100%;
            height: 220px;
            overflow: hidden;
            position: relative;
        }

        .project-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s ease;
        }

        .section-card:hover .project-img img {
            transform: scale(1.1);
        }

        .project-content {
            padding: 1.8rem;
            position: relative;
            overflow: hidden;
        }

        .project-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.5s ease;
        }

        .section-card:hover .project-content::before {
            transform: scaleX(1);
        }

        .project-content h3 {
            font-size: 1.6rem;
            margin-bottom: 0.8rem;
            color: var(--text);
            position: relative;
            display: inline-block;
        }

        .project-content h3::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--accent);
            transition: width 0.5s ease;
        }

        .section-card:hover .project-content h3::after {
            width: 100%;
        }

        .project-content p {
            color: var(--text);
            opacity: 0.8;
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }

        .project-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }

        .project-tag {
            background: var(--accent);
            color: white;
            padding: 0.3rem 0.8rem;
            border-radius: 1rem;
            font-size: 0.8rem;
            font-weight: 500;
            transition: transform 0.3s ease, background-color 0.3s ease;
        }

        .project-tag:hover {
            transform: translateY(-2px);
            background: var(--accent-hover);
        }

        .project-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .project-buttons a {
            padding: 0.7rem 1.5rem;
            border-radius: 0.5rem;
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            position: relative;
            overflow: hidden;
        }

        .project-buttons a:first-child {
            background: var(--accent);
            color: white;
        }

        .project-buttons a:last-child {
            background: transparent;
            color: var(--accent);
            border: 1px solid var(--accent);
        }

        .project-buttons a::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.7s ease;
        }

        .project-buttons a:hover::before {
            left: 100%;
        }

        .project-buttons a:hover {
            transform: translateY(-2px);
            /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); */
        }

        /* Footer */
        footer {
            background: var(--text);
            color: var(--bg);
            text-align: center;
            padding: 3rem 1rem;
        }

        footer p {
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .social-links a {
            color: var(--bg);
            font-size: 1.5rem;
            transition: var(--transition);
        }

        .social-links a:hover {
            color: var(--accent);
            transform: translateY(-3px);
        }

        .copyright {
            opacity: 0.8;
            font-size: 0.9rem;
        }

        /* Botones flotantes */
        .floating-buttons {
            position: fixed;
            bottom: 25px;
            left: 0;
            right: 0;
            display: flex;
            justify-content: space-between;
            padding: 0 25px;
            z-index: 1000;
        }

        .floating-btn {
            width: 55px;
            height: 55px;
            border-radius: 50%;
            border: none;
            background: var(--accent);
            color: #fff;
            font-size: 1.3rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .floating-btn:hover {
            background: var(--accent-hover);
            transform: scale(1.1);
        }

        /* Tamaño más pequeño para el botón de idioma */
        #toggle-lang {
            font-size: 1rem;
            font-weight: bold;
        }

        /* Efecto de aparición suave para las secciones */
        .section-reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.8s ease, transform 0.8s ease;
        }

        .section-reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Separador elegante entre secciones */
        .section-divider {
            height: 1px;
            background: linear-gradient(to right, transparent, var(--accent), transparent);
            margin: 4rem auto;
            width: 80%;
            max-width: 800px;
            opacity: 0.3;
        }

        /* Efecto de profundidad con sombras sutiles */
        .content-section {
            position: relative;
            transition: box-shadow 0.5s ease;
        }

        .content-section::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 10px;
            right: 10px;
            bottom: -10px;
            background: rgba(0, 0, 0, 0.05);
            border-radius: 20px;
            z-index: -1;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        body.dark .content-section::before {
            background: rgba(255, 255, 255, 0.05);
        }

        .content-section:hover::before {
            opacity: 1;
        }

        /* Efecto de scroll suave personalizado */
        html {
            scroll-behavior: smooth;
        }

        /* Ajustar el scroll para que no quede justo en el borde superior */
        .scroll-target {
            scroll-margin-top: 100px;
        }

        /* Efecto de iluminación focalizada */
        @keyframes focusGlow {
            0% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.15);
                transform: translateY(0);
            }

            50% {
                box-shadow: 0 0 30px 10px rgba(59, 130, 246, 0.25);
                transform: translateY(-5px);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.15);
                transform: translateY(0);
            }
        }

        .highlighted {
            animation: focusGlow 2s ease;
        }

        /* Animaciones */
        @keyframes gradientShift {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Efectos de modo oscuro suaves */
        body,
        .section-card,
        .floating-btn,
        .skill-category,
        .skill-item {
            transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
        }

        /* Cursor parpadeante para el efecto de typewriter */
        .typewriter-cursor {
            display: inline-block;
            margin-left: 2px;
            animation: blink 1s infinite;
        }

        @keyframes blink {

            0%,
            50% {
                opacity: 1;
            }

            51%,
            100% {
                opacity: 0;
            }
        }

        /* Efecto de brillo en proyectos */
        .project-img::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 50%;
            height: 100%;
            background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.7s ease;
        }

        .section-card:hover .project-img::after {
            left: 100%;
        }

        /* Loader de progreso para proyectos */
        .project-loader {
            position: absolute;
            bottom: 0;
            left: 0;
            height: 3px;
            width: 0;
            background: var(--accent);
            transition: width 0.5s ease;
        }

        .section-card:hover .project-loader {
            width: 100%;
        }

        @media (max-width: 768px) {
            .skills-list {
                grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
            }

            .skill-item {
                padding: 0.8rem;
                font-size: 0.9rem;
            }

            .section-container-wrapper {
                padding: 1rem;
            }

            .section-grid {
                grid-template-columns: 1fr;
            }
        }