/* ==========================================
   SOBRE-MI.CSS — Portafolio CJ_CORE — Cristia Gimenez
   ========================================== */


        :root {
            --primary-cyan: #00f0ff;
            --surface-dark: #0a0b10;
        }
        body {
            background-color: var(--surface-dark);
            font-family: 'Space Grotesk', sans-serif;
            margin: 0;
            overflow: hidden;
        }
        /* Permitir scroll en mobile/tablet */
        @media (max-width: 1024px) {
            body { overflow: auto !important; overflow-x: hidden !important; }
            html { overflow-x: hidden !important; }
        }
        
        .tech-nebula-bg {
            position: fixed;
            inset: 0;
            z-index: -1;
            background: 
                radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(0, 79, 84, 0.12) 0%, transparent 50%),
                linear-gradient(160deg, #050608 0%, #0d0e13 100%);
            overflow: hidden;
        }
        
        .data-stream-line {
            position: absolute;
            background: linear-gradient(to bottom, transparent, var(--primary-cyan), transparent);
            width: 1px;
            opacity: 0.15;
            animation: move-stream 10s linear infinite;
        }
        @keyframes move-stream {
            0% { transform: translateY(-100%) rotate(15deg); }
            100% { transform: translateY(200%) rotate(15deg); }
        }

        .data-particle {
            position: absolute;
            width: 2px;
            height: 2px;
            background: var(--primary-cyan);
            border-radius: 50%;
            opacity: 0.2;
            pointer-events: none;
            animation: drift-particle 20s linear infinite;
        }
        @keyframes drift-particle {
            0% { transform: translate(0, 100vh); opacity: 0; }
            10% { opacity: 0.5; }
            90% { opacity: 0.5; }
            100% { transform: translate(100px, -10vh); opacity: 0; }
        }

        .scanning-line {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #00F0FF, transparent);
            box-shadow: 0 0 15px #00F0FF;
            z-index: 10;
            animation: scan-avatar 4s linear infinite;
        }
        @keyframes scan-avatar {
            0% { top: 0%; opacity: 0; }
            5% { opacity: 1; }
            95% { opacity: 1; }
            100% { top: 100%; opacity: 0; }
        }
        
        .dna-scan-ring { animation: rotate 10s linear infinite; }
        @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

        .skill-bar-fill {
            transform-origin: left;
            width: 0%;
            transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .skill-bar-fill.active {
            width: var(--target-width);
            animation: breathe 4s ease-in-out 2s infinite;
        }
        @keyframes breathe {
            0%, 100% { transform: scaleX(1); opacity: 1; }
            50% { transform: scaleX(0.97); opacity: 0.85; }
        }

        #sidebar {
            width: 70px;
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 60;
        }
        #sidebar:hover { width: 240px; }

        .skill-node {
            position: relative;
            background: rgba(0, 240, 255, 0.03);
            border: 1px solid rgba(0, 240, 255, 0.1);
            transition: all 0.4s ease;
            overflow: hidden;
        }
        .skill-node:hover {
            background: rgba(0, 240, 255, 0.08);
            border-color: rgba(0, 240, 255, 0.4);
            transform: translateY(-2px);
        }

        #terminal-overlay {
            display: none;
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 320px;
            height: 224px;
            background: rgba(10, 11, 16, 0.95);
            border: 1px solid var(--primary-cyan);
            z-index: 150;
            font-family: monospace;
            font-size: 10px;
            padding: 10px;
            color: var(--primary-cyan);
            box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
        }
        #terminal-overlay.active { display: flex; flex-direction: column; }

        #purge-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 210;
            background: #0A0B10;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        #purge-overlay.active { display: flex; }

        #encryption-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 200;
            backdrop-filter: blur(24px);
            background: rgba(0, 0, 0, 0.98);
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }
        #encryption-overlay.active { display: flex; }

        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Proyectos pulse animation */
        @keyframes proyectos-glow {
            0%, 100% { 
                color: rgba(0, 240, 255, 0.5);
                text-shadow: none;
            }
            50% { 
                color: #00F0FF;
                text-shadow: 0 0 8px rgba(0, 240, 255, 0.8), 0 0 20px rgba(0, 240, 255, 0.4);
            }
        }

        /* --- Sidebar móvil: se abre con click/touch --- */
        @media (hover: none) {
            #sidebar { width: 50px; }
            #sidebar.open { width: 240px; }
            #sidebar.open .opacity-0 { opacity: 1; }
            #sidebar-overlay {
                display: none;
                position: fixed;
                inset: 0;
                z-index: 49;
                background: rgba(0,0,0,0.5);
            }
            #sidebar-overlay.active { display: block; }
        }

        /* --- Sidebar: click para abrir/cerrar --- */
        #sidebar {
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        #sidebar.locked {
            width: 240px !important;
        }
        #sidebar.locked .opacity-0 {
            opacity: 1 !important;
        }
        #sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 49;
            background: rgba(0,0,0,0.3);
            cursor: pointer;
        }
        #sidebar-overlay.active {
            display: block;
        }

        /* Desktop: main fijo entre nav superior y borde inferior.
           Mismo esqueleto que en mis proyectos. */
        #main-content {
            left: 70px;
        }
    
/* ==========================================
   RESPONSIVE — Sobre Mí
   Tablet: 768px-1366px | Móvil: <768px
   ========================================== */

/* Tablet/Laptop (hasta 1366px) */


/* Tablet (769px - 1024px): sidebar overlay, scroll natural */
@media (max-width: 1024px) {
    /* Sidebar deja de empujar y se vuelve overlay */
    #sidebar {
        z-index: 60 !important;
        width: 70px !important;
    }
    /* Anula la regla #sidebar:hover { width:240px } heredada de desktop:
       en touch/tablet la expansión solo debe ocurrir por click (.locked/.open) */
    #sidebar:hover { width: 70px; }
    #sidebar.locked,
    #sidebar.open {
        width: 240px !important;
    }
    #sidebar.locked .opacity-0,
    #sidebar.open .opacity-0 {
        opacity: 1 !important;
    }

    /* Contenido sin offset de sidebar — sidebar flota encima */
    #main-content {
        position: relative !important;
        height: auto !important;
        min-height: calc(100vh - 3.5rem) !important;
        overflow: visible !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        padding-left: 70px !important;
        margin-top: 3.5rem !important;
    }
    #content-inner {
        overflow: visible !important;
        height: auto !important;
        padding-left: 0 !important;
    }
}

/* Móvil (≤768px) */
@media (max-width: 768px) {
    /* Ocultar menú de texto del top-nav */
    nav .hidden.md\:flex { display: none !important; }

    /* Main con scroll natural — mismo patrón que proyectos */
    #main-content {
        position: relative !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: calc(100vh - 3.5rem) !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 3.5rem !important;
        padding-left: 70px !important;
    }
    #content-inner {
        padding: 1rem 1rem 2rem !important;
    }

    /* Grid: 1 columna */
    #main-content .grid.grid-cols-12 {
        gap: 1rem !important;
    }
    #main-content .col-span-12 {
        gap: 1rem !important;
    }
    /* Ajustes de tipografía */
    #main-content h1.font-headline-md { font-size: 1.5rem !important; }
    #main-content .font-body-lg { font-size: 1rem !important; }

    /* Cards padding mas compacto */
    #main-content section > div { padding: 1.25rem !important; }
    /* Stats grid: 2 columnas siempre */
    #main-content .grid.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    /* Mods integrados: stack vertical */
    #main-content .md\:flex-row { flex-direction: column !important; }
    #main-content .md\:border-l { border-left: 0 !important; }
    #main-content .md\:pl-10 { padding-left: 0 !important; }

    /* Avatar mas pequeño */
    #main-content .w-40.h-40 { width: 8rem !important; height: 8rem !important; }
}

/* Móvil pequeño (≤480px) */
@media (max-width: 480px) {
    #content-inner { padding: 0.75rem !important; }
    #main-content section > div { padding: 1rem !important; }
    #main-content h1.font-headline-md { font-size: 1.25rem !important; }
}

/* Fuentes más grandes — feedback madre de Cristia :) */
@media (min-width: 769px) {
    body { font-size: 16px; }
    .font-mono-data { font-size: 14px !important; }
    .text-\[10px\] { font-size: 12px !important; }
    .text-\[11px\] { font-size: 13px !important; }
    .text-\[12px\] { font-size: 14px !important; }
    .text-\[13px\] { font-size: 14px !important; }
    .text-sm { font-size: 15px !important; }
}

/* ==========================================
   MARCO CARICATURA HUD — retrato de Cristia
   Esquinas fijas + escaneo + etiqueta. Sin borde latiendo.
   ========================================== */
.avatar-frame {
    position: relative;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 2 / 3;
    border: 1.5px solid rgba(0, 240, 255, 0.35);
    overflow: hidden;
    background: #000;
    margin: 0 auto;
}
.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-frame .avatar-scanline {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.22), transparent);
    animation: avatar-scan 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes avatar-scan {
    0% { top: -60px; }
    100% { top: 100%; }
}
.avatar-frame .a-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-cyan);
    z-index: 4;
}
.avatar-frame .a-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.avatar-frame .a-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.avatar-frame .a-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.avatar-frame .a-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }
.avatar-frame .a-tag {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--primary-cyan);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 4;
    background: rgba(10, 11, 16, 0.7);
    padding: 3px 8px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    white-space: nowrap;
}
