:root {
    --bg-color: #fbfbfb;
    --grid-line: #f0f0f0;
    --text-main: #111;
    --text-muted: #666;
    --text-inverse: #fbfbfb;
    --bg-inverse: #0a0a0a;
    --border-color: #e5e5e5;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center top;
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Typography Utilities ── */
h1, h2, h3, h4, h5, h6 {
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
}

/* ── App Layout ── */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(251,251,251,1) 60%, rgba(251,251,251,0));
    backdrop-filter: blur(4px);
    /* mask the grid going through the header if needed, but blur is fine */
}

.nav-brand {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.05em;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.15s linear;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.nav-contact-btn {
    background-color: var(--bg-inverse);
    color: var(--text-inverse);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--bg-inverse);
    transition: background-color 0.15s linear, color 0.15s linear;
}

.nav-contact-btn:hover {
    background-color: transparent;
    color: var(--text-main);
}

/* ── Main Content Area ── */
.main-content {
    flex: 1;
    padding: 0 48px 80px 48px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* ── Footer ── */
.site-footer {
    background-color: var(--bg-inverse);
    color: var(--text-inverse);
    padding: 80px 48px 32px 48px;
    margin-top: auto;
}

.footer-hero {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    margin: -80px -48px 80px -48px; /* bleed to edges of footer */
    padding: 80px 24px;
}

.footer-hero h2 {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 900;
    max-width: 900px;
    margin-bottom: 48px;
    letter-spacing: -0.04em;
}

.footer-hero .mono-label {
    margin-bottom: 24px;
    color: #888;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid #222;
}

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

.footer-links a {
    color: #888;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

.btn-inverse {
    background-color: var(--text-inverse);
    color: var(--bg-inverse);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: bold;
    padding: 16px 32px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--text-inverse);
    transition: background-color 0.15s, color 0.15s;
}

.btn-inverse:hover {
    background-color: transparent;
    color: var(--text-inverse);
}

.btn-primary {
    background-color: var(--bg-inverse);
    color: var(--text-inverse);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: bold;
    padding: 16px 32px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--bg-inverse);
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--text-main);
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 24px;
        flex-wrap: wrap;
        row-gap: 16px;
        justify-content: space-between;
    }
    .nav-links {
        display: flex;
        order: 3;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 24px;
        padding-bottom: 4px;
    }
    .nav-links::-webkit-scrollbar {
        display: none;
    }
    .main-content {
        padding: 0 24px 60px 24px;
    }
    .footer-hero h2 {
        font-size: 40px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }
}

.folder-card:hover {
    background-color: #f0f0f0 !important;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-main);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
