*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ivory: #f5f7fa;
  --charcoal: #0b0f14;
  --surface: #13161a;
  --surface2: #1a1d22;
  --mid: #8c929a;
  --muted: #52575f;
  --blue: #3da9fc;
  --blue-dark: #1a85d6;
  --border: rgba(255, 255, 255, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--charcoal);
  color: var(--ivory);
  overflow-x: hidden;
  cursor: none;
}

/* Cursor */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.25s,
    height 0.25s;
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition:
    width 0.25s,
    height 0.25s,
    opacity 0.25s;
}
body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 20px;
  height: 20px;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 54px;
  height: 54px;
  opacity: 0.25;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  transition:
    background 0.4s,
    padding 0.4s;
}
nav.scrolled {
  background: rgba(11, 15, 20, 0.93);
  backdrop-filter: blur(12px);
  padding: 1rem 4rem;
  border-bottom: 1px solid var(--border);
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--ivory);
  text-decoration: none;
}
.logo span {
  color: var(--blue);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--blue);
  transition: right 0.3s;
}
.nav-links a:hover {
  color: var(--ivory);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}
.nav-links a.active {
  color: var(--ivory);
}
.nav-cta {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--blue);
  padding: 0.65rem 1.5rem;
  transition:
    background 0.25s,
    color 0.25s;
}
.nav-cta:hover {
  background: var(--blue);
  color: var(--charcoal);
}

/* Page header */
.page-header {
  padding: 14rem 5rem 6rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "WORK";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Cormorant Garamond", serif;
  font-size: 28vw;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.025);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: -0.02em;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}
.header-left {
  max-width: 50%;
}
.eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--blue);
}
.page-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 5vw, 6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ivory);
}
.page-title em {
  font-style: italic;
  color: var(--blue);
}
.header-right {
  max-width: 38ch;
  text-align: right;
}
.header-right p {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--mid);
  letter-spacing: 0.03em;
}
.header-stats {
  display: flex;
  gap: 3rem;
  justify-content: flex-end;
  margin-top: 2rem;
}
.h-stat-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--blue);
  line-height: 1;
}
.h-stat-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Category nav */
.cat-nav {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: rgba(11, 15, 20, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-tabs {
  display: flex;
}
.cat-tab {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 1.4rem 1.8rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: none;
  transition:
    color 0.2s,
    border-color 0.2s;
  position: relative;
}
.cat-tab:hover {
  color: var(--ivory);
}
.cat-tab.active {
  color: var(--ivory);
  border-bottom-color: var(--blue);
}
.cat-count {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: rgba(61, 169, 252, 0.15);
  color: var(--blue);
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.cat-tab.active .cat-count {
  background: var(--blue);
  color: var(--charcoal);
}
.view-toggle {
  display: flex;
  gap: 0.5rem;
}
.view-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 14px;
}
.view-btn.active,
.view-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Section label */
.section-label {
  padding: 3rem 5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}
.section-label.visible {
  opacity: 1;
  transform: translateY(0);
}
.section-label-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--ivory);
}
.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-label-count {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* Grid container */
.gallery-wrap {
  padding: 0 5rem 8rem;
}

/* Masonry grid */
.masonry-grid {
  columns: 3;
  column-gap: 4px;
  transition: opacity 0.3s;
}
.masonry-grid.list-view {
  columns: 1;
}
.masonry-grid.two-col {
  columns: 2;
}

.grid-item {
  break-inside: avoid;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  cursor: none;
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s,
    transform 0.5s;
}
.grid-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.grid-item.hidden {
  display: none;
}

.grid-item .photo-bg {
  width: 100%;
  display: block;
  transition: transform 0.7s ease;
}
.grid-item:hover .photo-bg {
  transform: scale(1.04);
}

/* Photo aspect ratios via padding trick */
.ratio-landscape {
  padding-bottom: 66%;
}
.ratio-portrait {
  padding-bottom: 133%;
}
.ratio-square {
  padding-bottom: 100%;
}
.ratio-wide {
  padding-bottom: 50%;
}
.ratio-tall {
  padding-bottom: 150%;
}

.photo-bg {
  position: relative;
  overflow: hidden;
}
.photo-bg .fill {
  position: absolute;
  inset: 0;
  transition: transform 0.7s ease;
}
.grid-item:hover .fill {
  transform: scale(1.04);
}

/* Photo fill colors */
.c1 {
  background: linear-gradient(145deg, #1a1a1a, #2a2622, #1f1c18, #0f0e0c);
}
.c2 {
  background: linear-gradient(135deg, #181510, #2e251a, #3a2e20, #1a1510);
}
.c3 {
  background: linear-gradient(160deg, #141418, #1e1e24, #16161c, #101014);
}
.c4 {
  background: linear-gradient(140deg, #1a1612, #2a2018, #322618, #141210);
}
.c5 {
  background: linear-gradient(150deg, #111114, #1c1c20, #141418, #0d0d10);
}
.c6 {
  background: linear-gradient(130deg, #141210, #22201a, #2c2820, #141210);
}
.c7 {
  background: linear-gradient(155deg, #161412, #201e1a, #18161a, #0f0e0c);
}
.c8 {
  background: linear-gradient(125deg, #1c1a16, #2a2822, #1e1c18, #131210);
}
.c9 {
  background: linear-gradient(165deg, #12141a, #1c2028, #161820, #0e1018);
}
.c10 {
  background: linear-gradient(135deg, #1a1614, #281e18, #201814, #141010);
}
.c11 {
  background: linear-gradient(145deg, #101218, #181c24, #14181e, #0c1014);
}
.c12 {
  background: linear-gradient(140deg, #181614, #24201c, #1c1816, #121010);
}

/* Overlay */
.item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 20, 0);
  transition: background 0.35s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.8rem;
}
.grid-item:hover .item-overlay {
  background: rgba(11, 15, 20, 0.72);
}
.overlay-body {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s 0.05s;
}
.grid-item:hover .overlay-body {
  opacity: 1;
  transform: translateY(0);
}
.item-cat {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.4rem;
}
.item-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.item-meta {
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(245, 247, 250, 0.5);
}
.item-expand {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(11, 15, 20, 0.5);
  color: var(--ivory);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.3s,
    border-color 0.2s;
  cursor: none;
}
.grid-item:hover .item-expand {
  opacity: 1;
}
.item-expand:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Featured badge */
.badge-featured {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--blue);
  color: var(--charcoal);
  padding: 0.25rem 0.7rem;
  z-index: 2;
}

/* List view card */
.masonry-grid.list-view .grid-item {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  margin-bottom: 2px;
}
.masonry-grid.list-view .photo-bg {
  width: 280px;
  flex-shrink: 0;
  padding-bottom: 0 !important;
  height: 180px;
}
.masonry-grid.list-view .photo-bg .fill {
  position: absolute;
  inset: 0;
}
.masonry-grid.list-view .item-overlay {
  display: none;
}
.list-meta {
  display: none;
  padding: 2rem 2.5rem;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  border-right: 1px solid var(--border);
}
.masonry-grid.list-view .list-meta {
  display: flex;
}
.list-meta .item-cat {
  opacity: 1;
  margin-bottom: 0.5rem;
}
.list-meta .item-title {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}
.list-meta .item-meta {
  opacity: 1;
  color: var(--mid);
}
.list-meta .item-desc {
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--mid);
  margin-top: 1rem;
  max-width: 60ch;
}
.list-actions {
  display: none;
  padding: 2rem 2.5rem;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  min-width: 180px;
}
.masonry-grid.list-view .list-actions {
  display: flex;
}
.list-view-btn {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid rgba(61, 169, 252, 0.3);
  padding: 0.55rem 1.2rem;
  background: none;
  cursor: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.list-view-btn:hover {
  background: var(--blue);
  color: var(--charcoal);
  border-color: var(--blue);
}

/* Category sections */
.cat-section {
  margin-bottom: 0;
}
.cat-section.hidden-section {
  display: none;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 8rem 5rem;
  display: none;
}
.empty-state.visible {
  display: block;
}
.empty-state p {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(11, 15, 20, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.lightbox.open {
  display: flex;
}
.lightbox.visible {
  opacity: 1;
}
.lb-inner {
  position: relative;
  max-width: 1100px;
  width: 92%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-photo {
  height: 80vh;
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-fill {
  width: 100%;
  height: 100%;
}
.lb-fill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.lb-info {
  background: var(--surface);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--border);
}
.lb-eyebrow {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6rem;
}
.lb-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.15;
  color: var(--ivory);
  margin-bottom: 1.2rem;
}
.lb-divider {
  width: 2rem;
  height: 1px;
  background: var(--blue);
  margin-bottom: 1.5rem;
}
.lb-desc {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--mid);
  letter-spacing: 0.02em;
}
.lb-details {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lb-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.lb-detail-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  width: 5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.lb-detail-val {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--mid);
}
.lb-cta {
  margin-top: auto;
}
.lb-cta a {
  display: block;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--blue);
  padding: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}
.lb-cta a:hover {
  background: var(--blue-dark);
  color: var(--ivory);
}
.lb-close {
  position: absolute;
  top: -3rem;
  right: 0;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mid);
  background: none;
  border: none;
  cursor: none;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.lb-close:hover {
  color: var(--ivory);
}
.lb-close::before {
  content: "✕";
  font-size: 0.9rem;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 15, 20, 0.7);
  border: 1px solid var(--border);
  color: var(--mid);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.2s;
  font-size: 1rem;
  z-index: 10;
}
.lb-nav:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.lb-prev {
  left: -60px;
}
.lb-next {
  right: -60px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  background: #060810;
  padding: 3rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}
.footer-copy {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--blue);
}
.footer-social {
  display: flex;
  gap: 1.5rem;
}
.footer-social a {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--blue);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 201;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ivory);
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--charcoal);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem;
}
.mobile-menu.open {
  display: flex;
  animation: fadeUp 0.25s ease;
}
.mobile-menu a {
  font-size: 1.8rem;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--blue);
}
.mobile-menu .mobile-cta {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--blue);
  padding: 0.9rem 2.5rem;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  nav {
    padding: 1.2rem 2.5rem;
  }
  nav.scrolled {
    padding: 0.9rem 2.5rem;
  }
  .page-header {
    padding: 11rem 2.5rem 4rem;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
  }
  .header-right {
    text-align: left;
    max-width: 100%;
  }
  .header-stats {
    justify-content: flex-start;
  }
  .cat-nav {
    padding: 0 2.5rem;
  }
  .cat-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-tabs::-webkit-scrollbar {
    display: none;
  }
  .gallery-wrap {
    padding: 0 2.5rem 6rem;
  }
  .section-label {
    padding: 2.5rem 0 1rem;
  }
  .masonry-grid {
    columns: 2;
  }
  footer {
    padding: 2.5rem;
  }
}

/* Mobile — 768px */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  .cursor,
  .cursor-ring {
    display: none;
  }
  nav {
    padding: 1rem 1.5rem;
  }
  nav.scrolled {
    padding: 0.8rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .logo {
    font-size: 1.3rem;
  }

  .page-header {
    padding: 8rem 1.5rem 3rem;
  }
  .header-inner {
    flex-direction: column;
    gap: 2rem;
  }
  .header-right {
    text-align: left;
  }
  .header-stats {
    gap: 1.8rem;
    justify-content: flex-start;
  }
  .h-stat-num {
    font-size: 1.6rem;
  }
  .page-title {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .cat-nav {
    padding: 0 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .cat-tabs {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .cat-tab {
    padding: 1rem 1rem;
    font-size: 0.58rem;
  }
  .view-toggle {
    padding: 0.75rem 0;
  }

  .gallery-wrap {
    padding: 0 1.5rem 5rem;
  }
  .section-label {
    padding: 2rem 0 1rem;
  }
  .section-label-text {
    font-size: 1.1rem;
  }
  .masonry-grid {
    columns: 1;
  }
  .masonry-grid.two-col {
    columns: 1;
  }

  /* List view on mobile */
  .masonry-grid.list-view .grid-item {
    flex-direction: column;
  }
  .masonry-grid.list-view .photo-bg {
    width: 100%;
    height: 52vw;
  }
  .masonry-grid.list-view .list-meta {
    padding: 1.2rem 1.5rem;
  }
  .masonry-grid.list-view .list-actions {
    padding: 1rem 1.5rem 1.5rem;
    align-items: flex-start;
    min-width: unset;
  }

  /* Lightbox — full screen on mobile */
  .lightbox {
    align-items: center;
  }
  .lb-inner {
    width: 100%;
    max-width: 100%;
  }
  .lb-photo {
    height: 70vh;
  }
  .lb-close {
    top: 1rem;
    right: 1rem;
  }
  .lb-prev {
    left: 1rem;
  }
  .lb-next {
    right: 1rem;
    top: 50%;
  }
  footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .footer-social {
    justify-content: center;
  }
}

/* Small mobile — 480px */
@media (max-width: 480px) {
  .page-title {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }
  .cat-tab {
    padding: 0.9rem 0.75rem;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
  }
  .cat-count {
    display: none;
  }
  .h-stat-num {
    font-size: 1.4rem;
  }
  .header-stats {
    gap: 1.2rem;
  }
}
/* ═══════════════════════════════════════════════════════════════════
   APPEND TO gallery-style.css
   Paste this at the very END of the file so it overrides earlier rules.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grid images ──────────────────────────────────────────────────── */
.photo-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Fade in once the file has decoded — prevents an abrupt pop-in. */
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.7s ease;
}
.photo-bg img.loaded {
  opacity: 1;
}

/* The zoom-on-hover was previously applied to .fill; move it to the img.
   Scaling the image instead of the wrapper keeps the overlay steady. */
.grid-item:hover .photo-bg {
  transform: none;
}
.grid-item:hover .photo-bg img.loaded {
  transform: scale(1.04);
}

/* Placeholder tone behind an image that has not loaded yet, so tiles
   read as dark frames rather than flashing white on a slow connection. */
.photo-bg {
  background: linear-gradient(145deg, #14171c, #1a1e24);
}

/* ── Hover overlay (no text, just the darkening wash) ─────────────── */
.item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 20, 0);
  transition: background 0.35s;
  pointer-events: none;
}
.grid-item:hover .item-overlay {
  background: rgba(11, 15, 20, 0.42);
}

/* ── Lightbox: single centered column ─────────────────────────────── */
.lb-inner {
  position: relative;
  max-width: 1100px;
  width: 92%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-photo {
  width: 100%;
  height: 85vh;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-fill {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  /* The thumbnail shows first and is replaced by the full-size file.
     A slight blur hides the upscaling until the real image lands. */
  filter: blur(8px);
  transition: filter 0.35s ease;
}
.lb-img.full {
  filter: none;
}

.lb-close {
  position: absolute;
  top: -3rem;
  right: 0;
  z-index: 20;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Cancel the old two-column lightbox grid from the base stylesheet. */
  .lb-inner {
    grid-template-columns: none;
  }
}

@media (max-width: 768px) {
  .lightbox {
    align-items: center;
  }
  .lb-inner {
    width: 100%;
    max-width: 100%;
    grid-template-columns: none;
    grid-template-rows: none;
  }
  .lb-photo {
    height: 78vh;
  }
  .lb-close {
    top: 0.75rem;
    right: 1rem;
  }
  .lb-prev {
    left: 0.5rem;
  }
  .lb-next {
    right: 0.5rem;
    top: 50%;
  }
  /* Touch devices have no hover, so keep tiles at full brightness. */
  .grid-item:hover .item-overlay {
    background: rgba(11, 15, 20, 0);
  }
  .grid-item:hover .photo-bg img.loaded {
    transform: none;
  }
}

/* Users who prefer reduced motion get no zoom and no fade. */
@media (prefers-reduced-motion: reduce) {
  .photo-bg img,
  .lb-img {
    transition: none;
  }
  .grid-item:hover .photo-bg img.loaded {
    transform: none;
  }
}
