:root {
    /* Tema Dark (Default) */
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --bg-nav: rgba(15, 23, 42, 0.85);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --border: rgba(255, 255, 255, 0.05);
    --glow: rgba(20, 184, 166, 0.3);
}

[data-theme='light'] {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-nav: rgba(248, 250, 252, 0.85);
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --border: rgba(15, 23, 42, 0.1);
    --glow: rgba(13, 148, 136, 0.15);
}

[data-theme='cyber'] {
    --bg-main: #000000;
    --bg-card: rgba(15, 5, 25, 0.7);
    --bg-nav: rgba(0, 0, 0, 0.95);
    --text-main: #ffffff;
    --text-muted: #d946ef;
    --accent: #a855f7;
    --accent-hover: #f43f5e;
    --border: rgba(168, 85, 247, 0.5);
    --glow: rgba(168, 85, 247, 0.8);
    --gradient-cyber: linear-gradient(90deg, #a855f7 0%, #06b6d4 100%);
}

/* Especial para Modo Cyber */
[data-theme='cyber'] .text-highlight {
    color: #d946ef !important;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

[data-theme='cyber'] .glow-text {
    background: var(--gradient-cyber);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.6));
}

[data-theme='cyber'] .bg-highlight {
    background: var(--gradient-cyber) !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

[data-theme='cyber'] .glow-box {
    border: 1px solid var(--border) !important;
    box-shadow: 0 0 30px -5px rgba(168, 85, 247, 0.4) !important;
}

[data-theme='cyber'] #stack img {
    filter: drop-shadow(0 0 8px #a855f7) brightness(1.2);
}


html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Glassmorphism para el Nav */
.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

/* Efectos de brillo sutiles */
.glow-text {
    text-shadow: 0 0 25px var(--glow);
}

.glow-box {
    box-shadow: 0 0 40px -10px var(--glow);
}

/* FORZAR CONTRASTE TOTAL EN MODO LIGHT */
[data-theme='light'] body {
    background-color: #f8fafc;
    color: #0f172a;
}

/* Capturar cualquier variante de texto blanco/claro de Tailwind */
[data-theme='light'] .text-white, 
[data-theme='light'] .text-slate-100, 
[data-theme='light'] .text-slate-200, 
[data-theme='light'] .text-slate-300,
[data-theme='light'] .text-slate-400 { 
    color: #0f172a !important; 
}

/* Capturar cualquier variante de fondo oscuro de Tailwind */
[data-theme='light'] .glass-nav,
[data-theme='light'] footer,
[data-theme='light'] #stack,
[data-theme='light'] #review-toast,
[data-theme='light'] #project-modal-content,
[data-theme='light'] section.bg-slate-900,
[data-theme='light'] .bg-slate-900,
[data-theme='light'] .bg-slate-800,
[data-theme='light'] [class*="bg-slate-800/"],
[data-theme='light'] [class*="bg-slate-900/"],
[data-theme='light'] .bg-\[\#0b1121\] {
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Enlaces y Navegación */
[data-theme='light'] nav a:not(.bg-highlight),
[data-theme='light'] header .text-white,
[data-theme='light'] header .text-slate-300 {
    color: #0f172a !important;
}

/* Reviews Detalle */
[data-theme='light'] #review-text { color: #334155 !important; }
[data-theme='light'] #review-author { color: #0f172a !important; }

/* Stack Detalle */
[data-theme='light'] #stack img {
    filter: invert(1) brightness(0.2) !important; /* Invierte blanco a negro */
}
[data-theme='light'] #stack h2,
[data-theme='light'] #stack p,
[data-theme='light'] #stack span {
    color: #0f172a !important;
}

/* Hero Badge */
[data-theme='light'] .inline-flex.bg-slate-800\/50 {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #0d9488 !important;
}

/* Footer Detalle */
[data-theme='light'] footer h4,
[data-theme='light'] footer p,
[data-theme='light'] footer a:not(.bg-slate-800) {
    color: #0f172a !important;
}
[data-theme='light'] footer .border-t {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Glows */
[data-theme='light'] .glow-text { text-shadow: none !important; }
[data-theme='light'] .glow-box { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1) !important; }



/* Clases para Animaciones con JS Vainilla */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay para elementos en grid */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

/* Ajuste para las imágenes de los mockups */
.mockup-img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
}
