* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================================================
   BASE
========================================================= */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.7;
}
/* =========================================================
   GALLERY PAGE — MODERN FRAMED EDITORIAL
   Designed to match your About page theme
========================================================= */

/* =========================================================
   PAGE WRAPPER
========================================================= */

.gallery-page {
  max-width: 1400px;
  margin: auto;
  padding: 160px 96px 200px;
}

/* =========================================================
   HERO
========================================================= */

.gallery-hero {
  max-width: 760px;
  margin-bottom: 120px;
  padding: 20px 40px;
}

.gallery-hero h1 {
  font-size: clamp(44px, 5vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--heading);
  margin-bottom: 22px;
}

.gallery-hero p {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 640px;
}

/* =========================================================
   GRID (EDITORIAL / MASONRY FEEL)
========================================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
}

/* =========================================================
   GALLERY ITEM — MODERN FRAME
========================================================= */

.gallery-item {
  position: relative;
  grid-column: span 4;
  aspect-ratio: 4 / 5;

  padding: 12px; /* frame thickness */
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.96),
    rgba(255,255,255,0.88)
  );

  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--primary-border);

  box-shadow:
    0 22px 55px rgba(31,41,55,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.65);

  overflow: hidden;
  cursor: pointer;

  transition:
    transform 0.5s cubic-bezier(.22,1,.36,1),
    box-shadow 0.5s cubic-bezier(.22,1,.36,1);
}

/* IMAGE */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  border-radius: var(--radius);

  transform: scale(1.01);
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
}

/* =========================================================
   CAPTION OVERLAY
========================================================= */

.gallery-item figcaption {
  position: absolute;
  inset: 12px;
  padding: 28px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  border-radius: var(--radius);

  background: linear-gradient(
    180deg,
    rgba(0,0,0,0),
    rgba(0,0,0,0.55)
  );

  color: white;
  opacity: 0;

  transition: opacity 0.4s ease;
}

.gallery-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.gallery-item span {
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

/* =========================================================
   HOVER INTERACTION
========================================================= */

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow:
    0 40px 100px rgba(31,41,55,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.85);
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item:hover figcaption {
  opacity: 1;
}

/* =========================================================
   FRAME HIGHLIGHT (PREMIUM DETAIL)
========================================================= */

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(255,255,255,0.25);
}

/* =========================================================
   GRID VARIANTS
========================================================= */

.gallery-item.wide {
  grid-column: span 8;
  aspect-ratio: 16 / 9;
}

.gallery-item.tall {
  grid-column: span 4;
  aspect-ratio: 3 / 5;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
  .gallery-page {
    padding: 130px 48px 160px;
  }

  .gallery-item {
    grid-column: span 6;
  }

  .gallery-item.wide {
    grid-column: span 12;
  }
}

@media (max-width: 700px) {
  .gallery-page {
    padding: 110px 22px 140px;
  }

  .gallery-hero {
    margin-bottom: 90px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .gallery-grid {
    gap: 26px;
  }

  .gallery-item,
  .gallery-item.wide,
  .gallery-item.tall {
    grid-column: span 12;
    aspect-ratio: 4 / 5;
    padding: 10px;
  }
}

