:root {
  --bg: #2d2d2d;
  --panel: #3b3b3b;
  --panel-soft: #474747;
  --text: #f5f5f1;
  --muted: #b8b8b2;
  --line: rgba(245, 245, 241, 0.18);
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.2);
  --header-size: 58px;
  --intro-size: 88px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 18vw 100%,
    var(--bg);
}

body[data-page="home"] {
  height: 100svh;
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: rgba(45, 45, 45, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  gap: 3px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--white);
}

.home-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100svh - var(--header-size));
  padding: clamp(18px, 3vw, 36px);
  overflow: hidden;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: clamp(12px, 2vh, 22px);
}

.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--white);
  font-size: clamp(28px, 5vw, 72px);
  line-height: 0.98;
  font-weight: 800;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  height: 100%;
  gap: clamp(8px, 1vw, 14px);
  opacity: 1;
  transition: opacity 140ms ease;
}

.wall-grid.is-changing {
  opacity: 0;
}

.wall-item {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 180ms ease, transform 180ms ease;
}

.wall-item:hover {
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-2px);
}

.wall-grid .slot-1 { grid-column: 1 / span 4; grid-row: 1 / span 3; }
.wall-grid .slot-2 { grid-column: 5 / span 3; grid-row: 1 / span 2; }
.wall-grid .slot-3 { grid-column: 8 / span 5; grid-row: 1 / span 3; }
.wall-grid .slot-4 { grid-column: 5 / span 3; grid-row: 3 / span 4; }
.wall-grid .slot-5 { grid-column: 1 / span 4; grid-row: 4 / span 3; }
.wall-grid .slot-6 { grid-column: 8 / span 5; grid-row: 4 / span 3; }

.wall-grid.layout-4 .slot-1 { grid-column: 1 / span 6; grid-row: 1 / span 3; }
.wall-grid.layout-4 .slot-2 { grid-column: 7 / span 6; grid-row: 1 / span 3; }
.wall-grid.layout-4 .slot-3 { grid-column: 1 / span 6; grid-row: 4 / span 3; }
.wall-grid.layout-4 .slot-4 { grid-column: 7 / span 6; grid-row: 4 / span 3; }

.wall-grid.layout-5 .slot-1 { grid-column: 1 / span 4; grid-row: 1 / span 3; }
.wall-grid.layout-5 .slot-2 { grid-column: 5 / span 4; grid-row: 1 / span 3; }
.wall-grid.layout-5 .slot-3 { grid-column: 9 / span 4; grid-row: 1 / span 3; }
.wall-grid.layout-5 .slot-4 { grid-column: 1 / span 6; grid-row: 4 / span 3; }
.wall-grid.layout-5 .slot-5 { grid-column: 7 / span 6; grid-row: 4 / span 3; }

.wall-grid.layout-7 .slot-4 { grid-column: 5 / span 3; grid-row: 3 / span 2; }
.wall-grid.layout-7 .slot-7 { grid-column: 5 / span 3; grid-row: 5 / span 2; }

.wall-grid.layout-8 .slot-1 { grid-column: 1 / span 3; grid-row: 1 / span 3; }
.wall-grid.layout-8 .slot-2 { grid-column: 4 / span 3; grid-row: 1 / span 2; }
.wall-grid.layout-8 .slot-3 { grid-column: 7 / span 3; grid-row: 1 / span 3; }
.wall-grid.layout-8 .slot-4 { grid-column: 10 / span 3; grid-row: 1 / span 2; }
.wall-grid.layout-8 .slot-5 { grid-column: 1 / span 3; grid-row: 4 / span 3; }
.wall-grid.layout-8 .slot-6 { grid-column: 4 / span 3; grid-row: 3 / span 4; }
.wall-grid.layout-8 .slot-7 { grid-column: 7 / span 3; grid-row: 4 / span 3; }
.wall-grid.layout-8 .slot-8 { grid-column: 10 / span 3; grid-row: 3 / span 4; }

.image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #575757, #343434);
}

.wall-grid .image-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 0;
  box-shadow: none;
}

.wall-grid img {
  object-fit: cover;
  object-position: center;
}

.wall-grid .image-frame img {
  background: transparent;
  box-shadow: none;
}

.wall-grid figcaption {
  opacity: 0;
  transition: opacity 180ms ease;
}

.wall-item:hover figcaption {
  opacity: 1;
}

.image-frame figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.image-frame.is-missing {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.image-frame.is-missing span {
  max-width: 70%;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.page-title,
.work-page,
.archive-page,
.traces-page,
.about-page {
  padding: clamp(22px, 4vw, 48px);
}

.works-page {
  padding: clamp(22px, 4vw, 48px) clamp(28px, 10vw, 180px);
}

.page-title {
  padding-bottom: 22px;
}

.work-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: end;
  min-height: calc(100vh - 150px);
}

.work-actions {
  position: sticky;
  top: calc(var(--header-size) + 14px);
  z-index: 15;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
  pointer-events: none;
}

.back-button,
.close-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(45, 45, 45, 0.8);
  color: var(--white);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.close-button {
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.back-button:hover,
.close-button:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
}

.hero-image {
  min-height: min(72vh, 760px);
  box-shadow: 0 24px 70px var(--shadow);
}

.work-page .image-frame img,
.archive-page .image-frame img,
.traces-page .image-frame img {
  object-fit: contain;
  background: transparent;
}

.work-page .image-frame,
.archive-page .image-frame,
.traces-page .image-frame {
  background: transparent;
  background-image: none;
}

.work-meta {
  padding-bottom: 8px;
}

.work-meta p:last-child,
.exhibition-text p:last-child,
.trace-note p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.translated-title {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.1;
}

.content-section {
  margin-top: clamp(40px, 7vw, 92px);
}

.content-section.compact {
  margin-top: 28px;
}

.content-section h2,
.content-section h3,
.exhibition-block h2 {
  margin-bottom: 16px;
  color: var(--white);
  font-size: clamp(22px, 3vw, 38px);
}

.media-grid,
.trace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.media-grid .image-frame,
.trace-grid .image-frame {
  grid-column: span 4;
  aspect-ratio: 4 / 3;
}

.related-work {
  display: block;
  grid-column: span 6;
}

.related-work .image-frame {
  aspect-ratio: 4 / 3;
}

.detail-grid .image-frame:nth-child(3n + 1),
.installation-grid .image-frame:nth-child(3n + 2) {
  grid-column: span 6;
  aspect-ratio: 16 / 10;
}

.relation-grid .image-frame,
.route-grid .image-frame {
  grid-column: span 6;
}

.link-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.link-list a,
.review-link {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.link-list span,
.review-link span,
.empty-note {
  color: var(--muted);
}

.archive-list {
  display: grid;
  gap: clamp(48px, 8vw, 110px);
}

.exhibition-block {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.exhibition-text {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(280px, 0.75fr);
  gap: 20px;
  margin-bottom: 22px;
}

.exhibition-text p:last-child {
  grid-column: 2;
}

.review-list {
  margin-top: 24px;
}

.trace-note {
  max-width: 760px;
  margin: 0 0 28px;
}

.home-credit {
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(300px, 0.8fr);
  gap: clamp(18px, 4vw, 52px);
  align-items: end;
  padding-bottom: clamp(36px, 7vw, 90px);
  border-bottom: 1px solid var(--line);
}

.about-hero h1 {
  grid-column: 2;
}

.about-hero p:not(.kicker),
.about-hero .text-link {
  grid-column: 2;
  max-width: 760px;
}

.about-hero p:not(.kicker),
.cv-block p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.text-link {
  display: inline-block;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.cv-section {
  padding-top: clamp(36px, 6vw, 78px);
}

.cv-section h2 {
  margin-bottom: 22px;
  color: var(--white);
  font-size: clamp(26px, 4vw, 54px);
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.cv-column {
  border-top: 1px solid var(--line);
}

.cv-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.cv-block h3 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 16px;
  text-transform: uppercase;
}

.cv-block p {
  margin-bottom: 8px;
}

.works-title {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(300px, 0.9fr);
  gap: 20px;
  padding-left: 0;
  padding-right: 0;
}

.works-title h1,
.works-title p:not(.kicker) {
  grid-column: 2;
}

.works-title p:not(.kicker) {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.works-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: clamp(34px, 6vw, 88px) clamp(22px, 4vw, 54px);
  max-width: 980px;
  margin: 0 auto;
  padding-top: clamp(28px, 5vw, 70px);
}

.work-index-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  transition: transform 180ms ease;
}

.work-index-item:nth-child(6n + 2),
.work-index-item:nth-child(6n + 5) {
  transform: translateY(clamp(18px, 4vw, 54px));
}

.work-index-item:nth-child(6n + 3) {
  transform: translateY(clamp(6px, 2vw, 28px));
}

.thumb-frame {
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color 180ms ease, transform 180ms ease;
}

.thumb-frame img {
  object-fit: cover;
}

.work-index-item:hover .thumb-frame {
  border-color: rgba(255, 255, 255, 0.65);
}

.work-index-item:hover {
  transform: translateY(-2px);
}

.work-index-item:nth-child(6n + 2):hover,
.work-index-item:nth-child(6n + 5):hover {
  transform: translateY(calc(clamp(18px, 4vw, 54px) - 2px));
}

.work-index-item:nth-child(6n + 3):hover {
  transform: translateY(calc(clamp(6px, 2vw, 28px) - 2px));
}

.work-index-meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.work-index-meta strong {
  color: var(--white);
  font-size: 13px;
}

.work-index-meta span {
  color: var(--muted);
}

.work-index-meta em {
  color: rgba(245, 245, 241, 0.56);
  font-style: normal;
}

@media (max-width: 880px) {
  body {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 33.333vw 100%,
      var(--bg);
  }

  .home-intro,
  .work-hero,
  .exhibition-text,
  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-hero h1,
  .about-hero p:not(.kicker),
  .about-hero .text-link,
  .works-title h1,
  .works-title p:not(.kicker) {
    grid-column: auto;
  }

  .work-hero {
    min-height: auto !important;
    align-items: start;
  }

  h1 {
    font-size: clamp(32px, 11vw, 58px);
  }

  .wall-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
  }

  .wall-grid .slot-1 { grid-column: 1 / span 3; grid-row: 1 / span 3; }
  .wall-grid .slot-2 { grid-column: 4 / span 3; grid-row: 1 / span 3; }
  .wall-grid .slot-3 { grid-column: 1 / span 2; grid-row: 4 / span 2; }
  .wall-grid .slot-4 { grid-column: 3 / span 4; grid-row: 4 / span 2; }
  .wall-grid .slot-5 { grid-column: 1 / span 3; grid-row: 6 / span 3; }
  .wall-grid .slot-6 { grid-column: 4 / span 3; grid-row: 6 / span 3; }

  .wall-grid.layout-4 .slot-1 { grid-column: 1 / span 3; grid-row: 1 / span 4; }
  .wall-grid.layout-4 .slot-2 { grid-column: 4 / span 3; grid-row: 1 / span 4; }
  .wall-grid.layout-4 .slot-3 { grid-column: 1 / span 3; grid-row: 5 / span 4; }
  .wall-grid.layout-4 .slot-4 { grid-column: 4 / span 3; grid-row: 5 / span 4; }

  .wall-grid.layout-5 .slot-1 { grid-column: 1 / span 3; grid-row: 1 / span 3; }
  .wall-grid.layout-5 .slot-2 { grid-column: 4 / span 3; grid-row: 1 / span 3; }
  .wall-grid.layout-5 .slot-3 { grid-column: 1 / span 2; grid-row: 4 / span 5; }
  .wall-grid.layout-5 .slot-4 { grid-column: 3 / span 2; grid-row: 4 / span 5; }
  .wall-grid.layout-5 .slot-5 { grid-column: 5 / span 2; grid-row: 4 / span 5; }

  .media-grid .image-frame,
  .trace-grid .image-frame,
  .detail-grid .image-frame:nth-child(3n + 1),
  .installation-grid .image-frame:nth-child(3n + 2),
  .relation-grid .image-frame,
    .route-grid .image-frame {
    grid-column: span 6;
  }

  .related-work {
    grid-column: span 6;
  }

  .cv-grid {
    grid-template-columns: 1fr;
  }

  .cv-column-copy {
    display: none;
  }

  .works-page {
    padding-left: clamp(24px, 8vw, 72px);
    padding-right: clamp(24px, 8vw, 72px);
  }

  .works-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 46px 18px;
  }

  .exhibition-text p:last-child {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home-shell,
  .page-title,
  .work-page,
  .archive-page,
  .traces-page,
  .about-page {
    padding: 14px;
  }

  .works-page {
    padding: 14px clamp(34px, 11vw, 58px);
  }

  .works-index-grid {
    grid-template-columns: 1fr;
    gap: 42px;
    max-width: 280px;
  }

  .work-index-item:nth-child(n),
  .work-index-item:nth-child(n):hover {
    transform: none;
  }

  .work-page {
    padding-top: 10px;
  }

  .work-actions {
    top: 10px;
    margin-bottom: 10px;
  }

  .work-hero {
    min-height: auto !important;
    align-items: start;
    gap: 18px;
  }

  .work-meta {
    padding-bottom: 0;
  }

  .home-intro {
    gap: 8px;
  }

  .home-intro h1 {
    font-size: clamp(30px, 13vw, 48px);
  }

  .wall-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
  }

  .wall-grid .slot-1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .wall-grid .slot-2 { grid-column: 3 / span 2; grid-row: 1 / span 2; }
  .wall-grid .slot-3 { grid-column: 1 / span 4; grid-row: 3 / span 2; }
  .wall-grid .slot-4 { grid-column: 1 / span 2; grid-row: 5 / span 2; }
  .wall-grid .slot-5 { grid-column: 3 / span 2; grid-row: 5 / span 2; }
  .wall-grid .slot-6 { grid-column: 1 / span 4; grid-row: 7 / span 2; }

  .wall-grid.layout-4 .slot-1 { grid-column: 1 / span 2; grid-row: 1 / span 4; }
  .wall-grid.layout-4 .slot-2 { grid-column: 3 / span 2; grid-row: 1 / span 4; }
  .wall-grid.layout-4 .slot-3 { grid-column: 1 / span 2; grid-row: 5 / span 4; }
  .wall-grid.layout-4 .slot-4 { grid-column: 3 / span 2; grid-row: 5 / span 4; }

  .wall-grid.layout-5 .slot-1 { grid-column: 1 / span 2; grid-row: 1 / span 3; }
  .wall-grid.layout-5 .slot-2 { grid-column: 3 / span 2; grid-row: 1 / span 3; }
  .wall-grid.layout-5 .slot-3 { grid-column: 1 / span 2; grid-row: 4 / span 3; }
  .wall-grid.layout-5 .slot-4 { grid-column: 3 / span 2; grid-row: 4 / span 3; }
  .wall-grid.layout-5 .slot-5 { grid-column: 1 / span 4; grid-row: 7 / span 2; }

  .media-grid,
  .trace-grid {
    gap: 9px;
  }

  .media-grid .image-frame,
  .trace-grid .image-frame,
  .detail-grid .image-frame:nth-child(3n + 1),
  .installation-grid .image-frame:nth-child(3n + 2),
  .relation-grid .image-frame,
    .route-grid .image-frame {
    grid-column: span 12;
  }

  .related-work {
    grid-column: span 12;
  }

  .hero-image {
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
  }

  .work-page .hero-image img {
    height: auto;
    max-height: 72vh;
    object-fit: contain;
  }
}
