/* ryong — public site. One typeface (Geist), true black, hairlines. */

:root {
	--ink: #FCFDFF;
	--body: rgba(252, 253, 255, 0.86);
	--soft: rgba(252, 253, 255, 0.7);
	--mute: #A1A4A5;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.14);
	--pad: 40px;
	--safe-l: env(safe-area-inset-left, 0px);
	--safe-r: env(safe-area-inset-right, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #000;
	color: var(--ink);
	font-family: 'Geist', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, p { margin: 0; }
button { font-family: inherit; -webkit-appearance: none; appearance: none; border-radius: 0; background: none; border: 0; color: inherit; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: 1680px; margin: 0 auto; padding-left: calc(var(--pad) + var(--safe-l)); padding-right: calc(var(--pad) + var(--safe-r)); }

/* Header */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px calc(var(--pad) + var(--safe-r)) 28px calc(var(--pad) + var(--safe-l)); max-width: 1680px; margin: 0 auto; }
.site-header--hero { position: absolute; top: 0; left: 0; right: 0; z-index: 3; max-width: none; }
.site-logo { display: inline-flex; padding: 4px 0; color: var(--ink); }
.site-nav { display: flex; gap: 28px; font-size: 14px; }
.site-nav a { padding: 12px 0; color: var(--soft); }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--ink); }

/* Intro (first visit per session only — see the inline script in functions.php) */
.intro { display: none; }
.show-intro .intro {
	position: fixed; inset: 0; z-index: 50; background: #000;
	display: flex; align-items: center; justify-content: center; pointer-events: none;
	animation: introOut 0.8s cubic-bezier(0.7, 0, 0.3, 1) 2.1s forwards;
}
@keyframes introOut { to { opacity: 0; visibility: hidden; } }
.intro .mk { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.intro .mk1 { animation-delay: 0.15s; }
.intro .mk2 { animation-delay: 0.4s; }
.intro .mk3 { animation-delay: 0.65s; }
.intro .mk4 { opacity: 0; animation: slash 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.95s forwards; }
@keyframes pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }
@keyframes slash { from { opacity: 0; transform: translate(-10px, -10px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1100px; overflow: hidden; background: #000; }
.hero-media { position: absolute; inset: 0; transform: scale(1.06); animation: settle 3.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s forwards; }
.show-intro .hero-media { animation-delay: 2.1s; }
@keyframes settle { to { transform: scale(1); } }
.hero .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; opacity: 0; transition: opacity 1.6s ease; }
.hero .slide.is-active { opacity: 1; }
/* Video slides: the cover shows first; the muted player fades in once it is actually playing. */
.slide-video { overflow: hidden; }
.slide-video .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.slide-video .yt-holder { position: absolute; inset: 0; container-type: size; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.slide-video.is-playing .yt-holder { opacity: 1; }
.slide-video iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); transform: translate(-50%, -50%); border: 0; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 20%), linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 30%); }
.fade { opacity: 0; animation: fadeIn 1s ease 0.6s forwards; }
.show-intro .fade { animation-delay: 2.6s; }
@keyframes fadeIn { to { opacity: 1; } }

.hero-info { position: absolute; left: 0; bottom: 0; z-index: 2; width: 240px; padding: 0 0 22px calc(var(--pad) + var(--safe-l)); display: flex; flex-direction: column; }
.hero-cap { font-size: 13px; color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 20px; }
.hero-bars { display: flex; gap: 6px; }
.hero-bars.is-many { gap: 3px; } /* same total width, more works: just tighter gaps */
.seg { flex: 1; min-height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.seg .track { display: block; width: 100%; height: 1px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.seg:hover .track { background: rgba(255, 255, 255, 0.5); }
.seg .bar { display: block; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.seg .bar.done { transform: scaleX(1); }
.seg .bar.on { animation: fill 6s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.scroll-cue { position: absolute; right: calc(32px + var(--safe-r)); bottom: 32px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px; color: var(--soft); font-size: 12px; }
.scroll-cue .line { display: block; width: 1px; height: 48px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.scroll-cue .cue { display: block; width: 1px; height: 48px; background: var(--ink); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue {
	0% { transform: scaleY(0); transform-origin: top; }
	45% { transform: scaleY(1); transform-origin: top; }
	55% { transform: scaleY(1); transform-origin: bottom; }
	100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Works */
.works-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 96px; padding-bottom: 28px; scroll-margin-top: 0; }
.works-head h2 { font-size: 20px; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--line-strong); background: transparent; color: var(--body); font-size: 13px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.pill span { font-size: 12px; color: var(--mute); }
.pill:hover { border-color: rgba(255, 255, 255, 0.4); }
.pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #000; }
.pill[aria-pressed="true"] span { color: #555; }

.works { padding-bottom: 140px; }
.grid { column-count: 3; column-gap: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.tile { display: block; break-inside: avoid; margin-bottom: 44px; color: var(--ink); }
.tile[hidden] { display: none; }
.tile .frame { display: block; overflow: hidden; border-radius: 2px; background: #141414; }
.tile .ph { width: 100%; height: auto; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile:hover .ph { transform: scale(1.03); }
.tile .frame { position: relative; }
.yt-thumb { aspect-ratio: 16 / 9; object-fit: cover; }
.yt-thumb.is-vertical { aspect-ratio: 9 / 16; }
.tile .play { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 9999px; background: rgba(0, 0, 0, 0.55); display: flex; align-items: center; justify-content: center; pointer-events: none; transition: background 0.3s; }
.tile .play svg { margin-left: 2px; }
.tile:hover .play { background: rgba(0, 0, 0, 0.75); }
.tile .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 12px; font-size: 13px; }
.tile .t { color: var(--body); transition: color 0.3s; }
.tile:hover .t { color: var(--ink); }
.tile .m { color: var(--mute); text-align: right; }
.empty { padding: 120px 0; text-align: center; font-size: 15px; color: var(--mute); }
.notice-plugin { padding-top: 40px; padding-bottom: 40px; color: var(--mute); }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 32px; padding-bottom: calc(40px + var(--safe-b)); border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.site-footer a { color: var(--body); padding: 12px 0; }

/* Work detail */
.detail { min-height: 100vh; display: flex; flex-direction: column; }
.detail-bar { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.back { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; color: var(--body); }
.back .logo-mark { width: 28px; height: 28px; }
.counter { font-size: 13px; color: var(--mute); }
.round { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9999px; border: 1px solid var(--line-strong); color: var(--body); flex: none; transition: color 0.2s, border-color 0.2s; }
.round:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.4); }
.round.side { width: 52px; height: 52px; color: var(--mute); }
.detail-main { width: 100%; flex-grow: 1; display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.detail-art { margin: 0; flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.detail-art figure { margin: 0; width: 100%; display: flex; justify-content: center; }
.zoom { display: block; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom .art { display: block; }
.art-extra .art { max-height: 90vh; }
/* With extra images the page scrolls; keep the work info in view on wide screens. */
.has-extra { align-items: flex-start; }
.has-extra .round.side { position: sticky; top: calc(50vh - 26px); }
.has-extra .detail-info { position: sticky; top: 32px; }
.tile .more { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 9999px; background: rgba(0, 0, 0, 0.55); font-size: 11px; color: var(--ink); pointer-events: none; }
.detail-art .art { width: auto; max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 2px; opacity: 0; transform: scale(0.98); animation: artIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s forwards; }
@keyframes artIn { to { opacity: 1; transform: none; } }
.video-wrap { width: 100%; max-width: calc(78vh * 16 / 9); aspect-ratio: 16 / 9; background: #0D0D0D; border-radius: 2px; overflow: hidden; }
.video-wrap.is-vertical { max-width: calc(78vh * 9 / 16); aspect-ratio: 9 / 16; }
.video-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.detail-info { flex: 1 1 240px; max-width: 340px; display: flex; flex-direction: column; gap: 20px; }
.detail-info .label { font-size: 13px; color: var(--mute); }
.detail-info h1 { font-size: 24px; font-weight: 500; line-height: 1.3; margin-top: -8px; }
.detail-info dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); border-top: 1px solid var(--line); font-size: 14px; }
.detail-info dt, .detail-info dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-info dt { color: var(--mute); }
.detail-info .desc { font-size: 15px; line-height: 1.8; color: var(--soft); }
.detail-info .desc p + p { margin-top: 1em; }
.detail-mobile-nav { display: none; }

/* Full-screen image viewer */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.96); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 9999px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.5); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lb-btn:hover { border-color: rgba(255, 255, 255, 0.5); }
.lb-btn[hidden] { display: none; }
.lb-close { top: calc(20px + env(safe-area-inset-top, 0px)); right: calc(20px + var(--safe-r)); }
.lb-prev { left: calc(24px + var(--safe-l)); top: 50%; margin-top: -24px; }
.lb-next { right: calc(24px + var(--safe-r)); top: 50%; margin-top: -24px; }
.lb-count { position: absolute; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); font-size: 13px; color: var(--mute); }
html.lb-open, html.lb-open body { overflow: hidden; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 72px; padding-top: 96px; padding-bottom: 120px; }
.about-photo { flex: 1 1 300px; max-width: 420px; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.about-text { flex: 999 1 420px; min-width: 0; max-width: 560px; display: flex; flex-direction: column; gap: 48px; }
.about-text section { display: flex; flex-direction: column; gap: 14px; }
.about-text h1 { font-size: 20px; font-weight: 500; }
.about-text h2 { font-size: 13px; font-weight: 400; color: var(--mute); }
.about-text p { font-size: 15px; line-height: 1.8; color: var(--body); }
.about .ig { align-self: flex-start; font-size: 15px; padding: 10px 0; }

.plain { padding-top: 120px; padding-bottom: 160px; display: flex; flex-direction: column; gap: 16px; }
.plain h1 { font-size: 20px; font-weight: 500; }
.plain a { color: var(--soft); }

/* Responsive */
@media (max-width: 1100px) {
	.grid { column-count: 2; }
}
@media (max-width: 720px) {
	:root { --pad: 20px; }
	.grid { column-count: 1; }
	.works-head { padding-top: 72px; }
	/* Keep hero controls clear of rounded screen corners and the home indicator. */
	.hero-info { width: 168px; padding: 0 0 calc(var(--safe-b) + 20px) calc(var(--safe-l) + 28px); }
	.scroll-cue { right: calc(var(--safe-r) + 22px); bottom: calc(var(--safe-b) + 28px); }
	.scroll-cue .line, .scroll-cue .cue { height: 36px; }
	.round.side { display: none; }
	/* Stack image → info without the stretched gaps, and keep the bottom nav full width. */
	.detail-main { flex-grow: 0; align-content: flex-start; gap: 24px; padding-top: 24px; padding-bottom: 32px; }
	.detail-info { max-width: none; }
	.detail-art .art, .art-extra .art { max-height: none; }
	.has-extra .detail-info { position: static; }
	/* Phone browsers float their toolbars over the bottom of the page: keep viewer controls at mid-height and top. */
	.lb-img { max-width: 100vw; max-height: calc(100dvh - 180px); }
	.lb-btn { width: 44px; height: 44px; }
	.lb-prev, .lb-next { margin-top: -22px; }
	.lb-prev { left: calc(8px + var(--safe-l)); }
	.lb-next { right: calc(8px + var(--safe-r)); }
	.lb-count { bottom: auto; top: calc(32px + env(safe-area-inset-top, 0px)); left: calc(20px + var(--safe-l)); transform: none; }
	/* Right after the work, not pinned to the screen bottom (where the browser toolbar floats). Extra room
	   at the end lets the buttons scroll up above that toolbar. */
	.detail { min-height: 0; }
	.detail-mobile-nav { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: calc(var(--safe-b) + 96px); border-top: 1px solid var(--line); }
	.detail-mobile-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 9999px; border: 1px solid var(--line-strong); color: var(--body); font-size: 13px; }
	.detail-mobile-nav a:active { border-color: rgba(255, 255, 255, 0.4); }
	.about { gap: 40px; padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.show-intro .intro { display: none; }
	.fade, .intro .mk, .intro .mk4 { opacity: 1; animation: none; }
	.hero-media, .scroll-cue .cue, .detail-art .art { animation: none; transform: none; opacity: 1; }
	.hero .slide { transition: none; }
	.seg .bar.on { animation: none; transform: scaleX(1); }
}
