@font-face {
  font-family: 'Signifier';
  src: url('../fonts/signifier/signifier-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haffer';
  src: url('../fonts/haffer/Haffer-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Figma 🧩 Components / variables 기준 토큰 */
:root {
  --color-ink: #101010;          /* text/primary */
  --color-ink-muted: rgba(16, 16, 16, 0.3);  /* text/secondary */
  --color-ink-hover: rgba(16, 16, 16, 0.7);  /* action/text/fg-hover */
  --color-bg: #ffffff;           /* bg/default */
  --color-subtle: #eeeeee;       /* bg/subtle, border/default */
  --color-muted: #d9d9d9;        /* bg/muted */
  --color-nav: rgba(242, 242, 242, 0.85);   /* 블러 알약 내비 */
  --color-glass: rgba(255, 255, 255, 0.72); /* 모바일 메뉴 카드 */
  --color-glass-edge: rgba(255, 255, 255, 0.6);
  --color-scrim: rgba(255, 255, 255, 0.16);
  --color-line: rgba(16, 16, 16, 0.15);

  /* Signifier에는 한글이 없음 → 한글은 명조로 떨어지지 않게 고딕(민부리)으로 바로 받는다. 영문은 그대로 Signifier */
  --font-serif: 'Signifier', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Noto Sans CJK KR', sans-serif;
  --font-sans: 'Haffer', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Jayhan', var(--font-sans);

  --nav-height: 80px;
  --gutter: 80px;
  --content-max: 1760px; /* 1920 스크린 기준 — 이보다 넓은 화면에서는 중앙 정렬 */
}

/* 다크 모드 — 내비의 Dark/Light 버튼으로 전환 (처음엔 기기 설정을 따름) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-ink: #f2f2f2;
  --color-ink-muted: rgba(242, 242, 242, 0.4);
  --color-ink-hover: rgba(242, 242, 242, 0.7);
  --color-bg: #101010;
  --color-subtle: #222222;
  --color-muted: #2a2a2a;
  --color-nav: rgba(40, 40, 40, 0.85);
  --color-glass: rgba(24, 24, 24, 0.8);
  --color-glass-edge: rgba(255, 255, 255, 0.08);
  --color-scrim: rgba(0, 0, 0, 0.3);
  --color-line: rgba(242, 242, 242, 0.15);
}

/* 검은 로고 이미지(SVG)는 다크에서 뒤집어 흰색으로 */
:root[data-theme="dark"] .nav__logo img,
:root[data-theme="dark"] .footer img,
:root[data-theme="dark"] .type-family__logo {
  filter: invert(1);
}

/* 화면 아래 오른쪽에 떠 있는 언어 · 테마 전환 (내비와 같은 블러 알약) */
.dock {
  position: fixed;
  right: var(--gutter);
  bottom: 24px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: var(--color-nav);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: var(--color-ink);
}

.dock__lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock__item {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 120ms ease;
}

.dock__item:hover,
.dock__item.is-active { color: var(--color-ink); }
.dock__sep { color: var(--color-ink-muted); }
.dock__divider { width: 1px; height: 14px; background: var(--color-line); }
button.dock__item[data-theme-toggle] { color: var(--color-ink); }

@media (max-width: 768px) {
  .dock { right: 16px; bottom: 16px; }
}

@media (max-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--nav-height); /* .nav가 fixed라 문서 흐름에서 빠지는 만큼 상단 여백 보정 */
}

img,
video {
  display: block;
  max-width: 100%;
}

/* jayImg 의 AVIF <picture> 는 레이아웃에 끼지 않는다 — 안의 img 가 그대로 자리 차지 */
picture {
  display: contents;
}

a {
  color: inherit;
  text-decoration: none;
}

@font-face {
  font-family: 'Jayhan';
  src: url('../fonts/jayhan/Jayhan-Sans.woff2') format('woff2-variations');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

/* Text styles — Figma v2 텍스트 스타일과 1:1 */
.t-display,
.t-display-m,
.t-heading,
.t-heading-m,
.t-title,
.t-title-m {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
}

.t-display   { font-size: 64px; line-height: 68px; letter-spacing: -0.025em; }
.t-display-m { font-size: 32px; line-height: 36px; letter-spacing: -0.015em; }
.t-heading   { font-size: 48px; line-height: 52px; letter-spacing: -0.02em; }
.t-heading-m { font-size: 28px; line-height: 32px; letter-spacing: -0.01em; }
.t-title     { font-size: 24px; line-height: 28px; letter-spacing: -0.01em; }
.t-title-m   { font-size: 20px; line-height: 24px; letter-spacing: -0.005em; }

.t-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.t-label-l {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.t-caption {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.01em;
}

/* Text button (Button / Variant=Text) */
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-ink);
  cursor: pointer;
  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--color-ink-hover);
}

.text-button--large {
  gap: 8px;
  min-height: 48px;
}

.text-button svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.text-button--large svg {
  width: 13px;
  height: 13px;
}

/* Tag — 랜딩 카드 라벨과 같은 회색 텍스트 */
.tag {
  color: var(--color-ink-muted);
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;

  width: 100%;
  max-width: var(--content-max);
  height: var(--nav-height);
  padding: 24px var(--gutter);
  background: var(--color-bg);
  border: 1px solid transparent;
  border-radius: 1000px;

  transition:
    top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 스크롤하면 둥근 플로팅 필(pill) 형태로 축소 — Nav / State=Scrolled */
.nav.is-scrolled {
  top: 16px;
  width: min(840px, calc(100% - 48px));
  height: 66px;
  padding: 16px 32px;
  /* 모바일과 같은 회색 반투명 블러 알약 (Wolff Olins 방식) */
  border-color: transparent;
  background: var(--color-nav);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

@media (prefers-reduced-motion: reduce) {
  .nav {
    transition: none;
  }
}

.nav__logo img {
  height: 27px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--color-ink-hover);
}

/* 모바일 메뉴 — Wolff Olins 방식: ☰ 버튼을 누르면 Nav 자체가 블러 카드로 펼쳐지고 큰 글씨 링크가 나옴 */
.nav__toggle {
  display: none;
}

.nav-scrim[hidden] {
  display: none;
}

@media (max-width: 768px) {
  /* 크기는 Wolff Olins 모바일 실측값 기준: 위 16 + 바 56 = 88, 아이콘 16.
     로고는 WO 워드마크(102×16)보다 짧은 형태라 높이 20으로 시각적 무게를 맞추고,
     좌우 여백은 본문 여백(--gutter)과 맞춰 로고가 본문 왼쪽 선에 정렬되게 함 */
  :root {
    --nav-height: 88px;
  }

  .nav {
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: center;
    top: 16px;
    height: 56px;
    padding: 8px var(--gutter);
  }

  .nav__logo img {
    display: block;
    height: 20px;
  }

  .nav.is-scrolled {
    top: 16px;
    width: calc(100% - 96px);
    height: 56px;
    padding: 8px 24px;
    border-color: transparent;
    border-radius: 28px;
    background: var(--color-nav);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }

  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    margin-right: -12px; /* 터치 영역은 40px, 아이콘(16px)은 오른쪽 여백선에 맞춤 */
    padding: 0 12px;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .nav__toggle-bar {
    display: block;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .nav.is-open .nav__toggle-bar:first-child {
    transform: translateY(3.25px) rotate(45deg);
  }

  .nav.is-open .nav__toggle-bar:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
  }

  .nav__links {
    display: none;
  }

  .nav.is-open {
    top: 16px;
    width: calc(100% - 16px);
    height: auto;
    padding: 8px 24px 24px;
    border-color: var(--color-glass-edge);
    border-radius: 24px;
    background: var(--color-glass);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    backdrop-filter: blur(24px) saturate(1.4);
  }

  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding-top: 24px;
  }

  /* 큰 글자는 Signifier — 사이트 타입 시스템의 t-display-m(32/36)과 같은 값 */
  .nav.is-open .nav__link {
    min-height: 44px;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
    text-transform: none;
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--color-scrim);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

/* Hero — 첫 화면을 꽉 채움 (Wolff Olins 방식): 높이 = 화면 높이 − Nav, 영상은 cover로 잘라 채움.
   svh = 모바일 주소창을 뺀 실제 보이는 높이. 미지원 브라우저는 vh로 대체 */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  height: calc(100svh - var(--nav-height));
  min-height: 320px;
  background: #000;
  overflow: hidden;
}

/* 히어로에 작업물이 연결돼 있으면 배너 전체가 그 작업물 링크 */
.hero__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 롤링 히어로 — 슬라이드는 겹쳐 두고 페이드, 아래 막대가 진행 표시 */
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease;
  z-index: 1;
}

.hero__controls,
.hero__arrow {
  position: absolute;
  z-index: 2;
  color: #fff;
  mix-blend-mode: difference; /* 밝은 화면에선 검게, 어두운 화면에선 희게 */
}

.hero__controls {
  left: var(--gutter);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero__dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* 나머지는 짧은 막대, 지금 슬라이드만 길어지고 재생 시간에 따라 참 */
.hero__dot {
  width: 14px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: width 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero__dot[aria-selected="true"] { width: 77px; }

.hero__dot span {
  position: relative;
  display: block;
  width: 100%;
  height: 2.5px;
  background: rgb(255 255 255 / 0.4);
  overflow: hidden;
}

.hero__dot:hover span { background: rgb(255 255 255 / 0.7); }

.hero__dot span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.hero__arrow {
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.7;
  transform: translateY(-50%);
  transition: opacity 120ms ease;
}

.hero__arrow:hover { opacity: 1; }
.hero__arrow svg { width: 24px; height: 24px; }
.hero__arrow--prev { left: calc(var(--gutter) - 12px); }
.hero__arrow--next { right: calc(var(--gutter) - 12px); }

@media (max-width: 768px) {
  /* 모바일은 화면 높이 대신 16:9 풀블리드 */
  .hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .hero__controls { bottom: 16px; gap: 12px; }
  .hero__dot[aria-selected="true"] { width: 48px; }
  .hero__arrow--prev { left: 4px; }
  .hero__arrow--next { right: 4px; }
}

.hero__video,
.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Intro */
.intro {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 160px var(--gutter) 120px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.intro__content {
  grid-column: span 9;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.intro__sub {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.intro__paragraph {
  margin: 0;
}

@media (max-width: 768px) {
  .intro {
    padding: 64px var(--gutter);
  }

  .intro__content {
    grid-column: 1 / -1;
    gap: 24px;
  }

  .intro__statement {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

/* Selected work */
.works {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  scroll-margin-top: calc(var(--nav-height) + 24px); /* 고정 Nav에 앵커 이동한 제목이 가리지 않도록 */
}

@media (max-width: 768px) {
  .works {
    padding: 0 var(--gutter) 64px;
    gap: 32px;
  }

  .works__headline {
    font-size: 28px;
    line-height: 32px;
    letter-spacing: -0.01em;
  }
}

.work-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  width: 100%;
}

.work-row--pair > .work-card {
  flex: 1 0 0;
  min-width: 0;
}

.work-row--wide {
  flex-direction: column;
}

@media (max-width: 768px) {
  .work-row--pair {
    flex-direction: column;
    gap: 32px;
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.work-card__image {
  width: 100%;
  aspect-ratio: 4 / 5; /* 썸네일 비율은 4:5와 16:9 두 가지만 */
  overflow: hidden;
  background: var(--color-muted);
}

.work-card--wide .work-card__image {
  aspect-ratio: 16 / 9;
}

/* 모바일 시안은 모든 카드가 16:9 단일 컬럼 */
@media (max-width: 768px) {
  .work-card__image {
    aspect-ratio: 16 / 9;
  }
}

.work-card__image img,
.work-card__image video,
.library-card__image img,
.library-card__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.work-card:hover .work-card__image img,
.work-card:hover .work-card__image video,
.library-card:hover .library-card__image img,
.library-card:hover .library-card__image video {
  transform: scale(1.02);
}

.work-card__meta,
.library-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-card__labels,
.library-card__labels {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 데스크톱에서는 카드가 커서 12px 태그가 너무 작아 보임 → 14px (모바일은 12px 유지) */
@media (min-width: 769px) {
  .work-card__labels .t-label,
  .library-card__labels .t-label {
    font-size: 14px;
    line-height: 20px;
  }
}

.label--muted {
  color: var(--color-ink-muted);
}

@media (max-width: 768px) {
  .work-card__title,
  .library-card__title {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.005em;
  }
}

/* Work Library */
.work-library {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 80px var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.work-library__tabs {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

.work-library__tab {
  color: var(--color-ink-muted);
  transition: color 0.2s ease;
}

.work-library__tab:hover {
  color: var(--color-ink-hover);
}

.work-library__tab--active,
.work-library__tab--active:hover {
  color: var(--color-ink);
}

.work-library__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}

@media (max-width: 900px) {
  .work-library__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .work-library {
    padding: 40px var(--gutter) 64px;
    gap: 32px;
  }

  /* 카테고리 탭 — 한 줄 가로 스와이프. 화면 양 끝까지 이어지고 스크롤바는 숨김 */
  .work-library__tabs {
    flex-wrap: nowrap;
    gap: 16px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    /* 가로 스크롤 상자는 위아래도 자르므로, g·p·y 아래 획이 잘리지 않게 안쪽 여유를 주고 바깥 여백으로 상쇄 */
    margin-block: -4px -8px;
    padding-block: 4px 8px;
    overflow-y: hidden;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .work-library__tabs::-webkit-scrollbar {
    display: none;
  }

  .work-library__tab {
    flex-shrink: 0;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .work-library__tab {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em; /* t-display-m */
  }

  .work-library__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.library-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-muted);
}

/* Footer */
.footer {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px var(--gutter) 88px; /* 아래 88px: 떠 있는 언어·테마 알약이 저작권 줄을 가리지 않게 */
}

.footer__wordmark {
  display: block;
  transition: opacity 0.2s ease;
}

.footer__wordmark:hover {
  opacity: 0.7;
}

.footer__wordmark img {
  width: 100%;
  height: auto;
}

.footer__wordmark-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 12vw, 140px);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}

.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__social {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.footer__copyright {
  color: var(--color-ink-muted);
  margin: 0;
}

.footer__br {
  display: none;
}

/* 모바일 — 연회색 블록, 왼쪽 정렬: 링크 목록 → 꽉 찬 워드마크 → 카피라이트 한 줄.
   글자는 전부 16/24 보통 글씨(대문자 없음) */
@media (max-width: 768px) {
  .footer {
    align-items: flex-start;
    gap: 24px;
    padding: 24px var(--gutter) 72px;
    background: var(--color-subtle);
  }

  .footer__row {
    display: contents;
  }

  .footer__copyright,
  .footer__social .text-button {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-ink);
  }

  .footer__social {
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .footer__wordmark {
    order: 2;
    width: 100%;
    margin-top: 16px; /* 링크와 워드마크 사이 40 (24 + 16) */
  }

  .footer__copyright {
    order: 3;
    margin-top: -16px; /* 워드마크 바로 아래 8 (24 − 16) */
  }
}

/* Work detail */
.work-detail-hero {
  width: 100%;
  aspect-ratio: 9 / 5;
  background: var(--color-muted);
  overflow: hidden;
}

.work-detail-hero img,
.work-detail-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-detail {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 80px var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.work-detail__intro {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.work-detail__heading,
.work-detail__summary {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-detail__summary {
  align-items: flex-start;
}

.work-detail__tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.work-detail__description {
  margin: 0;
  white-space: pre-line;
}

.work-detail__more {
  display: none;
  flex-direction: column;
  gap: 16px;
}

/* 설명글 위계 — 소제목(Signifier 28) · 인용(Signifier 32 + 작은 출처) · 본문 */
.work-detail__subheading {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -0.01em;
}

/* 앞 문단과 40px (gap 16 + 24) — 맨 처음 소제목만 위 여백 없음 */
.work-detail__summary .work-detail__subheading {
  margin-top: 24px;
}

.work-detail__summary > .work-detail__subheading:first-child {
  margin-top: 0;
}

.work-detail__quote {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.work-detail__quote blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 36px;
  letter-spacing: -0.015em;
  white-space: pre-line;
}

.work-detail__quote figcaption {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-ink-hover);
}

@media (max-width: 768px) {
  .work-detail__subheading {
    font-size: 24px;
    line-height: 28px;
  }

  .work-detail__quote blockquote {
    font-size: 24px;
    line-height: 28px;
  }
}

.work-detail__summary.is-expanded .work-detail__more {
  display: flex;
}

.work-detail__readmore svg {
  transition: transform 0.2s ease;
}

.work-detail__summary.is-expanded .work-detail__readmore svg {
  transform: rotate(-90deg);
}

@media (max-width: 768px) {
  .work-detail {
    padding: 40px var(--gutter) 64px;
    gap: 40px;
  }

  .work-detail__intro {
    flex-direction: column;
    gap: 24px;
  }

  .work-detail__title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

.work-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.gallery-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .work-detail__gallery,
  .gallery-row {
    gap: 16px;
  }

}

.gallery-image {
  width: 100%;
  overflow: hidden;
  background: var(--color-muted);
}

.gallery-image--wide {
  aspect-ratio: 16 / 9;
}

.gallery-image--empty {
  background: none;
}

.gallery-image--square {
  aspect-ratio: 4 / 5; /* 썸네일·이미지 비율은 4:5와 16:9 두 가지만 */
  flex: 1 0 0;
  min-width: 0;
}

.gallery-image img,
.gallery-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-detail__back {
  align-self: flex-start;
}

/* Credit — 제목·태그 아래: 회색 역할 + 이름 한 줄씩, 그룹이 여럿이면 가로로 */
.work-credits {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 22px;
}

.work-credits__group dt {
  color: var(--color-ink-muted);
}

.work-credits__group dd {
  margin: 0;
}

/* 같은 카테고리 작업 — 한 줄 3컬럼 */
.work-related {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 64px;
  border-top: 1px solid var(--color-subtle);
}

/* About — 12컬럼 그리드: 프로필 1–4, 목록 6–12 (5번 컬럼은 여백) */
.about {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
  padding: 80px var(--gutter) 120px;
}

.about__profile {
  grid-column: 1 / span 4;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 80px); /* Work 페이지 탭과 같은 높이(Nav + 상단 패딩)에서 고정 */
}

.about__identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about__bio p {
  margin: 0;
}

.about__content {
  grid-column: 6 / span 7;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.about-section__headline {
  margin: 0;
}

.about-section__items {
  display: flex;
  flex-direction: column;
}

/* List Item — 시안 비율(302 : 411)대로 함께 줄어들도록 */
.about-row {
  display: grid;
  grid-template-columns: minmax(0, 302fr) minmax(0, 411fr);
  gap: 24px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--color-subtle);
}

.about-row__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-row__label {
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: -0.005em;
  margin: 0;
}

.about-row__period {
  color: var(--color-ink-muted);
  margin: 0;
}

.about-row__description {
  margin: 0;
}

/* 태블릿: 프로필 1–5, 목록 7–12로 조정 — 이름(64px)이 좁은 컬럼에서 줄바꿈되지 않도록 */
@media (max-width: 1200px) {
  .about__profile {
    grid-column: 1 / span 5;
  }

  .about__content {
    grid-column: 7 / span 6;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .about {
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding: 40px var(--gutter) 64px;
  }

  .about__profile {
    position: static;
    width: 100%;
    gap: 16px;
  }

  .about__identity {
    gap: 4px;
  }

  .about__content {
    width: 100%;
  }

  .about__name {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }

  .about__role,
  .about__bio {
    font-size: 20px;
    line-height: 24px;
    letter-spacing: -0.005em;
  }
}

/* Error */
.error-page {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: 480px;
  padding: 80px var(--gutter) 120px;
}

@media (max-width: 768px) {
  .error-page {
    min-height: 320px;
    padding: 40px var(--gutter) 64px;
  }

  .error-page__title {
    font-size: 32px;
    line-height: 36px;
    letter-spacing: -0.015em;
  }
}

/* Vimeo 플레이어 — <video object-fit: cover> 와 같은 방식으로 영역을 꽉 채운다 (site/snippets/video.php) */
:has(> .vimeo-cover) { position: relative; }
.vimeo-cover { position: absolute; inset: 0; overflow: hidden; container-type: size; pointer-events: none; }
.vimeo-cover iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: max(100cqw, calc(100cqh * var(--ar)));
  height: max(100cqh, calc(100cqw / var(--ar)));
  transform: translate(-50%, -50%);
}

/* 다크/라이트 전환 디졸브 (View Transitions) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 450ms;
  animation-timing-function: ease;
}
