:root {
    --bg: #121214;
    --text: #e1e1e6;
    --link: #64d2ff;      /* Tweaked for better accessibility and contrast */
    --nav-bg: #1a1a1e;
    --logo: #ffffff;
    --tag-bg: #2a2a30;    /* Dark grey pills for tags */
    --tag-text: #c9d1d9;
    --max-width: 750px;
}

/* light & dark mode */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #ffffff;
        --text: #18181b;      /* Tmavě šedá pro dobrou čitelnost na bílé */
        --link: #0284c7;      /* Kontrastní modrá pro světlé pozadí */
        --nav-bg: #f4f4f5;    /* Světle šedý header */
        --logo: #18181b;
        --tag-bg: #e4e4e7;    /* Světlé pilulky pro tagy */
        --tag-text: #27272a;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
}

.nav-container, .main-container, .footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

body > header { background: var(--nav-bg); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; }
.logo { font-weight: bold; text-decoration: none; color: var(--logo); font-size: 1.2rem; }
.nav-links { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav-links a { color: var(--text); text-decoration: none; }
.nav-links a.active, .nav-links a:hover { color: var(--link); }

/* --- Post Metadata & Layout --- */
.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    color: #8d8d99;
    font-size: 0.9rem;
}

.post-item { margin-bottom: 40px; }
.post-date { color: #8d8d99; font-size: 0.9rem; }
.post-link { color: var(--link); text-decoration: none; }
.post-link:hover { text-decoration: underline; }

/* --- Tags Styling --- */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-badge {
    background: var(--tag-bg);
    color: var(--tag-text);
    text-decoration: none;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s;
}
.tag-badge:hover { background: #3a3a42; color: var(--link); }
.post-tags-inline { display: flex; gap: 10px; }
.tag-dot { color: #8d8d99; font-size: 0.85rem; }

pre { background: #202024; padding: 15px; overflow-x: auto; border-radius: 4px; }
code { font-family: monospace; }
img { max-width: 100%; height: auto; }
footer { text-align: center; color: #8d8d99; font-size: 0.9rem; margin-top: 40px; }

/* --- Hamburger Menu --- */

/* Hide checkbox */
.menu-toggle {
    display: none;
}

/* Hide hamburger icon on desktop */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.2s ease-in-out;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .hamburger {
        display: flex; /* Show hamburger on mobile */
    }

    .nav-links {
        display: none; /* Hide traditional menu */
        flex-direction: column;
        width: 100%;
        background: var(--nav-bg);
        position: absolute;
        top: 60px; /* bar height */
        left: 0;
        padding: 20px;
        box-sizing: border-box;
        border-bottom: 1px solid #202024;
        gap: 15px;
        z-index: 100;
    }

    /* If checkbox is checked show menu */
    .menu-toggle:checked ~ .nav-links {
        display: flex;
    }

    /* Animation of hamburger to X when open */
    .menu-toggle:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Relative positioning for menu to keep it under the header */
    .nav-container {
        position: relative;
    }
}