.project-gallery {
  width: min(100% - 2rem, 1100px);
  max-height: min(90vh, 900px);
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: #181714;
  color: var(--cream);
}

.project-gallery::backdrop { background: rgba(0,0,0,.85); backdrop-filter: blur(6px); }
.gallery-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.gallery-dialog-head p { margin: 0; font: 400 1.5rem var(--serif); }
.gallery-close { border: 0; background: none; color: var(--cream); font-size: 2rem; line-height: 1; cursor: pointer; }
.gallery-main-image { display: block; width: 100%; max-height: calc(90vh - 155px); object-fit: contain; background: #0f0f0d; }
.gallery-thumbnails { display: flex; gap: .6rem; padding-top: .8rem; overflow-x: auto; }
.gallery-thumbnails button { width: 86px; height: 62px; padding: 0; border: 1px solid transparent; background: #111; cursor: pointer; flex: 0 0 auto; }
.gallery-thumbnails button[aria-current="true"] { border-color: var(--amber); }
.gallery-thumbnails img { width: 100%; height: 100%; object-fit: cover; display: block; }
