:root {
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Nunito', sans-serif;

    --color-bg: #F8F3EC;
    --color-text: #1c2b23;
    --color-text-muted: #4a6358;
    --color-accent: #166534;
    --color-accent-dark: #5ba300;
    --color-border: #14532d;
    --color-highlight: #d1edd9;

    --content-max-width: 900px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0 0 20px;
    padding: 0 0 10px;
    font-family: var(--font-body);
    font-size: 12.5pt;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-accent);
    font-weight: 700;
}

a:hover {
    color: var(--color-accent-dark);
}

/* ── Header ── */

header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding-top: 10px;
}

.header-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 20px;
}

h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    letter-spacing: 0.01em;
}

.home-link {
    text-decoration: none;
    color: var(--color-text);
}

.header-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: bold;
    font-size: 1.5em;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.header-links a:hover {
    color: var(--color-accent-dark);
    transform: scale(1.1);
}

@media only screen and (max-width: 500px) {
    .header-container {
        justify-content: center;
        text-align: center;
    }

    .header-links {
        justify-content: center;
        width: 100%;
    }
}

/* ── Main content ── */

section {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 24px 20px 0;
}

h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4em;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

section p + p {
    margin-top: 14px;
}

ul {
    margin-top: 0;
    padding-top: 0;
}

section ul li {
    margin-bottom: 8px;
}

/* ── Headshot ── */

.headshot {
    float: right;
    margin: 4px 0 16px 24px;
    width: 210px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--color-border), 0 8px 24px -12px rgba(38, 42, 65, 0.35);
}

@media only screen and (max-width: 600px) {
    .headshot {
        float: none;
        display: block;
        margin: 0 auto 20px;
        width: 140px;
        height: auto;
    }
}

/* ── Publications ── */

.pub-entry {
    padding-left: 1.6em;
    text-indent: -1.6em;
}

/* ── Footer ── */

footer {
    text-align: center;
    font-size: 9pt;
    color: var(--color-text-muted);
    margin-top: 50px;
    margin-bottom: 10px;
}

/* ── Utilities ── */

.mark {
    background-color: var(--color-highlight);
    color: var(--color-text);
}
