/* Site-wide, accessible image enlargement with original-file download. */
html.vt-lightbox-open { overflow: hidden; }
img.homepage-photo, .project-files img, .blog-prose img,
.project-thumbnail img, img[data-lightbox], [data-lightbox-gallery] img {
  cursor: zoom-in;
}
img[role="button"]:focus-visible, .project-thumbnail:focus-visible, a[data-lightbox]:focus-visible,
.vt-view-background:focus-visible {
  outline: 3px solid #a96932;
  outline-offset: 4px;
}
.vt-view-background {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 5px;
  background: rgba(33,55,49,.89);
  color: #fff;
  padding: 6px 12px;
  font: 600 .78rem/1.4 system-ui,sans-serif;
  cursor: zoom-in;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.vt-view-background:hover { background: #34564b; }
.vt-lightbox {
  width: min(1320px, calc(100vw - 24px));
  height: min(920px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #63756b;
  border-radius: 8px;
  background: #17241f;
  color: #f7f4eb;
  box-shadow: 0 24px 90px #0008;
}
.vt-lightbox::backdrop { background: rgba(9,17,14,.87); }
.vt-lightbox-panel {
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  height: 100%;
  min-height: 0;
}
.vt-lightbox-top, .vt-lightbox-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  font: .85rem/1.5 system-ui,sans-serif;
}
.vt-lightbox-top { border-bottom: 1px solid #53685e; }
.vt-lightbox-count { margin-left: auto; font-variant-numeric: tabular-nums; color: #d9dfd5; }
.vt-lightbox-close, .vt-lightbox-arrow {
  color: #fff;
  border: 1px solid #86978c;
  border-radius: 100%;
  background: #344d41;
  font: 2rem/1 system-ui,sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}
.vt-lightbox-close:hover, .vt-lightbox-arrow:hover { background: #4b6d5a; }
.vt-lightbox-close:focus-visible, .vt-lightbox-arrow:focus-visible,
.vt-lightbox-download:focus-visible { outline: 3px solid #d6b78a; outline-offset: 3px; }
.vt-lightbox-stage {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) 52px;
  grid-template-rows: minmax(0,1fr);
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 10px;
  gap: 5px;
}
.vt-lightbox-image {
  grid-column: 2;
  grid-row: 1;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.vt-lightbox-stage .vt-lightbox-arrow:first-child { grid-column: 1; grid-row: 1; }
.vt-lightbox-stage .vt-lightbox-arrow:last-child { grid-column: 3; grid-row: 1; }
.vt-lightbox-footer { border-top: 1px solid #53685e; justify-content: space-between; }
.vt-lightbox-caption { overflow-wrap: anywhere; }
.vt-lightbox-download {
  color: #f7f4eb;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
  padding: 9px 0;
}
@media (max-width: 600px) {
  .vt-lightbox { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .vt-lightbox-top, .vt-lightbox-footer { padding: 8px 12px; gap: 8px; }
  .vt-lightbox-stage { grid-template-columns: 36px minmax(0,1fr) 36px; padding: 4px; gap: 2px; }
  .vt-lightbox-arrow { width: 34px; height: 34px; font-size: 1.6rem; }
  .vt-lightbox-close { width: 36px; height: 36px; }
  .vt-lightbox-footer { align-items: flex-start; font-size: .8rem; }
  .vt-lightbox-caption { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-lightbox, .vt-lightbox * { scroll-behavior: auto; }
}
