/* Shared design system. Page-specific rules stay in each page's <style> block. */

:root {
    --bg: #f9fafb;
    --text: #18181b;
    --text-dim: #71717a;
    --text-body: #3f3f46;
    --rule: #e4e4e7;
    --rule-soft: #ededf0;

    /* One typeface for the whole site: the system Helvetica Neue stack. */
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* kept so any page rule still referencing these stays sane */
    --text-primary: var(--text);
    --text-secondary: var(--text-dim);
    --accent: var(--text);
    --border: var(--rule);

    color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Links read as text, not as buttons: a hairline underline that firms up on hover. */
a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: #c9c9cf;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

a:hover { text-decoration-color: currentColor; }

/* Navigation: wordmark left, sections right, no boxed bar. */
nav {
    padding: 2.75rem 0 0;
    margin-bottom: 4rem;
}

.nav-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-name {
    font-family: var(--font);
    font-weight: 300;
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.nav-name:hover { text-decoration: none; color: var(--text-dim); }

.nav-links { display: flex; flex-wrap: wrap; gap: 1.75rem; min-width: 0; }

.nav-links a {
    /* Same voice as the wordmark. */
    font-family: var(--font);
    color: var(--text-dim);
    font-weight: 400;
    font-size: 1.08rem;
    letter-spacing: -0.005em;
    text-decoration: none;
}

.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); text-decoration: none; }

main {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem 6rem;
}

footer {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 1.5rem 3.5rem;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* Nothing should be able to push the page wider than the viewport. */
img { max-width: 100%; }

@media (max-width: 600px) {
    nav { padding-top: 1.75rem; margin-bottom: 2.5rem; }
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }
    .nav-name { font-size: 1.6rem; }
    .nav-links { gap: 1.1rem; font-size: 1rem; }
    main { padding-bottom: 4rem; }
}
