.gallery-body {
  background: var(--bg);
}

.gallery-main {
  padding-top: 6.5rem;
  padding-bottom: 5rem;
}

.gallery-intro {
  margin-bottom: 3rem;
  position: relative;
}

.photography-body .gallery-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 5rem;
  padding-bottom: 0;
}

.photography-body .gallery-intro {
  width: 100%;
  margin-bottom: 0.25rem;
}

.gallery-intro h1 {
  color: var(--text);
}

.gallery-intro p {
  color: var(--muted);
  max-width: 460px;
}

.gallery-back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.gallery-back-arrow:hover {
  background: rgba(15, 23, 42, 0.06);
}

.gallery-back-arrow svg {
  width: 22px;
  height: 22px;
}

/* Photography page: dark theme */

.photography-body {
  background: linear-gradient(90deg, #05060a, #1c2841 50%, #05060a);
}

.photography-body .site-header,
.photography-body .site-header.is-scrolled {
  background: transparent;
  backdrop-filter: none;
}

.photography-body .logo {
  color: #fff;
}

.photography-body .nav a {
  color: #fff;
}

.photography-body .nav-disabled {
  color: #fff;
}

.photography-body .header-actions .btn-dark {
  background: #fff;
  color: var(--bg-dark);
}

.photography-body .nav-toggle span {
  background: #fff;
}

.photography-body .gallery-back-arrow {
  color: #fff;
}

.photography-body .gallery-back-arrow:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Bento grid */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 320px;
  gap: 1rem;
}

.bento-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 14px;
  text-decoration: none;
  padding: 1.25rem;
  transition: transform 0.2s ease;
}

.bento-tile:hover {
  transform: scale(1.015);
}

.bento-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bento-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.65), transparent 60%);
  z-index: 1;
}

.bento-tile-label {
  position: relative;
  z-index: 2;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.bento-tile-pending {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg-dark);
  cursor: default;
}

.bento-tile-pending::before {
  content: none;
}

.bento-tile-pending svg {
  width: 32px;
  height: 32px;
  color: var(--muted-light);
}

.bento-tile-pending .bento-tile-label {
  color: var(--muted-light);
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
}

/* Horizontal 3D frame rail */

.frame-rail {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 0.5rem 45vw;
  overflow-x: auto;
  overflow-y: hidden;
  perspective: 1400px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.photography-body .frame-rail {
  flex: 1;
  min-height: 0;
}

.frame-rail::-webkit-scrollbar {
  display: none;
}

.frame-card {
  flex-shrink: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.frame-mat {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85vh;
  width: auto;
}

.frame-mat img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

/* Frame styles — one is randomly assigned per photo on load.
   All white, all square-cornered; only the mat width varies. */

.frame-style-1 { background: #fff; padding: 0.3rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-2 { background: #fff; padding: 0.7rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-3 { background: #fff; padding: 1.1rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-4 { background: #fff; padding: 1.5rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-5 { background: #fff; padding: 1.9rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-6 { background: #fff; padding: 2.3rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-7 { background: #fff; padding: 2.7rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-8 { background: #fff; padding: 3.1rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-9 { background: #fff; padding: 3.5rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.frame-style-10 { background: #fff; padding: 3.9rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }

@media (prefers-reduced-motion: reduce) {
  .frame-card {
    transform: none !important;
  }
}
