/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --text:      #f0ece4;
  --text-dim:  #888880;
  --accent:    #c8b99a;     /* warm parchment — pairs with Cormorant */
  --line:      rgba(255,255,255,0.08);
  --nav-h:     64px;
  --font-disp: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

#nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-disp);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}



.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  /*
    HERO BACKGROUND: Replace this with:
    background-image: url('../images/your-hero-photo.jpg');
    Pick your best wide landscape shot.
  */
  background: linear-gradient(135deg, #1a2430 0%, #0d1a14 40%, #1a1008 100%);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s var(--ease);
}

.hero:hover .hero-bg { transform: scale(1.0); }

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.2) 50%,
    rgba(10,10,10,0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { max-width: 480px; }

.hero-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.8s var(--ease) 0.3s forwards;
}

.hero-title {
  font-family: var(--font-disp);
  font-size: clamp(64px, 9vw, 120px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s var(--ease) 0.5s forwards;
}

.hero-portrait {
  position: relative;
  width: clamp(200px, 22vw, 320px);
  aspect-ratio: 3/4;
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 1s var(--ease) 0.7s forwards;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
}

.portrait-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  background: var(--bg3);
  align-items: center;
  justify-content: center;
  font-family: var(--font-disp);
  font-size: 80px;
  color: var(--text-dim);
}

/* Show placeholder if image fails */
.hero-portrait:not(:has(img[src])) .portrait-placeholder,
.hero-portrait img[src=""] ~ .portrait-placeholder { display: flex; }

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: fadeIn 1s var(--ease) 1.4s forwards;
}

.hero-scroll::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: var(--text-dim);
  margin: 0 auto 10px;
  animation: scrollLine 2s var(--ease) 1.8s infinite;
}

/* ── Gallery nav cards ──────────────────────────────────────── */
.gallery-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--bg);
}

.gallery-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
  opacity: 0;
  animation: fadeIn 0.8s var(--ease) calc(0.2s + var(--i) * 0.15s) forwards;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: brightness(0.7) grayscale(20%);
}

/* Placeholder for missing images */
.gallery-card.no-img {
  background: var(--bg3);
}

.gallery-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  z-index: 1;
  transition: opacity 0.4s;
}

.gallery-card:hover img {
  transform: scale(1.0);
  filter: brightness(0.85) grayscale(0%);
}

.gallery-card-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 28px 24px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.gallery-card-title {
  font-family: var(--font-disp);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #fff;
}

.gallery-card-arrow {
  font-size: 20px;
  color: var(--accent);
  transform: translateX(-6px);
  transition: transform 0.3s var(--ease);
}

.gallery-card:hover .gallery-card-arrow {
  transform: translateX(0);
}

/* ── Recent Work ─────────────────────────────────────────────── */
.recent {
  padding: 100px 40px;
  max-width: 1300px;
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-disp);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* CSS masonry via columns */
.masonry {
  columns: 3;
  column-gap: 12px;
}

.masonry-item {
  break-inside: avoid;
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeIn 0.7s var(--ease) calc(0.1s + var(--i) * 0.1s) forwards;
}

.masonry-item img {
  width: 100%;
  display: block;
  transform: scale(1.04);
  transition: transform 0.6s var(--ease), filter 0.4s;
  filter: brightness(0.85);
}

.masonry-item:hover img {
  transform: scale(1.0);
  filter: brightness(1.0);
}

.masonry-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}

.masonry-item:hover .masonry-label {
  opacity: 1;
  transform: translateY(0);
}

/* ── Gallery page hero ───────────────────────────────────────── */
.gallery-page body { background: var(--bg); }

.gallery-hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding-bottom: 60px;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45) grayscale(15%);
  transform: scale(1.04);
  transition: transform 8s var(--ease);
}

.gallery-hero:hover .gallery-hero-bg { transform: scale(1.0); }

.gallery-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 60%);
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 60px;
}

.gallery-hero-sub {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.gallery-hero-title {
  font-family: var(--font-disp);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ── Sub-gallery sections ────────────────────────────────────── */
.sub-gallery {
  padding: 80px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.sub-gallery + .sub-gallery {
  border-top: 1px solid var(--line);
  padding-top: 80px;
}

.sub-gallery-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.sub-gallery-header h2 {
  font-family: var(--font-disp);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text);
}

.sub-gallery-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Responsive photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.photo-item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 3/2;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.photo-item.visible {
  opacity: 1;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.6s var(--ease), filter 0.4s;
  filter: brightness(0.9);
}

.photo-item:hover img {
  transform: scale(1.0);
  filter: brightness(1.05);
}

/* If photo is portrait orientation, let it span 2 rows */
.photo-item.portrait { aspect-ratio: 2/3; grid-row: span 2; }

/* ── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5,5,5,0.97);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  transition: opacity 0.2s;
}

.lb-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 2;
}
.lb-close:hover { color: var(--text); }

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 52px;
  font-weight: 200;
  cursor: pointer;
  padding: 20px;
  transition: color 0.2s, transform 0.2s;
  z-index: 2;
  line-height: 1;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover { color: var(--text); transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { color: var(--text); transform: translateY(-50%) translateX(3px); }

.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  padding: 40px 60px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.site-footer a { transition: color 0.2s; }
.site-footer a:hover { color: var(--text); }
.footer-dot { opacity: 0.3; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  #nav { padding: 0 24px; }

  .nav-links { display: none; gap: 0; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
    gap: 20px;
  }
  .nav-toggle { display: block; }

  .hero-content { flex-direction: column; align-items: flex-start; gap: 30px; padding: 0 24px; }
  .hero-portrait { width: 160px; }

  .gallery-nav { grid-template-columns: 1fr; }
  .gallery-card { aspect-ratio: 16/9; }

  .recent { padding: 60px 24px; }
  .masonry { columns: 2; }

  .sub-gallery { padding: 60px 24px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 540px) {
  .masonry { columns: 1; }
  .hero-title { font-size: 52px; }
  .gallery-hero-content { padding: 0 24px; }
  .site-footer { padding: 32px 24px; }
}
