:root {
	--font: 'futura-pt', 'Futura PT', 'Futura PT Medium', Futura, 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', sans-serif;
	--font-brand: Helvetica, 'Helvetica Neue', Arial, sans-serif;
	--text: #000;
	--bg: #fff;
	--muted: rgba(0, 0, 0, .55);
	--line: rgba(0, 0, 0, .1);
	--surface: rgba(0, 0, 0, .06);
	--radius: .5rem;
	--shadow: 0 .25rem 1rem -.25rem rgba(0, 0, 0, .25);
	--side: 11rem;
}
@media (prefers-color-scheme: dark) {
	:root {
		--text: #fff;
		--bg: #000;
		--muted: rgba(255, 255, 255, .55);
		--line: rgba(255, 255, 255, .14);
		--surface: rgba(255, 255, 255, .1);
		--shadow: none;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 500 17px/1.75 var(--font);
	word-break: keep-all;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--text); color: var(--bg); }
a { color: inherit; text-decoration: none; }
a:hover, a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
img, video { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

.n { display: inline-block; margin-left: .35em; font-size: .75rem; color: var(--muted); vertical-align: top; text-decoration: none; }

/* ---------- 레이아웃: 왼쪽 고정 메뉴 + 오른쪽 내용 ---------- */
.shell {
	display: grid;
	grid-template-columns: var(--side) minmax(0, 1fr);
	column-gap: clamp(24px, 5vw, 72px);
	max-width: 1280px;
	margin: 0 auto;
	padding: 1.25rem clamp(16px, 3vw, 32px) 30vh;
	min-height: 100vh;
}
.side { position: sticky; top: 1.25rem; align-self: start; max-height: calc(100vh - 2.5rem); overflow-y: auto; }
.side-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.name { display: block; margin-bottom: 2rem; font-family: var(--font-brand); font-size: 1.25rem; font-weight: 400; line-height: 1.4; }
.name:hover { text-decoration: none; }
.side-tools { display: flex; align-items: center; gap: .15rem; margin-right: -.3rem; height: 1.75rem; }
.search-link { display: block; padding: .125rem .3rem; line-height: 0; }
.search-link svg { display: block; }
.search-link[aria-current] { opacity: .5; }
.menu-toggle { display: none; padding: .125rem .3rem; border: 0; background: none; color: var(--text); cursor: pointer; line-height: 0; }
.menu-toggle svg { display: block; }
.menu-toggle path { transform-box: view-box; transform-origin: 10px 10px; transition: transform .25s ease; }
.menu-toggle[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .l2 { transform: translateY(-3px) rotate(-45deg); }

.nav { line-height: 1.9; }
.nav .sub { margin: 0 0 .25rem 1.25rem; }
.filters { margin-top: 1.5rem; }
.fl { margin: 1rem 0 .25rem; color: var(--muted); font-size: .8125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0 .875rem; font-size: .9375rem; line-height: 1.8; }

.col { min-width: 0; padding-bottom: 1rem; }

/* ---------- 작업 목록 ---------- */
.intro { max-width: 34em; margin: 0 0 2.75rem; font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.75; }
.intro p { margin: 0; }
.caret { display: inline-block; width: .08em; height: 1em; margin-left: .06em; vertical-align: -.12em; background: currentColor; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.intro a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }

.works { border-top: 1px solid var(--line); padding-top: 1.5rem; }
.works-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.75rem; }
.works-title { margin: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.75; }
.filter-remove::after { content: ' ×'; color: var(--muted); }
.views { display: flex; gap: .25rem; margin-right: -.3rem; }
.views a { display: inline-flex; padding: .125rem .3rem; color: var(--muted); line-height: 0; }
.views svg { display: block; }
.views a:hover, .views a[aria-current] { color: var(--text); }

.items[data-view="card"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 2.5rem 1.25rem; }
.item { display: block; }
.item:hover { text-decoration: none; }
.thumb { display: grid; place-items: center; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.ph { font-size: 3rem; font-weight: 500; color: var(--muted); }
.t { margin: .75rem 0 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.y, .c { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.items[data-view="card"] .c { display: none; }
.y { white-space: nowrap; }

.items[data-view="list"] { border-top: 1px solid var(--line); }
.items[data-view="list"] .item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 8.5rem 13rem; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.items[data-view="list"] .info { display: contents; }
.items[data-view="list"] .thumb { border-radius: .25rem; box-shadow: none; }
.items[data-view="list"] .ph { font-size: 1.25rem; }
.items[data-view="list"] .t { margin: 0; }

.more { margin: 2.5rem 0 0; text-align: center; }
.more a { padding: .5rem 1.5rem; border: 1px solid var(--line); border-radius: 999px; }
.empty { color: var(--muted); }

/* ---------- 노드 보기 ---------- */
.nodes { position: relative; }
.nodes-map { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--surface); touch-action: pan-y; }
.nodes-links line { stroke: currentColor; stroke-opacity: .3; stroke-width: 1; }
.nodes-links line.is-active { stroke-opacity: .9; }
.nodes-links line.is-muted { stroke-opacity: .08; }
.nodes-point { cursor: pointer; }
.nodes-point circle { fill: currentColor; }
.nodes-point text { font-size: 11px; fill: currentColor; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.nodes-point.is-active circle { r: 7; }
.nodes-point.is-muted { opacity: .15; }
.nodes-zoom-hint { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: .9375rem; pointer-events: none; transition: opacity .4s; }
.nodes-zoom-hint.is-hidden { opacity: 0; }

/* ---------- 프로젝트 상세 ---------- */
.project { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0 clamp(24px, 4vw, 56px); }
.proj-meta { position: sticky; top: 1.25rem; align-self: start; }
.proj-cats { margin: 0; font-size: .9375rem; line-height: 1.6; }
.proj-cats a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.proj-title { margin: .25rem 0 1rem; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.facts { margin: 0; }
.facts > div { padding: .25rem 0; }
.facts dt { color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.facts dd { margin: 0; font-size: .9375rem; line-height: 1.6; }
.facts dd a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }

.proj-body { min-width: 0; }
.lead { margin: 0 0 1.25em; font-size: 1.125rem; }
.text { max-width: 36em; margin: 0 0 2.5rem; line-height: 1.9; }
.text p { margin: 0 0 1em; }
.text figure { margin: 2.25rem auto; max-width: min(100%, 22rem); }
.text figure img { display: block; max-width: 100%; height: auto; }
.text a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.embed { position: relative; margin: 0 0 1.5rem; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: grid; gap: 1.5rem; }
.gallery figure { margin: 0; }
.gallery img, .gallery video { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.gallery a { display: block; cursor: zoom-in; }
.gallery a:hover { text-decoration: none; }
.gallery figcaption { padding-top: .5rem; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.ext-links { margin: 2rem 0 0; line-height: 1.9; }
.ext-links a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.ext-links a::after { content: ' ↗'; color: var(--muted); }
.proj-tags { margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0 .875rem; font-size: .9375rem; }
.proj-tags a { color: var(--muted); }
.proj-tags a::before { content: '#'; }
.proj-tags a:hover { color: var(--text); }
.divider { margin: 3rem 0 1.5rem; border: 0; border-top: 1px solid var(--line); }
.related-title { margin: 0 0 1.5rem; font-size: 1.0625rem; font-weight: 500; }
.pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 3rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }

/* ---------- 검색 ---------- */
.search { margin: 1rem 0 1.5rem; }
.search-input { width: 100%; padding: .5rem 0; border: 0; border-bottom: 1px solid var(--text); background: none; color: inherit; font: inherit; font-size: 1.125rem; border-radius: 0; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus-visible { outline: none; border-bottom-width: 2px; }

/* ---------- 소개 ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 2rem clamp(24px, 4vw, 56px); margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.about-grid > :only-child { grid-column: 1 / -1; }
.about-photo { margin: 0; }
.about-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-name { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
.about-role { margin: 0 0 1.5rem; color: var(--muted); }
.about-block { margin-top: 2rem; }
.about-block h2 { margin: 0 0 .5rem; font-size: .9375rem; font-weight: 500; color: var(--muted); }
.history li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: .25rem 0; border-bottom: 1px solid var(--line); }
.hy { color: var(--muted); }
.hn { color: var(--muted); font-size: .9375rem; }

/* ---------- 이미지 확대창 ---------- */
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; }
.lightbox::backdrop { background: #000; }
.lb-stage { position: absolute; inset: 3.5rem 0 3rem; margin: 0; display: flex; flex-direction: column; }
.lb-viewport { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.lb-viewport img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.lightbox.is-zoomed .lb-viewport { overflow: auto; display: block; }
.lightbox.is-zoomed .lb-viewport img { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }
.lb-stage figcaption { padding: .5rem 1rem 0; text-align: center; font-size: .9375rem; color: rgba(255, 255, 255, .7); min-height: 2rem; }
.lb-btn { position: absolute; z-index: 1; padding: .375rem .875rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font-size: .9375rem; cursor: pointer; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { top: 50%; left: 1rem; }
.lb-next { top: 50%; right: 1rem; }
.lb-count { position: absolute; left: 0; right: 0; bottom: 1rem; margin: 0; text-align: center; font-size: .875rem; color: rgba(255, 255, 255, .6); }

/* 푸터: 맨 아래에 고정된 검정 띠. 뒤의 내용은 이 띠 아래로 묻혀서 안 보이고, 그 위로 올라오면 반전된 채로 나타나요.
   좌우 여백은 본문(사이트 제목)과 같은 선에 맞춰요 */
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; padding: .9rem calc(max(0px, (100% - 1280px) / 2) + clamp(16px, 3vw, 32px)) calc(.9rem + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); font-size: .875rem; }
.foot a:hover { color: var(--bg); }
/* 띠의 윗부분도 선이 아니라 그라데이션으로 번져서 올라가요 */
.foot::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 2.5rem; background: linear-gradient(to top, var(--text), transparent); pointer-events: none; }

@media (max-width: 900px) {
	.project { grid-template-columns: minmax(0, 1fr); }
	.proj-meta { position: static; margin-bottom: 1.5rem; }
}
@media (max-width: 760px) {
	body { font-size: 16px; }
	.shell { grid-template-columns: minmax(0, 1fr); }
	.side { position: static; max-height: none; margin-bottom: 1.5rem; }
	.name { margin-bottom: 1rem; }
	.menu-toggle { display: inline-block; }
	.side-body { display: none; }
	.side.is-open .side-body { display: block; margin-bottom: 1rem; }
	.items[data-view="list"] .item { grid-template-columns: 4.5rem minmax(0, 1fr); }
	.items[data-view="list"] .y { grid-column: 2; margin-top: -.75rem; }
	.items[data-view="list"] .c { display: none; }
	.about-grid { grid-template-columns: minmax(0, 1fr); }
	.about-photo { max-width: 12rem; }
	.lb-prev, .lb-next { top: auto; bottom: 1rem; }
	.lb-prev { left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* 아래쪽 깊이감: 하단에 고정된 '반전' 그라데이션.
   흰색을 difference로 섞어서, 아래로 잠길수록 뒤의 글자·사진·배경 색이 그만큼 반전돼요.
   (맨 아래는 완전 반전 = 검은 바탕에 흰 글자, 위로 올라오면 원래 색으로 돌아와요) */
.depth { position: fixed; left: 0; right: 0; bottom: 0; height: calc(33vh + var(--foot-h, 3rem)); z-index: 5; pointer-events: none;
	mix-blend-mode: difference;
	background: linear-gradient(to top, #fff 0%, rgba(255,255,255,.92) 14%, rgba(255,255,255,.7) 30%, rgba(255,255,255,.45) 50%, rgba(255,255,255,.2) 70%, rgba(255,255,255,.06) 88%, rgba(255,255,255,0) 100%); }

/* 투명 PNG 배경: 투명(기본) 또는 흰색 */
.thumb.bg-clear { background: transparent; box-shadow: none; }
.thumb.bg-white { background: #fff; }
.gallery.bg-clear img { background: transparent; box-shadow: none; }
.gallery.bg-white img { background: #fff; }
.lightbox.bg-white .lb-viewport img { background: #fff; }

/* 사이트 제목의 8: 곡선이 ∞로 변해요 (JS가 SVG로 그려요. JS가 없으면 그냥 8) */
.name .inf { display: inline-block; vertical-align: baseline; }
.name .inf:not(.moving) svg { display: none; }
.name .inf.moving .g { display: none; }
.name .inf svg { display: inline-block; height: .85em; overflow: visible; vertical-align: baseline; }

/* 첫 입장 연출: 검은 화면 → 사이트 제목이 ∞로 변했다 돌아오고 → 하얗게 → 제목이 제자리로 날아가요 */
.splash { display: none; }
html.splash-on .splash { display: flex; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; background: #000; color: #fff; transition: background-color .8s ease, color .8s ease; cursor: default; }
html.splash-on .splash.light { background: var(--bg); color: var(--text); }
html.splash-on .splash.reveal { background: transparent; transition: background-color .6s ease, color .8s ease; }
html.splash-on .name { visibility: hidden; }
.splash-title { font-family: var(--font-brand); font-size: clamp(48px, 12vw, 150px); font-weight: 400; line-height: 1.4; white-space: nowrap; opacity: 0; transition: opacity .5s ease; }
.splash.show .splash-title { opacity: 1; }
.splash-title .inf { display: inline-block; vertical-align: baseline; }
.splash-title .inf:not(.moving) svg { display: none; }
.splash-title .inf.moving .g { display: none; }
.splash-title .inf svg { display: inline-block; height: .85em; overflow: visible; vertical-align: baseline; }
.splash-title.fly { position: fixed; margin: 0; transform-origin: 0 0; will-change: transform; }

/* 화면이 아래에서 올라오며 나타나요 (연출 중에만) */
html.splash-on .shell { opacity: 0; transform: translateY(6vh); }
html.splash-on.splash-rise .shell { opacity: 1; transform: none; transition: opacity .8s ease, transform .95s cubic-bezier(.2, .7, .2, 1); }
html.splash-on .depth { opacity: 0; transform: translateY(40%); }
html.splash-on.splash-rise .depth { opacity: 1; transform: none; transition: opacity .9s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }

/* 연출 중에는 스크롤을 막아요 */
html.splash-on, html.splash-on body { overflow: hidden; }

/* 다크 모드의 오프닝: 흰 바탕에 검정 글자로 시작해서, 사이트 색(검정 바탕)으로 넘어가요 */
@media (prefers-color-scheme: dark) {
	html.splash-on .splash { background: #fff; color: #000; }
	html.splash-on .splash.light { background: var(--bg); color: var(--text); }
	html.splash-on .splash.reveal { background: transparent; }
}

/* 소개글 위의 큰 초상: 아래쪽이 잘린 면이 칸 바닥에 딱 붙어서 채워진 것처럼 보여요 (흰 부분은 투명) */
.hero { margin-bottom: 2.75rem; }
.portrait { --bleed: clamp(16px, 3vw, 32px); display: block; width: min(calc(62% + var(--bleed)), 22rem); height: auto; margin: 0 calc(var(--bleed) * -1) 0 auto; pointer-events: none; user-select: none; }
.hero .intro { margin: 1.5rem 0 0; }
@media (prefers-color-scheme: dark) { .portrait { filter: invert(1); } }

/* 눈에서 나가는 광선 연출 */
.zap-canvas { mix-blend-mode: difference; position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none; }
.zap-ch { display: inline-block; white-space: pre; will-change: transform, opacity; }

/* 사진을 누르면 화면을 부수는 연출 */
.portrait { pointer-events: auto; cursor: crosshair; -webkit-tap-highlight-color: transparent; }
.portrait:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
/* 부수는 중에도 스크롤할 수 있어요. 날아간 조각이 페이지를 길게 늘이지 않도록 가둬요 */
html.demolish .shell { contain: paint; }
html.demolish .side { overflow: visible; }
html.demolish *:not(.portrait) { border-color: var(--line); transition-property: border-color; }
html.demolish-bare *:not(.portrait), html.demolish-bare *::before, html.demolish-bare *::after { border-color: transparent !important; box-shadow: none !important; }

/* 계속 로딩 중인 점: . → .. → ... 를 끝없이 반복 (자리는 그대로, 보이기만 해요) */
.dots i { font-style: normal; }
.intro.is-typed .dots i { opacity: 0; animation: dot-load 1.8s infinite; }
.intro.is-typed .dots i:nth-child(2) { animation-name: dot-load-2; }
.intro.is-typed .dots i:nth-child(3) { animation-name: dot-load-3; }
@keyframes dot-load   { 0%, 14.9% { opacity: 0; } 15%, 89.9% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes dot-load-2 { 0%, 39.9% { opacity: 0; } 40%, 89.9% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes dot-load-3 { 0%, 64.9% { opacity: 0; } 65%, 89.9% { opacity: 1; } 90%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .intro .dots i { animation: none !important; opacity: 1 !important; } }
