/* Compact academic layout, with the existing light/dark theme preserved. */
html { font-size: 17px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}
#main { flex: 1 0 auto; width: 100%; margin-top: 1.25rem; }
.page__title { font-size: 1.5rem; line-height: 1.25; margin-bottom: 1rem; }
.page__content h2, .archive > h2 {
  font-size: 1.12rem;
  margin: 1.35rem 0 0.6rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--global-border-color);
}
.page__content h3, .archive > h3 { font-size: 1rem; margin: 1rem 0 0.35rem; }
.page__content p, .archive > p { margin-bottom: 0.8rem; }
.page__content li { margin-bottom: 0.25rem; }
.masthead__inner-wrap { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.masthead__menu-item--lg { padding-right: 1rem; }
.greedy-nav .visible-links a { margin-left: 0.75rem; margin-right: 0.75rem; }
.greedy-nav .visible-links .masthead__menu-item--lg a { margin-left: 0; }

/* Display the supplied photograph through a CSS crop; the source stays intact. */
.portrait-frame {
  overflow: hidden;
  border-radius: 12px;
  width: 168px;
  height: 200px;
}
.portrait-frame img.author__avatar {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 65%;
  transform: scale(1.7);
  transform-origin: 50% 68%;
}
.author__content { padding-right: 0; }
.sidebar .author__name { font-size: 1rem; margin-top: 0.7rem; margin-bottom: 0.4rem; }
.sidebar .author__bio { font-size: 0.82rem; margin-bottom: 0.7rem; }
.sidebar p, .sidebar li, .author__urls a { font-size: 0.78rem; }

.research-list { padding-left: 1.2rem; margin: 0.7rem 0 1.3rem; }
.research-list .research-entry {
  padding: 0 0 0 0.1rem;
  margin: 0 0 1rem;
  border: 0;
}
.research-entry h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.12rem;
}
.research-entry h3 a { color: var(--global-text-color); text-decoration: none; }
.research-entry h3 a:hover { color: var(--global-link-color); text-decoration: underline; }
.research-entry p { margin: 0 0 0.12rem; font-size: 0.95rem; line-height: 1.45; }
.research-entry__authors { font-style: italic; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; column-gap: 0.65rem; font-size: 0.93rem; }
.resource-links { display: inline-flex; align-items: center; gap: 0.25rem; vertical-align: middle; }
.resource-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 28px;
  color: var(--global-link-color);
  text-decoration: none;
  border-radius: 3px;
}
.resource-links a:hover, .resource-links a:focus-visible { color: var(--global-link-color-hover); background: var(--global-border-color); }
.resource-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.resource-links svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Fill short viewports while keeping the footer below all page content. */
.page__footer { flex-shrink: 0; position: static; float: none; margin-top: 2rem; }
.page__footer footer { margin-top: 0.65rem; padding-bottom: 0.65rem; }
.page__footer-follow { display: none; }

@media (min-width: 1024px) {
  #main { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2.5rem; max-width: 1200px; }
  #main::after { display: none; }
  #main > .sidebar { position: sticky; top: 5rem; align-self: start; width: auto; height: auto; max-height: calc(100vh - 6rem); max-width: none; padding: 0; margin: 0; overflow-y: auto; float: none; }
  #main > .page, #main > .archive { float: none; width: 100%; padding: 0; margin: 0; min-width: 0; }
  .masthead__inner-wrap, .page__footer footer { max-width: 1200px; }
  .portrait-frame { display: block; }
}
@media (max-width: 1023px) {
  html { font-size: 16px; }
  #main > .sidebar { position: static; width: 100%; height: auto; padding-top: 0; margin: 0 0 1.4rem; }
  .portrait-frame { display: inline-block; vertical-align: middle; width: 92px; height: 108px; }
  .author__content { display: inline-block; vertical-align: middle; width: calc(100% - 120px); padding-left: 1rem; }
  .author__urls-wrapper { display: block; margin-top: 0.45rem; }
  .author__urls-wrapper button { font-size: 0.8rem; }
  .author__urls { right: auto; left: 0; }
  .archive, .page { float: none; width: 100%; }
}
@media (max-width: 480px) {
  .masthead__menu-item--lg { padding-right: 0; }
  .greedy-nav .visible-links a { margin-left: 0.5rem; margin-right: 0.5rem; }
  .research-list { padding-left: 1rem; }
  .resource-links a { width: 32px; height: 32px; }
}
