/* 작업물 목록 (HOME · WORKS 공용): 카테고리 탭, 카드 그리드, 카드
   Figma "02 / Selected Works", "Works / Portfolio" */

/* 카테고리 탭 */
.v2-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: calc(32 * var(--u));
}
.v2-tab {
  font-weight: 300;
  font-size: calc(24 * var(--u));
  line-height: calc(34 * var(--u));
  white-space: nowrap;
  color: var(--color-text-secondary);
}
.v2-tab[aria-selected="true"] {
  font-weight: 700;
  color: var(--color-text-default);
}

/* 열 수를 고정한 그리드. 카드 폭의 합이 콘텐츠 폭과 정확히 같아서(512×3 + 32×2 = 1600),
   flex 줄바꿈으로 두면 폭 계산이 소수점만큼만 어긋나도 마지막 카드가 다음 줄로 떨어진다. */
.v2-workgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: calc(32 * var(--u));
  width: 100%;
}
.v2-workgrid > .v2-notice { grid-column: 1 / -1; }

.v2-work {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  min-width: 0;         /* 폭은 그리드 열이 정한다: 512 / 326 / 152 */
  position: relative;   /* 연결된 카드: 제목 링크의 누르는 영역을 카드 전체로 넓힌다 */
}
.v2-work__link { color: inherit; text-decoration: none; }
.v2-work__link::after { content: ''; position: absolute; inset: 0; border-radius: calc(10 * var(--u)); }
.v2-work__link:focus-visible { outline: none; }
.v2-work__link:focus-visible::after { outline: 2px solid var(--color-text-default); outline-offset: 2px; }
.v2-work__image {
  width: 100%;
  height: calc(420 * var(--u));
  border-radius: calc(10 * var(--u));
  background: #E8E8E8;
  overflow: hidden;
}
.v2-work__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-work__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: calc(24 * var(--u));
  line-height: calc(34 * var(--u));
  color: var(--color-text-default);
}
.v2-work__meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: 400;
  font-size: calc(14 * var(--u));
  line-height: calc(20 * var(--u));
  color: var(--color-text-secondary);
}
html[data-bp="t"] .v2-tabs { gap: calc(24 * var(--u)) calc(16 * var(--u)); }
html[data-bp="t"] .v2-tab { font-size: calc(18 * var(--u)); line-height: calc(25 * var(--u)); }
html[data-bp="t"] .v2-workgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(24 * var(--u)); }
html[data-bp="t"] .v2-work { gap: calc(8 * var(--u)); }
html[data-bp="t"] .v2-work__image { height: calc(244 * var(--u)); border-radius: calc(6.6 * var(--u)); }
html[data-bp="t"] .v2-work__title { font-size: calc(18 * var(--u)); line-height: calc(25 * var(--u)); }
html[data-bp="t"] .v2-work__meta { font-size: calc(13 * var(--u)); line-height: calc(18 * var(--u)); }
html[data-bp="m"] .v2-tabs { gap: calc(8 * var(--u)) calc(12 * var(--u)); }
html[data-bp="m"] .v2-tab { font-size: calc(13 * var(--u)); line-height: calc(18 * var(--u)); }
html[data-bp="m"] .v2-workgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(24 * var(--u)) calc(16 * var(--u)); }
html[data-bp="m"] .v2-work { gap: calc(8 * var(--u)); }
html[data-bp="m"] .v2-work__image { height: calc(125 * var(--u)); border-radius: calc(6.25 * var(--u)); }
html[data-bp="m"] .v2-work__title { font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); }
html[data-bp="m"] .v2-work__meta { font-size: calc(10 * var(--u)); line-height: calc(14 * var(--u)); }
