/* =========================================================================
   SISTEMA DE DISEÑO — JUNIOR NAVA PORTAFOLIO DIGITAL
   Estética: CodeCraft Dark Neon / Indigo-Violet / Customizable Theme
   Inspirado en Stitch Design System y Layout CodeCraft
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Variables de Color Dinámicas (Editables desde el Panel CMS) */
    --accent-primary: #6366F1;     /* Indigo/Purple principal */
    --accent-secondary: #8B5CF6;   /* Violeta para gradientes */
    --accent-cyan: #22D3EE;        /* Cyan para detalles */
    --accent-emerald: #22C55E;     /* Verde de estado */
    
    --bg-primary: #070913;         /* Fondo principal oscuro profundo */
    --bg-secondary: #0D1127;       /* Fondo secundario */
    --card-bg: #0F172A;            /* Fondo de tarjetas */
    --card-secondary: #162038;     /* Hover de tarjetas */
    --card-border: #1E293B;        /* Bordes sutiles */
    --border-hover: rgba(99, 102, 241, 0.45);

    /* Tipografía */
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;

    /* Glows y Auras */
    --glow-color: rgba(99, 102, 241, 0.25);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Geist', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Background Grid Tecnológico Seguro */
.tech-grid-bg {
    position: relative;
}

.tech-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

/* Navbar Glassmorphism */
.glass-navbar {
    background: rgba(7, 9, 19, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

/* Tarjetas Tech */
.tech-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.tech-card:hover {
    background: var(--card-secondary);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -12px var(--glow-color), 0 0 20px -4px rgba(99, 102, 241, 0.15);
}

/* Hero Developer Orb & Mockup */
.hero-orb {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-primary) 0%, var(--accent-secondary) 60%, transparent 80%);
    opacity: 0.45;
    filter: blur(50px);
    z-index: 1;
}

.code-floating-card {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 25px -5px var(--glow-color);
    position: relative;
    z-index: 10;
}

/* Botones con Estilo CodeCraft */
.btn-accent-glow {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--glow-color);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-accent-glow:hover {
    box-shadow: 0 6px 22px var(--glow-color), 0 0 15px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-dark-outline {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary) !important;
    transition: all 0.25s ease;
}

.btn-dark-outline:hover {
    background: var(--card-secondary);
    border-color: var(--accent-primary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Badges con estilo CodeCraft */
.badge-codecraft {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #A5B4FC;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skill Progress Bars */
.skill-progress-track {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.skill-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    box-shadow: 0 0 10px var(--glow-color);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Project Card Number Badge */
.project-num-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94A3B8;
}

/* Auras de Fondo */
.glow-spot-1 {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.12;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.glow-spot-2 {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    opacity: 0.12;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

/* Badge con Pulso En Vivo */
@keyframes livePulse {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.badge-live-pulse {
    animation: livePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 15px var(--glow-color);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Color Preview Swatches in CMS */
.theme-preset-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-preset-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

/* Print mode */
@media print {
    body {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    nav, footer, .no-print, #toast-container, .glow-spot-1, .glow-spot-2, #admin-modal {
        display: none !important;
    }
    .tech-card, .code-floating-card {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        color: #0f172a !important;
        page-break-inside: avoid;
    }
    h1, h2, h3, h4, span, p, div {
        color: #0f172a !important;
    }
}
