/* ========================================
   HOME HERO
======================================== */

.home-hero {
  min-height: 68vh;

  padding-top: 100px;
  padding-bottom: 120px;

  display: flex;
  align-items: flex-end;
}

.home-intro {
  max-width: 1100px;
}

.home-intro .display {
  margin-bottom: 32px;
}

.home-intro-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.home-description {
  width: 100%;
  max-width: 580px;

  margin: 0;

  color: var(--color-secondary);
}


/* ========================================
   WORK GRID
======================================== */

.work {
  padding-top: 40px;
}

.work-header {
  margin-bottom: 32px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.work-header p {
  margin: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);

  column-gap: 20px;
  row-gap: 96px;
}


/* ========================================
   PROJECT CARD

   Span classes set the rhythm. Every row must add up to 12:
     .full                 -> 12
     .large + .small       -> 8 + 4
     default + default     -> 6 + 6
======================================== */

.project-card {
  grid-column: span 6;
}

.project-card.full {
  grid-column: span 12;
}

.project-card.large {
  grid-column: span 8;
}

.project-card.small {
  grid-column: span 4;
}

.project-cover {
  width: 100%;

  overflow: hidden;

  border-radius: 2px;

  background: #e5e3de;

  /* A fixed ratio keeps a row tidy no matter what you drop in.
     Override per card with .ratio-16-9 / .ratio-1-1, or delete these three
     lines to let each image keep its natural height. */
  aspect-ratio: 4 / 3;
}

.project-cover.ratio-16-9 { aspect-ratio: 16 / 9; }
.project-cover.ratio-4-3  { aspect-ratio: 4 / 3; }
.project-cover.ratio-1-1  { aspect-ratio: 1 / 1; }

.project-cover img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.7s var(--ease),
    opacity 0.4s ease;
}

.project-card:hover .project-cover img {
  transform: scale(1.015);
}

.project-info {
  padding-top: 16px;

  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.project-title {
  margin: 0;

  font-size: 20px;
  line-height: 1.2;

  letter-spacing: -0.025em;
  font-weight: 500;
}

.project-meta {
  margin: 0;

  font-size: 14px;
  line-height: 1.4;

  color: var(--color-secondary);

  text-align: right;

  /* Was nowrap, which let a long discipline label push the whole page wider
     and put a horizontal scrollbar on every screen. Wrapping right-aligned
     keeps the label tidy; the <br> before the year still holds. */
  white-space: normal;
  max-width: 100%;
}


/* ========================================
   OPTIONAL FEATURE PROJECT
======================================== */

.feature-project {
  margin-top: 140px;

  padding: 100px 0;

  border-top: 1px solid var(--color-line);
}

.feature-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 80px;
}

.feature-copy {
  position: sticky;
  top: 60px;

  align-self: start;
}

.feature-copy p {
  color: var(--color-secondary);
}

.feature-image {
  width: 100%;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 900px) {

  .home-hero {
    min-height: 58vh;

    padding-top: 80px;
    padding-bottom: 90px;
  }

  .home-intro-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .work-grid {
    row-gap: 72px;
  }

  /* Two per row on tablet, whatever the desktop span was. */
  .project-card,
  .project-card.large,
  .project-card.small {
    grid-column: span 6;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .feature-copy {
    position: static;
  }

}


@media (max-width: 640px) {

  .home-hero {
    min-height: auto;

    padding-top: 80px;
    padding-bottom: 100px;
  }

  .work-grid {
    display: block;
  }

  .project-card {
    display: block;
    margin-bottom: 72px;
  }

  .project-card:last-child {
    margin-bottom: 0;
  }

  .project-card.full,
  .project-card.large,
  .project-card.small {
    width: 100%;
  }

  .project-info {
    gap: 20px;
  }

  .project-meta {
    max-width: 130px;
    white-space: normal;
  }

}
