:root {
    --bg: #fbf5e9;
    --text: #222;
    --muted: #555;
    --accent: #013f4a;
    --bar-text: #f6f6d3;
    --link: #226;
    --link-visited: #004;
    --link-hover: #404;
    --rule: #999;
    --img-border: #669;
}

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

body {
    margin: 0 auto;
    max-width: 1000px;
    padding: 1rem;
    background: var(--bg);
    color: var(--text);
    font-family: Verdana, "DejaVu Sans", Geneva, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

a:link { color: var(--link); }
a:visited { color: var(--link-visited); }
a:hover, a:active { color: var(--link-hover); }

img {
    max-width: 100%;
}

p {
    margin: 0 0 0.5em;
}

/* Header */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 3px double var(--accent);
}

.site-header h1 {
    margin: 0;
    color: var(--accent);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2rem;
    line-height: 1.1;
}

.role {
    margin: 0;
    font-weight: bold;
    font-style: italic;
}

.links {
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.links a + a::before {
    content: "|";
    margin: 0 0.5em;
    color: var(--muted);
    font-weight: normal;
}

/* About */
.about {
    display: flow-root;
    margin: 0.75rem 0;
}

.portrait {
    float: left;
    width: 140px;
    height: auto;
    margin: 2px 12px 4px 0;
    border: 1px solid var(--img-border);
}

.about p {
    margin: 0;
}

/* Section title bar */
h2 {
    margin: 1rem 0 0.5rem;
    padding: 3px 6px;
    background: var(--accent);
    color: var(--bar-text);
    font-size: 1.15em;
    text-align: center;
}

/* Publications: two newspaper-style columns on wide screens */
.pub-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.25rem;
}

.pub {
    break-inside: avoid;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--rule);
}

.pub h3 {
    margin: 0 0 4px;
    padding: 3px 5px;
    background: var(--accent);
    color: var(--bar-text);
    font-size: 1em;
    font-style: italic;
    line-height: 1.3;
}

.pub-body {
    display: flow-root;
    padding-bottom: 0.3rem;
}

.pub-thumb {
    float: left;
    width: 160px;
    height: auto;
    margin: 3px 10px 4px 0;
    padding: 3px;
    background: #fff;
    border: 1px solid var(--img-border);
}

.citation {
    color: var(--muted);
    font-size: 0.92em;
}

.pub-links a {
    margin-right: 0.6em;
}

.pub-links a::before { content: "["; }
.pub-links a::after { content: "]"; }

footer {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 3px double var(--accent);
    text-align: center;
    color: var(--muted);
    font-size: 0.9em;
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }
    .pub-list {
        columns: 1;
    }
}

@media (max-width: 600px) {
    .site-header {
        justify-content: center;
        text-align: center;
    }
    .site-header h1 {
        font-size: 1.8rem;
    }
    .portrait {
        float: none;
        display: block;
        width: 120px;
        margin: 0 auto 0.75rem;
    }
    .pub-thumb {
        float: none;
        display: block;
        width: 100%;
        max-width: 360px;
        margin: 4px auto 8px;
    }
}
