/* Existing portfolio collections and gallery within Academic Pages. */
:root { --global-link-color: #2f7f93; --global-link-color-hover: #245f6e; --global-link-color-visited: #2f7f93; --global-fig-caption-color: #59636e; }
html[data-theme="dark"] { --global-link-color: #81c7db; --global-link-color-hover: #b0e2ef; --global-link-color-visited: #81c7db; }
.author__avatar img { aspect-ratio: 1; object-fit: cover; object-position: 62% center; }
.author__name { font-weight: bold; }
.author__urls { z-index: 20; color: var(--global-text-color); }
.author__urls a { display: flex; align-items: center; gap: 0.5rem; min-height: 32px; margin: 0; padding: 0.3rem 0; line-height: 1.4; }
.sidebar .author__urls li { margin: 0; font-size: 0.78rem; }
.author__urls-wrapper .btn { color: var(--global-text-color) !important; background: var(--global-bg-color); min-height: 44px; font-size: 0.875rem; }
.page__footer { color: var(--global-text-color); position: relative; bottom: auto; }
.page__footer a { text-decoration: underline; text-underline-offset: 0.15em; }
.author__urls a .icon { width: 1.1rem; height: 1.1rem; margin: 0; }
.page__footer-copyright { font-size: 0.78rem; }
.page__footer-follow li { font-size: 0.78rem; }
.icon { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.15em; fill: currentColor; flex-shrink: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.4em; min-height: 44px; padding: 0.5em 0.75em; border: 1px solid var(--global-border-color); border-radius: 4px; color: var(--global-link-color); background: var(--global-bg-color); cursor: pointer; text-decoration: none; font: inherit; }
.icon-button { min-width: 44px; }
.facts { display: flex; flex-wrap: wrap; gap: 0.5em 2em; font-size: 0.85em; }
.facts div { max-width: 100%; }
.facts dt { font-weight: bold; }
.facts dd { margin: 0; }
.work-list { margin: 1.25rem 0 2rem; }
.citation-list { list-style: none; padding: 0; }
.citation-list .work-item { margin-bottom: 1.1rem; padding-left: 1.5rem; text-indent: -1.5rem; line-height: 1.65; }
.title-list { padding-left: 1.2rem; }
.title-list .work-item { margin-bottom: 0.7rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 1.5rem 0; }
.tile { min-width: 0; margin: 0; border: 1px solid var(--global-border-color); border-radius: 6px; overflow: hidden; }
.archive .tile__link { display: flex; flex-direction: column; height: 100%; color: var(--global-text-color); text-decoration: none; }
.tile__link:hover .tile__title { text-decoration: underline; }
.tile__body { padding: 1rem; }
.tile__title { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--global-link-color); }
.tile__summary { margin: 0 0 0.75rem; font-size: 0.88rem; line-height: 1.5; }
.tile__meta { margin: 0; font-size: 0.78rem; }
.tile__media img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; list-style: none; padding: 0; }
.gallery__item { margin: 0; min-width: 0; }
.gallery__open { display: block; }
.gallery__open img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery__caption { margin: 0.5em 0 0; font-size: 0.85em; }
.lightbox { border: 0; padding: 1rem; width: min(95vw, 1200px); max-height: 95vh; color: #f0f6fc; background: #0d1117; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(1, 4, 9, 0.92); }
.lightbox__figure { margin: 0; min-height: 0; text-align: center; overflow: auto; touch-action: pinch-zoom; }
.lightbox__image { width: auto; max-width: 100%; max-height: 72vh; object-fit: contain; }
.lightbox__caption { font-size: 0.85em; }
.lightbox__controls { display: flex; gap: 0.75rem; justify-content: center; align-items: center; padding-top: 0.75rem; }
.lightbox__count { margin: 0; }
html:has(.lightbox[open]) { overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 100; background: var(--global-bg-color); padding: 0.75rem; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--global-link-color); outline-offset: 3px; }
.page__content, .archive { overflow-wrap: anywhere; }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr; } }
@media (min-width: 1024px) {
  /* Keep the full profile in page flow so the footer cannot cover its links. */
  .sidebar.sticky { position: sticky; top: 70px; bottom: auto; max-height: calc(100vh - 90px); padding-top: 0 !important; }
}
