/* ===========================================================================
   lucasbeeler.net — shared stylesheet
   Extracted from the landing page so every page inherits one source of truth.
   Dark-as-default. The warm "book under lamplight" palette is the site.
   =========================================================================== */

:root {
    --bg: #1c1814;
    --ink: #ece6d8;
    --ink-soft: #c0b8a8;
    --accent: #4ba0ad;
    --rule: #3a342c;
    --measure: 36rem;
    --link: #7ab5d4;
    --nav-bg: #0a5a68;
    --nav-fg: #ece6d8;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
header, main, footer, h1, h2, h3, p, blockquote { margin-top: 0; }

html { font-size: 18px; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-optical-sizing: auto;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1rem 1.5rem 6rem;
}

/* --- Site header / nav ---------------------------------------------------- */

.site-header {
    max-width: var(--measure);
    margin: 1.75rem auto 4rem;
    padding: 0.85rem 1.75rem 0.95rem;
    background: var(--nav-bg);
    border-radius: 16px;
    box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.06),
            0 4px 24px 0 rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.site-header .mark {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 0.88;
    letter-spacing: -0.015em;
}
.site-header .mark a {
    color: #ffffff;
    text-decoration: none;
    display: block;
}
.site-header .mark .tm {
    font-size: 0.55rem;
    font-weight: 700;
    vertical-align: super;
    letter-spacing: 0;
    margin-left: 0.2em;
    line-height: 1;
}
.site-header nav {
    display: flex;
    gap: 1.5rem;
}
.site-header nav a {
    color: var(--nav-fg);
    text-decoration: none;
    font-style: normal;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.06em;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 1;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.site-header nav a:hover {
    color: #ffffff;
}

/* --- Display headings ----------------------------------------------------- */

h1.display {
    font-family: "Source Serif 4", Georgia, serif;
    font-optical-sizing: auto;
    font-variation-settings: "opsz" 60;
    font-weight: 600;
    font-size: 3rem;
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin: 0 0 1.5rem;
    color: var(--ink);
}
h1.display em {
    font-style: italic;
    font-weight: 500;
}

.deck {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0 0 3rem;
    max-width: 32rem;
}

h2 {
    font-family: "Source Serif 4", Georgia, serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
    margin: 3.5rem 0 1rem;
}

/* --- Body copy ------------------------------------------------------------ */

p {
    margin: 0 0 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.65;
    hyphens: auto;
    -webkit-hyphens: auto;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover {
    text-decoration-thickness: 2px;
}

main p a,
main li a {
    color: var(--link);
}

em { font-style: italic; }
strong { font-weight: 600; }

code {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

/* --- Shared decorative / structural elements ------------------------------ */

.section-label {
    font-variant-caps: all-small-caps;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.ornament {
    text-align: center;
    margin: 3rem 0;
    color: var(--accent);
    font-size: 1.4rem;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
}

/* --- Article-specific --------------------------------------------------- */

.article-meta {
    font-variant-caps: all-small-caps;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin: 0 0 2.75rem;
}
.article-meta .sep {
    color: var(--accent);
    margin: 0 0.6em;
}

article h2:first-of-type {
    margin-top: 1rem;
}

.footnote-rule {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 3.5rem 0 1.5rem;
}

.backlink {
    margin-top: 3.5rem;
    font-variant-caps: all-small-caps;
    letter-spacing: 0.08em;
    font-size: 0.95rem;
}

/* --- Contact block (landing page) ---------------------------------------- */

.contact {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
}
.contact .label {
    font-variant-caps: all-small-caps;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
}
.contact a {
    color: var(--link);
    font-size: 1.0625rem;
}

/* --- Colophon ------------------------------------------------------------- */

footer.colophon {
    max-width: var(--measure);
    margin: 6rem auto 3rem;
    padding: 2rem 1.5rem 0;
    border-top: 1px solid var(--rule);
    font-style: italic;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-align: center;
}

/* --- Narrow viewports ----------------------------------------------------- */

@media (max-width: 540px) {
    html { font-size: 17px; }
    .site-header {
        padding: 0.7rem 1.25rem 0.8rem;
        gap: 1rem;
    }
    .site-header .mark { font-size: 1.6rem; }
    .site-header nav { gap: 1rem; }
    .site-header nav a { font-size: 0.95rem; }
    h1.display { font-size: 2.25rem; }
}