/* Project detail page */

.project-detail {
  min-height: 100vh;
  padding: clamp(6rem, 4rem + 6vw, 10rem) clamp(1rem, 0.5rem + 2vw, 2rem);
  padding-bottom: clamp(5rem, 3rem + 5vw, 8rem);
}

/* Override base white text colors for this page */
.project-detail h1,
.project-detail h2,
.project-detail h3,
.project-detail p,
.project-detail a,
.project-detail span {
  color: #000;
}

/* ================================
   Hero Section
   ================================ */
.project-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
  margin-bottom: clamp(2rem, 1.5rem + 3vw, 4rem);
}

.project-category {
  display: inline-block;
  padding: 0.35em 1em;
  border: 1.5px solid #000;
  border-radius: 50px;
  font-family: "DM Mono", monospace;
  font-size: clamp(0.65rem, 0.55rem + 0.4vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(20px);
}

.project-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(0.5rem, 0.3rem + 0.8vw, 1rem);
  flex-wrap: wrap;
}

.title-word {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(3rem, 2rem + 5vw, 7rem);
  font-weight: 500;
  line-height: 1.1;
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
}

.project-year {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.65rem, 0.55rem + 0.4vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
}

.project-live-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6em 1.4em;
  border: 1.5px solid #000;
  border-radius: 50px;
  font-family: "DM Mono", monospace;
  font-size: clamp(0.65rem, 0.55rem + 0.4vw, 0.8rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #000;
  transition: background 0.3s ease, color 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.project-live-link svg {
  transition: transform 0.3s ease;
}

.project-live-link:hover {
  background: #000;
  color: #fff;
}

.project-live-link:hover svg {
  stroke: #fff;
  transform: translate(2px, -2px);
}

/* ================================
   Hero Image
   ================================ */
.project-hero-image {
  width: 100%;
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}

.hero-image-wrapper {
  width: 100%;
  height: clamp(250px, 30vw, 600px);
  overflow: hidden;
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
  opacity: 0;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

/* ================================
   Info Grid
   ================================ */
.project-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  opacity: 0;
  transform: translateY(30px);
}

.info-label {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.6rem, 0.5rem + 0.35vw, 0.75rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #acacac !important;
  margin-bottom: 0.75rem;
}

.info-overview .info-text {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(1rem, 0.85rem + 0.6vw, 1.35rem);
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
}

.info-metadata {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-metadata .info-text {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1rem);
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
}

/* ================================
   Deliverables (inside breakdown)
   ================================ */
.deliverables-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 0.35rem + 0.4vw, 0.75rem);
}

.deliverable-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.deliverable-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deliverable-icon svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
}

.deliverable-text {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  color: #000;
}

/* ================================
   Gallery — Bento Grid (4 images)
   ================================
   Desktop:
   ┌──────────────┬──────────────┐
   │              │              │
   │      1       │      2       │
   │   (tall)     │              │
   │              ├──────┬───────┤
   │              │      │       │
   │              │  3   │   4   │
   │              │      │       │
   └──────────────┴──────┴───────┘
   ================================ */
.project-gallery {
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}

#gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: clamp(350px, 50vw, 550px);
  gap: clamp(0.4rem, 0.3rem + 0.4vw, 0.6rem);
}

.gallery-item {
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Tablet — 2 columns */
@media (min-width: 768px) {
  #gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: clamp(320px, 32vw, 480px) clamp(300px, 28vw, 440px);
  }

  /* Tall left spanning both rows */
  .gallery-item:nth-child(1) {
    grid-row: 1 / 3;
  }

  .gallery-item:nth-child(2) {
    grid-row: 1 / 2;
  }

  .gallery-item:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }

  .gallery-item:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
  }
}

/* Desktop — 4-column bento */
@media (min-width: 1024px) {
  #gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: clamp(280px, 24vw, 420px) clamp(280px, 24vw, 420px);
  }

  /* Tall left feature — spans 2 cols, 2 rows */
  .gallery-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  /* Top right — spans 2 cols */
  .gallery-item:nth-child(2) {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
  }

  /* Bottom right — two side by side */
  .gallery-item:nth-child(3) {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
  }

  .gallery-item:nth-child(4) {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
  }
}

/* ================================
   Content (Description + Breakdown)
   ================================ */
.project-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  opacity: 0;
  transform: translateY(30px);
}

.content-left {
  /* sticky only activates at desktop when side-by-side */
}

.project-description {
  /* no extra spacing needed — parent grid handles it */
}

.description-text {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
  text-transform: none;
}

.content-right {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 1.5rem + 2vw, 3rem);
}

.breakdown-item {
  opacity: 0;
  transform: translateY(30px);
}

.breakdown-text {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
  text-transform: none;
}

@media (min-width: 768px) {
  .project-content {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }

  .content-left {
    position: sticky;
    top: clamp(6rem, 4rem + 6vw, 10rem);
  }
}

/* ================================
   Project Navigation (Prev / Next)
   ================================ */
.project-nav {
  border-top: 2px solid #000;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0;
  transform: translateY(30px);
}

.project-nav-item {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 0.3rem + 0.6vw, 1rem);
  padding: clamp(1.5rem, 1rem + 2vw, 3rem) 0;
  text-decoration: none;
}

.project-nav-next {
  text-align: right;
  align-items: flex-end;
  border-left: 1px solid #000;
  padding-left: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.project-nav-prev {
  text-align: left;
  align-items: flex-start;
  padding-right: clamp(1rem, 0.5rem + 2vw, 2rem);
}

.project-nav-label {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.6rem, 0.5rem + 0.35vw, 0.75rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #acacac !important;
}

.project-nav-name {
  display: flex;
  align-items: baseline;
  gap: clamp(0.25rem, 0.15rem + 0.4vw, 0.5rem);
  flex-wrap: wrap;
  transition: gap 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-nav-prev .project-nav-name {
  justify-content: flex-start;
}

.project-nav-next .project-nav-name {
  justify-content: flex-end;
}

.project-nav-item:hover .project-nav-name {
  gap: clamp(0.5rem, 0.3rem + 0.8vw, 1rem);
}

.nav-word {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(1.5rem, 1rem + 2.5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  display: inline-block;
}

/* ================================
   Responsive
   ================================ */
@media (min-width: 768px) {
  .project-info {
    grid-template-columns: 1.5fr 1fr;
  }
}

@media (max-width: 480px) {
  .project-title {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .project-nav-name {
    flex-direction: column;
    gap: 0;
  }
}
