:root {
  color-scheme: dark;
  --background: #0f0f0f;
  --foreground: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --rule: rgba(255, 255, 255, 0.5);
  --hx: 0px; /* 히어로 하단 여백(첫 화면에서 아래 구분선이 안 보이도록) */
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
}

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

p,
h1,
h2,
dl,
dd {
  margin: 0;
}

.viewport {
  position: relative;
  width: 100%;
  height: 6116px;
  overflow: hidden;
  background: var(--background);
}

.site {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1920px;
  height: 6116px;
  transform: translateX(-50%);
  transform-origin: top center;
  overflow: hidden;
  background: var(--background);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.small-copy {
  font-size: calc(14px / var(--site-scale, 1));
  line-height: 1.24;
  font-weight: 300;
}

.display-title {
  position: absolute;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 112px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -3.36px;
  white-space: nowrap;
}

.rule {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--rule);
  opacity: 0.6;
}


.rule--hero,
.rule--works,
.rule--contact,
.rule--footer {
  left: 50px;
  width: 1820px;
  height: 0.3px;
}

.rule--hero { top: calc(1010px + var(--hx)); }
.rule--works { top: calc(1755px + var(--hx)); }
.rule--contact { top: calc(5550px + var(--hx)); }
.rule--footer { top: calc(6014px + var(--hx)); }

/* 캔버스 밖 요소도 사이트 폰트·굵기·크기 그대로 (작은 텍스트 14px/300, 제목 400) */
.bar { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; }
.bar .small-copy, .bar a { font-size: 14px; font-weight: 400; }

/* ---------- fixed nav ---------- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: min(3.2292vw, 62px) clamp(16px, 2.6vw, 50px) 12px;
  line-height: 1.24;
  background: transparent;
}
.bar a { transition: color 0.3s; }
.bar { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s; }
.bar.is-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; } /* 스크롤하면 메뉴바 숨김 (TOP 버튼이 대신함) */
.bar a:hover { color: var(--muted); }
.bar__nav { display: flex; gap: 48px; }
@media (max-width: 700px) { .bar__nav { gap: 24px; } }

/* ---------- hero (원래 사이트와 동일: 인덱스 표 + 큰 타이틀) ---------- */
.identity {
  position: absolute;
  top: calc(62px + 17.36px / var(--site-scale, 1)); /* 고정 메뉴바 로고(LIA KIM) 바로 아래 줄 */
  left: 50px;
}

.edition {
  position: absolute;
  top: calc(62px + 70px / var(--site-scale, 1));
  left: 50px;
}

.index {
  position: absolute;
  top: 220px;
  left: 970px;
  width: 900px;
  line-height: 1;
}

.index-row {
  display: grid;
  align-items: center;
  width: 900px;
  height: max(32.3px, calc(2.3 * 14px / var(--site-scale, 1)));
  border-bottom: 0.3px solid var(--rule);
}

.index-row--section {
  grid-template-columns: 154px 1fr;
}

.index-row--project {
  position: relative;
  grid-template-columns: 405px 103px;
  margin-left: 306px;
  width: 508px;
  justify-content: space-between;
  border-bottom: 0;
}

.index-row--project::after {
  content: "";
  position: absolute;
  left: -306px;
  width: 904px;
  height: max(32.3px, calc(2.3 * 14px / var(--site-scale, 1)));
  border-bottom: 0.3px solid var(--rule);
}

.index-row--project { cursor: pointer; transition: color 0.3s; }
.index-row--project:hover { color: var(--muted); }

.index-row--project span:last-child {
  text-align: right;
  white-space: nowrap;
}

.index-row--last {
  border-bottom: 0;
}

.hero-title {
  top: 882px;
  left: auto;
  right: 50px;
  white-space: nowrap;
}

#about {
  position: absolute;
  inset: calc(1010px + var(--hx)) 0 auto;
  height: 745px;
}

.section-number {
  position: absolute;
  left: 50px;
}

#about .section-number { top: 16px; }
.about-title { top: 28px; left: 50px; }

.about-left { position: absolute; top: 190px; left: 1050px; width: 450px; }
.about-intro {
  margin: 0 0 130px;
  width: 340px;
  font-family: Pretendard, "Apple SD Gothic Neo", sans-serif;
  font-size: calc(14px / var(--site-scale, 1));
  line-height: 1.72;
  font-weight: 300;
  letter-spacing: -0.02em;
  word-break: keep-all;
  text-wrap: balance;
  color: #fff;
}

.profile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 190px;
  left: 660px;
  width: 287.5px;
  height: 383.3px;
  border-radius: 8px;
  background: #353535;
  font-size: calc(14px / var(--site-scale, 1));
  line-height: 1.24;
}

.about-facts {
  position: relative;
  width: max-content;
  min-width: 450px;
  line-height: 1;
}

.about-facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  height: max(32.3px, calc(2.3 * 14px / var(--site-scale, 1)));
  border-bottom: 0.3px solid var(--rule);
}

.about-facts dt,
.about-facts dd {
  white-space: nowrap;
}

#works {
  position: absolute;
  inset: calc(1755px + var(--hx)) 0 auto;
  height: 3795px;
}

/* ---------- works: DFY 스타일 — 필터 + 2열 큰 카드(4:3) + 제목/설명/태그 ---------- */
.works-body { position: absolute; top: 205px; left: 0; width: 1920px; }
.works-filter {
  position: relative;
  margin-left: 1350px;
  margin-bottom: 200px; /* 위(WORKS와) 간격 = 아래(카드와) 간격 */
  width: 520px;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.works-filter button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 520px;
  height: max(32.3px, calc(2.3 * 14px / var(--site-scale, 1)));
  border-bottom: 0.3px solid var(--rule);
  color: var(--muted);
  font: inherit;
  transition: color 0.3s;
}
.works-filter button:hover, .works-filter button.is-active { color: #fff; }
.works-filter button:last-child { border-bottom: 0; }
.works-grid {
  position: relative;
  margin-left: 50px;
  width: 1820px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr)); /* DFY처럼 12컬럼 그리드 */
  column-gap: 20px;
  row-gap: 180px;
  align-items: start;
}
/* 카드마다 다른 크기·위치 (DFY 홈 슬롯 배치) */
.wcard2.slot-a { grid-area: 1 / 1 / 2 / 7;  margin-top: 0; }   /* 좌 큰 가로 카드 */
.wcard2.slot-b { grid-area: 1 / 9 / 2 / 13; margin-top: 300px; }    /* 우 세로 카드 */
.wcard2.slot-c { grid-area: 2 / 2 / 3 / 9;  margin-top: 60px; }    /* 좌측으로 치우친 와이드 */
.wcard2.slot-d { grid-area: 3 / 7 / 4 / 12; margin-top: 60px; }   /* 우 하단, 좁게 */
.wcard2.slot-b .wthumb { aspect-ratio: 464 / 600; }
.wcard2.slot-c .wthumb { aspect-ratio: 16 / 10; }
.wcard2 { display: block; }
.wcard2[hidden] { display: none; }
.works-grid.is-refresh .wcard2 { animation: wfade .5s ease backwards; }
@keyframes wfade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.wthumb { position: relative; display: block; width: 100%; aspect-ratio: 100 / 75; overflow: hidden; border-radius: 8px; background: #191919; }
.wthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.wthumb--mark img { object-fit: contain; padding: 22% 38%; box-sizing: border-box; }
.wthumb--momen img { object-position: 78% 50%; }
.wthumb--polaroid img { object-position: 52% 50%; }
/* 호버: 이미지 확대 대신 카드 전체가 살짝 작아짐 */
.wcard2 { transition: transform .6s cubic-bezier(.22, 1, .36, 1); transform-origin: 50% 40%; }
.wthumb { transition: border-radius .6s cubic-bezier(.22, 1, .36, 1), clip-path 1.1s cubic-bezier(.22, 1, .36, 1); }
.wthumb::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity .5s ease; pointer-events: none; }
a.wcard2:hover .wthumb::after { opacity: 1; }
/* 스크롤 등장: 썸네일이 아래에서 열리듯 나타나고 텍스트가 이어서 올라옴 */
.wcard2 { transition: opacity .9s ease, transform 1.1s cubic-bezier(.22, 1, .36, 1); }
.works-grid.is-armed .wcard2:not(.in) { opacity: 0; transform: translateY(70px); }
.works-grid.is-armed .wcard2:not(.in) .wthumb { clip-path: inset(100% 0 0 0); }
.works-grid.is-armed .wcard2:not(.in) .wmeta { opacity: 0; transform: translateY(20px); }
.wmeta { transition: opacity .8s ease .35s, transform .8s cubic-bezier(.22, 1, .36, 1) .35s; }
.wcard2 .wthumb img { transition: transform 1.4s cubic-bezier(.22, 1, .36, 1); }
.works-grid.is-armed .wcard2:not(.in) .wthumb img { transform: scale(1.25); }
.wmeta { display: grid; gap: calc(14px / var(--site-scale, 1)); margin-top: calc(14px / var(--site-scale, 1)); line-height: 1.24; }
.wmeta strong { font-weight: 400; color: #fff; font-size: calc(18px / var(--site-scale, 1)); line-height: 1.2; }
.wmeta__desc { color: var(--muted); }
.wmeta__tags { display: flex; flex-wrap: wrap; gap: calc(6px / var(--site-scale, 1)); }
.wmeta__tags span { font-size: calc(12px / var(--site-scale, 1)); line-height: 1; padding: calc(6px / var(--site-scale, 1)) calc(9px / var(--site-scale, 1)); border-radius: calc(4px / var(--site-scale, 1)); background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.7); }

#works > .section-number { top: 16px; }
.works-title { top: 28px; left: 1350px; } /* 필터와 좌측 정렬 */

.project {
  position: absolute;
  inset-inline: 0;
  height: 532px;
}

.project-meta {
  position: absolute;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  width: 747px;
  line-height: 1.24;
}

.project-title,
.project-year {
  display: flex;
  flex-direction: column;
}

.project-title span {
  color: var(--muted);
}

.project-image {
  position: absolute;
  width: 747px;
  height: 472px;
  overflow: hidden;
  background: #353535;
}

.project-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project--dipz { top: 309px; }
.project--dipz .project-meta { left: 357px; }
.project--dipz .project-image { top: 60px; left: 357px; }
.project-image--dipz { display: flex; align-items: center; justify-content: center; background: #191919; }
.project-image--dipz > img { width: 189.998px; height: 196.564px; object-fit: contain; }

.project--momen { top: 309px; }
.project--momen .project-meta { left: 1123px; }
.project--momen .project-image { top: 60px; left: 1123px; }

.project--parallax { top: 961px; }
.project--parallax .project-meta { left: 357px; }
.project--parallax .project-image { top: 60px; left: 357px; }
.project-image--parallax > img { object-position: bottom; }

.parallax-wordmark {
  position: absolute;
  left: 23px;
  bottom: 16px;
  color: #000000;
  font-family: Panchang, "Helvetica Neue", sans-serif;
  font-size: 32px;
  line-height: 1;
  font-weight: 400;
}

.project--polaroid { top: 961px; }
.project--polaroid .project-meta { left: 1123px; }
.project--polaroid .project-image { top: 60px; left: 1123px; }

#contact {
  position: absolute;
  inset: calc(5550px + var(--hx)) 0 auto;
  height: 566px;
}

#contact > .section-number { top: 16px; }
.contact-name { position: absolute; top: 28px; left: 50px; }
.contact-title { top: 28px; left: auto; right: 50px; }

.contact-list {
  position: absolute;
  bottom: 122px;
  left: 50px;
  width: 747px;
  font-style: normal;
  line-height: 1;
}

.contact-list > a,
.contact-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: max(32.3px, calc(2.3 * 14px / var(--site-scale, 1)));
  border-bottom: 0.3px solid var(--rule);
}

.contact-list > div {
  border-bottom: 0;
}

.contact-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-action img {
  width: 12px;
  height: 12px;
}

.copyright {
  position: absolute;
  bottom: 130px;
  right: 50px;
  left: auto;
  white-space: nowrap;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1919px) {
  .site {
    left: 0;
    transform: scale(var(--site-scale, 1));
    transform-origin: top left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 우하단 TOP 버튼 — 캔버스 스케일과 무관하게 항상 실제 14px */
.to-top-fixed {
  position: fixed; right: 40px; bottom: 40px; z-index: 100;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 300; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background 0.3s, color 0.3s;
}
.to-top-fixed:hover { background: #fff; color: #0f0f0f; }
@media (max-width: 700px) { .to-top-fixed { right: 16px; bottom: 16px; } }
.to-top-fixed .ico { display: block; flex: 0 0 auto; }

/* 영문 작은 텍스트 자간 0 */
.small-copy:not(.ko) { letter-spacing: 0; }


/* 섹션 제목: DFY "VIEW ALL WORKS" 크기(1920px 기준 약 37.5px, 자간 -0.04em)에 맞춤 */
.about-title, .works-title, .contact-title { font-size: 37.5px; letter-spacing: -0.04em; }
