/* ── Work page ───────────────────────────────── */

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 140px 40px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Card ────────────────────────────────────── */
.work-card {
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  animation: cardIn 0.6s ease-out forwards;
}

.work-card:nth-child(1) { animation-delay: 0.1s; }
.work-card:nth-child(2) { animation-delay: 0.2s; }
.work-card:nth-child(3) { animation-delay: 0.3s; }
.work-card:nth-child(4) { animation-delay: 0.4s; }

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

/* ── Thumbnail placeholder ───────────────────── */
.work-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 300px;
  border-radius: 4px;
  margin-bottom: 24px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.work-card:hover .work-thumb {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ── Clickable thumbnail wrapper ─────────────── */
.work-thumb-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

/* ── Image thumbnail ─────────────────────────── */
.work-thumb--image {
  overflow: hidden;
  background: #000;
}

.thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Video thumbnail ─────────────────────────── */
.work-thumb--video {
  overflow: hidden;
  background: #000;
  position: relative;
}

.thumb-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: videoFadeLoop 6s ease-in-out infinite;
}

@keyframes videoFadeLoop {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Text ────────────────────────────────────── */
.work-title {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: #fff;
}

.work-desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ── Button ──────────────────────────────────── */
.work-link {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
  align-self: flex-start;
}

.work-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Tablet: 2×2 grid ────────────────────────── */
@media (max-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
    padding: 120px 32px 60px;
  }
}

/* ── Mobile: single column ───────────────────── */
@media (max-width: 600px) {
  .work-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 110px 24px 48px;
  }

  .work-thumb {
    max-width: 100%;
  }
}
