.work {
  padding: 72px 40px 100px;
  color: rgba(255,255,255,.92);
}

@media (min-width: 861px) {
  .work {
    margin-left: var(--rail-w);
  }
}

.work__header {
  max-width: 1146px;
  margin: 0 auto;
}

.work__title {
  margin: 0;
  font-weight: 600;
  font-family: "Playfair Display", serif;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 600ms cubic-bezier(.2,.8,.2,1) 100ms forwards;
}

.work__intro {
  margin: 28px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,.65);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 600ms cubic-bezier(.2,.8,.2,1) 220ms forwards;
}

.work__intro-highlight {
  color: rgba(255,255,255,.92);
  font-style: italic;
}

.work__gridWrap {
  max-width: 1146px;
  margin: 64px auto 0;
  opacity: 0;
  animation: fadeUp 500ms cubic-bezier(.2,.8,.2,1) 340ms forwards;
}

.work__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: block;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  aspect-ratio: 4 / 5;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms cubic-bezier(.2,.8,.2,1),
    transform 500ms cubic-bezier(.2,.8,.2,1);
}

.card--visible {
  opacity: 1;
  transform: translateY(0);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1);
}

.card:hover img {
  transform: scale(1.03);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .work {
    padding: 60px 24px 80px;
  }

}

@media (max-width: 860px) {
  .work {
    margin-left: 0;
    padding: 96px 18px 72px;
  }

  .work__intro {
    margin-top: 20px;
    font-size: 15px;
  }

  .work__gridWrap {
    margin-top: 48px;
  }

  .work__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

}


@media (prefers-reduced-motion: reduce) {
  .work__title,
  .work__intro,
  .work__gridWrap {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover img {
    transform: none;
  }
}
/* ── Intro truncation ── */
.work__intro-wrap {
  max-width: 980px;
}

.work__intro {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work__intro.is-expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.work__intro-toggle {
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.38);
  cursor: pointer;
  transition: color 160ms ease;
}

.work__intro-toggle:hover {
  color: rgba(255,255,255,.70);
}