:root {
    --bg: #f7f7f4;
    --surface: #ffffff;
    --surface-2: #efefea;
    --text: #17181a;
    --muted: #5d6066;
    --border: #e2e2dc;
    --accent: #0f7a5a;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1113;
        --surface: #16191c;
        --surface-2: #1f2327;
        --text: #ecedee;
        --muted: #9ba1a6;
        --border: #2a2f34;
        --accent: #3fd1a0;
    }
}

*, *::before, *::after { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header and desktop menu */

header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1000px;
    min-height: 64px;
    margin-inline: auto;
    padding-inline: 20px;
}

.brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

#dMenu nav {
    display: flex;
    gap: 4px;
}

#dMenu a {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    transition: background-color 200ms, color 200ms;
}

#dMenu a:hover {
    background: var(--surface-2);
    color: var(--text);
}

/* The link for the page you're on */
#dMenu a[aria-current="page"],
#mLayerMenu a[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
}

/* The hamburger menu only shows on small screens (see mobile.css) */
#mMenu { display: none; }

/* Page */

main {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

h1 {
    margin: 0 0 32px;
    font-size: clamp(2rem, 5vw + 1rem, 3rem);
    letter-spacing: -0.02em;
    text-align: center;
}

/* Text pages, like About */

main.page {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
    padding-block: 56px;
}

main.page p {
    margin: 0 0 1em;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links a {
    display: block;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.links a:hover,
.links a:focus-visible {
    border-color: var(--accent);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .links a { transition: none; }
    .links a:hover { transform: none; }
}
