/* Pictures page styles. */

.gallery-page {
  width: var(--page-width);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid rgba(24, 32, 42, 0.06);
  padding: 0.62in 0.72in 0.5in;
}

.gallery-hero {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.gallery-hero__eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-hero__title {
  margin: 0.32rem 0 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
}

.gallery-hero__description {
  max-width: 28rem;
  margin: 0.46rem 0 0;
  color: var(--muted);
}

.gallery-layout {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(14rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.gallery-column {
  display: grid;
  gap: 1rem;
}

.gallery-column--side {
  align-content: start;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  background: #f7f9fc;
  box-shadow: 0 14px 28px rgba(24, 32, 42, 0.08);
}

.gallery-card--landscape .gallery-card__image {
  aspect-ratio: 2.26 / 1;
}

.gallery-card--portrait .gallery-card__image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.gallery-column--side .gallery-card:first-child .gallery-card__image {
  aspect-ratio: 4 / 5.8;
}

.gallery-column--side .gallery-card:first-child .gallery-card__image {
  object-position: center 8%;
}

.gallery-column--side .gallery-card:last-child .gallery-card__image {
  object-position: center 28%;
}

.gallery-card__image {
  width: 100%;
  display: block;
  height: auto;
  object-fit: contain;
  transition: transform 260ms ease, filter 260ms ease;
}

.gallery-card__caption {
  margin: 0;
  padding: 0.62rem 0.82rem 0.72rem;
  color: #485565;
  font-size: 0.88rem;
  line-height: 1.35;
  background: #f7f9fc;
}

.gallery-card:hover .gallery-card__image,
.gallery-card:focus-within .gallery-card__image {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.02);
}

@media (max-width: 980px) {
  .gallery-layout {
      grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 1fr);
    }
}

@media (max-width: 780px) {
  .gallery-page {
      padding: 1.4rem 1rem 1.2rem;
    }
  
  .gallery-layout {
      grid-template-columns: 1fr;
    }
  
  .gallery-card__caption {
      font-size: 0.9rem;
    }
}

html[data-theme="dark"] .resume,
html[data-theme="dark"] .gallery-page {
  background: #172232;
  border-color: rgba(218, 232, 240, 0.12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .gallery-hero,
html[data-theme="dark"] .cv-section__heading {
  border-color: rgba(218, 232, 240, 0.14);
}

html[data-theme="dark"] .hero__name,
html[data-theme="dark"] .hero__title,
html[data-theme="dark"] .cv-updated,
html[data-theme="dark"] .entry__header h3,
html[data-theme="dark"] .publication-group__title,
html[data-theme="dark"] .gallery-hero__title,
html[data-theme="dark"] .skills-grid dt {
  color: #edf4f7;
}

html[data-theme="dark"] .hero__institution,
html[data-theme="dark"] .hero__affiliation,
html[data-theme="dark"] .hero__contact-line,
html[data-theme="dark"] .entry__date,
html[data-theme="dark"] .entry__meta,
html[data-theme="dark"] .entry__detail,
html[data-theme="dark"] .cv-section p,
html[data-theme="dark"] .entry__list,
html[data-theme="dark"] .publication-list,
html[data-theme="dark"] .compact-list,
html[data-theme="dark"] .award-list,
html[data-theme="dark"] .skills-grid dd,
html[data-theme="dark"] .gallery-hero__description,
html[data-theme="dark"] .gallery-card__caption {
  color: #b6c3ce;
}

html[data-theme="dark"] .cv-section__heading h2,
html[data-theme="dark"] .gallery-hero__eyebrow {
  color: #7ab7f0;
}

html[data-theme="dark"] .hero__photo-frame,
html[data-theme="dark"] .gallery-card,
html[data-theme="dark"] .gallery-card__caption {
  background: #172232;
}
