/* ── Reset & Base ─────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Light theme (default) ───────────────────── */
:root {
    --color-bg:           #eeeeee;
    --color-text:         #000000;
    --color-text-muted:   #555;
    --color-border:       #222;
    --color-link:         #6a8aff;
}

/* ── Dark theme (auto via browser preference) ── */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg:           #111111;
        --color-text:         #e0e0e0;
        --color-text-muted:   #aaa;
        --color-border:       #555;
        --color-link:         #8eaaff;
    }
}

html {
    font-size: 16px;
    line-height: 1.6;
    font-family: "Iosevka Mono", Menlo, Monaco, Consolas, monospace;
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: var(--color-link);
}

/* ── Page Grid ───────────────────────────────── */
.page {
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header header"
        "body sidebar"
        "footer footer";
    max-width: 960px;
    min-height: 100vh;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 1.5rem;
}

/* ── Header / Title ──────────────────────────── */
.header {
    grid-area: header;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 2.2rem;
    height: 2.2rem;
    flex-shrink: 0;
    border-radius: 4px;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* ── Body (wraps all content sections) ────────── */
.body {
    grid-area: body;
}

/* ── Shared section styling ──────────────────── */
.section {
    margin-bottom: 2rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
}

.section p {
    margin-bottom: 1rem;
}

.section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.section li {
    margin-bottom: 0.35rem;
}

/* ── Sidebar (Upcoming Events) ───────────────── */
.sidebar {
    grid-area: sidebar;
    border: 2px solid var(--color-border);
    border-radius: 2px;
    padding: 1rem;
    align-self: start;
}

.sidebar h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 0.6rem 0;
    border-bottom: 2px solid var(--color-border);
}

.sidebar li:last-child {
    border-bottom: none;
}

.sidebar .event-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.15rem;
}

/* ── Footer ──────────────────────────────────── */
.footer {
    grid-area: footer;
    border-top: 2px solid var(--color-border);
    padding-top: 1rem;
    text-align: center;
}

.footer p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.footer p.copyright {
    float: left;
}

.footer p.revision {
    float: right;
}

/* ── Responsive: stack on narrow screens ─────── */
@media (max-width: 800px) {
    .page {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "sidebar"
            "body"
            "footer";
    }
}
