/* ============================================================
   공개 화면

   PRD 3절의 톤 — 화려하지 않고, 차분하고, 작품이 주인공.
   값은 전부 tokens.css 에서 가져온다

   이 파일 전체를 관통하는 규칙 하나
     **작품 사진을 잘라서 보여주지 않는다.**
     격자를 반듯하게 맞추려고 object-fit: cover 를 쓰면
     세로로 긴 그림의 위아래가 잘려 나간다. 그림을 자르는 일은 하지 않는다.
     대신 칸의 높이를 정해 두고 그 안에 그림 전체를 넣는다(contain).
     갤러리 벽에 크기가 다른 그림을 나란히 거는 것과 같다
   ============================================================ */

/* 키보드로 다니는 사람이 메뉴를 건너뛸 수 있게 */
.skip {
  position: absolute;
  left: -9999px;
  top: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-ink);
  color: #fff;
  border-radius: var(--r-md);
  z-index: 100;
}
.skip:focus { left: var(--sp-4); color: #fff; }


/* ── 머리말 ──────────────────────────────────────────────────*/

.head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}

.head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  min-height: var(--header-h);
}

.head__name {
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: var(--sp-2);
}

.nav__a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
  border-bottom: 2px solid transparent;
}

.nav__a:hover  { color: var(--c-ink); }
.nav__a.is-on  { color: var(--c-ink); border-bottom-color: var(--c-accent); }


/* ── 홈 첫 화면 ──────────────────────────────────────────────
   스크롤하지 않아도 「무엇을 그리는가」가 보여야 한다 (PRD 4.1) */

.hero {
  padding-block: var(--sp-10) var(--sp-12);
}

.hero__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
}

.hero__img {
  max-width: min(1100px, 100%);
  /* 화면 높이에 맞춰 줄인다. 세로로 긴 그림이 화면을 넘어가지 않게 */
  max-height: 62vh;
  width: auto;
  object-fit: contain;
  box-shadow: var(--shadow-md);
}

.hero__cap {
  margin-top: var(--sp-8);
  text-align: center;
}

.hero__name {
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: var(--lh-tight);
}

.hero__intro {
  max-width: var(--wrap-text);
  margin: var(--sp-3) auto 0;
  font-size: var(--fs-md);
  color: var(--c-ink-2);
  line-height: var(--lh-normal);
}

.hero__work { margin-top: var(--sp-5); }

.hero--empty { padding-block: var(--sp-24); text-align: center; }


/* ── 구역 머리 ───────────────────────────────────────────────*/

.sechead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-line);
}

.sechead .link { font-size: var(--fs-sm); }


/* ── 작품 격자 ───────────────────────────────────────────────*/

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-10) var(--sp-6);
}

.cell__a { display: block; }

/* 칸마다 높이를 같게 두고 그 안에 그림 전체를 넣는다.
   크기가 다른 그림이 나란히 걸려도 줄이 맞는다 */
.cell__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 260px;
  margin-bottom: var(--sp-4);
}

.cell__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.cell__a:hover .cell__img {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cell__cap { display: block; }


/* ── 시리즈 거르기 ───────────────────────────────────────────*/

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-block: var(--sp-6) var(--sp-10);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
}

.chip:hover { border-color: var(--c-ink-3); color: var(--c-ink); }

.chip.is-on {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: #fff;
}


/* ── 페이지 넘김 ─────────────────────────────────────────────*/

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  margin-top: var(--sp-16);
}

.pager__now { font-size: var(--fs-sm); color: var(--c-ink-3); }


/* ── 작품 상세 ───────────────────────────────────────────────*/

.detail { padding-block: var(--sp-8) var(--sp-16); }

.shotview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
}

.shotview__img {
  max-width: min(1200px, 100%);
  max-height: 78vh;
  width: auto;
  object-fit: contain;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}

.shotnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.shotnav__btn {
  width: var(--tap);
  height: var(--tap);
  background: transparent;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  font-size: var(--fs-md);
  cursor: pointer;
}

.shotnav__btn:hover { background: var(--c-surface); }

.shotnav__n { font-size: var(--fs-sm); color: var(--c-ink-3); }

.shothint {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--c-ink-3);
}

.detail__body {
  margin: var(--sp-12) auto 0;
  padding-inline: var(--gutter);
  text-align: center;
}

.detail__title {
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

.detail__cap { margin-top: var(--sp-3); }

.detail__series { margin-top: var(--sp-5); }

.detail__desc {
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-line);
  text-align: left;
}


/* ── 앞뒤 작품 ───────────────────────────────────────────────*/

.neighbors {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-16);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-line);
}

.neighbors__a {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  max-width: 45%;
}

.neighbors__a--next { text-align: right; align-items: flex-end; }

.neighbors__lab { font-size: var(--fs-xs); color: var(--c-ink-3); }

.neighbors__t {
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.backlink { margin-top: var(--sp-10); text-align: center; font-size: var(--fs-sm); }


/* ── 크게 보기 ───────────────────────────────────────────────*/

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  background: var(--c-viewer-bg);
  cursor: zoom-out;
  animation: fade var(--dur) var(--ease);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox__x {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: var(--tap);
  height: var(--tap);
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: var(--r-full);
  color: #fff;
  font-size: var(--fs-md);
  cursor: pointer;
}

.lightbox__hint {
  position: absolute;
  bottom: var(--sp-5);
  left: 0; right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .5);
  font-size: var(--fs-xs);
}


/* ── 글 ──────────────────────────────────────────────────────*/

.block { margin-top: var(--sp-12); }
.block .t-label { margin-bottom: var(--sp-5); }

/* 경력은 줄바꿈이 곧 뜻이다. 문단으로 묶지 않고 줄 그대로 둔다 */
.career {
  font-size: var(--fs-base);
  line-height: 2;
  color: var(--c-ink);
}

.contact {
  font-size: var(--fs-md);
  line-height: 2.1;
}

.contact__hint {
  margin-top: var(--sp-8);
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
}

.lede {
  margin-top: var(--sp-4);
  font-size: var(--fs-md);
  color: var(--c-ink-2);
  line-height: var(--lh-normal);
}

.blank {
  padding-block: var(--sp-16);
  text-align: center;
  color: var(--c-ink-3);
}

.blank-page { text-align: center; padding-block: var(--sp-24); }
.blank-page .btn { margin-top: var(--sp-8); }


/* ── 꼬리말 ──────────────────────────────────────────────────*/

.foot {
  margin-top: var(--sp-24);
  padding-block: var(--sp-12);
  border-top: 1px solid var(--c-line);
  text-align: center;
}

.foot__name {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.foot__contact {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
  line-height: 1.9;
}

.foot__copy {
  margin-top: var(--sp-6);
  font-size: var(--fs-xs);
  color: var(--c-ink-3);
}


/* ── 좁은 화면 ───────────────────────────────────────────────*/

@media (max-width: 640px) {
  .hero { padding-block: var(--sp-6) var(--sp-10); }
  .hero__img   { max-height: 52vh; }
  .shotview__img { max-height: 64vh; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8) var(--sp-4); }
  .cell__frame { height: 168px; }

  .detail__body { margin-top: var(--sp-8); }
  .neighbors { gap: var(--sp-3); }
  .neighbors__a { max-width: 48%; }
}

@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
  .cell__frame { height: 220px; }
}
