.dashboard h3,
.content-section > summary h4,
.topic-group > summary h5,
.latest-update-label,
.interests-dropdown > summary {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 500;
    font-optical-sizing: auto;
}

.profile-copy > .latest-update {
    margin-bottom: 0.75rem;
    color: #555;
    font-size: 0.9rem;
}

.latest-update-label {
    color: #52769a;
}

.latest-update-link,
.latest-update-link:visited,
.latest-update-link:hover,
.latest-update-link:focus,
.latest-update-link:active {
    color: inherit;
    text-decoration: none;
}

.profile-intro {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.profile-copy {
    flex: 1 1 0;
    min-width: 0;
}

.profile-section {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.profile-section > p {
    margin: 0.5rem 0 0;
}

.profile-section > summary > strong {
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 700;
    font-optical-sizing: auto;
}

.profile-picture {
    width: 210px;
    max-width: 36%;
    flex-shrink: 0;
}

.profile-picture > summary {
    cursor: pointer;
    color: #777;
    font-size: 0.88em;
    line-height: 1.55;
}

.profile-section > summary:focus-visible,
.profile-picture > summary:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 4px;
    border-radius: 4px;
}

.profile-picture[open] > summary {
    display: block;
    list-style: none;
}

.profile-picture[open] .profile-picture-label,
.profile-picture:not([open]) .profile-photo {
    display: none;
}

.profile-photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: 64% center;
    border-radius: 4px;
}

.interests-note {
    color: #777;
    font-size: 0.78em;
    line-height: 1.55;
}

.interests-dropdown {
    font-size: 0.88em;
    margin-bottom: 1.5rem;
}

.interests-dropdown summary {
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.interests-dropdown p {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.content-section {
    margin-bottom: 12px;
}

.content-section > summary,
.profile-copy > details > summary,
.profile-picture:not([open]) > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.content-section > summary::-webkit-details-marker,
.profile-copy > details > summary::-webkit-details-marker,
.profile-picture > summary::-webkit-details-marker {
    display: none;
}

.content-section > summary::before,
.profile-copy > details > summary::before,
.profile-picture:not([open]) > summary::before {
    content: "+";
    width: 18px;
    flex-shrink: 0;
    font-weight: 600;
}

.content-section[open] > summary::before,
.profile-copy > details[open] > summary::before {
    content: "-";
}

.content-section h4 {
    margin: 0;
}

.content-section ul {
    margin-top: 8px;
}

.entry-annotation {
    margin: 0.25rem 0 0.75rem;
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

.creation-image {
    display: block;
    width: 420px;
    max-width: 100%;
    height: auto;
    margin-top: 8px;
    border-radius: 4px;
}

/* Show source rows 284 through 1695, omitting the black band and last two text lines. */
.stopover-viewport {
    display: block;
    position: relative;
    width: 420px;
    max-width: 100%;
    aspect-ratio: 912 / 1412;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 4px;
}

.stopover-viewport .creation-image {
    position: absolute;
    width: 100%;
    max-width: none;
    height: auto;
    top: calc(-100% * 284 / 1412);
    margin: 0;
    border-radius: 0;
}

/* Display the photo at (205, 99), 883 x 1384, inside the original 1350 x 1800 image. */
.mural-viewport {
    position: relative;
    width: 420px;
    max-width: 100%;
    aspect-ratio: 883 / 1384;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 4px;
}

.mural-viewport .creation-image {
    position: absolute;
    width: calc(100% * 1350 / 883);
    max-width: none;
    height: auto;
    margin: 0;
    left: calc(-100% * 205 / 883);
    top: calc(-100% * 99 / 1384);
    border-radius: 0;
}

@media (max-width: 767px) {
    .profile-intro {
        flex-direction: column;
        gap: 18px;
    }

    .profile-picture {
        order: -1;
        width: min(100%, 260px);
        max-width: 100%;
    }
}

/* Viewing preferences are an enhancement; the original page works without JS. */
.display-preferences {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    margin: 0 15px 0.5rem;
    font-size: 0.9rem;
}

.display-preferences[hidden],
.annotation-toggle[hidden],
.entry-annotation[hidden] {
    display: none;
}

.display-preferences label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-height: 32px;
    cursor: pointer;
}

.display-preferences input {
    margin: 0;
    accent-color: #005fcc;
}

.display-preferences input:focus-visible,
.annotation-toggle:focus-visible,
.content-section details > summary:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 3px;
}

.annotation-toggle {
    display: inline-block;
    margin-inline-start: 0.5rem;
    padding: 0.15rem 0;
    border: 0;
    background: transparent;
    color: #666;
    font: inherit;
    font-size: 0.9em;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.content-section details {
    margin: 0.3rem 0 0.65rem;
}

.content-section details > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    padding: 0.2rem 0;
    cursor: pointer;
    list-style: none;
}

.content-section details > summary::-webkit-details-marker {
    display: none;
}

.content-section details > summary::before {
    content: "+";
    width: 18px;
    flex-shrink: 0;
    font-weight: 600;
}

.content-section details[open] > summary::before {
    content: "-";
}

.content-section details > ul {
    padding-left: 1.5rem;
}

.content-section > .topic-group {
    margin-inline-start: 1.5rem;
}

.topic-group > summary h5 {
    margin: 0;
    font-size: 1.05rem;
}

.seminar-pdfs time {
    color: #666;
}

html[data-display-mode="compact"] .section-collection,
html[data-display-mode="compact"] .profile-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px 24px;
}

html[data-display-mode="compact"] .profile-copy {
    width: 100%;
}

html[data-display-mode="compact"] .profile-section {
    min-width: 0;
    margin-bottom: 0;
}

html[data-display-mode="compact"] .profile-section > summary {
    padding: 0.5rem 0;
}

html[data-display-mode="compact"] .profile-section[open],
html[data-display-mode="compact"] .profile-copy > .interests-dropdown,
html[data-display-mode="compact"] .profile-copy > .latest-update {
    grid-column: 1 / -1;
}

html[data-display-mode="compact"] #footer {
    padding-top: 2rem;
}

html[data-display-mode="compact"] .section-collection > .content-section {
    min-width: 0;
    margin-bottom: 0;
}

html[data-display-mode="compact"] .section-collection > .content-section > summary {
    padding: 0.5rem 0;
}

html[data-display-mode="compact"] .section-collection > .content-section[open] {
    grid-column: 1 / -1;
    padding-bottom: 0.5rem;
}

html[data-display-mode="compact"] .content-section > .section-note {
    margin-bottom: 0.5rem;
}

html[data-display-mode="compact"] .content-section > ul {
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
}

html[data-display-mode="compact"] .content-section li {
    overflow-wrap: anywhere;
}

@media (min-width: 640px) {
    html[data-display-mode="compact"] .profile-copy {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    html[data-display-mode="compact"] .section-collection {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    html[data-display-mode="compact"] .section-collection {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (pointer: coarse) {
    .display-preferences label,
    .annotation-toggle,
    .content-section details > summary,
    .profile-section > summary {
        min-height: 44px;
    }
}
