:root {
    --max-width: 900px;
    --text: #333333;
    --muted: #666666;
    --accent: #26474b; /* "beach seine green" */
    --border: #dadee5;
    --bg: #f7f7f7;
}

/* Basic formatting for body and header text */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Serif", Georgia, serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 3rem;
    font-weight: 500;
    font-variant: all-small-caps;
    font-feature-settings: "smcp" 1;
    letter-spacing: 0.1em;
    line-height: 1;
    text-align: center;
    margin: 0 0 0.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
h2 {
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--muted);
    margin: 0 0 0.5rem;
}
h2 + * {
    margin-top: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
}

/* Layout: header, content, footer */

.site-header {
    border-bottom: 1px solid var(--border);
}
.site-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.site-title {
    font-weight: 700;
    font-size: 2rem;
}
.site-nav a {
    margin-left: 1.5rem;
    color: var(--muted);
}
.site-nav a:first-child {
    margin-left: 0;
}
.site-nav a:hover {
    color: var(--accent);
}

/* Hamburger menu for narrow/mobile viewports */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem 0.25rem;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 1.75rem;
    height: 2px;
    border-radius: 1px;
    background: var(--accent);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}
.nav-toggle span + span {
    margin-top: 6px;
}

@media (max-width: 700px) {
    .nav-toggle {
        display: block;
    }
    .site-nav {
        display: none;
        width: 100%;
    }
    .site-header.nav-open .site-nav {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding-top: 0.5rem;
    }
    .site-nav a {
        margin-left: 0;
    }
    .site-header.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .site-header.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    .site-header.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

.page-content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Utilities */

.contact-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    margin-right: 0.5em;
}

/* Aside images */

.aside-section {
    display: flex;
    gap: 1.75rem;
    align-items: center;
    margin: 2rem 0;
}
.aside-section.aside-right {
    flex-direction: row-reverse;
}
.aside-img {
    width: 45%;
    flex-shrink: 0;
    margin: 0;
}
.aside-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.aside-img figcaption {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
}
.aside-text {
    flex: 1;
    min-width: 0;
}
.aside-text :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
}

@media (max-width: 700px) {
    .aside-section,
    .aside-section.aside-right {
        flex-direction: column;
    }
    .aside-img {
        width: 100%;
    }
}

/* People grid */

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.75rem;
    margin-top: 1.5rem;
}
.person-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f2f4;
}
.person-card h3 {
    margin: 0.6rem 0 0.1rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.person-card .role {
    color: var(--muted);
    font-weight: 400;
}
.person-card .pronouns {
    color: var(--muted);
    font-weight: 300;
}
.person-card p {
    margin: 0.25rem 0;
}
.person-card .person-links {
    margin: 0.5rem 0 0;
    font-size: 1rem;
}
.person-card .person-links a {
    font-weight: 600;
}

/* Publications list */

.pub-list {
    list-style: none;
    padding: 0;
}
.pub {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.pub h3 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
}
.pub .authors {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 0.3rem;
}
.pub .blurb {
    margin: 0.3rem 0;
}
.pub .pdf-link {
    font-size: 0.9rem;
    font-weight: 600;
}
.pub-legend {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}
.pub-num {
    color: var(--muted);
    font-weight: 400;
}
.pub-year {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0 2rem;
    padding: 1.25rem 0;
}
.pub-year h2 {
    text-align: left;
    border-bottom: none;
    margin: 0;
    font-size: 1.25rem;
}
.pub-year-body p {
    margin: 0 0 0.5rem;
}

@media (max-width: 700px) {
    .pub-year {
        grid-template-columns: 1fr;
        gap: 0.25rem 0;
    }
}

/* Photo gallery */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.photo-grid figure {
    margin: 0;
}
.photo-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #f0f2f4;
}
.photo-grid figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* Photo overlay */

.photo-item {
    cursor: pointer;
}
.photo-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.18) 60%,
        transparent 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.photo-wrap:hover .photo-overlay,
.photo-wrap:focus-within .photo-overlay {
    opacity: 1;
}
.photo-overlay-inner {
    color: #fff;
}
.photo-overlay-title {
    margin: 0 0 0.15rem;
    font-weight: 700;
    font-size: 0.9rem;
}
.photo-overlay-caption {
    margin: 0 0 0.15rem;
    font-size: 0.8rem;
    opacity: 0.9;
}
.photo-overlay-credit {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.75;
    font-style: italic;
}

/* Lightbox for gallery */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    outline: none;
}
.lightbox[hidden] {
    display: none;
}
.lb-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
}
.lb-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}
.lb-info {
    color: #fff;
    text-align: center;
}
.lb-title {
    margin: 0 0 0.2rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.lb-caption {
    margin: 0 0 0.2rem;
    font-size: 1.125rem;
    opacity: 0.85;
}
.lb-credit {
    margin: 0;
    font-size: 1rem;
    opacity: 0.65;
    font-style: italic;
}

.lb-close,
.lb-prev,
.lb-next {
    position: fixed;
    background: none;
    border: none;
    color: #fff;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.lb-close {
    top: 1rem;
    right: 1.25rem;
    font-size: 2.25rem;
    opacity: 0.7;
}
.lb-prev,
.lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
    opacity: 0.6;
    padding: 0 0.5rem;
    user-select: none;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
    opacity: 1;
}
.lb-prev {
    left: 0.75rem;
}
.lb-next {
    right: 0.75rem;
}
