/* ============================================================
   SANGHOON SUNG — PORTFOLIO
   Inspired by fionajaneburgess.com
   ============================================================ */

/* ========================
   RESET & ROOT
   ======================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #101010;
  --white: #fdfdfd;
}

html {
  /* 1rem = ~7.5px at 1440px — scales fluidly with viewport */
  font-size: 0.5208333333vw;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--black) transparent;
}

/* Webkit 스크롤바 — 얇은 검정 라인 */
::-webkit-scrollbar {
  width: 2px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--black);
  border-radius: 0;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  background-color: var(--white);
  color: var(--black);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;
}

a, button, a *, button * {
  text-decoration: none;
  color: inherit;
  cursor: none;
}

ul {
  list-style: none;
}

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

/* ========================
   CUSTOM CURSOR
   ======================== */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 1.8rem;
  height: 1.8rem;
  margin-top: -0.9rem;
  margin-left: -0.9rem;
  pointer-events: none;
  z-index: 999999;
  mix-blend-mode: difference;
  color: var(--white);
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor__inner {
  width: 100%;
  height: 100%;
  background: currentColor;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cursor.is-over-link .cursor__inner {
  transform: rotate(45deg);
}

.cursor.is-pressed .cursor__inner {
  transform: scale(0.75) rotate(-15deg);
}

.cursor.is-pressed.is-over-link .cursor__inner {
  transform: scale(0.75) rotate(60deg);
}

/* ========================
   PROGRESS BAR
   ======================== */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.25rem;
  z-index: 999999999;
  mix-blend-mode: difference;
  pointer-events: none;
}

.progress-bar__strap {
  height: 100%;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}

/* ========================
   HEADER
   ======================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 6000;
  padding: 3.2rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
  color: var(--white);
  pointer-events: none;
}

.header a {
  pointer-events: all;
}

/* Name — hover 시 Saintiego 로 전환 */
.header__name {
  font-size: 3.6rem;
  letter-spacing: 0.03em;
  line-height: 1;
  position: relative;
  display: inline-block;
  overflow: hidden;
  height: 3.8rem;
}

.header__name span {
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header__name-hover {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(110%);
  opacity: 0;
  white-space: nowrap;
}

.header__name:hover .header__name-default {
  transform: translateY(-110%);
  opacity: 0;
}

.header__name:hover .header__name-hover {
  transform: translateY(0%);
  opacity: 1;
}

/* 우측 내비 (서브 페이지에서 Index 링크) */
.header__nav {
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  line-height: 1;
}

.header__nav a {
  position: relative;
  display: inline-block;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -0.2rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.header__nav a:hover::after {
  transform: scaleX(1);
}

/* ========================
   SECTION WORK (INDEX)
   ======================== */
.section-work {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;          /* 블렌딩 컨텍스트 경계 설정 */
  background: var(--white);    /* difference 계산 기준 배경 */
}

/* Preview 컨테이너
   z-index 없음 → stacking context 생성 안 함
   DOM 순서상 work-list보다 앞에 있으므로 자연히 텍스트 뒤에 렌더링됨 */
.previews-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.work-list__preview {
  position: absolute;
  width: 65rem;
  height: 37rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-list__preview.is-visible {
  opacity: 1;
}

.work-list__preview img,
.work-list__preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.6s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.work-list__preview.is-visible img,
.work-list__preview.is-visible video {
  transform: scale(1.005);
}

/* 각 카테고리 프리뷰 위치 (section-work 기준) */
.preview--exhibition   { left: 2rem;  top: 10rem; }
.preview--artwork      { right: 2rem; top: 8rem; }
.preview--documentary  { left: 2rem;  bottom: 10rem; }
.preview--photography  { left: 50%;  top: 50%; transform: translate(-50%, -50%); }
.preview--branding     { right: 2rem; bottom: 10rem; }
.preview--samadhi      { left: 18rem; top: 8rem; }
.preview--contact      { right: 18rem; bottom: 8rem; }

/* 프리뷰 is-visible 시 transform 유지 (위치 변경 없이 opacity만) */
.preview--photography.is-visible { transform: translate(-50%, -50%); }

/* 프리뷰 placeholder 배경색 */
.preview--exhibition  { background-color: #0a0a14; }
.preview--artwork     { background-color: #1a0f06; }
.preview--documentary { background-color: #060f10; }
.preview--photography { background-color: #0f0f0f; }
.preview--branding    { background-color: #140600; }
.preview--samadhi     { background-color: #050514; }
.preview--contact     { background-color: #0d0d0d; }

/* Work List
   mix-blend-mode: difference를 work-list 전체에 적용
   → 흰 배경 위: 흰 텍스트 - 흰 배경 = 검정
   → 어두운 이미지 위: 흰 텍스트 - 어두운 배경 = 은빛 */
.work-list {
  width: 120rem;
  max-width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 3.6rem;
  padding: 16rem 0 14rem;
  mix-blend-mode: difference;
  color: var(--white);
}

.work-list__item {
  padding: 0 3.1rem;
  margin-bottom: 1.2rem;
  line-height: 1;
}

.work-list__item a {
  position: relative;
  display: inline-block;
  line-height: 4rem;
}

/* 호버 언더라인 애니메이션 — 왼쪽에서 오른쪽으로 */
.work-list__item a::before {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 0;
  width: 100%;
  height: 0.2rem;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.work-list__item a:hover::before {
  transform: scaleX(1);
}

/* 텍스트 레이블 — color/mix-blend-mode는 work-list에서 상속 */
.work-list__label {
  display: inline-block;
}

/* 번호 위첨자 */
.work-list__label sup {
  font-size: 55%;
  font-weight: 300;
  position: relative;
  top: -0.5em;
  padding-right: 0.8rem;
  letter-spacing: 0.06em;
}

/* ========================
   ABOUT PAGE
   ======================== */
.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 14rem 3.5rem 8rem;
  position: relative;
}

.about-container {
  width: 100%;
  max-width: 120rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12rem;
  align-items: start;
}

.about-left {}

.about-name {
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
  position: relative;
}

.about-name__default {
  display: block;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-name__hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
}

.about-name:hover .about-name__default {
  opacity: 0;
  transform: translateY(-8px);
}

.about-name:hover .about-name__hover {
  opacity: 1;
  transform: translateY(0);
}

.about-title {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #555;
  line-height: 1.8;
}

.about-right {}

.about-bio {
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--black);
  margin-bottom: 5rem;
}

.about-bio p + p {
  margin-top: 2rem;
}

.about-contact {
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.about-contact a {
  display: inline-block;
  position: relative;
}

.about-contact a::after {
  content: '';
  position: absolute;
  bottom: -0.1rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-contact a:hover::after {
  transform: scaleX(1);
}

/* ========================
   ABOUT — SCROLL HINT
   ======================== */
.about-scroll-hint {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  opacity: 0.28;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
  white-space: nowrap;
}

.about-scroll-line {
  width: 1px;
  height: 4rem;
  background: var(--black);
  transform-origin: top;
  animation: scrollLineGrow 2s ease-in-out infinite;
}

@keyframes scrollLineGrow {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  80%  { transform: scaleY(1); opacity: 0; }
  100% { transform: scaleY(0); opacity: 0; }
}

/* ========================
   PHOTOGRAPHY — MASONRY
   ======================== */
.masonry-grid {
  columns: 4;
  column-gap: 4.8rem;
  padding: 0 0 14rem;
  max-width: 100rem;
  margin: 0 auto;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 4.8rem;
  overflow: visible;
  position: relative;
  z-index: 0;
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 36rem;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              z-index 0s;
}

.masonry-item:hover {
  z-index: 10;
}

.masonry-item:hover img {
  transform: scale(1.25);
}

/* ========================
   CV SECTION
   ======================== */
.cv-section {
  padding: 2rem 3.5rem 8rem;
}

.cv-inner {
  width: 100%;
  max-width: 120rem;
  margin: 0 auto;
}

.cv-block {
  margin-bottom: 3.5rem;
}

.cv-block:last-child {
  margin-bottom: 0;
}

.cv-heading {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888;
  padding-bottom: 1rem;
  border-bottom: 1px solid #d8d8d8;
  margin-bottom: 0;
}

.cv-row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 3rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #efefef;
  font-size: 1.55rem;
  font-weight: 300;
  line-height: 1.5;
}

.cv-year {
  color: #999;
  padding-top: 0.05em;
}

.cv-detail {
  color: var(--black);
}

/* ========================
   ARTWORK — HORIZONTAL STRIP
   ======================== */
.artwork-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.artwork-header {
  padding: 14rem 3.5rem 2rem;
  flex-shrink: 0;
}

.artwork-strip {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding-top: 2rem;
  gap: 2rem;
  overflow: hidden;
  padding: 2rem calc(50vw - 22rem) 0;
}

.artwork-hint {
  flex-shrink: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaa;
  padding: 1.8rem 0 2rem;
}

.artwork-card {
  flex-shrink: 0;
  height: 62vh;
}

.artwork-card__image {
  height: 100%;
  aspect-ratio: 16 / 9; /* 기본값, 인라인 style로 개별 지정 */
  position: relative;
  overflow: hidden;
  background-color: #141414;
  transition: opacity 0.3s;
}

.artwork-card.is-sounding .artwork-card__image::after {
  content: '♦';
  position: absolute;
  bottom: 1.4rem;
  right: 1.6rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  z-index: 2;
  pointer-events: none;
}

.artwork-vimeo-wrap {
  position: absolute;
  inset: 0;
}

.artwork-vimeo-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* iframe 위 투명 오버레이 — iframe 이벤트 차단 + 커서 유지 */
.artwork-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: all;
  cursor: none;
}

/* 컨트롤 — 중앙 하단, 텍스트만 */
.artwork-controls {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0 2.5rem;
}

.artwork-ctrl-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
  padding: 0;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.artwork-ctrl-btn:hover {
  opacity: 1;
}

.artwork-ctrl-sep {
  width: 1px;
  height: 1.1rem;
  background: #bbb;
}

/* ========================
   DOCUMENTARY
   ======================== */
.doc-main {
  position: relative;
  height: 100vh;
  overflow: hidden;
  padding: 0 7rem;
}

.doc-main .archive-header {
  padding: 10rem 0 2rem;
}

.doc-items-wrap {
  position: relative;
  height: calc(100vh - 26rem);
}

.doc-item {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 5rem;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4rem);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.doc-item.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* 네비 버튼 */
.doc-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-family: inherit;
  font-size: 2rem;
  color: var(--black);
  opacity: 0.25;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
}

.doc-nav-btn--prev {
  left: 1.5rem;
}

.doc-nav-btn--next {
  right: 1.5rem;
}

.doc-nav-btn--prev:hover {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

.doc-nav-btn--next:hover {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

.doc-video-col {
  position: relative;
}

.doc-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.doc-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: none;
  z-index: 2;
}

.doc-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.doc-controls {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid #e0e0e0;
}

.doc-ctrl-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--black);
  padding: 0 2rem 0 0;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.doc-ctrl-btn:hover {
  opacity: 1;
}

.doc-ctrl-sep {
  width: 1px;
  height: 1.1rem;
  background: #ccc;
  margin-right: 2rem;
}

.doc-info-col {
  padding-left: 2rem;
}

.doc-category {
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.6rem;
}

.doc-title {
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.doc-meta {
  font-size: 1.3rem;
  font-weight: 300;
  color: #888;
  letter-spacing: 0.04em;
  margin-bottom: 3rem;
}

.doc-desc {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.9;
  color: #333;
}

.doc-desc p + p {
  margin-top: 1.6rem;
}

/* ========================
   ARCHIVE PAGE (카테고리 내부)
   ======================== */
.archive-header {
  padding: 16rem 3.5rem 6rem;
}

.archive-title {
  font-size: 6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.archive-count {
  font-size: 1.5rem;
  font-weight: 300;
  color: #888;
  margin-top: 1.5rem;
  letter-spacing: 0.04em;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem 3rem;
  padding: 2rem 3.5rem 12rem;
}

.archive-item {
  display: block;
}

.archive-item__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 1.8rem;
  background-color: #e8e8e8;
}

.archive-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.archive-item:hover .archive-item__image img {
  transform: scale(1.0);
}

.archive-item__title {
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.archive-item__meta {
  font-size: 1.3rem;
  font-weight: 300;
  color: #888;
  letter-spacing: 0.03em;
}

/* ========================
   SAMADHI
   ======================== */

/* 1. 인트로 영상 — 중앙 25% */
.samadhi-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 6rem 0 3rem;
}

.samadhi-intro__video {
  width: 25%;
  aspect-ratio: 16 / 9;
  position: relative;
}

.samadhi-intro__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.samadhi-intro__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: none;
  pointer-events: all;
}

.samadhi-intro__controls {
  display: flex;
  align-items: center;
  gap: 0;
}

/* 2. 소개 텍스트 */
.samadhi-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 20rem;
  gap: 1.8rem;
}

.samadhi-bio p {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--black);
}

/* 3. 프로젝트 영상 */
.samadhi-works {
  padding: 4rem 8rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

.samadhi-work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.samadhi-work__video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
  margin-bottom: 1.6rem;
}

.samadhi-work__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.samadhi-work__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: none;
  pointer-events: all;
}

.samadhi-work__controls {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid #e0e0e0;
}

.samadhi-work__title {
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.samadhi-work__meta {
  font-size: 1.3rem;
  font-weight: 300;
  color: #888;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
}

.samadhi-work__desc {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.9;
  color: #333;
}

.samadhi-work__desc p + p {
  margin-top: 1.4rem;
}

/* 4. 인스타그램 */
.samadhi-instagram {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8rem 0 16rem;
}

.samadhi-instagram__link {
  font-size: 5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--black);
  text-decoration: none;
  position: relative;
}

.samadhi-instagram__link::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.samadhi-instagram__link:hover::after {
  transform: scaleX(1);
}

/* ========================
   WORK MODAL
   ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #101010;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s 0.4s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s 0s;
}

/* 닫기 버튼 */
.modal-close {
  position: absolute;
  top: 3rem;
  right: 3.5rem;
  z-index: 10;
  background: none;
  border: none;
  color: #fdfdfd;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  cursor: none;
  opacity: 0.6;
  transition: opacity 0.3s;
  padding: 0;
}

.modal-close:hover {
  opacity: 1;
}

/* 왼쪽 — 영상 영역 */
.modal-left {
  flex: 0 0 62%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 4rem 4rem 4rem;
}

.modal-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.modal-video-wrap iframe,
.modal-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* 영상 하단 컨트롤 바 */
.modal-controls {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(253,253,253,0.12);
  padding-top: 1.6rem;
}

.modal-ctrl-btn {
  background: none;
  border: none;
  color: #fdfdfd;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 0.07em;
  cursor: none;
  padding: 0 2.5rem 0 0;
  opacity: 0.55;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.modal-ctrl-btn:hover {
  opacity: 1;
}

.modal-ctrl-btn:first-child {
  padding-left: 0;
}

/* 구분선 */
.modal-ctrl-sep {
  width: 1px;
  height: 1.2rem;
  background: rgba(253,253,253,0.2);
  margin: 0 2.5rem 0 0;
}

.modal-ctrl-vimeo {
  margin-left: auto;
  padding-right: 0;
}

/* 오른쪽 — 텍스트 영역 */
.modal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 4rem 4rem 5rem;
  border-left: 1px solid rgba(253,253,253,0.1);
  color: #fdfdfd;
  overflow-y: auto;
}

.modal-category {
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,253,253,0.4);
  margin-bottom: 2.5rem;
}

.modal-title {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.modal-meta {
  font-size: 1.3rem;
  font-weight: 300;
  color: rgba(253,253,253,0.45);
  letter-spacing: 0.03em;
  margin-bottom: 4rem;
}

.modal-desc {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.9;
  color: rgba(253,253,253,0.75);
}

.modal-desc p + p {
  margin-top: 1.5rem;
}

/* ========================
   CONTACT PAGE
   ======================== */
.contact-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 12rem 3.5rem;
}

.contact-heading {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4rem;
}

.contact-email {
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--black);
  display: block;
  position: relative;
  margin-bottom: 1.5rem;
}

.contact-email:last-of-type {
  margin-bottom: 6rem;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-email:hover::after {
  transform: scaleX(1);
}

.contact-socials {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.contact-socials a {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  position: relative;
}

.contact-socials a::after {
  content: '';
  position: absolute;
  bottom: -0.2rem;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-socials a:hover::after {
  transform: scaleX(1);
}

/* ========================
   MOBILE  (≤ 767px)
   ======================== */
@media (max-width: 767px) {

  /* ── 기본 ── */
  html {
    font-size: 4vw;   /* 1rem ≈ 15px at 375px */
    cursor: auto;
  }

  body {
    cursor: auto;
  }

  .cursor,
  .progress-bar {
    display: none;
  }

  a, button, a *, button * {
    cursor: auto;
  }

  /* ── 헤더 ── */
  .header {
    padding: 2rem 2.4rem;
  }

  .header__name {
    font-size: 2.2rem;
    height: 2.4rem;
  }

  /* ── INDEX ── */
  .work-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 12rem 2.4rem 8rem;
    font-size: 3rem;
    gap: 0;
  }

  .work-list__item {
    padding: 0;
    margin-bottom: 0.6rem;
  }

  .work-list__preview {
    display: none;
  }

  /* ── ABOUT ── */
  .about-section {
    padding: 12rem 2.4rem 6rem;
    align-items: flex-start;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .about-name {
    font-size: 4.2rem;
    margin-bottom: 2rem;
  }

  .about-title {
    font-size: 1.5rem;
  }

  .about-bio {
    font-size: 1.6rem;
    line-height: 1.8;
    margin-bottom: 3rem;
  }

  .about-scroll-hint {
    display: none;
  }

  /* ── CV ── */
  .cv-section {
    padding: 1rem 2.4rem 5rem;
  }

  .cv-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem 0;
    font-size: 1.4rem;
  }

  .cv-year {
    display: none;
  }

  .cv-heading {
    font-size: 1rem;
  }

  /* ── ARCHIVE (Exhibition 등) ── */
  .archive-header {
    padding: 12rem 2.4rem 3rem;
  }

  .archive-title {
    font-size: 3.5rem;
  }

  .archive-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    padding: 2rem 2.4rem 10rem;
  }

  /* ── PHOTOGRAPHY ── */
  .masonry-grid {
    columns: 2;
    column-gap: 2rem;
    padding: 0 2.4rem 8rem;
    max-width: 100%;
  }

  .masonry-item {
    margin-bottom: 2rem;
  }

  .masonry-item img {
    max-height: none;
  }

  .masonry-item:hover img {
    transform: none;  /* 모바일에서 hover 스케일 제거 */
  }

  /* ── ARTWORK ── */
  .artwork-main {
    height: auto;
    overflow: visible;
  }

  .artwork-strip {
    flex-direction: column;
    overflow: visible;
    padding: 0 2.4rem 6rem;
    gap: 3rem;
    transform: none !important;  /* lerp translateX 무력화 */
  }

  .artwork-card {
    height: auto;
    width: 100%;
  }

  .artwork-card__image {
    height: auto;
    width: 100%;
  }

  .artwork-hint {
    padding: 1rem 0 0.5rem;
  }

  .artwork-controls {
    padding: 1rem 0 1.5rem;
  }

  /* ── DOCUMENTARY ── */
  .doc-main {
    height: auto;
    overflow: visible;
    padding: 0 2.4rem;
  }

  .doc-main .archive-header {
    padding: 10rem 0 2rem;
  }

  .doc-items-wrap {
    height: auto;
    position: relative;
  }

  .doc-item {
    position: relative;
    inset: auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    padding-bottom: 6rem;
  }

  .doc-item.is-active {
    display: grid;
    opacity: 1;
    transform: none;
  }

  .doc-info-col {
    padding-left: 0;
  }

  .doc-title {
    font-size: 2.2rem;
  }

  .doc-desc {
    font-size: 1.4rem;
  }

  .doc-nav-btn {
    position: static;
    transform: none;
    font-size: 2.5rem;
    opacity: 0.4;
    display: inline-block;
    margin-top: 1rem;
  }

  .doc-nav-btn--prev {
    margin-right: 2rem;
  }

  /* 네비 버튼을 doc-main 하단에 한 줄로 배치 */
  #docPrevBtn, #docNextBtn {
    position: static;
    display: inline-block;
  }

  /* ── SAMADHI ── */
  .samadhi-intro {
    padding: 8rem 2.4rem 2rem;
  }

  .samadhi-intro__video {
    width: 80%;
  }

  .samadhi-bio {
    padding: 2.5rem 2.4rem;
    gap: 1.2rem;
  }

  .samadhi-bio p {
    font-size: 1.6rem;
  }

  .samadhi-works {
    padding: 2rem 2.4rem 6rem;
    gap: 6rem;
  }

  .samadhi-work {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .samadhi-work__desc {
    font-size: 1.4rem;
  }

  .samadhi-instagram {
    padding: 4rem 2.4rem 10rem;
  }

  .samadhi-instagram__link {
    font-size: 2.5rem;
  }

  /* ── MODAL ── */
  .modal-overlay {
    flex-direction: column;
    overflow-y: auto;
  }

  .modal-left {
    flex: none;
    width: 100%;
    padding: 7rem 2rem 2rem;
  }

  .modal-right {
    flex: none;
    width: 100%;
    padding: 2rem 2rem 6rem;
    border-left: none;
    border-top: 1px solid rgba(253,253,253,0.1);
    overflow-y: visible;
  }

  .modal-title {
    font-size: 2.2rem;
  }

  .modal-desc {
    font-size: 1.4rem;
  }

  .modal-close {
    top: 2rem;
    right: 2rem;
    font-size: 1.3rem;
  }

  /* ── CONTACT ── */
  .contact-section {
    padding: 10rem 2.4rem 6rem;
  }

  .contact-email {
    font-size: 2.2rem;
    word-break: break-all;
  }

  .contact-socials {
    gap: 2rem;
  }

  .contact-socials a {
    font-size: 1.4rem;
  }

  /* ── 컨트롤 버튼 공통 (Play / Sound / Pause) ── */
  .doc-ctrl-btn {
    padding: 0 1.2rem 0 0;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
  }

  .doc-ctrl-sep {
    margin-right: 1.2rem;
    width: 1px;
    flex-shrink: 0;
  }

  .doc-controls {
    margin-top: 1.2rem;
    padding-top: 1rem;
  }

  .samadhi-work__controls {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
  }

  /* artwork 컨트롤 */
  .artwork-hint {
    font-size: 1rem;
  }

  .artwork-ctrl-btn {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
  }

  /* 가로 overflow 전체 차단 */
  body {
    overflow-x: hidden;
  }

  main {
    overflow-x: hidden;
  }
}

/* ========================
   TABLET  (768px – 1279px)
   ======================== */
@media (min-width: 768px) and (max-width: 1279px) {

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry-grid {
    columns: 3;
  }

  .about-container {
    gap: 6rem;
  }

  .samadhi-bio {
    padding: 4rem 8rem;
  }

  .samadhi-intro__video {
    width: 40%;
  }

  .doc-main {
    padding: 0 4rem;
  }
}
