/* ============================================================
   PORTFOLIO — ZinMin Htet (Adem)
   Multi-page: Hub (Homepage) + Spoke (Project Detail) Styles
   Minimalist · Architectural · Gallery-focused
   ============================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette (Phase 13: Quiet Luxury - Green Accent) */
  --bg: #FAFAFA;
  /* Clean Off-White */
  --bg-dark: #1A1A1A;
  /* Dark Charcoal */
  --surface: #ffffff;
  --text: #222222;
  --text-muted: #6B6B6B;
  /* Neutral Grey */
  --accent: #222222;
  /* Deep Charcoal/Black */
  --green: #5e6e4c;
  /* Refined Sage Green — Architectural Accent */
  --bg-alt: #EDE8E2;
  /* Warm Stone */

  /* Typography */
  --font-serif: 'Nunito', sans-serif;
  --font-sans: 'Nunito', sans-serif;
  --font: var(--font-sans);

  /* Spacing */
  --section-pad: clamp(3rem, 6vw, 5rem);
  --container: 1400px;
  /* Wider for Masonry */

  /* Transitions */
  --ease: cubic-bezier(.25, .46, .45, .94);
}

html {
  /* scroll-behavior handled by Lenis smooth scroll */
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* === BRAND TYPOGRAPHY: HEADING OVERRIDES === */
h1,
h2,
h3,
h4,
.home-hero__title,
.project-hero-title,
.section-title {
  font-family: var(--font-serif);
  /* Playfair Display */
  font-weight: 400;
  /* Elegant weight */
}

/* === BRAND TYPOGRAPHY: LABEL OVERRIDES (Tech/Arch Style) === */
.nav__links a,
.project-meta-item strong,
.project-hero-category,
.premium-footer__label,
.home-hero__eyebrow,
.section-number,
.next-project__label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  /* Wide tracking */
  font-weight: 500;
  font-size: 0.75rem;
  /* Precise size */
}

/* === BRAND IDENTITY: SIGNATURE ARCHITECTURAL WATERMARK (Brand Accurate) === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;

  background-image:
    /* 1. THE VERTICAL SPINE (Adem's Pillar) */
    linear-gradient(to right,
      transparent 5%,
      var(--accent) 5%,
      var(--accent) 5.15%,
      transparent 5.15%);

  background-size: 100% 100%;
  background-attachment: fixed;
}

/* Architectural Grid Lines - REMOVED */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

/* Smooth image rendering */
img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Custom selection color */
::selection {
  background: var(--accent);
  color: #fff;
}

::-moz-selection {
  background: var(--accent);
  color: #fff;
}

.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}


/* ============================================================
   NAVIGATION (Shared — Homepage & Detail)
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5%;
  z-index: 1000;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}

.nav--scrolled {
  background: rgba(245, 243, 240, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav__logo-img {
  height: 54px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
  /* Make white background transparent */
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .35s var(--ease);
}

.nav__links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.nav__toggle--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle--active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.section-number {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}


/* ============================================================
   HOMEPAGE — HERO (Compact)
   ============================================================ */
.home-hero {
  display: flex;
  align-items: flex-end;
  min-height: 55vh;
  padding: 5rem 5% 3rem;
  background: linear-gradient(160deg, var(--bg) 0%, #ece8e3 50%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}

/* Geometric green accent — hard clean diagonal cut via clip-path,
   coordinate space matched to body::before for exact beam alignment */
.home-hero::before {
  content: '';
  position: absolute;
  top: -94px;
  /* lifts origin to viewport (0,0) — same as body::before */
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  /* Solid fill — NO gradient fade at the edge, shape is 100% defined
     by clip-path so the cut is razor sharp, not blurry */
  background: linear-gradient(115deg,
      rgba(94, 110, 76, 0.24) 40%,
      rgba(94, 110, 76, 0.28) 55%,
      rgba(94, 110, 76, 0.22) 75%,
      rgba(94, 110, 76, 0.08) 92%);
  /* +2.5% shift right ≈ 1cm at standard viewport width */
  clip-path: polygon(52.5% 0%, 100% 0%, 100% 100%, 27.5% 100%);
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 80px;
  height: 2px;
  background: var(--green);
}

.home-hero__inner {
  max-width: var(--container);
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 1;
  border-left: 2px solid var(--green);
  padding-left: 2rem;
}

.home-hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}

.home-hero__title {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text);
  /* Forced DARK text for visibility */
}

.home-hero__title span {
  font-weight: 300;
  color: var(--green);
}

.home-hero__philosophy {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 520px;
}

/* ============================================================
   HOMEPAGE — PROJECT GALLERY GRID
   ============================================================ */
.gallery {
  padding: var(--section-pad) 0;
}

.gallery__header {
  margin-bottom: 3rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 3rem;
  /* More breathing room */
}

@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Strict 3-Column Grid */
    gap: 1.5rem;
    /* Precise Geometry */
    align-items: stretch;
    /* FIX: Force equal height for Row 1 */
  }

  /* === STABLE UNIFORM GRID (THE FIX) === */

  /* Reset Staggers */
  .gallery-card {
    margin-top: 0 !important;
    height: 100%;
    /* Ensure card fills grid cell */
    display: flex;
    flex-direction: column;
  }

  .gallery-card__image-wrap {
    flex-grow: 1;
    /* Ensure image area fills card */
    height: 100%;
    position: relative;
  }

  /* Item 1: Anchor Feature (Landscape 2-Col) */
  .gallery-card:nth-child(1) {
    grid-column: span 2;
  }

  .gallery-card:nth-child(1) .gallery-card__image-wrap img {
    aspect-ratio: 16/9 !important;
    /* Defines the Row Height */
    height: 100%;
    object-fit: cover;
  }

  /* Item 2: Wise Watch (Standard Portrait -> Stretched) */
  .gallery-card:nth-child(2) {
    grid-column: span 1;
  }

  .gallery-card:nth-child(2) .gallery-card__image-wrap img {
    aspect-ratio: unset !important;
    /* Remove constraints */
    height: 100% !important;
    /* Force fill to match Item 1 */
    object-fit: cover;
  }

  /* Row 2+: Uniformity */
  .gallery-card:nth-child(n+3) {
    grid-column: span 1;
  }

  /* PERFECT ALIGNMENT: All 4:3 for standardized rows below */
  .gallery-card:nth-child(n+3) .gallery-card__image-wrap img {
    aspect-ratio: 4/3 !important;
    height: 100%;
    object-fit: cover;
  }

  /* Interactions */
  .gallery-card:hover .gallery-card__image-wrap img {
    transform: scale(1.02);
    filter: brightness(1.05);
  }
}

/* Gallery Card — clickable, minimal */
.gallery-card {
  display: block;
  position: relative;
  /* Fix for absolute children positioning */
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.gallery-card__image-wrap {
  position: relative;
  overflow: hidden;
}

.gallery-card__image-wrap img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  will-change: transform;
  /* GPU compositing for parallax */
  /* transition handled by GSAP — no CSS transition on transform */
}

/* Hover scale is handled by GSAP; CSS fallback for no-JS */
.gallery-card:hover .gallery-card__image-wrap img {
  transform: scale(1.05);
}

/* ============================================================
   PHASE 5: STRUCTURED MINIMALISM (PROJECT LAYOUT)
   ============================================================ */
.project-layout {
  padding: 4rem 0;
  /* Huge top padding on Desktop */
  display: flex;
  /* Mobile: Stack */
  flex-direction: column;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .project-layout {
    padding: 6rem 0 4rem;
    /* Reduced top padding for mobile */
    gap: 2.5rem;
    /* Tighter spacing */
  }
}

.project-info-col {
  /* Mobile: Natural flow */
  margin-bottom: 2rem;
}

.project-gallery-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  width: 100%;
}

.project-gallery-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  /* Consistent grid tiles */
  display: block;
  border-radius: 2px;
}

/* Make the first image (Hero) span full width */
.project-gallery-col img:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

@media (max-width: 768px) {
  .project-gallery-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-gallery-col img:first-child {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }
}

/* Desktop: split screen */
/* ============================================================
   PHASE 8: UNIVERSAL LAYOUT (Hero Top / Concept Bottom)
   ============================================================ */
.project-layout {
  padding: 0 0 4rem;
  /* Remove top padding, handled by nav/hero */
  /* Block layout to allow stacking of Hero -> Grid -> Concept */
}

.project-hero-top {
  width: 100%;
  margin-bottom: 4rem;
  overflow: hidden;
  border-radius: 4px;
}

.project-hero-top img {
  width: 100%;
  height: clamp(400px, 60vh, 800px);
  /* Impactful height */
  object-fit: cover;
  display: block;
}

/* The Middle Section: Sticky Meta + Gallery */
.project-split-row {
  display: grid;
  grid-template-columns: 350px 1fr;
  align-items: start;
  gap: 3rem;
}

.project-info-col {
  position: sticky;
  top: 4rem;
  height: fit-content;
}

/* The Bottom Section: Concept Text */
.project-concept-bottom {
  grid-column: 1 / -1;
  /* If inside grid */
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.project-concept-inner {
  max-width: 680px;
  /* Optimal reading width */
  margin: 0;
  /* Align left or center? User likes minimal. Let's keep align left or matching grid */
}

/* Mobile Adaptation */
@media (max-width: 768px) {
  .project-split-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Let specific elements handle gaps */
  }

  /* CRITICAL FIX: Ensure info column flows naturally below hero */
  .project-info-col {
    position: relative !important;
    top: auto !important;
    margin-top: 0;
    margin-bottom: 3rem;
    z-index: 10;
    /* Ensure text is above if there is accidental overlap */
  }

  .project-hero-top {
    margin-bottom: 2rem;
    border-radius: 0;
    /* Full width on mobile gets negative margins relative to container */
    margin-left: -5vw;
    width: 100vw;
    position: relative;
    z-index: 1;
  }

  .project-hero-top img {
    height: 50vh;
    width: 100%;
    object-fit: cover;
  }

  .project-concept-bottom {
    margin-top: 4rem;
    padding-top: 3rem;
  }
}

/* Typography Overrides for Clean Layout */
.project-title-clean {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  /* Reduced from 2.5/4rem */
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .project-title-clean {
    margin-bottom: 1rem;
    font-size: 2rem;
    /* Reduced from 2.5rem */
  }

  .project-concept-clean {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

.project-meta-clean {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1.5rem;
}

@media (max-width: 768px) {
  .project-meta-clean {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    margin-bottom: 2rem;
  }
}

.project-meta-item strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.project-concept-clean {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 35ch;
  /* Optimal reading width */
}

/* Hidden legacy sections removed for cleaner stylesheet */

/* New Local Back Link */
.back-link-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}

@media (max-width: 768px) {
  .back-link-clean {
    margin-bottom: 1.5rem;
    /* Tighter spacing on mobile */
  }
}

.back-link-clean:hover {
  opacity: 1;
  color: var(--accent);
}

.gallery-card__body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 2;
  transform: translateY(10px);
  transition: transform 0.3s var(--ease);
}

.gallery-card:hover .gallery-card__body {
  transform: translateY(0);
}

.gallery-card__title {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.gallery-card__category {
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

/* Hide original overlay text since we moved it */
.gallery-card__overlay {
  display: none;
}

.gallery-card__category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.gallery-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Make first card span 2 cols on desktop for variety */
.gallery-card--featured {
  grid-column: span 2;
}

.gallery-card--featured .gallery-card__image-wrap img {
  aspect-ratio: 21 / 10;
}


/* ============================================================
   HOMEPAGE — ABOUT (Compact)
   ============================================================ */
.home-about {
  padding: var(--section-pad) 0;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.home-about__header {
  margin-bottom: 3rem;
}

.home-about__content {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.home-about__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.home-about__text {
  color: var(--text-muted);
  max-width: 540px;
}

.home-about__photo-wrap {
  flex-shrink: 0;
  width: 320px;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.home-about__photo-wrap:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
}

.home-about__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}


/* ============================================================
   HOMEPAGE — CONTACT
   ============================================================ */
.contact {
  padding: var(--section-pad) 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.contact__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 400;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__link {
  display: flex;
  flex-direction: column;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}

.contact__link:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-2px);
}

.contact__link-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.contact__link-value {
  font-size: 1rem;
  font-weight: 500;
}

.contact__link--download {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.contact__link--download .contact__link-label {
  color: rgba(255, 255, 255, 0.7);
}

.contact__link--download .contact__link-value {
  color: #fff;
}

.contact__link--download:hover {
  opacity: 0.88;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-2px);
}


/* ============================================================
   FOOTER (Shared)
   ============================================================ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__brand {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer__logo-img {
  height: 40px;
  width: auto;
  opacity: 0.7;
}

.footer__copy {
  font-size: 0.76rem;
  color: var(--text-muted);
}


/* ============================================================
   PROJECT DETAIL — BACK BAR
   ============================================================ */
.back-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  z-index: 999;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}

.back-bar--scrolled {
  background: rgba(245, 243, 240, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.back-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .3s var(--ease);
}

.back-bar__link:hover {
  color: var(--accent);
}

.back-bar__link svg {
  width: 18px;
  height: 18px;
  transition: transform .3s var(--ease);
}

.back-bar__link:hover svg {
  transform: translateX(-3px);
}

.back-bar__logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.back-bar__logo-img {
  height: 44px;
  width: auto;
  display: block;
}


/* ============================================================
   PROJECT DETAIL — CINEMATIC HERO
   ============================================================ */
.project-hero {
  position: relative;
  width: 100%;
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.project-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
      rgba(20, 18, 16, 0.7) 0%,
      rgba(20, 18, 16, 0.15) 50%,
      transparent 100%);
  z-index: 1;
}

.project-hero__content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 0 3.5rem;
}

.project-hero__category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.75rem;
}

.project-hero__title,
.project-hero-title {
  /* Added support for about.html class */
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  /* Forced DARK for visibility */
  margin-bottom: 1rem;
  max-width: 700px;
}

.project-hero__desc {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}


/* ============================================================
   PROJECT DETAIL — INFO BAR
   ============================================================ */
.project-info {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.project-info__row {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.project-info__item {
  display: flex;
  flex-direction: column;
}

.project-info__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.project-info__value {
  font-size: 0.95rem;
  font-weight: 500;
}


/* ============================================================
   PROJECT DETAIL — MAGAZINE GALLERY
   ============================================================ */
.project-gallery {
  padding: var(--section-pad) 0;
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-gallery__item {
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.project-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform .5s var(--ease);
}

.project-gallery__item:hover img {
  transform: scale(1.03);
}

/* First image spans 2 columns — magazine style */
.project-gallery__item--hero {
  grid-column: span 2;
}

.project-gallery__item--hero img {
  aspect-ratio: 21 / 10;
}


/* ============================================================
   PROJECT DETAIL — CONCEPT TEXT
   ============================================================ */
.project-concept {
  padding: 0 0 var(--section-pad);
}

.project-concept__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.project-concept__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-concept__text {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.85;
  color: var(--text-muted);
  max-width: 580px;
}


/* ============================================================
   PROJECT DETAIL — NEXT PROJECT NAV
   ============================================================ */
.next-project {
  display: flex;
  width: 100%;
  margin-top: 4rem;
  display: flex;
  justify-content: flex-end;
  /* Place in right */
  padding-bottom: 4rem;
}

.next-project__link {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 3rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  /* Perfect box design */
  transition: all 0.5s var(--ease);
  background: var(--bg);
  min-width: 300px;
}

.next-project__link:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.next-project__text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.next-project__label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  transition: color 0.5s;
}

.next-project__link:hover .next-project__label {
  color: rgba(255, 255, 255, 0.6);
}

.next-project__title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  /* Not too big */
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.next-project__arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s var(--ease);
}

.next-project__link:hover .next-project__arrow {
  transform: translateX(5px);
  background: none;
  /* No circle bg change */
}

.next-project__arrow svg {
  width: 20px;
  height: 20px;
  color: var(--text);
  transition: color 0.5s;
}

.next-project__link:hover .next-project__arrow svg {
  color: var(--bg);
}


/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 8, 6, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

.lightbox--open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
  transform: scale(0.94);
  transition: transform .4s var(--ease);
}

.lightbox--open .lightbox__img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .3s var(--ease);
}

.lightbox__close:hover {
  border-color: #fff;
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
  color: #fff;
}


/* .fade-in handled purely by JS (GSAP ScrollTrigger) - no CSS needed */


/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet — 768px ---- */
@media (max-width: 768px) {

  /* --- Homepage Gallery Grid --- */
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-card--featured {
    grid-column: span 2;
  }

  /* --- Magazine Gallery → Single Column --- */
  .project-gallery__grid {
    grid-template-columns: 1fr;
  }

  .project-gallery__item--hero {
    grid-column: span 1;
  }

  .project-gallery__item--hero img {
    aspect-ratio: 16 / 10;
  }

  /* --- Layout: About / Contact / Concept → Stack --- */
  .home-about__content,
  .contact__grid,
  .project-concept__inner {
    flex-direction: column;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-about__photo-wrap {
    width: 240px;
    height: 300px;
  }

  /* --- Cinematic Hero — Tablet --- */
  .project-hero {
    min-height: 55vh;
  }

  .project-hero__image {
    object-position: center 40%;
  }

  .project-hero__content {
    padding: 0 0 2.5rem;
  }

  /* --- Adaptive Typography — Tablet --- */
  .section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  }

  .project-hero__title {
    font-size: clamp(2rem, 5.5vw, 3rem);
  }

  .project-concept__text {
    font-size: clamp(0.95rem, 1.4vw, 1.08rem);
    max-width: 100%;
  }

  .gallery-card__title {
    font-size: clamp(0.92rem, 2.5vw, 1.05rem);
  }

  /* --- Touch-Friendly Navigation — Tablet --- */
  .back-bar__link {
    padding: 12px 16px;
    min-height: 44px;
  }

  .next-project__link {
    padding: 2.5rem 0;
  }

  .contact__link {
    padding: 1.4rem 1.6rem;
  }

  /* --- Mobile Nav: Hamburger Menu --- */
  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 72%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: right .4s var(--ease);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
  }

  .nav__links--open {
    right: 0;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links a {
    font-size: 1rem;
    padding: 14px 0;
  }

  /* --- Project Info — Wrap nicely --- */
  .project-info__row {
    gap: 1.5rem;
  }
}


/* ---- Phone — 480px ---- */
@media (max-width: 480px) {

  /* --- Homepage Gallery → Single Column --- */
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery-card--featured {
    grid-column: span 1;
  }

  .gallery-card--featured .gallery-card__image-wrap img {
    aspect-ratio: 4 / 3;
  }

  /* --- Cinematic Hero — Phone --- */
  .project-hero {
    min-height: 40vh;
  }

  .project-hero__image {
    object-position: center 35%;
  }

  .project-hero__content {
    padding: 0 0 2rem;
  }

  .project-hero__title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .project-hero__desc {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
  }

  .project-hero__category {
    font-size: 0.65rem;
  }

  /* --- Homepage Hero — Phone --- */
  .home-hero {
    min-height: 45vh;
    padding: 6rem 5% 3rem;
  }

  .home-hero__title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .home-hero__philosophy {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
  }

  .home-hero__eyebrow {
    font-size: 0.7rem;
  }

  /* --- Adaptive Typography — Phone --- */
  .section-title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .gallery-card__title {
    font-size: clamp(0.9rem, 3vw, 1rem);
  }

  .gallery-card__category {
    font-size: 0.6rem;
  }

  .project-concept__text {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .project-concept__label {
    font-size: 0.68rem;
  }

  .home-about__lead {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  }

  .contact__lead {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  }

  /* --- About Section — Phone --- */
  .home-about__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .home-about__photo-wrap {
    width: 200px;
    height: 260px;
  }

  .home-about__text {
    max-width: 100%;
  }

  /* --- Touch-Friendly Navigation — Phone --- */
  .back-bar {
    padding: 0.75rem 5%;
  }

  .back-bar__link {
    padding: 14px 18px;
    font-size: 0.75rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
  }

  .back-bar__logo-img {
    height: 36px;
  }

  .next-project__link {
    padding: 2rem 0;
  }

  .next-project__title {
    font-size: 1.15rem;
  }

  .next-project__label {
    font-size: 0.68rem;
  }

  .next-project__arrow {
    width: 44px;
    height: 44px;
  }

  .contact__link {
    padding: 1.5rem 1.6rem;
  }

  .contact__link-value {
    font-size: 0.92rem;
    word-break: break-word;
  }

  /* --- Contact Grid — Phone --- */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* --- Footer — Phone --- */
  .footer__inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .footer__logo-img {
    height: 32px;
  }

  /* --- Lightbox — Phone --- */
  .lightbox__img {
    max-width: 96%;
    max-height: 80vh;
  }

  .lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }

  /* --- Nav links touch targets — Phone --- */
  .nav__links a {
    font-size: 1.1rem;
    padding: 16px 0;
  }

  .nav__links {
    gap: 0.5rem;
  }
}


/* ============================================================
   PHASE 2: LUXURY POLISH (Preloader, Transitions, Reveals)
   ============================================================ */

/* ============================================================
   WHITE LUXURY PRELOADER (Added per User Request)
   ============================================================ */
@keyframes preloaderPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.98);
  }
}

@keyframes safetyHide {
  to {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

/* ============================================================
   NEW LOADING PAGE
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__logo {
  width: 120px;
  height: auto;
  mix-blend-mode: multiply;
  animation: pulseLogo 2s infinite ease-in-out;
}

.preloader__text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 500;
  animation: fadeInText 1s ease-out;
}

@keyframes pulseLogo {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

@keyframes fadeInText {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Transition Overlay */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #1a1a1a;
  z-index: 9998;
  transform: translateY(100%);
  pointer-events: none;
}

/* ============================================================
   PHASE 3: PREMIUM FOOTER — Business Card Layout
   ============================================================ */
.premium-footer {
  background-color: #0b1a13;
  /* Luxury dark green */
  color: #fff;
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 1;
  clip-path: inset(0);
}

.premium-footer::before,
.premium-footer::after {
  display: none;
}

/* Slash wrapper */
.footer-slash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* The actual / slash line — rotated white bar */
/* The actual / slash line — rotated white bar */
.footer-slash__line {
  position: absolute;
  left: 45%;
  /* Moved SAFE RIGHT (Clear of text) */
  top: 50%;
  width: 60px;
  /* Massive Beam */
  height: 300%;
  background-color: rgba(138, 185, 155, 0.15);
  /* Green accent slash */
  transform: translate(-50%, -50%) rotate(20deg);
  transform-origin: center center;
}

/* Two-column layout: CTA left | contacts right */
.premium-footer__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: 4rem;
}

.premium-footer__content::before {
  display: none;
}

/* Left — big serif CTA heading */
.premium-footer__text {
  position: relative;
  z-index: 1;
  padding-right: 4rem;
}

.premium-footer__cta {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.1;
  font-weight: 400;
  color: #fff;
  margin: 0;
  margin-top: -3rem;
  /* Pull Up Higher */
  text-align: left;
  /* Force Left Alignment */
  width: 100%;
  display: block;
}

/* Right — stacked contact details */
.premium-footer__deco {
  position: relative;
  z-index: 1;
  padding-left: 4rem;
}

.premium-footer__details {
  display: flex;
  flex-direction: row;
  /* Horizontal Layout */
  flex-wrap: wrap;
  gap: 4rem;
  /* Wide spacing between groups */
  justify-content: flex-start;
  /* Align left with the grid column */
  margin-top: 2rem;
}

.premium-footer__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(138, 185, 155, 0.6);
  /* Green accent tint */
  margin-bottom: 0.4rem;
}

.premium-footer__link {
  display: block;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s;
}

.premium-footer__link:hover {
  opacity: 1;
  color: #8ab99b;
  /* Green highlight on hover */
  text-decoration: none;
}

.premium-footer__btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: all 0.3s;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
}

.premium-footer__btn:hover {
  background: #fff;
  color: var(--bg-dark);
}

/* Bottom copyright bar */
.premium-footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(138, 185, 155, 0.15);
  /* Green-tinted border */
  font-size: 0.8rem;
  color: rgba(138, 185, 155, 0.5);
  /* Green-tinted text */
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
}

/* Split Text Char */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
}

/* Curtain Reveal Helper (Optional) */
.reveal-curtain-wrap {
  position: relative;
  overflow: hidden;
}

/* ============================================================
   LENIS SMOOTH SCROLL (Recommended Styles)
   ============================================================ */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ============================================================
   PHASE 10: SUPPORTED DESIGN (Hero Overlay + Meta Strip)
   ============================================================ */

/* 1. HERO SECTION WITH OVERLAY (REFINED SCALE) */
.project-hero-container {
  position: relative;
  width: 100%;
  height: 65vh;
  /* Reduced from 75vh for better framing */
  margin-bottom: 0;
  overflow: hidden;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  /* Moved UP to show building */
  /* Crucial: Show the building/base */
  display: block;
}

/* Desktop Overlay: Text sits ON image */
.project-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 5%;
  /* Tighter padding */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
  color: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-hero-category {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.project-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  /* Refined size: not too large */
  line-height: 1;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.project-hero-description {
  max-width: 600px;
  font-size: 1rem;
  /* Standard readable size */
  line-height: 1.6;
  /* Tighter line height */
  opacity: 0.95;
  font-weight: 300;
  color: #f0f0f0;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Mobile: Stacked Layout (Text BELOW image, no overlap) */
@media (max-width: 768px) {
  .project-hero-container {
    height: auto;
    /* Natural height */
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
  }

  .project-hero-img {
    height: 50vh;
    /* Half screen height */
    width: 100%;
  }

  .project-hero-overlay {
    position: relative !important;
    /* Force static flow */
    background: var(--bg);
    /* Match page bg */
    color: var(--text);
    /* Dark text */
    padding: 2rem 5%;
    height: auto;
    justify-content: flex-start;
  }

  .project-hero-category {
    color: var(--accent);
    /* Gold accent on light bg */
  }

  .project-hero-title {
    font-size: 2.5rem;
    /* Readable mobile size */
    color: var(--text);
  }

  .project-hero-description {
    color: var(--text-muted);
    font-size: 1rem;
  }
}

/* 2. META STRIP (Horizontal Bar) */
.project-meta-strip {
  background: var(--surface);
  padding: 2.5rem 5%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
  /* Reduced from 5rem */
  transition: background 0.3s ease;
}

.project-meta-strip:hover {
  background: #fafafa;
  /* Subtle highlight on hover */
}

.project-meta-item {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 1rem;
  border-left: 1px solid var(--accent);
  /* Brand Green Border */
  /* Editorial vertical lines */
}

.project-meta-item strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  /* Gold labels */
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.project-meta-item span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-serif);
  /* Serif for elegance */
}

@media (max-width: 768px) {
  .project-meta-strip {
    grid-template-columns: repeat(2, 1fr);
    /* 2x2 Grid */
    gap: 2rem 1.5rem;
    padding: 2.5rem 5%;
    margin-bottom: 3rem;
  }

  .project-meta-item {
    border-left: none;
    /* Remove lines on mobile for cleanliness */
    padding-left: 0;
  }
}

/* 3. EDITORIAL CONCEPT (PROPER LAYOUT) */
.project-concept-editorial {
  padding: 0 5% 4rem;
  /* Bottom padding to separate from gallery */
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* 1/3 Title, 2/3 Text */
  gap: 4rem;
  align-items: start;
}

.project-concept-editorial .concept-title {
  margin-bottom: 0;
  font-size: 0.9rem;
  opacity: 0.8;
  /* Looks like a sidebar label */
  border-bottom: none;
  display: block;
}

.project-concept-editorial .project-concept-clean {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  font-weight: 300;
  max-width: 800px;
}

@media (max-width: 768px) {
  .project-concept-editorial {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 3rem;
  }
}

/* 4. GALLERY & CONCEPT (Full Width) */
.project-gallery-full {
  padding: 0 5%;
  max-width: var(--container);
  margin: 0 auto 8rem;
  /* More breathing room */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  /* Wider gaps */
}

.project-gallery-full img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
  /* Subtle zoom on hover maybe? */
}

/* .project-gallery-full img:hover removed (empty) */

.project-gallery-full img.full-width {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .project-gallery-full {
    grid-template-columns: 1fr;
    /* Stack on mobile */
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding: 0 5%;
    /* Restore padding */
  }

  .project-gallery-full img.full-width {
    grid-column: span 1;
  }
}

/* Specific styling for Design Concept Header */
.concept-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2rem;
  display: inline-block;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  /* Gold underline */
  padding-bottom: 0.5rem;
}

/* Force Hide Phase 8 layouts if they somehow persist */
.project-split-row,
.project-info-col,
.project-gallery-col,
.project-hero-top {
  display: none !important;
}

/* ============================================================
   PHASE 13 & 14: LUXURY REDESIGN (Masonry & Tools)
   ============================================================ */

/* 1. STABLE ARCHITECTURAL GRID (THE FINAL FIX) */
.project-gallery-structured {
  display: grid;
  /* STRICT GRID */
  grid-template-columns: repeat(3, 1fr);
  /* 3 Columns */
  gap: 1.5rem;
  /* Consistent Gap */
  padding: 0 5% 4rem;
  /* Top padding removed (was 4rem) */
  max-width: 1800px;
  /* Increased from 1400px for wider screens */
  margin: 0 auto;
}

/* The Item Card */
.structured-item {
  margin-bottom: 0;
  /* Grid gap handles spacing */
  position: relative;
  overflow: hidden;
  border-radius: 0;
  /* Swiss/Stable */
  background: var(--surface);
  width: 100%;
}

/* Image Logic: UNIFORM HEIGHT */
.structured-item img {
  width: 100%;
  height: 100%;
  /* Fill container */
  aspect-ratio: 4/3 !important;
  /* ENFORCE STABILITY */
  object-fit: cover;
  /* Crop to fit */
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
}

/* Interactions */
.structured-item:hover img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Responsive Columns */
@media (max-width: 1024px) {
  .project-gallery-structured {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .project-gallery-structured {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Cleanup */
.gallery-item-pair,
.gallery-item-full {
  display: contents;
}

@media (max-width: 991px) {
  .project-gallery-structured {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  .gallery-item-pair {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

/* 2. MASONRY GALLERY */
.project-gallery-masonry {
  column-count: 2;
  column-gap: 2rem;
  padding: 0 5%;
  max-width: var(--container);
  margin: 2rem auto 4rem;
}

.project-gallery-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.project-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s var(--ease);
}

.project-gallery-item:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .project-gallery-masonry {
    column-count: 1;
    column-gap: 0;
  }
}

/* 3. BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  transition: transform 0.3s ease;
}

.back-to-top:hover {
  border-color: var(--accent);
}

.back-to-top:hover svg {
  stroke: var(--accent);
  transform: translateY(-3px);
}

/* 3. FIXED BACK NAVIGATION */
.back-link-fixed {
  position: fixed;
  top: 2rem;
  left: 5%;
  z-index: 1000;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  transition: all 0.3s var(--ease);
}

.back-link-fixed:hover {
  background: #fff;
  color: #000;
  transform: translateX(-5px);
}

.back-link-fixed svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.nav {
  background: rgba(249, 249, 249, 0.9) !important;
  backdrop-filter: blur(10px);
}

/* PHASE 28 REVERT FIX: Standardize Project Hero Container */
.project-hero-container {
  position: relative;
  width: 100%;
  height: 40vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.project-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.project-hero-overlay {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
  padding-bottom: 3.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  width: 100%;
}

/* ============================================================
   EMERGENCY LAYOUT FORCE FIX (Step 29)
   ============================================================ */
.project-hero-container {
  position: relative !important;
  width: 100% !important;
  height: 40vh !important;
  min-height: 40vh !important;
  display: flex !important;
  align-items: flex-end !important;
  overflow: hidden !important;
  margin-bottom: 0 !important;
  background: #000 !important;
  /* Fail-safe bg */
}

.project-hero-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  z-index: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.project-hero-overlay {
  position: relative !important;
  width: 90% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding-bottom: 3.5rem !important;
  z-index: 2 !important;
  text-align: left !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent) !important;
}

.project-hero-title {
  color: #fff !important;
  font-family: 'Playfair Display', serif !important;
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  line-height: 1.1 !important;
  margin-bottom: 1rem !important;
  display: block !important;
}

.project-hero-category {
  color: #D4AF37 !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.2em !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

.project-hero-description {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 1rem !important;
  max-width: 600px !important;
  line-height: 1.6 !important;
}

/* ============================================================
   FOOTER RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .premium-footer__content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .premium-footer__content::before {
    display: none;
  }

  .premium-footer__text {
    padding-right: 0;
  }

  .premium-footer__deco {
    padding-left: 0;
  }

  .premium-footer__cta {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .premium-footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}