:root {
    --bg: #d9d9d9;
    --text: #1a1a1a;
    --muted: #55534f;
    --rule: rgba(26, 26, 26, 0.18);
    --highlight: #2c3e6b;
    --highlight-text: #ffffff;
    --card: #e3e3e1;
    --card-edge: rgba(26, 26, 26, 0.13);
    --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* No image may overflow its column, whatever else applies to it. */
img {
    max-width: 100%;
    height: auto;
}

html {
    overflow-y: scroll;
    /* Single knob for overall text size. */
    font-size: 15px;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--serif);
    /* Body copy only — headings carry their own rem sizes. */
    font-size: 1.12rem;
    font-weight: 400;
    line-height: 1.68;
}

/* ---------- layout ---------- */

.page {
    max-width: 620px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.page.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* ---------- type ---------- */

h1, h2, h3 {
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.25;
}

h1 {
    font-size: 2.1rem;
    margin: 0 0 1.25rem;
    letter-spacing: -0.015em;
}

h2 {
    font-size: 1.35rem;
    margin: 2.5rem 0 0.75rem;
}

h3 {
    font-size: 1.05rem;
    margin: 1.75rem 0 0.4rem;
}

p { margin: 0 0 1.15rem; }

p:last-child { margin-bottom: 0; }

/* ---------- links ---------- */

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

a:hover { opacity: 0.55; }

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

/* ---------- landing identity ---------- */

.identity { text-align: center; }

.identity h1 { margin-bottom: 0.9rem; }

.contact {
    margin: 0;
    color: var(--muted);
}

.contact .email {
    display: block;
    margin-bottom: 0.35rem;
}

.contact .profiles a { margin: 0 0.4rem; }

/* ---------- section nav ---------- */

.nav-box {
    margin-top: 3.5rem;
    text-align: center;
}

.nav-box a {
    display: block;
    border-bottom: none;
    line-height: 2.1;
}

.nav-box a:hover { opacity: 0.55; }

.nav-box a[aria-current="page"] { opacity: 0.45; }

/* ---------- interior pages: fixed sidebar ---------- */

.layout { min-height: 100vh; }

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 275px;
    height: 100vh;
    padding: 4.5rem 1.5rem 2.5rem;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.site-name {
    font-family: var(--sans);
    font-size: 1.3rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    border-bottom: none;
    margin-bottom: 3.5rem;
    text-align: center;
}

.side-nav {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.side-nav a {
    border-bottom: none;
    line-height: 2.85;
}

.side-nav a[aria-current="page"] { opacity: 0.45; }

.content {
    margin-left: 275px;
    padding: 4.5rem 2rem 6rem 4rem;
    max-width: 785px;
}

.content h1 { margin-bottom: 2.5rem; }

.content > * { max-width: 465px; }

/* Footnote markers, their hover tooltips, and the list at the foot of a piece. */

.fn {
    position: relative;
    font-size: 0.68em;
    vertical-align: super;
    line-height: 0;
}

.fn > a {
    border-bottom: none;
    padding: 0 0.1em;
}

.fn-tip { display: none; }

@media (hover: hover) {
    .fn-tip {
        display: block;
        position: absolute;
        bottom: 1.9em;
        left: 50%;
        transform: translateX(-50%);
        width: 250px;
        padding: 0.6rem 0.8rem;
        background-color: var(--bg);
        border: 1px solid var(--rule);
        border-radius: 2px;
        /* rem, not em: the marker is 0.68em and would shrink this too. */
        font-size: 0.92rem;
        font-style: italic;
        line-height: 1.5;
        vertical-align: baseline;
        color: var(--muted);
        text-align: left;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
        z-index: 2;
    }

    .fn:hover .fn-tip,
    .fn:focus-within .fn-tip { opacity: 1; }
}

.footnotes {
    margin: 3rem 0 0;
    padding: 1.75rem 0 0 1.15rem;
    border-top: 1px solid var(--rule);
    font-size: 0.92rem;
    color: var(--muted);
}

.footnotes li {
    margin-bottom: 0.6rem;
    line-height: 1.55;
}

.footnotes li:target { color: var(--text); }

/* Link out to the piece itself, ruled off from the review below it. */

.source-link {
    margin: 0.6rem 0 1.9rem;
    /* Same face and size as the review. */
    font-family: var(--serif);
    font-size: 1em;
}

.source-link a {
    padding: 0.12em 0.4em;
    border-bottom: none;
    border-radius: 2px;
    background-color: var(--highlight);
    color: var(--highlight-text);
}

.source-link a:hover {
    opacity: 0.82;
    background-color: var(--highlight);
    color: var(--highlight-text);
}

.source-link a:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 2px;
}

/* Block quotation set off from the body text. */

.pull-quote {
    margin: 3rem 0 0;
    padding-left: 1.25rem;
    border-left: 2px solid var(--rule);
    font-style: italic;
}

.pull-quote p { margin-bottom: 0.75rem; }

.quote-attr {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---------- misc: entries separated by rules ---------- */

.entry-photo {
    display: block;
    width: 440px;
    max-width: 100%;
    height: auto;
    margin: 1.2rem 0 0;
    border-radius: 2px;
}

.misc-entry {
    display: flow-root;
    padding-bottom: 1.7rem;
    margin-bottom: 1.7rem;
    border-bottom: 1px solid var(--rule);
}

.misc-entry h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.misc-entry p:last-child { margin-bottom: 0; }

/* Author's note at the head of a piece. */

.note {
    margin: 0 0 2.25rem;
    padding-left: 1rem;
    border-left: 2px solid var(--rule);
    color: var(--muted);
    font-style: italic;
    font-size: 0.95em;
}

/* Premise-conclusion block. */

.form-heading {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    margin: 2rem 0 0.6rem;
}

.argument-form {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.argument-form li {
    margin-bottom: 0.2rem;
    line-height: 1.5;
}

/* Author credit trailing a title in a bulleted index. */

.list-author {
    font-style: italic;
}

.list-author::before {
    content: " - ";
    font-style: normal;
}

/* Tight bulleted index, used for the writing list. */

.post-list {
    margin: 0;
    padding-left: 1.35rem;
    list-style: disc;
}

.post-list li {
    position: relative;
    margin: 0 0 0.3rem;
    line-height: 1.55;
}

/* Each piece's opening note, revealed beside the list on hover. Off by
   default, and only enabled where there is a pointer and room to the right
   of the text column for it to sit without pushing the page sideways. */

.post-list .desc { display: none; }

@media (hover: hover) and (min-width: 1150px) {
    .post-list .desc {
        display: block;
        position: absolute;
        left: calc(100% + 2.5rem);
        top: 50%;
        transform: translateY(-50%);
        width: 280px;
        padding-left: 1rem;
        border-left: 2px solid var(--rule);
        color: var(--muted);
        font-style: italic;
        font-size: 0.88em;
        line-height: 1.5;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .post-list li:hover .desc,
    .post-list li:focus-within .desc { opacity: 1; }
}

.post-list li::marker { font-size: 0.8em; }

.post-list li:last-child { margin-bottom: 0; }

.entries {
    margin: 0;
    padding: 0;
    list-style: none;
}

.entries li {
    margin-bottom: 1.6rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid var(--rule);
}

.entries li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.entry-title {
    font-family: var(--sans);
    font-size: 1.05rem;
}

.entry-meta {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.entries p { margin: 0.4rem 0 0; }

/* ---------- responsive ---------- */

@media screen and (max-width: 900px) {
    .sidebar {
        position: static;
        width: auto;
        height: auto;
        padding: 3rem 1.5rem 2rem;
        border-right: none;
        border-bottom: 1px solid var(--rule);
    }

    .site-name { margin-bottom: 1.75rem; text-align: left; }

    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 1.25rem;
        text-align: left;
    }

    .side-nav a { line-height: 2; }

    .content {
        margin-left: 0;
        padding: 3rem 1.5rem 4rem;
        max-width: none;
    }

    .content > * { max-width: none; }
}

@media screen and (max-width: 600px) {
    .page { padding: 3.5rem 1.5rem 3rem; }
    h1 { font-size: 1.75rem; }
    .contact .profiles a { display: inline-block; margin: 0 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
