/* ========================================
   ULTIMÁTNÍ MODERNÍ CSS PRO FLASK WEB — V5.0
   Base: verze 4.6 (opravené animace, glass, dark-toggle)
   Přidáno: FUTURISTIC MINIMAL CYAN/MODRÉ VYLEPŠENÍ (v5)
   Autor: AI Assistant — Final combo (complete file)
   ======================================== */

/* CSS Variables pro moderní témata (modro-bílé s gradienty) */
:root {
    --bg-primary: #f8fafc; /* Lehce šedobílé pozadí pro hloubku */
    --bg-secondary: rgba(255, 255, 255, 0.8); /* Glassmorphism pro sekce */
    --text-primary: #111827; /* Tmavší pro lepší čitelnost */
    --text-secondary: #64748b; /* Středně šedý */
    --accent: #3b82f6; /* Moderní modrá */
    --accent-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8); /* Gradient pro akcenty */
    --accent-hover: #2563eb; /* Hover modrá */
    --border-color: rgba(226, 232, 240, 0.8); /* Jemné hraničky */
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08); /* Subtilní stín */
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12); /* Jednoduchý shadow na hover */
    --shadow-glass: 0 4px 20px rgba(0, 0, 0, 0.1); /* Pro glass */
    --border-radius: 12px; /* Moderní zaoblení */
    --transition: all 0.3s cubic-bezier(.2,.9,.28,1); /* Rychlejší animace */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(226, 232, 240, 0.5);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: rgba(30, 41, 59, 0.8);
    --text-primary: #f9fafb; /* Světlý pro dark – lepší contrast */
    --text-secondary: #cbd5e1;
    --accent: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #60a5fa, #3b82f6);
    --accent-hover: #3b82f6;
    --border-color: rgba(51, 65, 85, 0.8);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 4px 20px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(71, 85, 105, 0.5);
}

/* Globální moderní styly – elegantní a čisté */
* { box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; /* Moderní font stack */
    margin: 0; padding: 0; 
    background: var(--bg-primary); 
    color: var(--text-primary); 
    line-height: 1.7; /* Lepší čitelnost textu */
    scroll-behavior: smooth;
    overflow-x: hidden;
    position: relative; /* Pro static pozadí */
}
body::before { /* Subtilní static gradient pro pozadí – bez animace */
    content: ''; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%), 
                radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%); 
    pointer-events: none; 
    z-index: -1; 
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; } /* Moderní šířka */

/* Moderní header – gradient s fade-in, dark-toggle nyní absolutní v headeru */
header { 
    background: var(--accent-gradient); 
    color: white; 
    padding: 60px 0; 
    text-align: center; 
    position: relative; /* Pro absolutní dark-toggle */
    overflow: hidden;
}
header::before { 
    content: ''; 
    position: absolute; top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(5px); 
}
header h1 { 
    margin: 0; 
    font-size: 3rem; 
    font-weight: 300; 
    position: relative; z-index: 2; 
    animation: fadeInDown 1.2s ease-out; /* Spomalený */
    will-change: opacity, transform; /* Optimalizace pro plynulost */
}
header p { 
    margin: 15px 0 0; 
    font-size: 1.3rem; 
    opacity: 0.95; 
    position: relative; z-index: 2; 
    animation: fadeInDown 1.2s ease-out 0.2s both; /* Spomalený */
    will-change: opacity, transform;
}
@keyframes fadeInDown { 
    from { opacity: 0; transform: translateY(-10px); } /* Snížen posun z -20px pro méně glitchů */
    to { opacity: 1; transform: translateY(0); } 
}

/* Dark mode toggle – nyní absolutní v headeru, shimmer jen na pozadí */
.dark-toggle { 
    position: absolute; /* Změna z fixed na absolute – relativně k headeru */
    top: 20px; right: 20px; 
    z-index: 10; /* Dostatečný v headeru, bez globálního překrývání */
    background: var(--glass-bg); 
    border: 1px solid var(--glass-border); 
    color: var(--text-secondary); 
    padding: 12px; 
    border-radius: 50%; 
    cursor: pointer; 
    transition: var(--transition); 
    backdrop-filter: blur(10px); 
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    will-change: transform, background; /* Optimalizace pro hover */
}
.dark-toggle::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za ikonou */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.dark-toggle:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
.dark-toggle:hover { 
    background: var(--accent); 
    color: white; 
    border-color: var(--accent); 
    transform: scale(1.1); /* Pouze 2D scale, bez rotate */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}

/* Hamburger – moderní pro mobil, shimmer jen na pozadí */
.hamburger { 
    display: none; 
    position: fixed; top: 20px; left: 20px; 
    z-index: 1002; 
    background: var(--glass-bg); 
    color: var(--text-primary); 
    border: 1px solid var(--glass-border); 
    padding: 12px; 
    cursor: pointer; 
    font-size: 1.2rem; 
    border-radius: 8px; 
    transition: var(--transition); 
    backdrop-filter: blur(10px); 
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    will-change: transform, background;
}
.hamburger::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za ikonou */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.hamburger:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
.hamburger:hover { 
    background: var(--accent); 
    color: white; 
    border-color: var(--accent); 
    transform: scale(1.05); /* Pouze 2D scale */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}

/* Moderní menu – fixed s mírným glass efektem, shimmer jen na pozadí linků (bez dark-toggle uvnitř) */
nav { 
    position: fixed; 
    top: 0; left: 0; 
    width: 280px; 
    height: 100vh; 
    background: var(--glass-bg); 
    color: var(--text-primary); 
    padding: 90px 0 20px; /* Padding-top pro header */
    overflow-y: auto; 
    transition: var(--transition); 
    z-index: 1001; 
    box-shadow: var(--shadow-glass); 
    backdrop-filter: blur(20px); 
    border-right: 1px solid var(--glass-border); 
    min-width: 220px;
}
nav ul { list-style: none; padding: 0; margin: 0; gap: 8px; }
nav li { margin: 0; }
nav a { 
    display: flex; align-items: center; 
    padding: 18px 30px; 
    color: var(--text-primary); 
    border-bottom: 1px solid var(--glass-border); 
    transition: var(--transition); 
    text-decoration: none; 
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    will-change: transform, color; /* Optimalizace */
    font-size: 1rem;
}
nav a::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za textem */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover, s ease-in-out pro plynulost */
}
nav a:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
nav a:hover { 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--accent); 
    transform: translateX(8px); /* Pouze 2D posun, bez rotate */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}
nav a i { 
    margin-right: 15px; 
    font-size: 1.3rem; 
    transition: var(--transition); 
    opacity: 0.8; 
    z-index: 1; /* Nahoře nad shimmer */
    will-change: opacity, transform;
}
nav a:hover i { 
    opacity: 1; 
    transform: scale(1.1); 
}

/* Obsah – s marginem pro menu */
main { 
    margin-left: 280px; 
    padding-top: 90px; 
    min-height: 100vh; 
    position: relative; z-index: 1; 
}
.content { padding: 40px 0; }

/* Moderní sekce – glassmorphism s jednoduchým shadow na hover */
.section { 
    background: var(--glass-bg); 
    margin-bottom: 50px; 
    padding: 40px; 
    border-radius: var(--border-radius); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition); 
    backdrop-filter: blur(15px); 
    border: 1px solid var(--glass-border); 
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: opacity, transform; /* Optimalizace pro sekce */
}
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(10px); } /* Snížen posun z 20px pro méně glitchů */
    to { opacity: 1; transform: translateY(0); } 
}
.section:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    border-color: var(--accent); 
}

/* Komplexní grid pro příspěvky – masonry-like s opravenými animacemi, bez posunů */
.posts-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px;
    margin-top: 40px; 
    justify-content: center; 
    align-items: start; /* Pro dynamické výšky */
    width: 100%; 
    margin-left: auto; 
    margin-right: auto; 
}
.post { 
    background: var(--glass-bg); /* Adaptivní – světlý v light, tmavý v dark */
    border-radius: var(--border-radius); 
    padding: 30px; 
    box-shadow: var(--shadow-light); 
    transition: var(--transition); 
    position: relative; 
    width: 100%; 
    max-width: 380px; 
    min-height: 350px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    border: 1px solid var(--border-color); 
    animation: fadeInUp 1.2s ease-out; /* Spomalený load pre celý post */
    overflow: visible; /* Pro top bar */
    will-change: transform, box-shadow; /* Optimalizace pro hover */
    min-width: 0;
}
.post::before { 
    content: ''; 
    position: absolute; /* Absolute pro pevné umístění nahoře – bez shiftu */
    top: 0; left: 0; 
    width: 100%; height: 4px; 
    background: var(--accent-gradient); 
    border-radius: var(--border-radius) var(--border-radius) 0 0; 
    z-index: 1; /* Nahoře, ale neovlivňuje obsah */
    transition: var(--transition); /* Pro shimmer na hover */
}
.post:hover { 
    transform: translateY(-4px); /* Mírnější lift – bez výrazného posunu nahoru */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    border-color: var(--accent); 
}
.post:hover::before { 
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); /* Lehký lesk na top bar na hover – bez shiftu */
}
.post-image { 
    width: 100%; 
    aspect-ratio: 16/9; 
    object-fit: cover; 
    border-radius: 8px; 
    opacity: 1; /* Default viditelný */
    display: block; 
    transition: var(--transition); 
    box-shadow: var(--shadow-light); 
    animation: fadeInImage 1.2s ease-out; /* Spomalený load animace */
    will-change: transform, box-shadow; /* Optimalizace */
}
.post:hover .post-image { 
    transform: scale(1.02); 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na obrázek na hover */
}
.post-image-placeholder { 
    width: 100%; 
    aspect-ratio: 16/9; 
    background: var(--bg-secondary); /* Adaptivní – tmavý v dark */
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--text-secondary); 
    font-style: italic; 
    font-size: 1rem; /* Viditelný text */
    opacity: 1; /* Default viditelný */
    transition: var(--transition); 
    box-shadow: var(--shadow-light); 
    animation: fadeInImage 1.2s ease-out; /* Spomalený load */
    border: 1px solid var(--border-color); /* Pro lepší viditelnost */
    will-change: box-shadow;
}
.post:hover .post-image-placeholder { 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na placeholder na hover */
}
.post h3 { 
    margin: 0; 
    color: var(--text-primary); 
    font-size: 1.4rem; 
    font-weight: 500; 
    opacity: 1; /* Default viditelný */
    line-height: 1.3; /* Lepší čitelnost */
    animation: staggerPost 1.2s ease-out forwards 0.1s; /* Subtilní animace pro text – rychlejší start */
    transform: translateY(0); /* Default pozice */
    will-change: opacity, transform;
}
.post small { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
    margin: 0; 
    opacity: 1; /* Default viditelný */
    animation: staggerPost 1.2s ease-out forwards 0.2s; /* Subtilní animace */
    transform: translateY(0); 
    will-change: opacity, transform;
}
.post p { 
    margin: 0; 
    color: var(--text-primary); 
    flex-grow: 1; 
    line-height: 1.6; /* Lepší čitelnost */
    opacity: 1; /* Default viditelný */
    animation: staggerPost 1.2s ease-out forwards 0.3s; /* Subtilní animace */
    transform: translateY(0); 
    will-change: opacity, transform;
}
@keyframes staggerPost { 
    from { 
        opacity: 0.95; 
        transform: translateY(1px); /* Velmi subtilní posun – snížen z 2px pro bez glitchů */
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}
.post a { 
    background: var(--accent); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 8px; 
    transition: var(--transition); 
    font-weight: 500; 
    text-decoration: none; 
    align-self: flex-start; 
    box-shadow: var(--shadow-light); 
    position: relative; 
    overflow: hidden; 
    opacity: 1; /* Default viditelný */
    animation: staggerPost 1.2s ease-out forwards 0.4s; /* Subtilní animace pro button */
    transform: translateY(0); 
    z-index: 1; /* Nahoře nad shimmer */
    will-change: transform, box-shadow;
}
.post a::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za textem */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.post a:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
.post a:hover { 
    background: var(--accent-hover); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na button na hover */
}

/* Styly pro materiály (high-end kolony s glassmorphism a 2D efekty) – vylepšeno pro ultra-responzivitu, bez 3D */
.materials-layout { 
    display: flex; gap: 30px; 
    height: auto;  
    margin-top: 40px; 
    opacity: 1; 
    min-height: 500px;  
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: opacity, transform;
}
.subjects-list { 
    width: 30%; 
    background: var(--glass-bg); 
    padding: 30px; 
    border-radius: var(--border-radius); 
    overflow-y: auto; 
    box-shadow: var(--shadow-glass); 
    animation: slideInLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Spomalený */
    opacity: 1; 
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    will-change: transform, opacity;
}
@keyframes slideInLeft { 
    from { transform: translateX(-30px); opacity: 0.8; } /* Odstraněno rotateY, snížen posun z -60px */
    to { transform: translateX(0); opacity: 1; } 
}
.pdf-viewer { 
    width: 70%; 
    padding: 30px; 
    border-radius: var(--border-radius); 
    background: var(--glass-bg); /* Adaptivní pro dark mode */
    overflow-y: auto; 
    box-shadow: var(--shadow-light); 
    border: 1px solid var(--border-color); 
    animation: slideInRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Spomalený */
    opacity: 1; 
    will-change: transform, opacity;
}
@keyframes slideInRight { 
    from { transform: translateX(30px); opacity: 0.8; } /* Odstraněno rotateY, snížen posun z 60px */
    to { transform: translateX(0); opacity: 1; } 
}
.subject-item { 
    display: flex; align-items: center; 
    padding: 25px; 
    border: 1px solid var(--glass-border); 
    border-radius: 12px; 
    margin-bottom: 20px; 
    cursor: pointer; 
    transition: var(--transition); 
    position: relative; 
    overflow: hidden; /* Pro shimmer na pozadí */
    opacity: 1; 
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: transform, box-shadow;
}
.subject-item::before { 
    content: ''; 
    position: absolute; left: 0; top: 0; 
    width: 6px; height: 100%; 
    background: var(--accent); 
    transform: scaleY(0); 
    transition: var(--transition); 
    border-radius: 12px 0 0 12px;
    z-index: 1; /* Nahoře */
}
.subject-item::after { /* Shimmer jen na pozadí za textem */
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.subject-item:hover::before { transform: scaleY(1); }
.subject-item:hover::after { left: 100%; } /* Shimmer aktivní jen na hover */
.subject-item:hover { 
    background: rgba(59, 130, 246, 0.1); 
    transform: translateX(8px); /* Odstraněno rotateY(5deg) – pouze 2D */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    border-color: var(--accent);
}
.subject-item.selected { 
    background: rgba(59, 130, 246, 0.15); 
    border-color: var(--accent); 
    box-shadow: var(--shadow-glass);
    transform: scale(1.02);
}
.subject-item img { 
    width: 70px; height: 70px; 
    object-fit: cover; 
    border-radius: 12px; 
    margin-right: 25px; 
    box-shadow: 0 6px 20px rgba(0,0,0,0.15); 
    opacity: 1; /* Default viditelný */
    display: block; 
    transition: transform 1.2s;  /* Spomalený */
    will-change: transform;
    z-index: 1; /* Nahoře nad shimmer */
    animation: fadeInImage 1.2s ease-out; /* Spomalený load */
}
.subject-item:hover img { 
    transform: scale(1.1); /* Odstraněno rotateY(10deg) – pouze 2D scale */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na obrázek na hover */
}
.subject-item h4 { 
    margin: 0 0 8px; 
    color: var(--text-primary); 
    font-weight: 500; 
    font-size: 1.2rem;
    opacity: 1; /* Default viditelný */
    z-index: 1; /* Nahoře nad shimmer */
}
@media (max-width: 768px) { 
    .materials-layout { flex-direction: column; height: auto; }
    .subjects-list, .pdf-viewer { width: 100%; }
}

/* Tlačítka – high-end s gradienty, 2D efekty a shimmer efektem jen na pozadí na hover */
button { 
    background: var(--accent-gradient); 
    color: white; 
    border: none; 
    padding: 14px 28px; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: var(--transition); 
    font-family: inherit; 
    font-weight: 500; 
    box-shadow: var(--shadow-light); 
    position: relative; 
    overflow: hidden; 
    opacity: 1; /* Default viditelný */
    z-index: 1; /* Nahoře nad shimmer */
    will-change: transform, box-shadow;
}
button::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za textem */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
button:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
button:hover { 
    transform: translateY(-3px) scale(1.05); /* Odstraněno rotateX(5deg) – pouze 2D */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    background: var(--accent-hover);
}
button.secondary { 
    background: linear-gradient(135deg, #6c757d, #5a6268); 
    box-shadow: var(--shadow-light); 
    z-index: 1; /* Nahoře nad shimmer */
}
button.secondary::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
button.secondary:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
button.secondary:hover { 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na secondary */
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-3px) scale(1.05); /* Přidáno pro konzistenci, bez 3D */
}

/* Footer – high-end s glassmorphism a shimmer jen na pozadí linků */
footer { 
    background: var(--accent-gradient); 
    color: white; 
    text-align: center; 
    padding: 50px 0; 
    margin-top: 80px; 
    position: relative; 
    opacity: 1; 
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1; /* Zabránění překrývání */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1); 
    will-change: opacity;
}
footer::before { 
    content: ''; 
    position: absolute; top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(255,255,255,0.05); 
    backdrop-filter: blur(5px); 
}
footer p { 
    margin: 0; 
    font-size: 1rem; 
    opacity: 0.9; 
}
footer a { 
    color: white; 
    transition: var(--transition); 
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    z-index: 1; /* Nahoře nad shimmer */
    will-change: color, box-shadow;
}
footer a::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za textem */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
footer a:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
footer a:hover { 
    color: rgba(255,255,255,0.8); 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na footer linky */
}

/* Lazy loading pro obrázky (high-end optimalizace) – vylepšeno s skeletons */
img { 
    opacity: 1; /* Default viditelný – oprava pro chybějící obrázky */
    display: block; 
    transition: none; /* Žádná default transition – jen na load */
    will-change: opacity, transform;
}
img.loaded { 
    opacity: 1; 
    animation: fadeInImage 1.2s ease-out; /* Spomalený objevení jen pro lazy load */
}
@keyframes fadeInImage { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

/* Další high-end optimalizace – loading animace pro sekce a skeletons */
.loading { 
    opacity: 1; /* Default viditelný */
    transform: translateY(0); 
    transition: var(--transition); 
    will-change: opacity, transform;
}
.loading.loaded { 
    opacity: 1; 
    transform: translateY(0); 
}
.loading::before { /* Skeleton loader pro prázdné stavy – shimmer jen na hover */
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--glass-bg) 25%, rgba(255,255,255,0.1) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    animation: none; /* Žádná trvalá animace */
    border-radius: var(--border-radius);
    transition: var(--transition);
    z-index: -1; /* Jen na pozadí */
}
.loading:hover::before { 
    animation: loading-skeleton 3s infinite; /* Shimmer jen na hover, spomalený */
}
@keyframes loading-skeleton { 
    0% { background-position: 200% 0; } 
    100% { background-position: -200% 0; } 
}

/* Scrollbar customizace pro high-end look (pro webkit prohlížeče) – vylepšeno */
::-webkit-scrollbar { 
    width: 8px; 
}
::-webkit-scrollbar-track { 
    background: var(--glass-bg); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb { 
    background: var(--accent); 
    border-radius: 4px; 
    box-shadow: var(--shadow-light);
}
::-webkit-scrollbar-thumb:hover { 
    background: var(--accent-hover); 
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na scrollbar hover */
}

/* Theme toggle – nyní slouží dark-toggle v headeru, toto je pro kompatibilitu (pokud je potřeba) */
.theme-toggle { 
    background: var(--glass-bg); 
    border: none; 
    color: var(--text-secondary); 
    cursor: pointer; 
    padding: 12px; 
    border-radius: 50%; 
    transition: var(--transition); 
    opacity: 1; 
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    z-index: 1; /* Nahoře nad shimmer */
    will-change: transform, background;
}
.theme-toggle::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za ikonou */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.theme-toggle:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
.theme-toggle:hover { 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--text-primary); 
    transform: scale(1.1); /* Pouze 2D scale, bez rotate */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}

/* Responzivita – high-end mobilní optimalizace s novým layoutem pro grid a ultra-wide */
@media (max-width: 768px) { 
    nav { transform: translateX(-100%); width: 280px; }  
    nav.open { transform: translateX(0); } 
    main { margin-left: 0; padding-top: 70px; } /* Upravený padding na mobilu proti hamburgeru */
    .hamburger { display: block; } 
    header h1 { font-size: 2.2rem; } 
    .section { padding: 25px; margin-bottom: 30px; } 
    /* NOVÝ LAYOUT: 1 sloupec na mobilu, plná šířka bez prázdného místa */
    .posts-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
        justify-content: center;  
        align-items: stretch; /* Dynamické výšky i na mobilu */
    } 
    .post { 
        padding: 20px; 
        max-width: 100%;  
        gap: 15px; /* Menší gap na mobilu pro kompaktnost */
        min-height: auto; /* Menší min-height na mobilu */
        min-width: auto; /* Na mobilu ignoruj min-width pro plnou šířku */
    } 
    .post-image { aspect-ratio: 1/1; } /* Čtvercový obrázek na mobilu pro lepší fit */
    .materials-layout { flex-direction: column; }  
    /* FIX: Rychlejší obrázky na mobilu – ale stále spomalené pro animace */
    .post-image, .subject-item img { transition-duration: 0.6s; }
    .container { padding: 0 15px; }
    body { font-size: 0.95rem; line-height: 1.6; }
    /* Dark-toggle na mobilu: Menší a blíže k okraji, aby se nepřekrýval s hamburgerem */
    .dark-toggle { top: 15px; right: 15px; padding: 10px; } 
}
@media (min-width: 769px) and (max-width: 1024px) { 
    /* NOVÝ LAYOUT: 2 sloupce na tabletu, fixní šířka s mírným prázdným místem */
    .posts-grid { 
        grid-template-columns: repeat(2, 1fr); 
        justify-content: center;  
        align-items: stretch; /* Dynamické */
    } 
}
@media (min-width: 1025px) { 
    /* NOVÝ LAYOUT: 3 sloupce na desktopu, fixní šířka s centrováním */
    .posts-grid { 
        grid-template-columns: repeat(3, 1fr); 
        justify-content: center;  
        align-items: stretch; /* Dynamické */
    } 
}
@media (min-width: 1400px) { 
    /* NOVÝ LAYOUT: 3 sloupce na ultra-wide, větší prázdné místo na velkých monitorech */
    .posts-grid { 
        grid-template-columns: repeat(3, 1fr); 
        justify-content: center; 
        gap: 35px;  
    } 
    .post { max-width: 380px; }  
    .container { max-width: 1400px; padding: 0 30px; } /* Širší pro 4K */
    header h1 { font-size: 3.5rem; }
}
@media (min-width: 2000px) { 
    /* Ultra-wide optimalizace: Stále 3 sloupce, ale větší mezery */
    .posts-grid { gap: 40px; }
    .materials-layout { gap: 40px; }
    .section { padding: 50px; }
}

/* Print styly pro high-end tisk (bonus) */
@media print {
    nav, .hamburger, .dark-toggle { display: none; }
    main { margin-left: 0; }
    .section { box-shadow: none; background: white; }
    body { background: white; }
    .post { 
        break-inside: avoid; 
        page-break-inside: avoid; 
        min-height: auto; 
        gap: 10px; 
    }
    .post-image { aspect-ratio: auto; max-height: 200px; }
}

/* Specifické styly pro Contacts stránku – high-end formuláře a kontaktní položky */
.contact-item {
    margin-bottom: 25px; 
    padding: 25px; 
    background: var(--glass-bg); 
    border-left: 5px solid var(--accent); 
    border-radius: 0 12px 12px 0; 
    transition: var(--transition); /* Spomalený */
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    display: flex; /* Dynamické rozložení – flex pro ikonu a text */
    align-items: center;
    gap: 15px; /* Bez překrývání */
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: transform, box-shadow;
}
.contact-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transition: var(--transition); /* Spomalený */
}
.contact-item:hover::before { transform: scaleX(1); }
.contact-item:hover {
    transform: translateX(5px) scale(1.02); /* Pouze 2D, bez rotate */
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    border-left-color: var(--accent-hover);
}
.contact-item i {
    color: var(--accent);
    margin-right: 0; /* Žádný margin – flex gap */
    font-size: 1.2rem;
    transition: var(--transition); /* Spomalený */
    flex-shrink: 0; /* Zabrání zmenšení ikony */
    opacity: 1; /* Default viditelný */
    z-index: 1; /* Nahoře nad shimmer */
    will-change: transform;
}
.contact-item:hover i {
    transform: scale(1.2); /* Pouze 2D scale, bez rotate(10deg) */
}
.contact-item strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block; /* Pro lepší rozložení */
    opacity: 1; /* Default viditelný */
    z-index: 1; /* Nahoře nad shimmer */
}
.contact-item a {
    color: var(--accent);
    transition: var(--transition); /* Spomalený */
    opacity: 1; /* Default viditelný */
    position: relative;
    overflow: hidden; /* Pro shimmer na pozadí */
    z-index: 1; /* Nahoře nad shimmer */
    will-change: color;
}
.contact-item a::before { 
    content: ''; 
    position: absolute; top: 0; left: -100%; 
    width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    z-index: -1; /* Jen na pozadí za textem */
    transition: left 3s ease-in-out; /* Spomalený shimmer jen na hover */
}
.contact-item a:hover::before { left: 100%; } /* Shimmer aktivní jen na hover */
.contact-item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 20px;
    display: flex; flex-direction: column; /* Dynamické pro label a input */
    gap: 8px;
    opacity: 1; /* Default viditelný */
    animation: staggerIn 1.2s ease-out forwards; /* Spomalený load */
    will-change: opacity, transform;
}
.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    opacity: 1; /* Default viditelný */
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--glass-bg);
    color: var(--text-primary);
    transition: var(--transition); /* Spomalený */
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    opacity: 1; /* Default viditelný */
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--glass-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(15px);
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: opacity, transform;
}

/* Styly pro mapu placeholder v Contacts – high-end embed s jednoduchým shadow na hover */
.map-placeholder {
    height: 400px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin-top: 25px;
    box-shadow: var(--shadow-glass);
    transition: var(--transition); /* Spomalený */
    position: relative;
    overflow: hidden;
    opacity: 1; /* Default viditelný */
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: transform, box-shadow;
}
.map-placeholder::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    animation: none; /* Žádná trvalá animace */
}
.map-placeholder:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}

/* Specifické styly pro Projects stránku – vylepšené pro grid a placeholdery s jednoduchým shadow na hover */
#projectsGrid .post {
    background: linear-gradient(135deg, var(--glass-bg), rgba(255,255,255,0.1)); /* Adaptivní pro dark */
    border: 1px solid var(--glass-border);
    min-height: 380px;
}
#projectsGrid .post-image-placeholder {
    background: var(--bg-secondary); /* Adaptivní */
    position: relative;
    opacity: 1; /* Default viditelný */
}
#projectsGrid .post-image-placeholder i {
    font-size: 4rem;
    color: var(--text-secondary);
    transition: var(--transition); /* Spomalený */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    opacity: 1; /* Default viditelný */
    z-index: 1; /* Nahoře */
    will-change: transform, filter;
}
#projectsGrid .post:hover .post-image-placeholder i {
    transform: scale(1.2); /* Pouze 2D scale, bez rotate(180deg) */
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
}
#projectsGrid .post small {
    font-style: italic;
    color: var(--text-secondary);
    opacity: 1; /* Default viditelný */
}

/* Globální vylepšení pro lead texty a placeholder stavy */
.lead {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    opacity: 1; /* Default viditelný */
    transition: var(--transition); /* Spomalený pro hover efekty */
}
.row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.row > div {
    flex: 1;
}

/* Animace pro kontakt položky a formuláře (staggered) – spomalené load */
.contact-item,
.form-group {
    opacity: 0;
    transform: translateY(10px); /* Snížen posun z 20px pro méně glitchů */
    animation: staggerIn 1.2s ease-out forwards; /* Spomalený */
    will-change: opacity, transform;
}
.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Další high-end prvky: Toast notifikace (pro JS error handling) s jednoduchým shadow */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-hover); /* Trvalý shadow pro toast */
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%); /* Slide-in zprava */
    transition: var(--transition); /* Spomalený slide-in */
    backdrop-filter: blur(10px);
    will-change: opacity, transform; /* Optimalizace pro animaci */
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast i {
    margin-right: 10px;
    opacity: 1; /* Default viditelný */
}

/* Loading stavy pro noPosts, noSubjects atd. – vylepšeno s animací s jednoduchým shadow na hover */
#noPosts, #noSubjects, #noPdfs {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(15px);
    border: 1px dashed var(--text-secondary);
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    margin: 40px 0;
    display: flex; flex-direction: column; align-items: center; gap: 20px; /* Dynamické rozložení */
    transition: var(--transition);
    will-change: box-shadow;
}
#noPosts:hover, #noSubjects:hover, #noPdfs:hover {
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
}
#noPosts i, #noSubjects i, #noPdfs i {
    font-size: 5rem;
    color: var(--text-secondary);
    margin-bottom: 0; /* Flex gap */
    opacity: 0.7;
    transition: var(--transition); /* Spomalený */
    will-change: transform, color;
}
#noPosts:hover i, #noSubjects:hover i, #noPdfs:hover i {
    transform: scale(1.1);
    color: var(--accent);
}
#noPosts h3 {
    color: var(--text-primary);
    margin-bottom: 0; /* Flex gap */
    font-size: 1.5rem;
    opacity: 1; /* Default viditelný */
}

/* Vylepšení pro embed PDF viewer – high-end iframe/ embed styly s jednoduchým shadow na hover */
embed {
    width: 100%;
    height: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-glass);
    transition: var(--transition); /* Spomalený */
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    animation: fadeInUp 1.2s ease-out; /* Spomalený load */
    will-change: transform, box-shadow;
}
embed:hover {
    box-shadow: var(--shadow-hover); /* Jednoduchý shadow na hover */
    transform: scale(1.005);
}

/* Globální focus styly pro přístupnost (high-end accessibility) */
*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
    transition: var(--transition); /* Spomalený focus */
}

/* Performance optimalizace: Redukce repaints – rozšířeno pro více animací */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .section, .post, button, .subject-item, .contact-item, .dark-toggle, .hamburger, nav a, footer a { 
        transform: none !important; 
    }
    .loading::before { animation: none !important; }
    img { transition: none !important; }
}
/* ... (všechny existující styly zůstávají nezměněny – vlož toto na konec souboru) ... */

/* High-end styly pro modal příspěvku – overlay s blur, centrování, responzivní */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);  /* Tmavý overlay pro fokus */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease-out;  /* Smooth fade-in */
    backdrop-filter: blur(5px);  /* Blur efekt pro high-end */
    will-change: opacity;
}

.modal-overlay.open {
    opacity: 1;
}

.modal-content {
    background: var(--glass-bg);  /* Adaptivní pro dark/light */
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    animation: fadeInScale 0.3s ease-out;  /* Smooth objevení */
    overflow-y: auto;  /* Scroll pro dlouhý content */
    will-change: transform, opacity;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    transform: scale(1.1);
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.modal-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--glass-bg);
    border: 2px dashed var(--text-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.modal-content-text {
    line-height: 1.6;
    color: var(--text-primary);
    margin: 20px 0;
    white-space: pre-wrap;  /* Zachová nové řádky z TXT souborů */
}

.modal-content h2 {
    margin-top: 0;
    color: var(--primary);
    font-size: 2rem;
}

.modal-content small {
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: block;
}

/* Responzivita pro mobil – fullscreen modal */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        padding: 20px;
        margin: 0;
    }
    
    .modal-close {
        top: 10px; right: 15px;
        font-size: 1.8rem;
    }
    
    .modal-image {
        max-height: 250px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
}

/* Indikace klikatelnosti pro posty v gridu */
.post {
    cursor: pointer;
    transition: var(--transition);
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Zkrácený text v gridu – zajištění, že excerpt nebude příliš dlouhý */
.post p {
    display: -webkit-box;
    -webkit-line-clamp: 3;  /* Max 3 řádky pro excerpt */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
}
/* Konec původního bloku (verze 4.6) */


/* =========================
   V5.0 ADDITIONS — FUTURISTIC MINIMAL CYAN/MODRÝ THEME
   (přidáno: plynulé pozadí, micro-motion, parallax, scroll reveal, utility třídy)
   ========================= */

/* --- nové proměnné / cyan akcenty --- */
:root{
  --v5-accent-1: #06b6d4; /* cyan */
  --v5-accent-2: #3b82f6; /* modrá */
  --v5-glow: 0 8px 40px rgba(6,182,212,0.12), 0 2px 8px rgba(59,130,246,0.04);
  --bg-anim-speed: 24s; /* rychlost animace pozadí */
  --parallax-scale: 1.02;
  --micro-ease: cubic-bezier(.2,.9,.28,1);
  --v5-border-subtle: rgba(6,182,212,0.08);
}

/* Adaptace pro dark mode */
[data-theme="dark"] {
  --v5-glow: 0 10px 50px rgba(6,182,212,0.18), 0 3px 12px rgba(59,130,246,0.06);
}

/* --- dynamické plynulé pozadí (low CPU, smooth) --- */
body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  background:
    radial-gradient(circle at 10% 20%, rgba(6,182,212,0.04), transparent 12%),
    radial-gradient(circle at 85% 80%, rgba(59,130,246,0.03), transparent 10%),
    linear-gradient(120deg, rgba(6,182,212,0.01), rgba(59,130,246,0.01));
  pointer-events:none;
  will-change: transform, opacity;
  animation: v5-bgDrift var(--bg-anim-speed) linear infinite;
  opacity: 1;
  mix-blend-mode: screen;
  filter: saturate(1.05);
}
@keyframes v5-bgDrift{
  0%{ transform: translate3d(0,0,0) scale(1); filter: hue-rotate(0deg) saturate(1); }
  50%{ transform: translate3d(-2%,1%,0) scale(1.01); filter: hue-rotate(6deg) saturate(1.05); }
  100%{ transform: translate3d(0,0,0) scale(1); filter: hue-rotate(0deg) saturate(1); }
}

/* Reduce motion respektování */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; transform: none; filter: none; }
}

/* --- HERO / HEADER micro parallax (data-parallax) --- */
[data-parallax]{
  transform-origin:center;
  transition: transform 600ms var(--micro-ease), box-shadow 600ms var(--micro-ease);
  will-change: transform, box-shadow;
}
[data-parallax]:hover{
  transform: scale(var(--parallax-scale));
  box-shadow: var(--v5-glow);
}

/* jemný pohyb pozadí u headeru (pseudo-3D pomocí translateZ emulace) */
header[data-parallax]::before{
  transition: transform 1200ms var(--micro-ease);
}

/* --- Micro motion pro tlačítka a ikony --- */
button, .post a, .theme-toggle, .dark-toggle, .hamburger {
  transition: transform 260ms var(--micro-ease), box-shadow 260ms var(--micro-ease), background 260ms ease;
  will-change: transform, box-shadow;
}
button:hover, .post a:hover, .theme-toggle:hover, .dark-toggle:hover, .hamburger:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(59,130,246,0.06), var(--v5-glow);
}

/* subtle press */
button:active, .post a:active { transform: translateY(-2px) scale(0.995); }

/* icons micro bounce on hover */
.icon, nav a i, .contact-item i {
  transition: transform 360ms var(--micro-ease), opacity 360ms;
  will-change: transform, opacity;
}
.icon:hover, nav a:hover i, .contact-item:hover i { transform: translateY(-6px) scale(1.06); opacity:1; }

/* --- Neon/cyan accent utilities --- */
.v5-accent {
  background: linear-gradient(90deg, var(--v5-accent-1), var(--v5-accent-2));
  color: #fff !important;
  box-shadow: var(--v5-glow);
}
.v5-outline {
  box-shadow: 0 0 0 2px rgba(6,182,212,0.06), 0 10px 30px rgba(59,130,246,0.03);
  border: 1px solid var(--v5-border-subtle);
}
.v5-text {
  text-shadow: 0 2px 14px rgba(6,182,212,0.06);
}

/* --- Glow focus pro přístupnost --- */
*:focus{
  box-shadow: 0 8px 28px rgba(6,182,212,0.06), 0 0 0 4px rgba(6,182,212,0.04);
}

/* --- Image subtle parallax (for images with class .parallax-img) --- */
.parallax-img {
  transition: transform 1000ms var(--micro-ease), box-shadow 1000ms var(--micro-ease);
  will-change: transform;
  transform-origin: center;
}
.parallax-img:hover { transform: scale(1.035) translateY(-6px); box-shadow: var(--shadow-hover); }

/* --- Glass panels with cyan rim (for key sections) --- */
.section.v5 {
  border: 1px solid rgba(6,182,212,0.08);
  box-shadow: 0 10px 40px rgba(6,182,212,0.03), 0 6px 18px rgba(59,130,246,0.02);
  position: relative;
  overflow: hidden;
}
.section.v5::before{
  content:"";
  position:absolute; inset:0; z-index:0;
  border-radius:inherit;
  padding:1px;
  background: linear-gradient(90deg, rgba(6,182,212,0.04), rgba(59,130,246,0.03));
  mix-blend-mode: screen; pointer-events:none;
}

/* --- subtle gradient underlines for headings --- */
h1, h2, h3 {
  position:relative;
}
h2::after, h3::after {
  content:"";
  height:6px; width:48px; border-radius:8px;
  background: linear-gradient(90deg, var(--v5-accent-1), var(--v5-accent-2));
  position:absolute; left:0; bottom:-14px; opacity:0.95;
  box-shadow: 0 12px 30px rgba(6,182,212,0.03);
  transform-origin:left;
  transition: transform 420ms var(--micro-ease), opacity 420ms;
}
h2:hover::after, h3:hover::after { transform: scaleX(1.12); opacity:1; }

/* --- Scroll reveal (CSS helper class) --- */
.reveal {
  opacity:0;
  transform: translateY(18px) scale(0.997);
  transition: transform 700ms var(--micro-ease), opacity 700ms var(--micro-ease);
  will-change: opacity, transform;
}
.reveal.revealed {
  opacity:1;
  transform: translateY(0) scale(1);
}

/* --- Soft cyan divider --- */
.divider-v5 {
  height:2px; width:100%;
  background: linear-gradient(90deg, rgba(6,182,212,0.18), rgba(59,130,246,0.12));
  border-radius:6px;
  box-shadow: 0 6px 20px rgba(6,182,212,0.03);
}

/* --- Minimal performance tweaks --- */
@media (max-width: 900px){
  :root{ --bg-anim-speed: 36s; }
  body::after{ opacity:0.92; }
  .post, .section { transition-duration: 420ms; }
}

/* --- Tiny helper for lowering glow on dark mode (balance) --- */
[data-theme="dark"] :root {
  --v5-glow: 0 10px 50px rgba(6,182,212,0.20), 0 3px 12px rgba(59,130,246,0.08);
}

/* --- Small utility classes --- */
.center { display:flex; align-items:center; justify-content:center; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.p-6 { padding: 1.5rem; }

/* --- Tiny adaptive tweaks for accessibility --- */
@media (prefers-contrast: more) {
  :root { --v5-accent-1: #06b6d4; --v5-accent-2: #075985; }
  body { filter: none; }
}

/* --- End of V5 additions --- */

/* =========================
   SHORT SNIPPET FOR USAGE (OPTIONAL):
   - Add attribute data-parallax to header or hero to enable subtle hover parallax.
   - Add class "reveal" to elements you want to animate on scroll.
   - Use .section.v5 for key panels with cyan rim.
   ========================= */

/* Konec souboru: style_v5.css */
