/* --- GLOBAL STYLES (VHS, CRT, NAVBAR, SCROLLBARS) --- */

/* --- IMPORTACIÓN DE FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&family=Inter:wght@300;400;600&family=Lora:ital,wght@0,400;0,500;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* --- VARIABLES --- */
:root { 
    --cyber-white: #ffffff; 
    --dim-white: rgba(255, 255, 255, 0.2);
    --cyber-blue: #00f2ff; 
    --dim-blue: rgba(0, 242, 255, 0.7);
    --glitch-blue: rgba(0, 150, 255, 0.5);
    --glitch-cyan: rgba(0, 255, 255, 0.5);
    --dimmed-text: rgba(255, 255, 255, 0.7);
    --content-text: rgba(255, 255, 255, 1.0);
}

/* --- ESTRUCTURA GLOBAL --- */
body, html {
    margin: 0; 
    padding: 0;
    width: 100%; 
    height: 100%;
    background: #252525; 
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    color: var(--cyber-white);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
    animation: magnetic-glitch 6s infinite steps(1);
}

/* --- ANIMACIÓN DE GLITCH --- */
@keyframes magnetic-glitch {
    0%, 90%, 100% { filter: contrast(1.1) brightness(1); transform: skew(0deg) scale(1); }
    92% { filter: contrast(1.4) brightness(1.2) hue-rotate(10deg); transform: skew(3deg) scale(1.01); }
    94% { filter: contrast(1.6) brightness(1.3) hue-rotate(-10deg); transform: skew(-3deg) scale(0.99); }
    96% { filter: contrast(1.2) brightness(1.1); transform: skew(1deg); }
}

body::before {
    content: ""; position: fixed; inset: 0;
    background: url("");
    opacity: 0.04; z-index: 5001; pointer-events: none;
}
body::after {
    content: ""; position: fixed; inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%),
                radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 150%);
    z-index: 6000; background-size: 100% 3px, 100% 100%; pointer-events: none;
}
.vhs-line {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 10px white;
    z-index: 5002; animation: vhs-scan 4s linear infinite;
}
@keyframes vhs-scan { 0% { top: -5%; } 100% { top: 105%; } }

/* --- NAVBAR --- */
.nav-bar {
    position: fixed; 
    bottom: 4%; 
    left: 50%;
    transform: translateX(-50%); 
    width: auto;
    min-width: 300px;
    display: flex; 
    justify-content: center; 
    gap: 40px;
    z-index: 7000;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    padding: 15px 40px;
    border: 1px solid var(--dim-white);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-bar a {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.85rem; 
    color: var(--cyber-white); 
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 5px;
    opacity: 0.8;
    transition: 0.4s ease;
    position: relative;
}

.nav-bar a:hover { 
    opacity: 1;
    color: var(--cyber-blue);
    text-shadow: 0 0 10px var(--cyber-blue);
    letter-spacing: 7px;
}

.nav-bar a:hover::before { content: "["; position: absolute; left: -20px; color: var(--cyber-blue); }
.nav-bar a:hover::after { content: "]"; position: absolute; right: -20px; color: var(--cyber-blue); }

/* --- SCROLLBARS (Invisible but functional) --- */
::-webkit-scrollbar { width: 0px; background: transparent; }
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* --- BLOG CONTAINER (Shared across sections) --- */
.blog-container {
    width: 90%; 
    max-width: 900px;
    margin: 40px auto; 
    padding-bottom: 120px;
    z-index: 10; 
    position: relative;
    max-height: 75vh; 
    overflow-y: auto;
}

.blog-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-bottom: 1px solid var(--dim-white); 
    padding-bottom: 15px; 
    margin-bottom: 30px;
}

.blog-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 0 10px var(--cyber-blue);
    letter-spacing: 3px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .blog-container {
        width: 95%;
        margin: 20px auto;
        padding-bottom: 150px;
        max-height: 80vh;
    }
    .blog-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    .blog-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    .nav-bar {
        gap: 15px;
        bottom: 2%;
        flex-wrap: wrap;
        padding: 10px 20px;
        width: 90%;
        border-radius: 20px;
        min-width: unset;
    }
    .nav-bar a {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    .nav-bar a:hover {
        letter-spacing: 3px;
    }
    .nav-bar a:hover::before, .nav-bar a:hover::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body, .vhs-line { animation: none; filter: none; }
}
