/* Variables de color para light y dark mode */
        :root {
            /* Colores base */
            --primary-color: #7A7ADB;
            --primary-dark: #5A5AC9;
            --primary-light: #9A9AFF;
            --secondary-color: #FF6B6B;
            --dark-color: #130F40;
            --light-color: #F5F5FF;
            --white: #FFFFFF;
            --black: #000000;
            --gray: #6C757D;
            --gray-light: #E9ECEF;
            --gray-dark: #343A40;
            --success-color: #28a745;
            --error-color: #dc3545;
            --warning-color: #ffc107;
            --info-color: #17a2b8;
            
            /* Variables para light mode */
            --bg-color-light: #FFFFFF;
            --bg-secondary-light: #F8F9FA;
            --text-color-light: #333333;
            --text-light-light: #666666;
            --header-bg-light: #1a1a2e;
            --header-text-light: #ffffff;
            --card-bg-light: #ffffff;
            --card-shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
            --form-bg-light: #ffffff;
            --border-color-light: #e0e0e0;
            
            /* Variables para dark mode */
            --bg-color-dark: #121212;
            --bg-secondary-dark: #1e1e1e;
            --text-color-dark: #f0f0f0;
            --text-light-dark: #b0b0b0;
            --header-bg-dark: #0f0f1a;
            --header-text-dark: #ffffff;
            --card-bg-dark: #1e1e1e;
            --card-shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.2);
            --form-bg-dark: #2d2d2d;
            --border-color-dark: #444444;
            
            /* Valores iniciales (se sobrescriben con JavaScript) */
            --bg-color: var(--bg-color-light);
            --bg-secondary: var(--bg-secondary-light);
            --text-color: var(--text-color-light);
            --text-light: var(--text-light-light);
            --header-bg: var(--header-bg-light);
            --header-text: var(--header-text-light);
            --card-bg: var(--card-bg-light);
            --card-shadow: var(--card-shadow-light);
            --form-bg: var(--form-bg-light);
            --border-color: var(--border-color-light);
        }

        /* Dark theme */
        [data-theme="dark"] {
            --bg-color: var(--bg-color-dark);
            --bg-secondary: var(--bg-secondary-dark);
            --text-color: var(--text-color-dark);
            --text-light: var(--text-light-dark);
            --header-bg: var(--header-bg-dark);
            --header-text: var(--header-text-dark);
            --card-bg: var(--card-bg-dark);
            --card-shadow: var(--card-shadow-dark);
            --form-bg: var(--form-bg-dark);
            --border-color: var(--border-color-dark);
        }

        /* Reset mejorado */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        /* Tipografía mejorada */
        body {
            font-family: 'Poppins', sans-serif;
            color: var(--text-color);
            background-color: var(--bg-color);
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        /* Contenedor principal responsive */
        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        /* Secciones */
        .section-padding {
            padding: 4rem 0;
        }

        .section-title {
            font-size: clamp(1.75rem, 4vw, 2.5rem);
            text-align: center;
            margin-bottom: 2rem;
            position: relative;
            color: var(--text-color);
        }

        .section-title::after {
            content: '';
            display: block;
            width: 80px;
            height: 4px;
            background: var(--primary-color);
            margin: 1.25rem auto;
            border-radius: 2px;
        }

        .highlight {
            color: var(--primary-color);
        }

        /* Textos legibles en ambos modos */
        p, li, td, th, label {
            color: var(--text-color);
            line-height: 1.7;
            font-size: clamp(0.9rem, 1.05vw, 1rem);
        }

        a {
            text-decoration: none;
            color: var(--primary-color);
            transition: all 0.3s ease;
        }

        a:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

        /* Botones mejorados */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.8rem 1.5rem;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            font-size: 1rem;
            min-width: 120px;
            text-align: center;
        }

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

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(122, 122, 219, 0.3);
            text-decoration: none;
        }

        .btn-secondary {
            background: var(--secondary-color);
            color: white;
        }

        .btn-secondary:hover {
            background: #e05555;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
            text-decoration: none;
        }

        .btn-outline {
            background: transparent;
            color: var(--primary-color);
            border: 2px solid var(--primary-color);
        }

        .btn-outline:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(122, 122, 219, 0.3);
        }

        .btn i {
            transition: transform 0.3s ease;
        }

        .btn:hover i {
            transform: translateX(5px);
        }

        /* Header mejorado */
        header {
            background-color: var(--header-bg);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            transition: all 0.3s ease;
            padding: 0.5rem 0;
            height: 70px;
            display: flex;
            align-items: center;
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .nav-brand {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--header-text);
        }

        .logo-text {
            font-weight: 700;
        }

        .nav-links {
            display: flex;
            align-items: center;
            list-style: none;
            margin: 0;
            padding: 0;
            gap: 1.5rem;
        }

        .nav-links li {
            display: flex;
            align-items: center;
            height: 40px;
        }

        .nav-links li a {
            font-weight: 500;
            color: var(--header-text);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.95rem;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem;
            position: relative;
            height: 100%;
        }

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

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

        .nav-links li a span {
            transition: transform 0.3s ease;
        }

        .nav-links li a:hover span {
            transform: translateX(5px);
        }

        .theme-toggle {
            background: transparent;
            border: none;
            color: var(--header-text);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.95rem;
            padding: 0.5rem;
            transition: color 0.3s ease;
        }

        .theme-toggle:hover {
            color: var(--primary-color);
        }

        .menu-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--header-text);
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 1001;
        }

        /* Logo animado */
        .logo-container {
            position: relative;
            width: 100%;
            display: flex;
            justify-content: center;
            margin-bottom: 2rem;
        }

        .logo-wrapper {
            position: relative;
            width: 150px;
            height: 150px;
        }

        .logo-pequeno {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            object-fit: cover;
            position: relative;
            z-index: 2;
            box-shadow: 0 0 20px rgba(0,0,0,0.2);
            border: 3px solid var(--primary-color);
            transition: transform 0.3s ease;
        }

        .logo-pequeno:hover {
            transform: scale(1.05);
        }

        /* Orbita general */
        .orbita {
            position: absolute;
            border: 2px solid;
            border-radius: 50%;
            transform-origin: center;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
        }

        /* Animaciones tipo React */
        .anim1 {
            width: 170px;
            height: 170px;
            top: -10px;
            left: -10px;
            border-color: var(--primary-color);
            animation: orbit1 8s linear infinite;
        }

        .anim2 {
            width: 190px;
            height: 90px;
            top: 30px;
            left: -20px;
            border-color: var(--primary-dark);
            animation: orbit2 10s linear infinite;
        }

        .anim3 {
            width: 120px;
            height: 200px;
            top: -25px;
            left: 15px;
            border-color: var(--secondary-color);
            animation: orbit3 12s linear infinite;
        }

        /* Keyframes para formas dinámicas */
        @keyframes orbit1 {
            0% { transform: rotate(0deg) skewX(0deg) skewY(0deg); }
            25% { transform: rotate(90deg) skewX(10deg) skewY(-10deg); }
            50% { transform: rotate(180deg) skewX(0deg) skewY(0deg); }
            75% { transform: rotate(270deg) skewX(-10deg) skewY(10deg); }
            100% { transform: rotate(360deg) skewX(0deg) skewY(0deg); }
        }

        @keyframes orbit2 {
            0% { transform: rotate(0deg) skewX(-5deg) skewY(5deg); }
            25% { transform: rotate(120deg) skewX(5deg) skewY(-5deg); }
            50% { transform: rotate(240deg) skewX(-5deg) skewY(5deg); }
            75% { transform: rotate(360deg) skewX(5deg) skewY(-5deg); }
            100% { transform: rotate(480deg) skewX(-5deg) skewY(5deg); }
        }

        @keyframes orbit3 {
            0% { transform: rotate(0deg) skewX(15deg) skewY(-15deg); }
            25% { transform: rotate(90deg) skewX(-15deg) skewY(15deg); }
            50% { transform: rotate(180deg) skewX(15deg) skewY(-15deg); }
            75% { transform: rotate(270deg) skewX(-15deg) skewY(15deg); }
            100% { transform: rotate(360deg) skewX(15deg) skewY(-15deg); }
        }

        /* Hero section */
        .hero {
            padding: 7rem 0 4rem;
            background: linear-gradient(135deg, #000000 0%, #130F40 100%);
            color: white;
            min-height: 100vh;
            display: flex;
            align-items: center;
            margin-top: 0;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(122,122,219,0.1)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
            background-size: cover;
            z-index: 0;
        }

        .hero .container {
            position: relative;
            z-index: 1;
        }

        .hero-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            width: 100%;
        }

        .hero-text {
            max-width: 800px;
            margin: 0 auto;
        }

        .hero h1 {
            font-size: clamp(2rem, 6vw, 3.5rem);
            margin-bottom: 1.5rem;
            line-height: 1.2;
            color: white;
        }

        .wave {
            display: inline-block;
            animation: wave 2s infinite;
            transform-origin: 70% 70%;
        }

        @keyframes wave {
            0% { transform: rotate(0deg); }
            10% { transform: rotate(-10deg); }
            20% { transform: rotate(12deg); }
            30% { transform: rotate(-10deg); }
            40% { transform: rotate(9deg); }
            50% { transform: rotate(0deg); }
            100% { transform: rotate(0deg); }
        }

        .subtitle {
            font-size: clamp(1rem, 3vw, 1.5rem);
            margin-bottom: 2rem;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            min-height: 3rem;
        }

        .typing-text {
            border-right: 2px solid white;
            animation: blink-caret 0.75s step-end infinite;
            padding-right: 5px;
        }

        @keyframes blink-caret {
            from, to { border-color: transparent; }
            50% { border-color: white; }
        }

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

        .scroll-down {
            position: absolute;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%);
            animation: bounce 2s infinite;
        }

        .scroll-link {
            color: white;
            font-size: 2rem;
            transition: color 0.3s ease;
        }

        .scroll-link:hover {
            color: var(--primary-color);
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0) translateX(-50%);
            }
            40% {
                transform: translateY(-20px) translateX(-50%);
            }
            60% {
                transform: translateY(-10px) translateX(-50%);
            }
        }

        /* About section */
        .about {
            background-color: var(--bg-secondary);
        }

        .about-content {
            display: flex;
            flex-direction: column;
            gap: 3rem;
        }

        .about-text {
            flex: 1;
        }

        .intro-text {
            font-size: 1.1rem;
            margin-bottom: 2rem;
            line-height: 1.8;
        }

        .about-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1.5rem;
            margin: 2rem 0;
        }

        .about-card {
            background: var(--card-bg);
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .about-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            border-color: var(--primary-color);
        }

        .about-card i {
            font-size: 2rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }

        .about-card h3 {
            font-size: 1.2rem;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }

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

        .experience-timeline {
            margin-top: 3rem;
        }

        .experience-timeline h3 {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--text-color);
            position: relative;
            padding-left: 1.5rem;
        }

        .experience-timeline h3::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 10px;
            height: 10px;
            background: var(--primary-color);
            border-radius: 50%;
        }

        .timeline-item {
            position: relative;
            padding-left: 1.5rem;
            margin-bottom: 2rem;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: 5px;
            top: 0;
            height: 100%;
            width: 2px;
            background: var(--primary-color);
        }

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

        .timeline-content {
            background: var(--card-bg);
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color);
        }

        .timeline-content h4 {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }

        .timeline-content p {
            font-size: 0.9rem;
            color: var(--text-light);
        }

        .about-image {
            flex: 1;
            min-width: 0;
        }

        .code-snippet {
            background: #1E1E1E;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s ease;
        }

        .code-snippet:hover {
            transform: translateY(-5px);
        }

        .code-header {
            display: flex;
            align-items: center;
            padding: 0.5rem 1rem;
            background: #252526;
            border-bottom: 1px solid #333;
        }

        .code-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 6px;
        }

        .code-dot.red {
            background: #FF5F56;
        }

        .code-dot.yellow {
            background: #FFBD2E;
        }

        .code-dot.green {
            background: #27C93F;
        }

        .code-title {
            margin-left: 1rem;
            color: #9E9E9E;
            font-size: 0.9rem;
            font-family: 'Courier New', Courier, monospace;
        }

        .code-snippet pre {
            margin: 0;
            padding: 1.5rem;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .code-snippet code {
            font-family: 'Courier New', Courier, monospace;
            font-size: 0.9rem;
            line-height: 1.5;
        }

        /* Skills section */
        .skills {
            background-color: var(--bg-color);
        }

        .skills-tabs {
            margin-top: 2rem;
        }

        .tabs-header {
            display: flex;
            justify-content: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .tab-button {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: none;
            border-radius: 30px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-light);
            border: 1px solid var(--border-color);
        }

        .tab-button:hover {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .tab-button.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .tabs-content {
            margin-top: 1rem;
        }

        .tab-pane {
            display: none;
            animation: fadeIn 0.5s ease;
        }

        .tab-pane.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .skills-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1.5rem;
        }

        .skill-item {
            background: var(--card-bg);
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
        }

        .skill-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            border-color: var(--primary-color);
        }

        .skill-icon {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            transition: all 0.3s ease;
            font-size: 1.5rem;
        }

        .skill-item:hover .skill-icon {
            transform: scale(1.1);
            background: var(--primary-dark);
        }

        .skill-icon i {
            color: white;
        }

        .skill-name {
            display: block;
            text-align: center;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-color);
        }

        .skill-bar {
            height: 6px;
            background: var(--border-color);
            border-radius: 3px;
            overflow: hidden;
            margin-top: 1rem;
        }

        .skill-level {
            height: 100%;
            background: var(--primary-color);
            border-radius: 3px;
            transition: width 1.5s ease;
        }

        /* Projects section */
        .projects {
            background-color: var(--bg-secondary);
        }

        .projects-filter {
            display: flex;
            justify-content: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .filter-button {
            padding: 0.5rem 1.25rem;
            background: transparent;
            border: none;
            border-radius: 30px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-light);
            border: 1px solid var(--border-color);
        }

        .filter-button:hover {
            color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .filter-button.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .project-card {
            background: var(--card-bg);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: var(--card-shadow);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
            opacity: 1;
            transform: translateY(0);
            transition: all 0.5s ease;
        }

        .project-card.hide {
            display: none;
        }

        .project-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
        }

        .project-image {
            position: relative;
            height: 200px;
            overflow: hidden;
        }

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

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

        .project-links {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .project-card:hover .project-links {
            opacity: 1;
        }

        .project-link {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .project-link:hover {
            background: white;
            color: var(--primary-color);
            transform: translateY(-5px);
        }

        .project-content {
            padding: 1.5rem;
        }

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

        .project-content p {
            margin-bottom: 1rem;
            color: var(--text-light);
            font-size: 0.9rem;
        }

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

        .project-tech span {
            background: rgba(122, 122, 219, 0.1);
            color: var(--primary-color);
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .projects-more {
            text-align: center;
            margin-top: 3rem;
        }

        /* Contact section */
        .contact {
            background-color: var(--bg-color);
        }

        .contact-content {
            display: flex;
            flex-direction: column;
            gap: 3rem;
            margin-top: 2rem;
        }

        .contact-info {
            flex: 1;
        }

        .contact-info h3 {
            font-size: 1.75rem;
            margin-bottom: 1.5rem;
            color: var(--text-color);
        }

        .contact-info p {
            margin-bottom: 2rem;
            color: var(--text-light);
            max-width: 500px;
        }

        .contact-details {
            margin-top: 2rem;
        }

        .contact-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .contact-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(122, 122, 219, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .contact-icon i {
            color: var(--primary-color);
            font-size: 1.25rem;
        }

        .contact-text h4 {
            font-size: 1.1rem;
            margin-bottom: 0.25rem;
            color: var(--text-color);
        }

        .contact-text a {
            color: var(--text-light);
            transition: color 0.3s ease;
        }

        .contact-text a:hover {
            color: var(--primary-color);
            text-decoration: none;
        }

        .contact-social {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .contact-social a {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(122, 122, 219, 0.1);
            color: var(--text-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            transition: all 0.3s ease;
        }

        .contact-social a:hover {
            background: var(--primary-color);
            color: white;
            transform: translateY(-3px);
        }

        .contact-form {
            flex: 1;
            background: var(--form-bg);
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            border: 1px solid var(--border-color);
        }

        .form-group {
            margin-bottom: 1.5rem;
            position: relative;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: var(--text-color);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.8rem 0;
            border: none;
            border-bottom: 1px solid var(--border-color);
            font-family: inherit;
            font-size: 1rem;
            background: transparent;
            color: var(--text-color);
            transition: all 0.3s ease;
        }

        .form-group textarea {
            min-height: 150px;
            resize: vertical;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-bottom-color: var(--primary-color);
        }

        .underline {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--primary-color);
            transition: width 0.3s ease;
        }

        .form-group input:focus ~ .underline,
        .form-group textarea:focus ~ .underline {
            width: 100%;
        }

        /* Footer */
        .footer {
            background: var(--dark-color);
            color: white;
            padding: 3rem 0 0;
            margin-top: auto;
        }

        .footer-content {
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .footer-about {
            max-width: 100%;
        }

        .footer-logo {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: white;
        }

        .footer-about p {
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 1.5rem;
        }

        .footer-links h4,
        .footer-contact h4 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: white;
            position: relative;
            padding-bottom: 0.5rem;
        }

        .footer-links h4::after,
        .footer-contact h4::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--primary-color);
        }

        .footer-links ul,
        .footer-contact ul {
            list-style: none;
        }

        .footer-links li,
        .footer-contact li {
            margin-bottom: 0.5rem;
        }

        .footer-links a,
        .footer-contact a,
        .footer-contact li {
            color: rgba(255, 255, 255, 0.7);
            transition: color 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .footer-links a:hover,
        .footer-contact a:hover {
            color: white;
            text-decoration: none;
        }

        .footer-links i,
        .footer-contact i {
            font-size: 0.8rem;
            color: var(--primary-color);
        }

        .footer-bottom {
            padding: 1.5rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
        }

        .footer-copyright {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
        }

        /* Back to Top Button */
        .back-to-top {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 999;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        .back-to-top.active {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
        }

        /* Media Queries para Responsive */
        @media (min-width: 768px) {
            .section-padding {
                padding: 5rem 0;
            }
            
            .about-content {
                flex-direction: row;
            }
            
            .contact-content {
                flex-direction: row;
            }
            
            .footer-content {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            }
            
            .projects-grid {
                grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            }
        }

        @media (max-width: 767px) {
            .menu-toggle {
                display: block;
            }
            
            .nav-links {
                position: fixed;
                top: 70px;
                right: -100%;
                width: 80%;
                max-width: 300px;
                height: calc(100vh - 70px);
                background: var(--header-bg);
                flex-direction: column;
                align-items: flex-start;
                padding: 2rem;
                transition: right 0.3s ease;
                z-index: 999;
                box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
            }
            
            .nav-links.active {
                right: 0;
            }
            
            .nav-links li {
                width: 100%;
            }
            
            .nav-links li a {
                padding: 0.75rem 0;
                font-size: 1rem;
            }
            
            .theme-toggle {
                justify-content: flex-start;
                width: 100%;
                padding-left: 0;
            }
            
            .hero {
                padding: 6rem 0 3rem;
            }
            
            .hero-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .hero-buttons .btn {
                width: 100%;
                max-width: 250px;
            }
            
            .about-grid {
                grid-template-columns: 1fr;
            }
            
            .skills-grid {
                grid-template-columns: 1fr;
            }
            
            .projects-grid {
                grid-template-columns: 1fr;
            }
            
            .project-links {
                gap: 1rem;
            }
            
            .project-link {
                width: 45px;
                height: 45px;
                font-size: 1.1rem;
            }
            
            .contact-form {
                padding: 1.25rem;
            }
            
            .back-to-top {
                width: 40px;
                height: 40px;
                font-size: 1rem;
                bottom: 1rem;
                right: 1rem;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0 1rem;
            }
            
            .section-title {
                font-size: 1.5rem;
            }
            
            .hero h1 {
                font-size: 2rem;
            }
            
            .subtitle {
                font-size: 1rem;
            }
            
            .btn {
                width: 100%;
                padding: 0.8rem;
            }
            
            .tabs-header {
                flex-direction: column;
                align-items: center;
            }
            
            .tab-button {
                width: 100%;
                max-width: 200px;
            }
            
            .projects-filter {
                flex-direction: column;
                align-items: center;
            }
            
            .filter-button {
                width: 100%;
                max-width: 200px;
            }
            
            .project-content {
                padding: 1.25rem;
            }
            
            .contact-item {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .contact-icon {
                width: 35px;
                height: 35px;
            }
            
            .contact-icon i {
                font-size: 1rem;
            }
            
            .contact-social a {
                width: 35px;
                height: 35px;
                font-size: 1.1rem;
            }
        }

        /* Accesibilidad */
        @media (prefers-reduced-motion: reduce) {
            * {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* Focus styles */
        a:focus, button:focus, input:focus, textarea:focus {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
        }

        /* Clases para el header */
        .header-hidden {
            transform: translateY(-100%);
        }

        .header-scrolled {
            background-color: rgba(26, 26, 46, 0.95);
            padding: 0.25rem 0;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
            height: 60px;
        }