/* Work index — staggered two-column grid; right column travels faster. Motion from motion.js. */

.page--projects main { overflow-x: clip; }
[data-y], [data-x], [data-o] { will-change: transform; }

/* Header */
.w-head { padding-top: var(--page-top); padding-bottom: clamp(56px, 8vw, 110px); }
.w-head > .cs-label { margin-bottom: clamp(16px, 3vw, 32px); }
.w-title { margin: 0; font-weight: 500; font-size: clamp(48px, 7.5vw, 128px); line-height: .92; letter-spacing: -0.06em; }
.w-title__line { display: block; white-space: nowrap; }
.w-title__line--em { font-style: italic; font-weight: 400; color: var(--fg); }
.w-head__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 60px; align-items: end; margin-top: clamp(32px, 4vw, 60px); }
.w-head__foot .lede { margin: 0; max-width: 36ch; }
.filters { margin: 0; justify-content: flex-end; }
.filter sup { font-size: .7em; opacity: .6; margin-left: 2px; }

/* Grid */
.w-grid { list-style: none; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 5vw, 96px); row-gap: clamp(80px, 12vw, 200px); padding-bottom: 20vh; }
.w-item.is-b { margin-top: clamp(120px, 22vw, 380px); margin-bottom: calc(-1 * clamp(120px, 22vw, 380px)); }
.w-item.is-wide { grid-column: 1 / -1; width: 72%; justify-self: center; margin-top: clamp(120px, 22vw, 380px); }
.w-card { position: relative; display: grid; gap: 18px; text-decoration: none; color: var(--fg); }
/* Number square — matches the homepage carousel */
.w-card__num { position: absolute; z-index: 2; top: 0; left: 0; display: grid; place-items: center; width: clamp(34px, 2.8vw, 46px); aspect-ratio: 1; background: #fff; color: #000; font-size: 14px; border-radius: 6px 0 0 0; pointer-events: none; }
.w-card__img { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 4/5; background: #111; }
.w-item.is-wide .w-card__img { aspect-ratio: 16/9; }
.w-card__img img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; transition: filter .5s; }
.w-card:hover .w-card__img img { filter: brightness(1.12); }
.w-card__text { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.w-card__title { margin: 0; font-size: clamp(22px, 2.4vw, 38px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; }
.w-card:hover .w-card__title { text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-skip-ink: none; }
.w-card__meta { font-size: 13px; color: var(--fg-50); }

@media (max-width: 800px) {
  .w-head__foot { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  .w-grid { grid-template-columns: 1fr; row-gap: 72px; }
  .w-item.is-b { margin: 0; }
  .w-item.is-wide { width: 100%; }
  .w-card__img { aspect-ratio: 4/3; }
}

@media (prefers-reduced-motion: reduce) {
  [data-y], [data-x] { transform: none !important; }
}

/* Category chip + year — matches the homepage carousel */
.w-card__meta { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--fg-50); }
.w-chip { display: inline-block; padding: .6em 1em; background: rgba(255,255,255,.1); color: var(--fg); font: 400 11px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.w-chip + .w-chip { margin-left: -6px; }
