/* ==============================
   CSS RESET / BASE
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ==============================
   THEME VARIABLES
================================ */
:root {
    /* Light */
    --bg-page: #ffffff;
    --bg-elevated: rgba(255, 255, 255, 0.6);
    --border-subtle: rgba(15, 23, 42, 0.08);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --link: #2563eb;

    --header-height: 64px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 32px;
    --space-lg: 64px;
    --space-xl: 96px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: #0b0d12;
        --bg-elevated: rgba(15, 23, 42, 0.6);
        --border-subtle: rgba(148, 163, 184, 0.15);

        --text-primary: #f2f4f8;
        --text-secondary: #b8bcc8;
        --link: #93c5fd;
    }
}

/* ==============================
   BODY BASE
================================ */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
        "Helvetica Neue", sans-serif;

    color: var(--text-primary);
    background-color: var(--bg-page);

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ==============================
   LINKS
================================ */
a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==============================
   HEADER
================================ */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;

    backdrop-filter: blur(8px);
    background: linear-gradient(
        to bottom,
        var(--bg-elevated),
        transparent
    );

    border-bottom: 1px solid var(--border-subtle);
}

.site-header {
    margin: 0 auto;
    padding: 10px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    opacity: 0.85;
}

.site-header img {
    height: 100px;
}

/* ==============================
   NAV
================================ */
.nav {
    display: flex;
    gap: 16px;
}

.nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.85;
}

.nav a:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* ==============================
   FOOTER
================================ */
footer {
    width: 100%;
    margin-top: auto;

    padding: 32px 24px;

    border-top: 1px solid var(--border-subtle);
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.25),
        transparent
    );
}

.site-footer {
    margin: 0 auto;
    text-align: center;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-footer .nav {
    justify-content: center;
    margin-bottom: 16px;
}

.site-footer p {
    margin: 4px 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.muted {
    color: var(--text-secondary);
}

.browse {
    background-color: var(--bg-page);
    border-top: 1px solid var(--border-subtle);
}

/* ==============================
   RESPONSIVE
================================ */
@media (max-width: 480px) {
    .site-header img {
        height: 48px;
    }

    .site-header {
        padding: 8px 16px;
    }
}

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}