.projects-gallery {
  --gallery-body-en: inherit;
  --gallery-body-zh: inherit;
  --gallery-title-en: Georgia, "Times New Roman", serif;
  --gallery-title-zh: inherit;
  --gallery-title: var(--gallery-title-en);
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 35%, #fff, #f1f6fb);
  color: #304b67;
  font-family: var(--gallery-body-en);
}
:lang(zh) .projects-gallery {
  font-family: var(--gallery-body-zh);
  --gallery-title: var(--gallery-title-zh);
}
.projects-gallery button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.gallery-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 56px);
  font-size: 13px;
}
.gallery-nav nav { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery-nav button { padding: 6px 2px; }
.gallery-nav [aria-current], .gallery-nav [aria-pressed="true"] {
  box-shadow: 0 1px #537699;
  color: #244768;
}
.gallery-exhibits {
  max-width: 1120px;
  margin: auto;
  padding: clamp(80px, 16vh, 160px) 30px 80px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(42px, 8vw, 116px);
}
.gallery-exhibit:nth-child(2) { padding-top: 72px; }
.gallery-project { width: 100%; padding: 0; text-align: left; perspective: 1000px; }
.gallery-book {
  isolation: isolate;
  position: relative;
  display: flex;
  aspect-ratio: 1.72;
  transform: rotateX(12deg);
  border-bottom: 3px solid #a3b4c1;
  border-radius: 2px 2px 5px 5px;
  box-shadow: 0 3px #d3e0eb, 0 6px 0 -1px #aabcc9, 5px 23px 26px -12px #465e7663;
  transition: transform 420ms ease, box-shadow 420ms ease;
}
.gallery-leaf {
  position: relative;
  display: grid;
  place-items: center;
  width: 50%;
  padding: 8%;
  background: linear-gradient(90deg, #eef2f5, #fff 10%, #fbfcfd 86%, #d9e1e8);
  border: 1px solid #e0e7ee;
  border-radius: 2px 9px 4px 2px / 2px 5px 3px 2px;
}
.gallery-leaf + .gallery-leaf {
  background: linear-gradient(90deg, #c6d2de, #f8fafc 12%, #fff 90%, #edf2f6);
  border-radius: 9px 2px 2px 4px / 5px 2px 2px 3px;
}
.gallery-leaf img { width: 100%; max-height: 100%; object-fit: contain; }
.gallery-placeholder { text-align: center; font-size: clamp(10px, 1.1vw, 14px); }
.gallery-placeholder small { display: block; margin-top: 8px; color: #5b7085; }
.gallery-caption { display: grid; gap: 9px; margin-top: 40px; line-height: 1.55; font-size: 13px; }
.gallery-caption strong, .gallery-case h1 { font-family: var(--gallery-title); font-size: 20px; font-weight: 500; }
.gallery-cta { width: max-content; border-bottom: 1px solid #8da8be; }
.gallery-project:is(:hover, :focus-visible) .gallery-book {
  transform: translateY(-8px) rotateX(9deg) scale(1.04);
  box-shadow: 0 3px #d3e0eb, 0 6px 0 -1px #aabcc9, 6px 29px 34px -12px #465e7675;
}
.gallery-project:is(:hover, :focus-visible) .gallery-caption { color: #193d60; }
.gallery-case { max-width: 680px; margin: 15vh auto 0; padding: 24px; }
.gallery-case button { text-decoration: underline; }
@media (max-width: 700px) {
  .gallery-nav { flex-wrap: wrap; }
  .gallery-nav nav { order: 3; width: 100%; justify-content: space-between; gap: 6px; }
  .gallery-exhibits { max-width: 480px; grid-template-columns: 1fr; padding-top: 60px; gap: 58px; }
  .gallery-exhibit:nth-child(2) { padding-top: 0; }
  .gallery-caption { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-project:is(:hover, :focus-visible) .gallery-book { transform: rotateX(12deg); }
}

/* Flat page art, with the existing book geometry and fold shading retained. */
.gallery-leaf:has(> img) { padding: 0; }
.gallery-leaf > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.gallery-leaf:has(> img)::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, #304b6705, transparent 12%, transparent 88%, #304b6714); }
.gallery-leaf + .gallery-leaf:has(> img)::after { background: linear-gradient(90deg, #304b6724, transparent 12%, transparent 92%, #304b6705); }
