/* ===== 1. Variables y Estilos Base ===== */
        :root {
            --bg-color: #0c0c0f;
            --bg-secondary: #111115;
            --text-main: #f0f0f5;
            --text-muted: #a0a0b0;
            --border: #302025;
            --font-main: 'Outfit', sans-serif;

            /* Tema de Eris (Rojo Feroz) */
            --accent: #e11d48;
            --accent-light: #fb7185;
            --accent-glow: rgba(225, 29, 72, 0.4);
            --accent-bright: rgba(225, 29, 72, 1);
        }

        /* Paleta especial para la página principal (Mushoku Tensei) */
        body[data-page="main"] {
            --accent: #d97706;
            --accent-light: #f59e0b;
            --accent-glow: rgba(217, 119, 6, 0.4);
            --accent-bright: rgba(217, 119, 6, 1);
        }

        [data-theme="light"] {
            /* MODO CLARO MEJORADO */
            --bg-color: #f9f9f9; /* Fondo principal no es blanco puro */
            --bg-secondary: #ffffff; /* Tarjetas son blancas puras */
            --text-main: #0f172a;
            --text-muted: #475569;
            --border: #e2e8f0; /* Borde se usa menos, más sombras */
            /* Los colores de acento se heredan del :root o body[data-page] */
        }

        /* Modo claro para página principal (Mushoku Tensei) */
        body[data-page="main"][data-theme="light"] {
            --accent: #d97706;
            --accent-light: #f59e0b;
            --accent-glow: rgba(217, 119, 6, 0.3);
        }

        /* Modo claro para Eris */
        body[data-character="eris"][data-theme="light"] {
            --accent: #dc2626;
            --accent-light: #ef4444;
            --accent-glow: rgba(220, 38, 38, 0.3);
        }

        /* Modo claro para Roxy */
        body[data-character="roxy"][data-theme="light"] {
            --accent: #2563eb;
            --accent-light: #3b82f6;
            --accent-glow: rgba(37, 99, 235, 0.3);
        }

        /* Modo claro para Sylphy */
        body[data-character="sylphy"][data-theme="light"] {
            --accent: #059669;
            --accent-light: #10b981;
            --accent-glow: rgba(5, 150, 105, 0.3);
        }

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

        body { 
            background-color: var(--bg-color); 
            color: var(--text-main); 
            font-family: var(--font-main); 
            line-height: 1.6; 
            overflow-x: hidden;
            position: relative;
            user-select: none;
            transition: background-color 0.3s, color 0.3s;
        }

        /* ===== 2. Animaciones Globales ===== */
        @keyframes glow-pulse {
            0%, 100% { box-shadow: 0 0 15px var(--accent-glow), 0 0 30px rgba(225, 29, 72, 0.15); }
            50% { box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(225, 29, 72, 0.25); }
        }

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

        @keyframes modal-fade-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes zoom-in {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        
        @keyframes modal-fade-out {
            from { opacity: 1; }
            to { opacity: 0; }
        }
        
        @keyframes zoom-out {
            from { opacity: 1; transform: scale(1); }
            to { opacity: 0; transform: scale(0.85); }
        }

        /* ===== 3. Elementos UI Globales (Loader, Scroll, Botones) ===== */

        /* Cursor personalizado eliminado — usar cursor nativo */

        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-color);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9998;
            transition: opacity 0.8s ease-out;
        }

        #loading-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .loader {
            width: 60px;
            height: 60px;
            border: 4px solid var(--accent-glow);
            border-top-color: var(--accent-light);
            border-radius: 50%;
            animation: spin 1.2s linear infinite;
            box-shadow: 0 0 30px var(--accent-glow);
        }

        #scroll-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 4px;
            background: var(--accent);
            z-index: 9999;
            transition: width 0.1s ease-out;
            box-shadow: 0 0 20px var(--accent-glow);
        }

        #particles-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            pointer-events: none;
            opacity: 0.2;
        }

        .container { 
            max-width: 1200px; 
            margin: 0 auto; 
            padding: 0 30px;
            position: relative;
            z-index: 1;
        }

        section { 
            padding: 120px 0;
            position: relative;
            border-bottom: 2px solid var(--border);
        }
        [data-theme="light"] section {
            border-bottom: 2px solid var(--border);
        }


        /* === NUEVO SISTEMA DE ANIMACIÓN DE SCROLL === */
        .fade-in {
            opacity: 0;
            transform: translateY(40px);
            transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .fade-in.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* === ANIMACIONES ADICIONALES DE SCROLL === */
        .slide-in-left {
            opacity: 0;
            transform: translateX(-60px);
            transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .slide-in-left.visible {
            opacity: 1;
            transform: translateX(0);
        }

        .slide-in-right {
            opacity: 0;
            transform: translateX(60px);
            transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .slide-in-right.visible {
            opacity: 1;
            transform: translateX(0);
        }

        .zoom-in {
            opacity: 0;
            transform: scale(0.8);
            transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .zoom-in.visible {
            opacity: 1;
            transform: scale(1);
        }

        .rotate-in {
            opacity: 0;
            transform: rotate(-10deg) translateY(20px);
            transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .rotate-in.visible {
            opacity: 1;
            transform: rotate(0) translateY(0);
        }

        .flip-in {
            opacity: 0;
            transform: perspective(800px) rotateY(90deg);
            transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
        .flip-in.visible {
            opacity: 1;
            transform: perspective(800px) rotateY(0);
        }

        .bounce-in {
            opacity: 0;
            transform: scale(0.3) translateY(30px);
            animation: bounce-in-anim 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
        }
        @keyframes bounce-in-anim {
            0% {
                opacity: 0;
                transform: scale(0.3) translateY(30px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        /* === FIN SISTEMA ANIMACIÓN === */


        .section-title { 
            font-size: 2.8rem; 
            margin-bottom: 60px;
            font-weight: 800;
            position: relative;
            display: inline-block;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -15px;
            left: 0;
            width: 60%;
            height: 4px;
            background: var(--accent);
            border-radius: 2px;
        }

        .btn { 
            display: inline-block; 
            padding: 14px 40px; 
            background: var(--accent); 
            color: #fff; 
            border-radius: 5px; 
            font-weight: 600;
            font-size: 1rem;
            box-shadow: 0 0 25px var(--accent-glow);
            transition: all 0.3s ease;
            border: 2px solid var(--accent);
            text-decoration: none;
            cursor: pointer;
        }

        .btn:hover { 
            transform: translateY(-5px);
            background: var(--accent-light);
            border-color: var(--accent-light);
            box-shadow: 0 0 35px var(--accent-glow);
        }

        .btn-secondary {
            background: transparent;
            border: 2px solid var(--accent);
            color: var(--accent-light);
            box-shadow: none;
            margin-left: 0;
        }

        .btn-secondary:hover {
            background: var(--accent-glow);
            border-color: var(--accent);
            color: #fff;
            transform: translateY(-5px);
        }

        /* ===== 4. Header y Navegación (REDISEÑO TOTAL) ===== */
        header { 
            position: absolute; /* Inicia como absoluto */
            top: 20px; /* Margen superior */
            left: 50%;
            transform: translateX(-50%);
            width: 90%; /* No es 100% al inicio */
            max-width: 1200px; /* Coincide con el .container */
            background: rgba(12, 12, 15, 0.8); 
            backdrop-filter: blur(10px);
            z-index: 100; 
            border: 1px solid var(--border);
            border-radius: 10px; /* ¡Redondeado! */
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        [data-theme="light"] header {
            background: rgba(255, 255, 255, 0.85);
            border: 1px solid var(--border);
        }


        /* ESTADO DE SCROLL */
        
        /* AI Disclaimer dentro del Hero */
        .ai-disclaimer-hero {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(217, 119, 6, 0.15);
            border: 1px solid var(--accent);
            border-radius: 8px;
            padding: 10px 16px;
            margin-bottom: 30px;
            font-size: 0.85rem;
            color: var(--text-main);
        }
        
        .ai-disclaimer-hero i {
            font-size: 1.2rem;
            color: var(--accent);
            flex-shrink: 0;
        }
        
        .ai-disclaimer-hero strong {
            color: var(--accent);
            font-weight: 600;
        }
        
        [data-theme="light"] .ai-disclaimer-hero {
            background: rgba(217, 119, 6, 0.08);
        }
        
        /* Eliminar el banner anterior */
        .ai-disclaimer {
            display: none;
        }
        
        [data-theme="light"] .ai-disclaimer {
            background: rgba(217, 119, 6, 0.05);
        }
        
        .ai-disclaimer p {
            color: var(--text-main);
            line-height: 1.5;
        }
        
        .ai-disclaimer strong {
            color: var(--accent);
            font-weight: 600;
        }

        /* Estado scrolled del header */
        header.scrolled {
            position: fixed; /* Se vuelve fijo */
            top: 0;
            left: 0;
            transform: none; /* Resetea transformación */
            width: 100%;
            max-width: 100%;
            border-radius: 0; /* Pierde redondeo */
            border-left: none;
            border-right: none;
            border-top: none;
            border-bottom: 1px solid var(--border);
            background: rgba(12, 12, 15, 0.95);
            box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
        }
        [data-theme="light"] header.scrolled {
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
        }


        nav { 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            height: 70px; 
            padding: 0 25px; /* Padding interno para nav */
        }
        /* Ajuste de padding en container para el header */
        header .container {
            padding: 0;
            margin: 0;
            max-width: 100%;
        }


        .logo { 
            font-weight: 900; 
            font-size: 1.8rem; 
            color: var(--accent);
            text-decoration: none;
            letter-spacing: -1px;
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .character-selector {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .char-btn {
            background: transparent;
            border: 2px solid var(--border);
            color: var(--text-muted);
            padding: 6px 12px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto; /* evitar que ocupe todo el ancho en móvil */
        }

        .char-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .char-btn.active {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        /* Colores para cada personaje */
        .char-btn#char-roxy {
            --char-color: #3b82f6;
        }

        .char-btn#char-roxy.active {
            background: #3b82f6;
            border-color: #3b82f6;
        }

        .char-btn#char-roxy:hover {
            border-color: #3b82f6;
            color: #3b82f6;
        }

        .char-btn#char-sylphy {
            --char-color: #10b981;
        }

        .char-btn#char-sylphy.active {
            background: #10b981;
            border-color: #10b981;
        }

        .char-btn#char-sylphy:hover {
            border-color: #10b981;
            color: #10b981;
        }

        .nav-right-cluster {
            display: flex;
            align-items: center;
            gap: 25px;
        }

        .nav-links { 
            display: flex; 
            gap: 25px; 
        }

        .nav-links a { 
            font-size: 0.95rem; 
            color: var(--text-muted); 
            font-weight: 500;
            position: relative;
            padding: 8px 0;
            transition: all 0.3s ease;
            text-decoration: none;
        }

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

        .nav-links a:hover {
            color: var(--text-main);
        }

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

        .nav-links a.active {
            color: var(--accent);
        }

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

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: var(--text-main);
            font-size: 1.8rem;
            cursor: pointer;
        }

        .mobile-nav {
            display: none;
            position: fixed;
            top: 70px;
            left: 0;
            width: 100%;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            padding: 30px;
            z-index: 1001;
            transform: translateY(-100%);
            transition: transform 0.4s ease;
            max-height: calc(100vh - 70px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .mobile-nav.active {
            display: block;
            transform: translateY(0);
        }

        .mobile-nav a {
            display: block;
            padding: 15px 0;
            color: var(--text-muted);
            font-weight: 500;
            font-size: 1.1rem;
            border-bottom: 1px solid var(--border);
            text-decoration: none;
        }

        .mobile-nav a:hover {
            color: var(--accent);
        }

        .lang-switch { display: flex; gap: 8px; }

        .lang-btn {
            background: var(--bg-secondary);
            color: var(--text-muted);
            border: 1px solid var(--border);
            padding: 6px 10px;
            border-radius: 5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 0.8rem;
        }

        .lang-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        .lang-btn.active {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

        .theme-toggle-btn {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 8px 12px;
            cursor: pointer;
            font-size: 1.3rem;
            color: var(--text-main);
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .theme-toggle-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: var(--bg-color);
            transform: scale(1.1);
        }

        /* ===== 5. Sección Hero (#inicio) - Rediseño ===== */
        .hero { 
            min-height: 100vh; 
            display: flex; 
            align-items: center; 
            position: relative;
            padding-top: 120px; /* Aumentado para el header flotante */
            overflow: hidden;
        }

        .hero-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            align-items: center;
            width: 100%;
        }

        .hero-image-container {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 500px;
            min-height: 500px; /* Altura fija para evitar movimiento */
        }

        .hero-image {
            height: 100%;
            width: auto;
            max-width: 100%;
            object-fit: contain;
            filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
            opacity: 1;
            border-radius: 16px;
            border: 4px solid var(--accent);
            box-shadow: 0 0 30px var(--accent-glow);
            box-sizing: border-box; /* Incluye el borde dentro de las dimensiones */
            display: block; /* Elimina espacios extra del inline */
        }
        [data-theme="light"] .hero-image {
            filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
        }

        .hero-vignette {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(ellipse at center, transparent 50%, var(--bg-color) 95%);
        }
        [data-theme="light"] .hero-vignette {
            background: radial-gradient(ellipse at center, transparent 40%, var(--bg-color) 90%);
        }

        .hero .container {
            z-index: 2;
        }

        .hero-content {
            max-width: 650px;
        }

        /* Animación Stagger */
        .hero-content > * {
            opacity: 0;
            transform: translateY(20px);
        }

        .hero-subtitle {
            font-size: 1.1rem;
            color: var(--accent-light);
            font-weight: 600;
            margin-bottom: 10px;
            letter-spacing: 1px;
        }

        .hero h1 { 
            font-size: 3.8rem; 
            line-height: 1.1; 
            margin-bottom: 20px;
            font-weight: 900;
            color: var(--text-main);
        }
        [data-theme="light"] .hero h1 {
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }


        .hero-desc { 
            font-size: 1.2rem; 
            color: var(--text-muted); 
            margin-bottom: 35px; 
            line-height: 1.7;
        }

        .hero-content > div {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            align-items: center;
        }

        .typewriter {
            color: var(--accent-light);
            font-weight: 600;
            display: inline-block;
            min-width: 350px; /* Reservar espacio para evitar movimiento del layout */
            vertical-align: baseline;
            white-space: nowrap; /* Evitar saltos de línea */
        }

        .typewriter-text {
            display: inline;
        }

        .typewriter-cursor {
            display: inline-block;
            margin-left: 2px;
            color: var(--accent);
            font-weight: 400;
            animation: blink 1s infinite;
        }

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

        /* ===== 6. Sección "About" (ACORDEÓN INTERACTIVO) ===== */
        #about {
            background-color: var(--bg-secondary);
        }

        .story-accordion {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-top: 40px;
        }

        .story-card {
            background: var(--bg-color);
            border: 2px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .story-card:hover {
            border-color: var(--accent);
            box-shadow: 0 8px 25px var(--accent-glow);
        }

        .story-card.expanded {
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
        }

        .story-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 25px;
            background: linear-gradient(135deg, rgba(225, 29, 72, 0.1), rgba(225, 29, 72, 0.05));
            transition: all 0.3s ease;
        }

        .story-card:hover .story-card-header {
            background: linear-gradient(135deg, rgba(225, 29, 72, 0.15), rgba(225, 29, 72, 0.08));
        }

        .story-card.expanded .story-card-header {
            background: linear-gradient(135deg, rgba(225, 29, 72, 0.2), rgba(225, 29, 72, 0.1));
            border-bottom: 2px solid var(--accent-glow);
        }

        .story-header-content {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .story-age-badge {
            display: inline-block;
            font-size: 0.8rem;
            font-weight: 700;
            color: white;
            background: var(--accent);
            padding: 8px 16px;
            border-radius: 20px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 4px 15px var(--accent-glow);
            white-space: nowrap;
            flex-shrink: 0;
        }

        .story-header-text h3 {
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-main);
            margin: 0;
            margin-bottom: 5px;
        }

        .story-header-text p {
            font-size: 0.95rem;
            color: var(--text-muted);
            margin: 0;
            line-height: 1.5;
        }

        .story-card-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--accent);
            font-size: 1.3rem;
            transition: all 0.3s ease;
            flex-shrink: 0;
        }

        .story-card:hover .story-card-toggle {
            background: var(--accent);
            color: white;
            transform: scale(1.1);
        }

        .story-card.expanded .story-card-toggle {
            background: var(--accent);
            color: white;
            transform: rotate(180deg);
        }

        .story-card-body {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            width: 100%;
        }

        .story-card.expanded .story-card-body {
            max-height: 600px;
        }

        .story-card-content {
            padding: 25px;
            display: block;
            width: 100%;
            box-sizing: border-box;
        }

        .story-card-text {
            width: 100%;
            box-sizing: border-box;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: scale(0.95);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .story-card-image {
            width: 100%;
            max-width: 200px;
            height: 200px;
            border-radius: 10px;
            border: 2px solid var(--accent-glow);
            object-fit: cover;
            animation: fadeIn 0.5s ease-out;
        }

        .story-card-text h4 {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--accent-light);
            margin: 0 0 15px 0;
            width: 100%;
        }

        .story-card-text .story-desc {
            font-size: 1rem;
            color: var(--text-main);
            line-height: 1.7;
            margin: 0 0 15px 0;
            width: 100%;
        }

        .story-card-text .story-details {
            font-size: 0.95rem;
            color: var(--text-muted);
            line-height: 1.8;
            padding: 15px;
            background: rgba(225, 29, 72, 0.05);
            border-left: 3px solid var(--accent);
            border-radius: 5px;
            margin: 0;
            width: 100%;
            box-sizing: border-box;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .story-card-image {
                width: 100%;
                max-width: 100%;
                height: auto;
                margin-bottom: 15px;
            }

            .story-header-content {
                flex-wrap: wrap;
            }

            .story-header-text h3 {
                font-size: 1.1rem;
            }

            .story-card.expanded .story-card-body {
                max-height: 1200px;
            }
        }

        @media (min-width: 769px) {
            .story-card-image {
                max-width: 200px;
                float: left;
                margin-right: 25px;
                margin-bottom: 15px;
            }
        }

        [data-theme="light"] .story-card {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        [data-theme="light"] .story-card:hover {
            box-shadow: 0 8px 20px rgba(220, 38, 38, 0.15);
        }

        [data-theme="light"] .story-card-header {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.03));
        }

        [data-theme="light"] .story-card:hover .story-card-header {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.05));
        }

        [data-theme="light"] .story-card-toggle {
            background: white;
            border-color: var(--border);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        [data-theme="light"] .story-card-text .story-details {
            background: rgba(220, 38, 38, 0.08);
            border-left-color: var(--accent);
        }


        /* ===== 7. Sección Habilidades ===== */
        .skills-section-v2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
        }

        .techniques-column h3, .languages-column h3 {
            font-size: 1.5rem;
            margin-bottom: 25px;
            color: var(--text-main);
            font-weight: 700;
            border-bottom: 2px solid var(--border);
            padding-bottom: 10px;
        }

        .techniques-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 25px;
        }

        .technique-card {
            background-color: transparent;
            min-height: 180px;
            perspective: 1000px;
            cursor: default;
        }

        .technique-card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.7s;
            transform-style: preserve-3d;
        }

        .technique-card:hover .technique-card-inner {
            transform: rotateY(180deg);
        }

        .technique-card-front,
        .technique-card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
            border-radius: 8px;
            border: 2px solid var(--border);
        }

        .technique-card-front {
            background: var(--bg-secondary);
        }
        [data-theme="light"] .technique-card-front {
            border: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }
        [data-theme="light"] .technique-card:hover .technique-card-front {
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
        }


        .technique-card-front i {
            font-size: 2.5rem;
            color: var(--accent);
            margin-bottom: 15px;
        }

        .technique-card-front h4 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .technique-card-back {
            background: var(--accent);
            color: #fff;
            transform: rotateY(180deg);
            border-color: var(--accent);
        }

        .technique-card-back h5 {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: 10px;
        }

        .technique-card-back p {
            font-size: 0.9rem;
            line-height: 1.6;
        }

        .languages-column { 
            align-self: start;
        }

        .language-item { 
            margin-bottom: 22px;
        }

        .language-item h4 { 
            font-size: 1rem; 
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--text-main);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .language-level {
            color: var(--accent-light);
            font-size: 0.9rem;
            font-weight: 600;
            background: var(--accent-glow);
            padding: 2px 8px;
            border-radius: 5px;
        }

        .language-bar { 
            background: var(--border); 
            border-radius: 10px; 
            height: 8px; 
            overflow: hidden;
        }
        [data-theme="light"] .language-bar {
            background: #e2e8f0;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
        }


        .language-fill { 
            background: var(--accent); 
            height: 100%; 
            border-radius: 10px;
            width: 0; /* Se anima con JS */
            transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .language-item .language-description {
            text-align: right;
            color: var(--text-muted);
            font-size: 0.85rem;
            margin-top: 8px;
            font-weight: 500;
        }

        /* ===== 8. Sección Galería ===== */
        #galeria {
            background-color: var(--bg-secondary);
        }

        /* ===== Novedades / Video Embed ===== */
        #novedades {
            background: var(--bg-color);
            padding-top: 60px;
            padding-bottom: 60px;
        }

        .video-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 10px;
        }

        .video-embed {
            width: 100%;
            max-width: 900px;
            aspect-ratio: 16 / 9;
            background: var(--bg-secondary);
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid var(--border);
            box-shadow: 0 12px 40px rgba(0,0,0,0.35);
        }

        .video-embed iframe {
            width: 100%;
            height: 100%;
            display: block;
            border: 0;
        }

        /* Carousel-style gallery: show one main image with prev/next controls and thumbnails */
        .gallery-grid {
            display: block;
            position: relative;
            max-width: 1000px;
            margin: 0 auto;
            padding: 20px 0;
        }

        .gallery-carousel {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 18px;
        }

        .carousel-main {
            width: 720px;
            max-width: 92vw;
            height: 460px;
            background: var(--bg-secondary);
            border-radius: 12px;
            border: 2px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.25);
        }

        .carousel-main img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.45s ease, opacity 0.35s ease;
        }

        .carousel-control {
            background: rgba(0,0,0,0.4);
            color: #fff;
            border: none;
            width: 56px;
            height: 56px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            cursor: pointer;
            transition: transform 0.2s ease, background 0.2s ease;
            user-select: none;
        }
        .carousel-control:hover { transform: scale(1.06); background: rgba(0,0,0,0.55); }

        .carousel-thumbs {
            display: flex;
            gap: 10px;
            margin-top: 14px;
            justify-content: center;
            align-items: center;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding: 6px 12px;
        }

        .carousel-thumb {
            width: 96px;
            height: 60px;
            border-radius: 8px;
            overflow: hidden;
            border: 2px solid var(--border);
            cursor: pointer;
            flex: 0 0 auto;
        }
        .carousel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .carousel-thumb.active { border-color: var(--accent); box-shadow: 0 6px 20px var(--accent-glow); transform: translateY(-4px); }

        .gallery-item {
            border-radius: 8px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid var(--border);
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }
        [data-theme="light"] .gallery-item {
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        }


        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.4s ease;
        }

        /* Transition helpers for smooth gallery updates */
        .gallery-item {
            opacity: 1;
            transform: translateY(0);
            transition: opacity 350ms cubic-bezier(0.2,0.8,0.2,1), transform 350ms cubic-bezier(0.2,0.8,0.2,1);
        }

        /* During fade-out of the grid, all children fade down */
        .gallery-fade-out .gallery-item {
            opacity: 0;
            transform: translateY(10px);
        }

        /* Initial state for newly inserted items */
        .gallery-item--enter {
            opacity: 0;
            transform: translateY(12px);
        }

        .gallery-item:hover {
            border-color: var(--accent);
            box-shadow: 0 10px 30px var(--accent-glow);
            transform: translateY(-5px);
        }
        [data-theme="light"] .gallery-item:hover {
            box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
        }


        .gallery-item:hover img {
            transform: scale(1.05);
        }

        /* ===== 9. Lightbox Modal ===== */
        .lightbox-modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(12, 12, 15, 0.95);
            backdrop-filter: blur(8px);
            animation: modal-fade-in 0.3s;
            cursor: auto;
        }
        
        .lightbox-modal.lightbox-closing {
            animation: modal-fade-out 0.3s forwards;
        }
        
        .lightbox-modal.lightbox-closing #lightbox-img {
            animation: zoom-out 0.3s forwards;
        }
        [data-theme="light"] .lightbox-modal {
            background-color: rgba(249, 249, 249, 0.95);
        }

        .lightbox-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: auto;
            max-width: 96vw;
            height: auto;
            max-height: 96vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            box-sizing: border-box;
        }

        #lightbox-img {
            max-width: 90vw;
            max-height: 85vh;
            object-fit: contain;
            border-radius: 5px;
            border: 2px solid var(--border);
            animation: zoom-in 0.3s ease;
            transition: opacity 0.2s ease-in-out;
        }
        [data-theme="light"] #lightbox-img {
            border: none;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }


        #lightbox-caption {
            text-align: center;
            color: var(--text-muted);
            padding: 10px 0;
            font-size: 1.1rem;
            position: absolute;
            bottom: 30px;
            width: 100%;
        }

        .lightbox-close {
            position: absolute;
            top: 25px;
            right: 40px;
            color: #fff;
            font-size: 50px;
            transition: 0.3s;
            cursor: pointer;
            z-index: 2001;
        }
        [data-theme="light"] .lightbox-close {
            color: var(--text-muted);
        }
        [data-theme="light"] .lightbox-close:hover {
            color: var(--accent);
        }

        .lightbox-close:hover { color: var(--accent); }

        .lightbox-prev,
        .lightbox-next {
            cursor: pointer;
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            padding: 10px 15px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 40px;
            font-weight: 300;
            transition: all 0.3s ease;
            user-select: none;
            z-index: 2001;
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        [data-theme="light"] .lightbox-prev,
        [data-theme="light"] .lightbox-next {
            color: rgba(0, 0, 0, 0.5);
        }


        .lightbox-prev { left: 30px; }
        .lightbox-next { right: 30px; }
        .lightbox-prev:hover,
        .lightbox-next:hover {
            color: rgba(255, 255, 255, 1);
            transform: translateY(-50%) scale(1.2);
        }
        [data-theme="light"] .lightbox-prev:hover,
        [data-theme="light"] .lightbox-next:hover {
            color: rgba(0, 0, 0, 0.8);
        }
        .lightbox-prev:hover,
        .lightbox-next:hover {
            background-color: var(--accent-glow);
        }

        /* Ocultar captions: solo mostrar la imagen */
        #lightbox-caption {
            display: none !important;
        }

        /* ===== 10. Sección "Saber Más" ===== */
        #saber-mas {
            text-align: center;
        }

        .section-subtitle {
            font-size: 1.1rem;
            color: var(--text-muted);
            margin-bottom: 60px;
            margin-top: -30px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.7;
        }

        .media-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
        }

        .media-card {
            display: flex;
            flex-direction: column;
            text-decoration: none;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 8px;
            padding: 35px;
            transition: all 0.4s ease-out; /* Transición más suave */
            min-height: 300px;
            position: relative;
        }
        [data-theme="light"] .media-card {
            border: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }


        /* === NUEVO EFECTO 3D HOVER === */
        .media-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 15px 40px var(--accent-glow);
        }
        [data-theme="light"] .media-card:hover {
            box-shadow: 0 15px 40px rgba(220, 38, 38, 0.2);
        }


        .media-card i {
            font-size: 3rem;
            color: var(--accent);
            margin-bottom: 20px;
        }

        .media-card h3 {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 10px;
        }

        .media-card p {
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.7;
            margin-bottom: 30px;
            flex-grow: 1;
        }

        .media-btn {
            display: inline-block;
            padding: 10px 25px;
            background: var(--accent-glow);
            border: 2px solid var(--accent);
            color: var(--accent-light);
            border-radius: 5px;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            text-decoration: none;
            text-align: center;
            margin-top: auto;
            cursor: pointer;
        }

        .media-btn:hover {
            background: var(--accent);
            border-color: var(--accent);
            color: #fff;
            transform: translateY(-2px);
        }

        /* ===== 11. Footer ===== */
        footer { 
            text-align: center; 
            padding: 60px 0 30px; 
            color: var(--text-muted); 
            font-size: 0.95rem;
            background: var(--bg-secondary);
        }

        .footer-content {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            gap: 30px;
            margin-bottom: 30px;
        }

        .footer-links {
            display: flex;
            gap: 30px;
        }

        .footer-links a {
            color: var(--text-muted);
            transition: all 0.3s ease;
            font-weight: 500;
            text-decoration: none;
        }

        .footer-links a:hover {
            color: var(--accent);
        }

        .social-links { 
            display: flex; 
            gap: 20px;
            justify-content: center;
        }

        .social-links a { 
            font-size: 1.6rem; 
            color: var(--text-muted);
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .social-links a:hover { 
            color: var(--accent);
            transform: translateY(-3px);
        }

        .footer-bottom {
            padding-top: 30px;
            border-top: 1px solid var(--border);
            font-size: 0.9rem;
        }

        /* ===== 12. Media Queries (Responsive) ===== */
        @media (max-width: 968px) {
            /* Ajuste del header */
            header {
                width: 95%;
            }
            nav {
                padding: 0 20px;
            }


            .hero h1 { font-size: 3rem; }

            .skills-section-v2 {
                grid-template-columns: 1fr;
            }

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

            .gallery-grid {
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            }

            .footer-content {
                flex-direction: column;
                gap: 40px;
            }
        }

        @media (max-width: 768px) {
            .container { padding: 0 20px; }
            section { padding: 80px 0; }
            
            .hero { text-align: center; padding-top: 100px; }
            .hero-wrapper {
                grid-template-columns: 1fr;
                gap: 30px;
            }
            .hero-content {
                max-width: 100%;
            }
            .hero-content > div {
                justify-content: center; /* Centrar botones en móvil */
            }
            .hero-image-container {
                height: 300px;
            }
            .hero h1 { font-size: 2.5rem; }
            .hero p { font-size: 1.1rem; }
            .section-title { font-size: 2.2rem; }
            
            /* Nav móvil */
            header {
                top: 0;
                width: 100%;
                border-radius: 0;
                position: fixed; /* Fijo desde el inicio en móvil */
                transform: none;
                left: 0;
            }
            .nav-links { display: none; }
            .lang-switch { display: none; }
            .mobile-menu-btn { display: block; }
            
            .logo-section {
                flex-direction: column;
                gap: 10px;
                align-items: flex-start;
            }

            .character-selector {
                width: 100%;
                justify-content: flex-start;
                flex-wrap: wrap; /* permitir que los botones salten de línea en pantallas pequeñas */
            }

            .char-btn {
                padding: 5px 10px;
                font-size: 0.75rem;
                width: auto; /* reafirmar que no se expandan */
            }
            
            .btn-secondary {
                grid-template-columns: 1fr;
            }
            
            /* Ocultar controles de lightbox en móvil */
            .lightbox-prev,
            .lightbox-next {
                display: none;
            }
            
            .lightbox-close {
                font-size: 35px;
                top: 15px;
                right: 25px;
            }
        }

        /* ===== Estilos Específicos para Modo Claro (MEJORADOS) ===== */

        [data-theme="light"] .section-title::after {
            background: var(--accent);
            box-shadow: 0 0 10px var(--accent-glow);
        }

        [data-theme="light"] .btn {
            box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
        }

        [data-theme="light"] .language-fill {
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
        }

        [data-theme="light"] .particles-canvas {
            opacity: 0.15;
        }

        [data-theme="light"] .scroll-progress {
            box-shadow: 0 0 15px var(--accent-glow);
        }

        /* Overlay para menú móvil */
        #mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.35);
            z-index: 1000;
        }
        #mobile-overlay.active {
            display: block;
        }

        .mobile-lang-switch {
            margin-top: 15px;
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* ===== Modal - selector de idioma para descarga ===== */
        .download-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 3000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .download-modal-overlay[aria-hidden="false"] { display: flex; }

        .download-modal-box {
            background: var(--bg-secondary);
            color: var(--text-main);
            padding: 18px 20px;
            border-radius: 10px;
            border: 1px solid var(--border);
            max-width: 420px;
            width: 100%;
            text-align: center;
            box-shadow: 0 10px 40px rgba(0,0,0,0.6);
        }

        .download-modal-close {
            position: absolute;
            right: 26px;
            top: 20px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            font-size: 28px;
            cursor: pointer;
        }

        .download-modal-box .btn { min-width: 110px; }
/* ===== Character Cards Grid (Main Page) ===== */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.character-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--accent-glow);
    border-color: var(--accent);
}

.character-card-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
}

.character-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 0.4s ease;
}

.character-card:hover .character-card-image img {
    transform: scale(1.08);
}

.character-card-content {
    padding: 24px;
}

.character-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent);
}

.character-card .character-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.character-card .character-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.synopsis-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.synopsis-content p {
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .characters-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .character-card-image {
        height: 380px;
    }
}
