*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ivory: #f7f4ef;
  --cream: #ede8e0;
  --sand:  #d6cfc4;
  --clay:  #b89a7c;
  --bark:  #3c2f23;
  --ink:   #1a1410;
  --smoke: #8a847c;
}
  a { text-decoration: none; color: inherit; }
html { scroll-behavior: smooth; }
body {
  background: var(--ivory);
  color: var(--ink);
  font-family: 'League Spartan', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 3px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247,244,239,0.92);
  backdrop-filter: blur(8px);
}
.nav-logo img { height: 140px; margin-left: 19px; margin-top: 1px; }
.nav-back {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--smoke);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color .25s;
}
.nav-back:hover { color: var(--clay); }
.nav-back::before {
  content: '←';
  font-size: 14px;
}

/* Hero */
.project-hero {
  height: 90vh;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}
.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}
.project-hero.loaded img { transform: scale(1); }
.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,16,.6) 0%, transparent 60%);
}
.project-hero-info {
  position: absolute;
  bottom: 60px;
  left: 52px;
  right: 52px;
  color: var(--ivory);
}
.project-category {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 12px;
}
.project-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -.01em;
}
.project-meta {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(247,244,239,.5);
}

/* Project info */
.project-info {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding: 100px 52px;
  background: var(--ivory);
}
.project-details { }
.detail-item {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--sand);
}
.detail-item:last-child { border-bottom: none; }
.detail-label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 8px;
}
.detail-value {
  font-size: 15px;
  color: var(--ink);
}
.project-description p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--smoke);
  margin-bottom: 20px;
  max-width: 640px;
}
.project-description p strong {
  font-weight: 400;
  color: var(--bark);
}

/* Gallery */
.gallery {
  padding: 0 52px 100px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.gallery-grid .full-width {
  grid-column: 1 / -1;
}
.gallery-grid .half {
  grid-column: span 1;
}
.gallery-grid .two-thirds {
  grid-column: span 2;
}
.gallery-item {
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.25,.1,.25,1);
}
.gallery-item:hover img { transform: scale(1.03); }

/* Fixed heights per row */
.row-tall { height: 600px; }
.row-medium { height: 480px; }
.row-short { height: 360px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26,20,16,.96);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-height: 90vh;
  max-width: 88vw;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 32px; right: 40px;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sand);
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(247,244,239,.1);
  border: none;
  color: var(--ivory);
  font-size: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(247,244,239,.2); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* Next project */
.next-project {
  background: var(--bark);
  padding: 80px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.next-label {
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 12px;
}
.next-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 42px;
  color: var(--ivory);
}
.next-arrow {
  font-size: 32px;
  color: var(--clay);
  text-decoration: none;
  transition: transform .3s;
  display: block;
}
.next-arrow:hover { transform: translateX(12px); }

/* Footer */
footer {
  background: var(--ink);
  padding: 32px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  color: var(--clay);
}
.footer-copy {
  font-size: 11px;
  color: rgba(245,240,232,.3);
  letter-spacing: .1em;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-logo img { height: 110px; margin-left: -10px; margin-top: 9px; }
  .project-hero-info { left: 24px; right: 24px; bottom: 40px; }
  .project-info { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
  .gallery { padding: 0 16px 60px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
  .gallery-grid .full-width,
  .gallery-grid .two-thirds,
  .gallery-grid .half { grid-column: 1; }
  .row-tall, .row-medium, .row-short { height: 280px; }
  .next-project { padding: 60px 24px; }
  footer { flex-direction: column; gap: 16px; text-align: center; padding: 32px 24px; }
}

/* ---- 4-column gallery variant (executive-office, office-kitchen, podcast-studio, kid-bedroom) ---- */
body.gallery-4col .gallery-grid { grid-template-columns: repeat(4, 1fr); }
body.gallery-4col .gallery-grid .span-two { grid-column: span 2; }
body.gallery-4col .gallery-item.row-tall { grid-column: span 2; height: 500px; }
body.gallery-4col .gallery-item.row-medium { grid-column: span 1; height: 350px; }
@media (max-width: 768px) {
  body.gallery-4col .gallery-grid { grid-template-columns: 1fr; }
  body.gallery-4col .gallery-item.row-tall, body.gallery-4col .gallery-item.row-medium { grid-column: auto; }
}
a.grid-item, a.next-project { color: inherit; text-decoration: none; display: block; }
