/*
Theme Name: Knyaz Portfolio
Theme URI: https://knyaz.uk
Author: knyaz.uk
Description: One-page video portfolio on black: full-screen showreel, about, and a work section with five switchable layouts. Edit projects under Projects; settings under Appearance → Customize → Portfolio.
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: knyaz-portfolio
*/

@font-face { font-family: "Inter Tight"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 800; font-style: normal; font-display: swap; src: url("assets/fonts/inter-tight-latin-800-normal.woff2") format("woff2"); }

:root {
	--bg: #000;
	--fg: #fff;
	--muted: #8c8c8c;
	--soft: #bfbfbf;
	--line: #222;
	--pad: 48px;
	--max: 1344px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
	font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
	line-height: 1.4;
}
img, video { max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--soft); }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
button { font: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.wrap--wide { max-width: 1440px; }
.label { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .16em; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }
.hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.hero__shade {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 62%, rgba(0,0,0,.9) 100%);
}
.hero__header {
	position: relative; z-index: 2;
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
	padding: 32px var(--pad);
}
.logo { font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.nav { display: flex; gap: 32px; font-size: 14px; font-weight: 500; letter-spacing: .08em; }

.play {
	position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
	display: flex; flex-direction: column; align-items: center; gap: 20px;
	background: none; border: 0; padding: 0; color: #fff; cursor: pointer;
}
.play__circle {
	width: 112px; height: 112px; border-radius: 999px;
	border: 1.5px solid rgba(255,255,255,.9); background: rgba(0,0,0,.25);
	display: flex; align-items: center; justify-content: center;
	transition: transform .25s ease, background .25s ease;
}
.play__circle svg { margin-left: 6px; }
.play:hover .play__circle, .play:focus-visible .play__circle { transform: scale(1.06); background: rgba(255,255,255,.12); }
.play__label { font-size: 13px; font-weight: 500; letter-spacing: .2em; }

.hero__footer {
	position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
	display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
	padding: 40px var(--pad);
}
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 760px; }
.hero__tag {
	display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px;
	border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.35);
	font-size: 13px; font-weight: 500; letter-spacing: .04em;
}
.hero__dot { width: 8px; height: 8px; border-radius: 999px; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.18); }
.hero__title { margin: 0; font-weight: 800; font-size: 64px; line-height: .98; letter-spacing: -.025em; white-space: pre-line; }
.hero__intro { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.5; font-weight: 400; color: #d9d9d9; }
.hero__scroll { font-size: 13px; font-weight: 500; letter-spacing: .2em; color: #d9d9d9; }

/* ---------- About ---------- */
.about {
	padding-top: 120px; padding-bottom: 104px;
	display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px 24px;
}
.about__body { display: flex; flex-direction: column; gap: 48px; }
.about__lead { margin: 0; font-size: 40px; line-height: 1.18; font-weight: 500; letter-spacing: -.015em; }
.about__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 15px; line-height: 1.5; color: var(--soft); }
.about__cols > div { display: flex; flex-direction: column; gap: 6px; }
.about__cols strong { color: var(--fg); font-weight: 700; }
.about__note { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Work: shared ---------- */
.work { padding-bottom: 120px; display: flex; flex-direction: column; gap: 40px; }
.section-head {
	display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px;
	border-top: 1px solid var(--line); padding-top: 24px;
}
.section-head__count { font-size: 13px; color: var(--muted); }

.media { position: relative; display: block; overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.thumb--empty { background: #111; }
.media__play {
	position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
	border-radius: 999px; border: 1.5px solid #fff; background: rgba(0,0,0,.35);
	opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s;
}
.media__play::after {
	content: ""; position: absolute; left: 29px; top: 24px;
	border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #fff;
}
.js-play:hover .thumb, .js-play:focus-visible .thumb { transform: scale(1.04); }
.js-play:hover .media__play, .js-play:focus-visible .media__play { opacity: 1; transform: scale(1); }
a.js-play { cursor: pointer; }

.card { display: flex; flex-direction: column; gap: 16px; }
.caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.caption__main { display: flex; flex-direction: column; gap: 4px; }
.caption__client { font-size: 20px; font-weight: 700; color: var(--fg); }
.caption__title { font-size: 15px; color: var(--soft); }
.caption__tag { font-size: 13px; color: var(--muted); }

/* ---------- A · Grid ---------- */
.grid { display: grid; gap: 48px 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- B · Index ---------- */
.work--b { gap: 16px; }
.index { display: flex; flex-direction: column; }
.row {
	display: grid; grid-template-columns: 64px minmax(0, 1fr) 240px 300px; align-items: center; gap: 24px;
	padding: 28px 0; border-bottom: 1px solid var(--line);
}
.row__num { font-size: 14px; color: var(--muted); }
.row__name { display: flex; flex-direction: column; gap: 6px; }
.row__client { font-size: 52px; font-weight: 800; letter-spacing: -.025em; line-height: 1; transition: transform .3s; }
.row:hover .row__client { transform: translateX(8px); }
.row__title { font-size: 16px; color: var(--soft); }
.row__tag { font-size: 14px; color: var(--muted); }

/* ---------- C · Mosaic ---------- */
.mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 12px; }
.tile { position: relative; overflow: hidden; background: #111; grid-column: span 2; }
.tile--0 { grid-column: span 4; grid-row: span 2; }
.tile--3, .tile--4 { grid-column: span 3; }
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.js-play:hover .tile__img { transform: scale(1.04); }
.tile__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.8) 100%); }
.tile__text {
	position: absolute; left: 24px; right: 24px; bottom: 20px;
	display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.tile__text .caption__client { font-size: 22px; font-weight: 800; }
.tile__text .caption__title { color: #d9d9d9; font-size: 14px; }
.tile__tag { font-size: 12px; letter-spacing: .08em; color: #d9d9d9; text-transform: uppercase; }

/* ---------- D · Carousel ---------- */
.work--d { gap: 32px; }
.work--d > .wrap { width: 100%; display: flex; flex-direction: column; gap: 32px; }
.carousel__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.chips, .arrows { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
	height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid #444;
	background: transparent; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip.is-active { background: #fff; color: #000; border-color: #fff; }
.arrow {
	width: 52px; height: 52px; border-radius: 999px; border: 1px solid #444; background: transparent; color: #fff;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.arrow:hover, .chip:hover { border-color: #fff; }
.track {
	display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	--edge: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
	padding: 0 var(--edge);
	scroll-padding: 0 var(--edge);
	scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(520px, 80vw); scroll-snap-align: start; }
.slide[hidden] { display: none; }

/* ---------- E · Stack ---------- */
.work--e { gap: 72px; }
.band { display: flex; flex-direction: column; gap: 12px; }
.band__hero { position: relative; display: block; aspect-ratio: 21 / 9; overflow: hidden; background: #111; }
.band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.js-play:hover .band__img { transform: scale(1.03); }
.band__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,0) 58%); }
.band__text { position: absolute; left: 48px; bottom: 44px; display: flex; flex-direction: column; gap: 10px; }
.band__meta { font-size: 13px; letter-spacing: .16em; color: #d9d9d9; }
.band__client { font-size: 72px; font-weight: 800; letter-spacing: -.03em; line-height: .95; }
.band__title { font-size: 18px; color: #d9d9d9; }
.band__play {
	position: absolute; right: 40px; bottom: 44px; width: 72px; height: 72px; border-radius: 999px;
	border: 1.5px solid #fff; display: flex; align-items: center; justify-content: center; transition: background .25s;
}
.band__play svg { margin-left: 4px; }
.js-play:hover .band__play { background: rgba(255,255,255,.15); }
.band__stills { display: grid; gap: 12px; }
.band__stills--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.band__stills .thumb { position: static; aspect-ratio: 16 / 9; height: auto; }

/* ---------- Footer ---------- */
.site-footer {
	border-top: 1px solid var(--line);
	padding: 72px var(--pad) 48px;
	display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 32px;
}
.site-footer__main { display: flex; flex-direction: column; gap: 16px; }
.site-footer__email { font-size: 48px; font-weight: 800; letter-spacing: -.02em; word-break: break-all; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; color: var(--soft); }
.site-footer__meta a { color: var(--soft); }
.site-footer__meta a:hover { color: #fff; }

/* ---------- Video player ---------- */
.player {
	width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
	margin: 0; padding: 0; border: 0; background: #000; color: #fff;
}
.player::backdrop { background: #000; }
.player__inner { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 16px 24px 24px; gap: 16px; }
.player__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.player__title { font-size: 14px; font-weight: 500; letter-spacing: .08em; color: var(--soft); }
.player__close {
	width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6);
	background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.player__close:hover { background: rgba(255,255,255,.12); }
.player__frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.player__frame video, .player__frame iframe {
	width: min(100%, calc((100vh - 108px) * 16 / 9)); aspect-ratio: 16 / 9; height: auto; max-height: 100%;
	border: 0; display: block; background: #000;
}

/* ---------- Hover previews ---------- */
.preview {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
	opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.is-previewing .preview { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-height: 860px) and (min-width: 601px) {
	.play { top: 38%; }
	.hero__title { font-size: 52px; }
}
@media (max-width: 1100px) {
	.row { grid-template-columns: 48px minmax(0, 1fr) 220px; }
	.row__tag { display: none; }
	.row__client { font-size: 40px; }
	.band__client { font-size: 56px; }
}
@media (max-width: 900px) {
	:root { --pad: 24px; }
	.about { grid-template-columns: 1fr; padding-top: 80px; padding-bottom: 72px; }
	.about__lead { font-size: 30px; }
	.about__cols { grid-template-columns: 1fr; }
	.grid--2, .grid--3 { grid-template-columns: 1fr; }
	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
	.tile, .tile--3, .tile--4 { grid-column: span 1; grid-row: span 1; }
	.tile--0 { grid-column: span 2; grid-row: span 1; }
	.band__hero { aspect-ratio: 4 / 3; }
	.band__text { left: 24px; bottom: 24px; right: 110px; }
	.band__client { font-size: 40px; }
	.band__play { right: 24px; bottom: 24px; width: 56px; height: 56px; }
	.site-footer__email { font-size: 32px; }
}
@media (max-width: 600px) {
	.hero__header { padding: 20px var(--pad); }
	.nav { gap: 18px; font-size: 12px; }
	.hero__title { font-size: 38px; }
	.hero__intro { font-size: 15px; }
	.hero__text { gap: 14px; }
	.hero__scroll { display: none; }
	.play { top: 34%; }
	.hero__footer { padding: 24px var(--pad); }
	.play__circle { width: 88px; height: 88px; }
	.row { grid-template-columns: 1fr; gap: 14px; padding: 24px 0; }
	.row__num { display: none; }
	.row__client { font-size: 34px; }
	.mosaic { grid-template-columns: 1fr; grid-auto-rows: 220px; }
	.tile--0 { grid-column: span 1; }
	.band__stills--2 { grid-template-columns: 1fr 1fr; gap: 8px; }
	.site-footer__email { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.thumb, .tile__img, .band__img, .play__circle, .row__client { transition: none; }
}
