/* Layout — Nav, Footer, Grid, Containers */

/* Nav bar */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    position: relative;
    z-index: 100;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    text-decoration: none;
    text-shadow: 0 0 10px var(--cyan-glow);
    letter-spacing: 2px;
    flex-shrink: 0;
}

.nav-brand:hover {
    color: var(--cyan-bright);
    text-shadow: 0 0 15px var(--cyan-glow-strong);
}

.nav-center {
    display: flex;
    gap: 1.5rem;
    margin-left: 2rem;
}

.nav-center a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-center a:hover {
    color: var(--cyan);
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-signin {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color var(--transition);
}

.nav-signin:hover {
    color: var(--cyan);
}

/* Hamburger toggle — hidden by default */
.nav-toggle-checkbox {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
}

/* Grid utilities */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Container */
.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.container-wide {
    max-width: var(--max-width-wide);
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Footer */
.site-footer {
    margin-top: auto;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.site-footer::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan) 20%, var(--cyan) 80%, transparent);
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.2);
    margin-bottom: 1.5rem;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: var(--text-muted);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.65rem;
    margin-top: 0.3rem;
}

/* Responsive — tablet */
@media (max-width: 768px) {
    .nav-bar {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .nav-center {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        margin-left: 0;
        padding: 1rem 0 0.5rem;
        gap: 0.75rem;
        border-top: 1px solid var(--cyan-dim);
        margin-top: 0.75rem;
    }

    .nav-toggle-checkbox:checked ~ #nav-menu {
        display: flex;
    }

    .nav-right {
        order: 1;
        margin-left: auto;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .container,
    .container-wide {
        padding: 1.5rem 1rem;
    }
}

/* Responsive — mobile */
@media (max-width: 480px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-bar {
        padding: 0.75rem 1rem;
    }
}
