/* layout.css - Navigation, Footer, and Grid Structures */

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    transition: all .3s;
    border-bottom: 1px solid transparent;
    padding-top: env(safe-area-inset-top, 0);
}

.nav.scrolled {
    background: rgba(10, 10, 10, .96);
    border-bottom-color: #1E1E1E;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    background: var(--brand-main);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color .15s;
    position: relative;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-mono);
    padding: 4px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    height: 1.5px;
    width: 0;
    background: var(--brand-main);
    transition: width .3s;
}

.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text);
    position: absolute;
    left: 12px;
    transition: all .3s;
}

.hamburger span:nth-child(1) { top: 16px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 26px; }

.hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s;
}

.mobile-drawer.open {
    max-height: 400px;
}

.mobile-drawer a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 1px solid var(--border-subtle);
    min-height: 48px;
}

/* Footer */
footer {
    padding: 32px 0;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--border-subtle);
    background: var(--bg);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

/* Utility layout components */
.skip {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 10px 20px;
    background: var(--brand-main);
    color: var(--bg);
    font-weight: 700;
    z-index: 200;
}

.skip:focus {
    top: 10px;
}

/* Media Queries for Layout */
@media(max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .mobile-drawer { display: block; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; }
}

@media(max-width: 480px) {
    .footer-left { font-size: 9px; }
    .footer-links { gap: 16px; }
    .footer-links a { font-size: 9px; }
}