/* ==========================================================================
   Miles Q. Li — Editorial Minimal (Wide 1140px, Solarized Slate-Teal + Blue)
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container-w: 1140px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --transition: 160ms ease;

  /* Light theme (default) */
  --bg: #fbf7ec;
  --surface: #fffdf7;
  --surface-subtle: #f3ede0;
  --border: #e3dcc8;
  --border-strong: #cfc6ae;
  --text: #073642;
  --text-secondary: #485e65;
  --text-muted: #657b83;
  --accent: #1c75b4;
  --accent-soft: rgba(28, 117, 180, 0.09);
  --accent-border: rgba(28, 117, 180, 0.32);
  --teal: #2aa198;
  --teal-soft: rgba(42, 161, 152, 0.10);
  --highlight-bg: #f4eedf;
}

html[data-theme="dark"] {
  --bg: #0f161b;
  --surface: #151f26;
  --surface-subtle: #1b2831;
  --border: #263742;
  --border-strong: #374e5d;
  --text: #e6eff2;
  --text-secondary: #b1c3cc;
  --text-muted: #7f97a3;
  --accent: #58a6df;
  --accent-soft: rgba(88, 166, 223, 0.14);
  --accent-border: rgba(88, 166, 223, 0.36);
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --highlight-bg: #152129;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
  transition: color var(--transition), border-color var(--transition), background var(--transition), text-decoration-color var(--transition);
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 44px;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand__dot {
  color: var(--teal);
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand__sub {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 450;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface-subtle);
  text-decoration: none;
}

.nav__link.is-active {
  color: var(--text);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--accent);
}

.theme-toggle {
  margin-left: 6px;
  padding: 3px 9px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- Main Sections ---------- */
.page-main {
  padding-top: 40px;
  min-height: calc(100vh - 180px);
}

.section {
  margin-top: 52px;
}

.section--first {
  margin-top: 0;
}

.section--tight {
  margin-top: 34px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.section__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.section__title--page {
  font-size: 34px;
}

.section__action {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.section__note {
  margin: 0 0 18px;
  color: var(--text-secondary);
}

/* ---------- Hero ---------- */
.hero-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 52px;
  align-items: start;
  padding: 12px 0 8px;
}

.hero-editorial > div {
  min-width: 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  font-weight: 500;
  margin: 0 0 10px;
}

.hero-editorial__name {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-editorial__name span {
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-left: 10px;
  font-weight: 400;
}

.hero-editorial__bio {
  margin: 0 0 14px;
  font-size: 16.5px;
  line-height: 1.82;
  color: var(--text-secondary);
}

.chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.chip-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.chip-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.chip-link:hover svg {
  color: var(--accent);
}

.hero-aside {
  min-width: 0;
}

.hero-editorial__avatar {
  width: 156px;
  height: 156px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(7, 54, 66, 0.07);
}

html[data-theme="dark"] .hero-editorial__avatar {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-aside__info {
  min-width: 0;
}

.hero-aside__motto {
  margin: 14px 0 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
}

.hero-aside__affils {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-affil {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-affil__org {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.hero-affil__role {
  font-size: 12px;
  font-family: var(--font-mono);
  line-height: 1.35;
  color: var(--text-muted);
}

/* ---------- ODCV-Bench Editorial Callout ---------- */
.editorial-callout {
  background: var(--highlight-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  padding: 22px 26px;
}

.editorial-callout__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.editorial-callout__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--text);
}

.editorial-callout__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.callout-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.callout-chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.callout-chip--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.callout-chip--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .callout-chip--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0f161b;
}

html[data-theme="dark"] .callout-chip--primary:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #0f161b;
}

.editorial-callout__summary {
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.editorial-callout__evidence {
  margin: 7px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.editorial-callout__evidence strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Systems & Open Source ---------- */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.system-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 18px 20px;
  transition: border-color var(--transition);
}

.system-card:hover {
  border-color: var(--accent-border);
}

.system-card--wide {
  grid-column: 1 / -1;
}

.editorial-sys-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.editorial-sys-row__name {
  font-family: var(--font-serif);
  font-weight: 550;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
}

.editorial-sys-row__name:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.editorial-sys-row__role {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.editorial-row__desc {
  font-size: 14.8px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 2px 0 12px;
}

.system-card .editorial-row__desc {
  flex: 1;
}

.editorial-row__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-top: 4px;
}

.system-card .editorial-row__links {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.more-open-source {
  margin: 18px 0 0;
  font-size: 14.2px;
  line-height: 1.65;
  color: var(--text-muted);
}

.more-open-source strong {
  color: var(--text-secondary);
}

/* ---------- Publication Rows & Controls ---------- */
.pub-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pub-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.filter-pill:hover {
  border-color: var(--accent-border);
  color: var(--text);
}

.filter-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .filter-pill.is-active {
  color: #0f161b;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  min-width: 220px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.editorial-row {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 22px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.editorial-row:last-child {
  border-bottom: none;
}

.editorial-row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.editorial-row__title {
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 3px;
}

.editorial-row__title a {
  color: var(--text);
  text-decoration: none;
}

.editorial-row__title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.pub-item__authors {
  font-size: 13.8px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.pub-item__authors strong {
  color: var(--text);
  font-weight: 600;
}

.pub-item__venue {
  font-size: 13.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 4px;
}

.drawer-toggle {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

.drawer-toggle:hover {
  text-decoration-color: var(--accent);
}

.pub-drawer {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.pub-drawer--mono {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.pub-empty {
  color: var(--text-muted);
  margin: 20px 0;
}

/* ---------- Recent Updates / News ---------- */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 15.8px;
}

.news-row:last-child {
  border-bottom: none;
}

.news-row__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-row__text {
  color: var(--text-secondary);
}

.news-row__text a {
  color: var(--text);
  font-weight: 500;
  text-decoration-color: var(--border-strong);
}

.news-row__text a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---------- Talks ---------- */
.talk-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.talk-item {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.talk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.talk-item__date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}

.talk-item__type {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

.talk-item__title {
  margin: 0 0 3px;
  font-size: 15.8px;
  font-weight: 600;
  line-height: 1.4;
}

.talk-item__title a {
  color: var(--text);
  text-decoration: none;
}

.talk-item__title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.talk-item__venue {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.talk-item__summary {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.talk-item__summary p {
  margin: 0 0 6px;
}

.talk-item__summary p:last-child {
  margin-bottom: 0;
}

/* ---------- CV ---------- */
.cv-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.cv-block__title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.cv-entry {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry__period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  padding-top: 2px;
}

.cv-entry__title {
  font-weight: 600;
  color: var(--text);
}

.cv-entry__org {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
}

.cv-entry__detail {
  margin: 2px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Photography Gallery ---------- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color var(--transition);
}

.photo-card:hover,
.photo-card:focus-visible {
  border-color: var(--accent-border);
  outline: none;
}

.photo-card__frame {
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 280ms ease;
}

.photo-card:hover img {
  transform: scale(1.02);
}

.photo-card figcaption {
  padding: 8px 4px 2px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
}

.photo-card__title {
  font-weight: 500;
  color: var(--text);
}

.photo-card__loc {
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
  font-family: var(--font-sans);
}

/* ---------- Single Article / Detail Pages ---------- */
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.editorial-article__title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text);
}

.editorial-article__meta {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.editorial-article__meta-line {
  margin: 4px 0;
}

.editorial-article__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
}

.editorial-article__body {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.72;
}

.editorial-article__body h2,
.editorial-article__body h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--text);
  margin: 26px 0 10px;
}

.editorial-article__body p {
  margin: 0 0 14px;
}

.editorial-article__body ul,
.editorial-article__body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.editorial-article__body li {
  margin-bottom: 8px;
}

.editorial-article__body img {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.editorial-article__citation {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.editorial-article__citation-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.editorial-article__citation-text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 68px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer__globe {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.site-footer__globe-box {
  width: 180px;
  max-width: 100%;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox__figure {
  margin: 0;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox__figure img {
  max-height: 80vh;
  width: auto;
  border-radius: 4px;
}

.lightbox__figure figcaption {
  color: #e2e8f0;
  font-size: 14px;
  text-align: center;
}

/* ---------- Responsive (Compact 2-line mobile header at 375-390px) ---------- */
@media (max-width: 760px) {
  .container {
    padding: 0 20px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
    gap: 6px;
    min-height: auto;
  }

  .nav {
    gap: 2px;
    width: 100%;
  }

  .nav__link {
    padding: 4px 6px;
    font-size: 13px;
  }

  .theme-toggle {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 11.5px;
  }

  .hero-editorial {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 4px 0 0;
  }

  .hero-editorial__name {
    font-size: 38px;
  }

  .hero-editorial__name span {
    font-size: 16px;
    margin-left: 8px;
  }

  .hero-aside {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 16px;
    align-items: start;
  }

  .hero-editorial__avatar {
    width: 108px;
    height: 108px;
    margin-top: 0;
  }

  .hero-aside__motto {
    margin: 0 0 10px;
    font-size: 15.5px;
  }

  .hero-aside__affils {
    padding-top: 10px;
    gap: 6px;
  }

  .section__title {
    font-size: 25px;
  }

  .section__title--page {
    font-size: 28px;
  }

  .editorial-callout {
    padding: 18px 18px;
  }

  .systems-grid {
    grid-template-columns: 1fr;
  }

  .system-card--wide {
    grid-column: auto;
  }

  .photo-strip,
  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .editorial-row,
  .talk-item,
  .cv-entry,
  .news-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }
}
