.projects-page { padding-block: 2rem 3rem; }
.projects-page .project-card h2 {
    margin-block: .6rem .5rem;
    font-size: 1.25rem;
    line-height: 1.25;
    text-wrap: wrap;
}
.project-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 1rem;
    color: var(--color-muted);
    text-decoration: underline;
    text-underline-offset: .25em;
}
.project-back:hover { color: var(--color-ivory); }
.project-facts {
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: .65rem;
    background: var(--color-surface);
}
.project-facts dt { font-weight: 600; }
.project-facts dd { color: var(--color-muted); margin-top: .25rem; }
.project-facts > div + div { margin-top: .875rem; }
.project-section { margin-top: 2.25rem; }
.project-section > p { margin-top: .75rem; max-width: 48rem; }
.project-note {
    margin-top: 1rem;
    font-size: .875rem;
    color: var(--color-muted);
}
.capture-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.capture-gallery a {
    display: block;
    height: 100%;
    border: 1px solid var(--color-border);
    border-radius: .65rem;
    background: var(--color-surface);
    overflow: hidden;
}
.capture-gallery a:hover { border-color: var(--color-crimson); }
.capture-gallery img { width: 100%; height: auto; }
.capture-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem .75rem;
    min-height: 44px;
    padding: .625rem 1rem;
    border-top: 1px solid var(--color-border);
}
.capture-expand { color: var(--color-muted); font-size: .875rem; }
.gallery-dialog {
    width: min(72rem, calc(100% - 1.5rem));
    max-width: none;
    max-height: calc(100dvh - 1.5rem);
    margin: auto;
    border: 1px solid var(--color-border);
    border-radius: .65rem;
    background: var(--color-surface);
    color: var(--color-ivory);
}
.gallery-dialog[open] { display: flex; flex-direction: column; }
.gallery-dialog::backdrop { background: rgb(0 0 0 / 80%); }
html:has(.gallery-dialog[open]) { overflow: hidden; }
.gallery-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}
.gallery-dialog-header h2 { font-size: 1.125rem; }
.gallery-dialog-image { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.gallery-dialog-image:focus-visible { outline-offset: -2px; }
.gallery-dialog-image img { width: 100%; height: auto; }

@media (min-width: 768px) {
    .projects-page { padding-top: 2.5rem; }
    .project-section { margin-top: 2.75rem; }
    .capture-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .capture-gallery > li:first-child { grid-column: 1 / -1; }
}
