@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f7f7f5;
  color: #111;
}

/* NAV */

.nav {
  padding: 60px 140px;
}

.logo {
  font-weight: 600;
  letter-spacing: 4px;
}

/* =========================
   HOMEPAGE GALLERY
========================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 90px;
  padding: 0 180px 180px 180px;
}

.project.featured {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 80px auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(0.95);
  transition: transform 0.6s ease, box-shadow 0.4s ease;
}

.project.featured:hover img {
  transform: scale(1);
  box-shadow: 0 25px 60px rgba(0,0,0,0.08);
}

.gallery-description {
  font-family: 'Inter', sans-serif;
  grid-column: 1 / -1;
  text-align: center;
  max-width: 800px;
  margin: 60px auto;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: #333;
  opacity: 0.85;
}

.project {
  position: relative;
  aspect-ratio: 10 / 5;
  overflow: hidden;
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, box-shadow 0.4s ease;
  transform: scale(0.8);
}

.project:hover img,
.project img:hover {
  transform: scale(1);
}

.image-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid video:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

/* =========================
   PROJECT PAGE GRID
========================= */

.featured-image {
  grid-column: 1 / -1;
  width: 80%;
  max-width: 1200px;
  margin: 80px auto;
  display: block;
  height: auto;
  object-fit: contain;
}

.project-page {
  padding: 80px 180px 160px 180px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 70px;
}

.image-grid img {
  width: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.lightbox img.zoomed {
  transform: scale(2);
  cursor: zoom-out;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: white;
  cursor: pointer;
  padding: 20px;
  user-select: none;
  transition: opacity 0.2s ease;
}

.lightbox-arrow:hover {
  opacity: 0.7;
}

.lightbox-arrow.left {
  left: 50px;
}

.lightbox-arrow.right {
  right: 50px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {

  .gallery {
    padding: 0 120px 140px 120px;
    gap: 70px;
  }

  .project-page {
    padding: 60px 120px 120px 120px;
  }

}

@media (max-width: 950px) {

  .gallery,
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
  }

}

/* MOBILE FIX */

@media (max-width: 768px) {

  .nav {
    padding: 30px 20px;
  }

  .gallery {
    grid-template-columns: 1fr;
    padding: 0 20px 80px 20px;
    gap: 50px;
  }

  /* PROJECT PAGE MOBILE */

  .project-page {
    padding: 30px 12px 80px 12px;
  }

  .featured-image {
    width: 100%;
    margin: 40px auto;
  }

  .image-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .image-grid img {
    width: 100%;
    height: auto;
  }

}