/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    /* Chaotic Rained-On Cement Wall */
    background-color: #4a4a4a;
    /* Lighter base for contrast */
    background-image:
        /* 1. Heavy Noise for Grit */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),

        /* 2. Random Wet Patches (Dark Stains) - Irregular placement */
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 75% 80%, rgba(0, 0, 0, 0.5) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 0%, rgba(0, 0, 0, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 90% 10%, rgba(0, 0, 0, 0.5) 0%, transparent 30%),

        /* 3. Rain Streaks - Chaotic, non-uniform vertical lines */
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255, 255, 255, 0.03) 20px, transparent 21px),
        repeating-linear-gradient(90deg, transparent, transparent 67px, rgba(0, 0, 0, 0.1) 68px, transparent 70px),

        /* 4. "Cracks" or surface variation */
        linear-gradient(45deg, transparent 48%, rgba(0, 0, 0, 0.2) 50%, transparent 52%);

    /* Blend modes to mix the chaos */
    background-blend-mode: overlay, multiply, multiply, multiply, multiply, normal, normal, normal, overlay;

    /* Rough Border */
    border-bottom: 4px solid #222;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.site-header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img,
.custom-logo {
    max-height: 80px;
    width: auto;
    filter: none;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    transform: skew(-5deg);
    /* Dynamic angle */
}

/* Page Content Layout */
.home-container {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 4rem;
    min-height: 100vh;
}

.home-main {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.post-content {
    color: var(--color-light);
    line-height: 1.8;
}

.site-title a {
    color: var(--color-white);
    background: none;
    -webkit-text-fill-color: initial;
}

.site-title a span {
    color: var(--color-primary);
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    color: var(--color-primary);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item>a::after {
    width: 100%;
}

/* Footer */
.site-footer {
    background: var(--color-darker);
    color: var(--color-concrete);
    padding: 6rem 0 2rem;
    border-top: var(--border-width) solid var(--color-primary);
}

.footer-section-title {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-gray);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.social-link {
    background: var(--color-gray);
    color: var(--color-white);
    border-radius: 0;
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-dark);
    transform: none;
}

.footer-note {
    color: var(--color-light);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.footer-note.subtle {
    color: var(--color-concrete);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

/* ========================================
   Mobile Navigation Drawer
   ======================================== */

/* Hide menu toggle on desktop */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

/* Hamburger icon */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-line:nth-child(1) {
    transform: translateY(-6px);
}

.hamburger-line:nth-child(3) {
    transform: translateY(6px);
}

/* Hamburger to X animation */
.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-2px) rotate(-45deg);
}

/* Drawer Container */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-darker);
    border-left: 3px solid var(--color-primary);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.is-open {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray);
}

.drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--color-white);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.drawer-close:hover,
.drawer-close:focus {
    color: var(--color-primary);
}

/* Drawer Navigation */
.drawer-nav {
    padding: 1rem 0;
}

.drawer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.drawer-menu li {
    border-bottom: 1px solid var(--color-gray);
}

.drawer-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    min-height: 56px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.drawer-menu a:hover,
.drawer-menu a:focus,
.drawer-menu .current-menu-item > a {
    background: rgba(57, 255, 20, 0.1);
    color: var(--color-primary);
}

/* Touch feedback */
.drawer-menu a:active {
    background: rgba(57, 255, 20, 0.2);
}

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile breakpoint - show toggle, hide desktop nav */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
    }

    .site-header {
        height: 70px;
    }

    .site-logo img,
    .custom-logo {
        max-height: 50px;
    }

    .site-title {
        font-size: 1.5rem;
    }
}

/* ========================================
   Footer Responsive
   ======================================== */
@media (max-width: 768px) {
    .site-footer {
        padding: 4rem 0 1.5rem;
    }

    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-section-title {
        font-size: 1.25rem;
    }

    .social-links {
        display: flex;
        gap: 1rem;
        justify-content: flex-start;
    }

    .social-link {
        width: 48px;
        height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .footer-copyright {
        text-align: center;
        padding-top: 2rem;
        border-top: 1px solid var(--color-gray);
        margin-top: 2rem;
    }

    .footer-copyright p {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 3rem 0 1rem;
    }

    .footer-note {
        font-size: 0.9rem;
    }
}
