/* Brutalist Header Layout */
.nav-ink-wash {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    background-color: rgba(12, 15, 15, 0.85); /* surface-container-lowest with opacity */
    border-bottom: 2px solid #000000;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.header-left {
    gap: 2rem;
}

.header-right {
    gap: 1.5rem;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
}

.logo-group h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    color: var(--clr-text-main);
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-nav a {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.header-nav a:hover {
    color: var(--clr-primary);
}

.header-nav a.active {
    color: var(--clr-primary);
    border-bottom-color: var(--clr-primary);
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--clr-surface-high);
    border: 2px solid #000000;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--clr-text-main);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    width: 200px;
}

.search-box input::placeholder {
    color: rgba(200, 198, 197, 0.5);
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--clr-primary);
    background-color: var(--clr-surface-high);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-primary);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.user-avatar-btn:hover {
    background-color: var(--clr-primary);
    color: #000;
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* SVGs */
.icon-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.icon-svg-primary {
    color: var(--clr-primary);
}
.icon-svg-secondary {
    color: var(--clr-text-muted);
}

/* Mobile Top Header */
.mobile-top-header {
    display: none;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(12, 15, 15, 0.85);
    border-bottom: 2px solid #000000;
}

.mobile-top-header .header-left,
.mobile-top-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-top-header h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}

.mobile-top-header button {
    background: none;
    border: none;
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.mobile-top-header button:active {
    background: var(--clr-primary);
    color: #000;
}

/* Mobile Bottom Nav Hidden by Default */
.mobile-bottom-nav-brutalist {
    display: none;
}

    /* Slide-out Drawer */
    .mobile-drawer-overlay {
        display: block; /* Takes effect when not .hidden */
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 2000;
        backdrop-filter: blur(4px);
    }

    .mobile-drawer-overlay.hidden {
        display: none;
    }

    .mobile-drawer-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: var(--clr-bg);
        border-right: 1px solid var(--clr-surface-high);
        display: flex;
        flex-direction: column;
        animation: slideIn 0.3s forwards;
    }

    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        border-bottom: 1px solid var(--clr-surface-high);
    }

    .mobile-drawer-header h2 {
        font-family: var(--font-heading);
        font-size: 1.5rem;
        color: var(--clr-text-main);
        margin: 0;
    }

    .close-drawer-btn {
        background: transparent;
        border: none;
        color: var(--clr-text-main);
        cursor: pointer;
        padding: 0;
    }

    .mobile-drawer-body {
        padding: 1rem;
        overflow-y: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Force the account-sidebar inside the drawer to look good */
    .mobile-drawer-body .account-sidebar {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
    }

    .mobile-drawer-body .account-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-drawer-body .account-nav a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        color: var(--clr-text-muted);
        text-decoration: none;
        font-family: var(--font-mono);
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        border-left: 2px solid transparent;
    }

    .mobile-drawer-body .account-nav a:hover,
    .mobile-drawer-body .account-nav a.active {
        color: var(--clr-primary);
        border-left-color: var(--clr-primary);
        background: rgba(0, 230, 118, 0.1);
    }

    /* Fix the SVG sizing because account.css isn't loaded globally */
    .mobile-drawer-body .account-nav a svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

main {
    padding-top: 80px; /* Accounts for the fixed desktop header */
}

/* Responsive Header */
@media (max-width: 900px) {
    .nav-links, .header-nav {
        display: none;
    }

    .actions .btn-primary, .actions .user-avatar-btn {
        display: none;
    }
    
    .search-box {
        display: none; /* Hide standard search on mobile for this specific layout */
    }

    .nav-ink-wash {
        display: none; /* We hide the desktop header entirely if we want a pure mobile experience */
    }

    .mobile-top-header {
        display: flex;
    }

    main {
        padding-top: 0;
    }

    /* Brutalist Bottom Nav */
    .mobile-bottom-nav-brutalist {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 80px;
        background-color: var(--clr-surface-lowest);
        border-top: 1px solid var(--clr-surface-high);
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-bottom-nav-brutalist .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--clr-text-muted);
        transition: transform 0.2s, color 0.2s;
    }

    .mobile-bottom-nav-brutalist .nav-item:active {
        transform: scale(0.9);
    }

    .mobile-bottom-nav-brutalist .nav-item.active,
    .mobile-bottom-nav-brutalist .nav-item:hover {
        color: var(--clr-primary);
    }

    .mobile-bottom-nav-brutalist .icon-svg {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
    }

    .mobile-bottom-nav-brutalist .nav-label {
        font-family: var(--font-mono);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }


    body {
        padding-bottom: 80px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }
}
