/* ==========================================================================
   Shahriar Hq. — Edit Suite
   Mobile-first. Tokens → base → layout → components → sections → motion.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */
:root {
	--bg: #1E1E1E;
	--surface: #262626;
	--letterbox: #141414;
	--text: #FFFFFF;
	--muted: #A0A0A0;
	--accent: #00A8FF;
	--accent-ink: #1E1E1E;
	--line: rgba(255, 255, 255, .08);
	--line-strong: rgba(255, 255, 255, .2);

	--font-head: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--fs-display: clamp(2.5rem, 1.6rem + 4vw, 5rem);
	--fs-h2: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
	--fs-h3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
	--fs-body: clamp(1rem, .95rem + .25vw, 1.125rem);
	--fs-label: .8125rem;

	--maxw: 1280px;
	--pad-x: clamp(20px, 5vw, 64px);
	--header-h: 72px;
	--radius: 10px;
	--section-y: clamp(72px, 10vw, 160px);

	--ease: cubic-bezier(.22, 1, .36, 1);
	--t-fast: 200ms;
}

/* Base -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
	background: var(--bg);
}

body {
	margin: 0;
	background: transparent; /* the gradient layer below shows through */
	color: var(--text);
	font: 400 var(--fs-body)/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

/* Ambient gradient: one fixed layer behind every section, so it costs a single
   paint and works on iOS (where background-attachment: fixed is ignored). */
body::before {
	content: "";
	position: fixed;
	inset: -10%;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(45% 42% at 84% 6%, rgba(0, 168, 255, .32), transparent 70%),
		radial-gradient(40% 38% at 4% 50%, rgba(0, 168, 255, .18), transparent 70%),
		radial-gradient(50% 45% at 94% 98%, rgba(0, 120, 220, .24), transparent 72%),
		linear-gradient(165deg, #1E1E1E 0%, #181C22 55%, #14181E 100%);
	animation: shq-drift 28s ease-in-out infinite alternate;
	will-change: transform;
}
@keyframes shq-drift {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}

img, video, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3 {
	font-family: var(--font-head);
	font-weight: 700;
	letter-spacing: -.015em;
	text-wrap: balance;
}

p { text-wrap: pretty; }

.dot { color: var(--accent); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 12px; left: 12px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 500;
	border-radius: 999px;
	transform: translateY(-150%);
	transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: none; }

.site-main:focus { outline: none; }

/* Layout ------------------------------------------------------------------ */
.container {
	width: 100%;
	max-width: calc(var(--maxw) + var(--pad-x) * 2);
	margin-inline: auto;
	padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); }

/* Label ------------------------------------------------------------------- */
.label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: var(--fs-label);
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
}
.label::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	font: 700 15px/1 var(--font-body);
	white-space: nowrap;
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn .icon { transition: transform var(--t-fast) var(--ease); }
.btn:hover .icon { transform: translateX(4px); }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--text); }

.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Playhead (scroll progress) --------------------------------------------- */
.playhead {
	position: fixed;
	inset: 0 0 auto 0;
	height: 2px;
	z-index: 60;
	pointer-events: none;
}
.playhead__bar {
	display: block;
	height: 100%;
	background: var(--accent);
	transform-origin: 0 50%;
	transform: scaleX(0);
}

/* Header ------------------------------------------------------------------ */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	height: var(--header-h);
}
/* Background lives on a pseudo-element: a backdrop-filter on the header itself
   would trap the fixed mobile menu inside the 72px bar. */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(28, 30, 34, .82);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	opacity: 1;
	transition: opacity 300ms var(--ease);
}
.nav-open .site-header::before { border-bottom-color: transparent; }

@media (min-width: 960px) {
	/* Desktop only: transparent over the hero, solid once you scroll. */
	.site-header::before {
		background: rgba(30, 30, 30, .94);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		opacity: 0;
	}
	.site-header.is-scrolled::before { opacity: 1; }
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: 100%;
}

.logo {
	position: relative;
	z-index: 2;
	font: 700 clamp(1.5rem, 1.3rem + .6vw, 1.75rem)/1 var(--font-head);
	letter-spacing: -.01em;
}

/* Mobile menu toggle */
.nav-toggle {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	border-radius: 999px;
}
.nav-toggle__bars { position: relative; width: 22px; height: 10px; }
.nav-toggle__bars span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 300ms var(--ease), top 300ms var(--ease);
}
.nav-toggle__bars span:first-child { top: 0; }
.nav-toggle__bars span:last-child { top: calc(100% - 1.5px); }
.nav-open .nav-toggle__bars span:first-child { top: calc(50% - .75px); transform: rotate(45deg); }
.nav-open .nav-toggle__bars span:last-child { top: calc(50% - .75px); transform: rotate(-45deg); }

/* Mobile nav panel */
.nav {
	position: fixed;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	padding: calc(var(--header-h) + 40px) var(--pad-x) 40px;
	background: var(--bg);
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms var(--ease), visibility 0s linear 300ms;
}
.nav-open .nav {
	opacity: 1;
	visibility: visible;
	transition: opacity 300ms var(--ease), visibility 0s;
}
.nav__list { display: flex; flex-direction: column; gap: 8px; }
.nav__list a {
	display: block;
	padding: 6px 0;
	font: 700 clamp(2.25rem, 9vw, 3.5rem)/1.1 var(--font-head);
	letter-spacing: -.02em;
	transition: color var(--t-fast) var(--ease);
}
.nav__list a:hover,
.nav__list a.is-active { color: var(--accent); }
.nav__cta { align-self: stretch; min-height: 56px; font-size: 16px; }

@media (min-width: 960px) {
	.nav-toggle { display: none; }

	.nav {
		position: static;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		gap: 40px;
		padding: 0;
		background: none;
		opacity: 1;
		visibility: visible;
		transition: none;
	}
	.nav__list { flex-direction: row; gap: 32px; }
	.nav__list a {
		position: relative;
		padding: 8px 0;
		font: 500 16px/1 var(--font-body);
		letter-spacing: 0;
		color: var(--muted);
	}
	.nav__list a::after {
		content: "";
		position: absolute;
		left: 0; right: 0; bottom: 2px;
		height: 1px;
		background: var(--accent);
		transform: scaleX(0);
		transform-origin: 0 50%;
		transition: transform 300ms var(--ease);
	}
	.nav__list a:hover,
	.nav__list a.is-active { color: var(--text); }
	.nav__list a:hover::after,
	.nav__list a.is-active::after { transform: scaleX(1); }
	.nav__cta { align-self: auto; min-height: 44px; font-size: 15px; }
}

/* Hero -------------------------------------------------------------------- */
.hero {
	display: flex;
	align-items: center;
	padding-top: calc(var(--header-h) + 40px);
	padding-bottom: clamp(48px, 7vw, 96px);
}
.hero > .container { min-width: 0; }
.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
	align-items: center;
}
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero__heading { display: flex; flex-direction: column; gap: clamp(10px, 1.2vw, 18px); }
/* Name line: big and bold, the first thing a visitor reads. */
.hero__hello {
	display: block;
	font-family: var(--font-head);
	font-size: clamp(2.125rem, 1.3rem + 3vw, 3.5rem);
	line-height: 1.08;
	letter-spacing: -.02em;
	color: var(--text);
}
.hero__greeting { font-weight: 700; }
.hero__name { font-weight: 800; color: var(--accent); white-space: nowrap; }
.hero__title {
	display: block;
	max-width: 17ch;
	font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.5rem);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.015em;
	color: var(--text);
}
.hero__subtitle {
	margin-top: 24px;
	font: 700 clamp(1.0625rem, 1rem + .3vw, 1.25rem)/1.4 var(--font-head);
	letter-spacing: -.005em;
}
.hero__text {
	max-width: 42ch;
	margin-top: 12px;
	color: var(--muted);
}
.hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 36px;
	width: 100%;
}
.hero__ctas .btn { flex: 1 1 auto; white-space: normal; text-align: center; }

@media (min-width: 640px) {
	.hero__ctas { width: auto; }
	.hero__ctas .btn { flex: 0 0 auto; }
}

@media (min-width: 960px) {
	/* Leave room so the marquee peeks at the bottom of the first screen. */
	.hero { min-height: calc(min(100svh, 980px) - 96px); padding-bottom: 48px; }
	.hero__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: clamp(48px, 5vw, 80px);
	}
}

/* Video frame (viewfinder) ------------------------------------------------ */
.frame { position: relative; }
.frame__view { position: relative; }
.frame__screen {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--letterbox);
	box-shadow: 0 0 0 1px var(--line);
}
.frame__poster,
.frame__video,
.frame__screen iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}
.frame__video { opacity: 0; transition: opacity 600ms var(--ease); }
.frame.is-playing .frame__video,
.frame.is-paused .frame__video { opacity: 1; }

.frame__corner {
	position: absolute;
	z-index: 2;
	width: 18px;
	height: 18px;
	border: 0 solid rgba(255, 255, 255, .35);
	pointer-events: none;
	transition: border-color 300ms var(--ease), transform 300ms var(--ease);
}
.frame__corner--tl { top: -10px; left: -10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.frame__corner--tr { top: -10px; right: -10px; border-top-width: 1.5px; border-right-width: 1.5px; }
.frame__corner--bl { bottom: -10px; left: -10px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.frame__corner--br { bottom: -10px; right: -10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.frame:hover .frame__corner,
.frame:focus-within .frame__corner { border-color: var(--accent); }
.frame:hover .frame__corner--tl { transform: translate(-3px, -3px); }
.frame:hover .frame__corner--tr { transform: translate(3px, -3px); }
.frame:hover .frame__corner--bl { transform: translate(-3px, 3px); }
.frame:hover .frame__corner--br { transform: translate(3px, 3px); }

/* Big play pill (YouTube facade) */
.frame__play {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background: linear-gradient(180deg, rgba(20, 20, 20, 0) 40%, rgba(20, 20, 20, .45));
}
.frame__pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 24px 0 20px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .72);
	border: 1px solid var(--line-strong);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-weight: 500;
	font-size: 15px;
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 300ms var(--ease);
}
.frame__play:hover .frame__pill { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.04); }
.frame__play:focus-visible { outline-offset: -6px; }

/* Loop play/pause */
.frame__toggle {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .72);
	border: 1px solid var(--line-strong);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.frame__toggle:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.frame__toggle-play { display: none; }
.frame.is-paused .frame__toggle-pause,
.frame:not(.is-playing):not(.is-paused) .frame__toggle-pause { display: none; }
.frame.is-paused .frame__toggle-play,
.frame:not(.is-playing):not(.is-paused) .frame__toggle-play { display: grid; }

.frame__empty,
.frame__error {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 24px;
	text-align: center;
	font-size: 14px;
	color: var(--muted);
}
.frame__error { background: rgba(20, 20, 20, .8); }
.frame__error[hidden] { display: none; }

/* Caption bar under the screen */
.frame__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 44px;
	padding-top: 12px;
	font-size: var(--fs-label);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}
.frame__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	color: var(--text);
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: color var(--t-fast) var(--ease);
}
.frame__link:hover { color: var(--accent); }

/* Marquee ----------------------------------------------------------------- */
.marquee {
	overflow: hidden;
	padding-block: clamp(18px, 2.4vw, 28px);
	border-block: 1px solid var(--line);
}
.marquee__track {
	display: flex;
	width: max-content;
	animation: shq-marquee 45s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex-shrink: 0; }
.marquee__item {
	display: flex;
	align-items: center;
	font: 700 clamp(1.25rem, .9rem + 1.8vw, 2.25rem)/1 var(--font-head);
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
}
.marquee__item::after {
	content: "";
	width: .22em;
	height: .22em;
	margin-inline: 1.1em;
	border-radius: 50%;
	background: var(--accent);
}
@keyframes shq-marquee {
	to { transform: translateX(-50%); }
}

/* Section heads & shells -------------------------------------------------- */
.section__head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.section__title { font-size: var(--fs-h2); line-height: 1.08; }
.section__text { max-width: 52ch; color: var(--muted); }

.shell { border-top: 1px solid var(--line); }
.admin-note {
	margin-top: 32px;
	padding: 14px 18px;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--muted);
	font-size: 14px;
}

.page__inner { padding-top: calc(var(--header-h) + 40px); }
.entry__content { margin-top: 32px; max-width: 70ch; }


/* ==========================================================================
   Phase 4 — About, Testimonials, Contact, Footer
   ========================================================================== */

/* About ------------------------------------------------------------------ */
.about { border-top: 1px solid var(--line); }
.about__grid { display: grid; gap: 48px; }
@media (min-width: 960px) {
	.about__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(56px, 6vw, 96px); align-items: start; }
	.about__media { position: sticky; top: calc(var(--header-h) + 32px); }
}
.about__portrait { max-width: 520px; }
.about__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
}
.about__portrait .vf__c { border-color: rgba(255, 255, 255, .35); }
.monogram {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font: 800 clamp(6rem, 14vw, 11rem)/1 var(--font-head);
	letter-spacing: -.04em;
	color: rgba(255, 255, 255, .9);
	background: radial-gradient(circle at 50% 40%, #2a2a2a, var(--surface) 70%);
}
.about__body { display: flex; flex-direction: column; gap: 32px; }
.about__text { display: flex; flex-direction: column; gap: 1em; max-width: 60ch; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.65; color: rgba(255, 255, 255, .86); }
.about__quote { margin: 0; padding-left: 20px; border-left: 2px solid var(--accent); display: flex; flex-direction: column; gap: 10px; }
.about__quote .label::before { display: none; }
.about__quote-text { font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem)/1.2 var(--font-head); letter-spacing: -.015em; }
.about__facts { max-width: 560px; }
.about__facts a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color var(--t-fast) var(--ease); }
.about__facts a:hover { color: var(--accent); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(0, 168, 255, .18); vertical-align: middle; }
/* Capabilities: skills + software ---------------------------------------- */
.caps { display: grid; gap: 40px; margin-top: 8px; }
@media (min-width: 640px) { .caps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } }
.caps__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-size: var(--fs-label);
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
}
.caps__title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Skills: numbered editorial list */
.skills { margin: 0; padding: 0; list-style: none; display: grid; column-gap: 32px; }
.skills__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 13px 0;
	border-top: 1px solid var(--line);
}
.skills__item:last-child { border-bottom: 1px solid var(--line); }
.skills__item::before {
	content: "";
	flex: 0 0 auto;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background: var(--accent);
	transition: width 300ms var(--ease);
}
.skills__item:hover::before { width: 22px; }
.skills__name {
	font: 700 clamp(1.0625rem, 1rem + .3vw, 1.1875rem)/1.25 var(--font-head);
	letter-spacing: -.01em;
	transition: transform 300ms var(--ease);
}
.skills__item:hover .skills__name { transform: translateX(4px); }

/* Software: logo cards */
.tools { display: grid; gap: 12px; }
@media (min-width: 480px) and (max-width: 639px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 64px;
	padding: 8px 14px 8px 8px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	transition: border-color 300ms var(--ease), transform 300ms var(--ease);
}
.tool:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tool__logo {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 11px;
	background: var(--bg);
	border: 1px solid var(--line);
}
.tool__logo.is-badge { font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.tool__logo .logo-img { width: 30px; height: 30px; }
.tool__name { min-width: 0; font-weight: 700; line-height: 1.25; }

/* Uploaded logos ----------------------------------------------------------
   "Exactly as uploaded": the logo fills its tile (works for app icons with their own background).
   "White": transparent logos shown white, original colours on hover. */
.logo-img { display: block; object-fit: contain; transition: filter 300ms var(--ease), opacity 300ms var(--ease); }
.has-logo.is-original { background: transparent; border: 0; overflow: hidden; }
.has-logo.is-original .logo-img { width: 100%; height: 100%; border-radius: inherit; }
.has-logo.is-white .logo-img { filter: brightness(0) invert(1); opacity: .9; }
.tool:hover .is-white .logo-img,
.clist__link:hover .is-white .logo-img,
.iconlinks__link:hover .is-white .logo-img { filter: none; opacity: 1; }

/* Testimonials ----------------------------------------------------------- */
.testimonials { border-top: 1px solid var(--line); }
.tgrid { display: grid; gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.admin-note + .tgrid { margin-top: 32px; }
@media (min-width: 760px) { .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tcard { display: flex; }
.tcard figure {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
	margin: 0;
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
}
.tcard--placeholder figure { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.tcard--placeholder .tcard__quote, .tcard--placeholder .tcard__name { color: var(--muted); }
.tcard__mark { color: var(--accent); }
.tcard__quote { margin: 0; flex: 1 1 auto; font-size: 1.125rem; line-height: 1.6; }
.tcard__who { display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.tcard__photo, .tcard__initial { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tcard__initial { display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-strong); font-weight: 800; }
.tcard__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tcard__name { font-weight: 700; }
.tcard__role { font-size: 14px; color: var(--muted); }
.tcard__project { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--accent); }

/* Contact ---------------------------------------------------------------- */
.contact { border-top: 1px solid var(--line); }
.contact__grid { display: grid; gap: 48px; }
@media (min-width: 960px) {
	.contact__grid {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		grid-template-areas: "intro form" "social form";
		grid-template-rows: auto 1fr;
		gap: 40px clamp(56px, 6vw, 96px);
		align-items: start;
	}
	.contact__intro { grid-area: intro; }
	.contact__form-wrap { grid-area: form; }
	.contact__social { grid-area: social; }
}
.contact__social { display: flex; flex-direction: column; gap: 14px; }
.contact__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact__title { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.5rem); line-height: 1.02; letter-spacing: -.025em; }
.contact__text { font-size: clamp(1.125rem, 1rem + .5vw, 1.5rem); color: var(--muted); }
/* Contact list: icon · label · handle · arrow */
.clist { display: grid; gap: 10px; width: 100%; max-width: 520px; }
@media (max-width: 479px) {
	.clist__link { min-height: 56px; padding: 8px 12px 8px 8px; }
	.clist__icon { width: 40px; height: 40px; }
}
@media (min-width: 480px) and (max-width: 959px), (min-width: 1200px) {
	.clist--social { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.clist__link {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 64px;
	padding: 10px 14px 10px 10px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.clist__link:hover { border-color: var(--accent); }
.clist__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--bg);
	border: 1px solid var(--line-strong);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.clist__link:hover .clist__icon { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.clist__link:hover .clist__icon.has-logo.is-white { background: var(--bg); border-color: var(--line-strong); }
.clist__link:hover .clist__icon.has-logo.is-original { background: transparent; border-color: transparent; }
.clist__icon .logo-img { width: 24px; height: 24px; }
.clist__icon.is-badge, .iconlinks__icon.is-badge { font-size: 13px; font-weight: 800; }
.clist__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.clist__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.clist__value { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist--direct .clist__link--email .clist__value { font-size: clamp(1rem, .95rem + .3vw, 1.125rem); }
.clist__go { flex: 0 0 auto; color: var(--muted); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.clist__link:hover .clist__go { color: var(--accent); transform: translateX(3px); }

/* Icon buttons (footer) */
.iconlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.iconlinks__link {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.iconlinks__link:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.iconlinks__link:hover:has(.has-logo) { background: transparent; border-color: var(--text); }
.iconlinks__icon { display: grid; place-items: center; }
.iconlinks__icon.has-logo.is-original { width: 26px; height: 26px; border-radius: 6px; }
.iconlinks__icon .logo-img { width: 20px; height: 20px; }

.cform {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: clamp(24px, 3vw, 40px);
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
}
.cform[hidden] { display: none; }
.cform__row { display: grid; gap: 20px; }
@media (min-width: 640px) { .cform__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 700; }
.field input, .field textarea, .field select {
	width: 100%;
	min-height: 52px;
	padding: 14px 16px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.4 var(--font-body);
	transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(160, 160, 160, .7); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 168, 255, .2); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
	content: "";
	position: absolute;
	right: 18px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 1.6px solid var(--muted);
	border-bottom: 1.6px solid var(--muted);
	transform: rotate(45deg);
	pointer-events: none;
}
.field.has-error input, .field.has-error textarea { border-color: #FF8A8A; }
.field__err { font-size: 14px; color: #FF8A8A; }
.field__err[hidden] { display: none; }
.cform__alert { padding: 12px 16px; border: 1px solid #FF8A8A; border-radius: 10px; color: #FF8A8A; font-size: 14px; }
.cform__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.cform__submit { min-height: 52px; padding: 0 26px; }
@media (max-width: 639px) { .cform__submit { width: 100%; } }
.cform__submit[disabled] { opacity: .6; cursor: progress; }
.cform__status { font-size: 14px; color: var(--muted); }
.cform__status.is-error { color: #FF8A8A; }
.form-done {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: clamp(24px, 3vw, 40px);
	border: 1px solid var(--accent);
	border-radius: 16px;
	background: rgba(0, 168, 255, .06);
}
.form-done__title { font: 700 1.5rem/1.2 var(--font-head); }
.form-done .btn { align-self: flex-start; margin-top: 8px; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 72px) 32px; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.site-footer__brand { font: 700 clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem)/1 var(--font-head); letter-spacing: -.015em; }
.site-footer__tag { margin-top: 12px; color: var(--muted); }
.site-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; font-size: 14px; color: var(--muted); }
.site-footer__email, .site-footer__top-link { display: inline-flex; align-items: center; gap: 8px; transition: color var(--t-fast) var(--ease); }
.site-footer__email:hover, .site-footer__top-link:hover { color: var(--accent); }
.site-footer__email .icon { width: 16px; height: 16px; }

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
	width: min(1200px, 100vw - 32px);
	max-width: none;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--text);
	overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 10, 10, .9); }
.lightbox__screen {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	background: #000;
}
.lightbox__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox__close {
	position: absolute;
	top: -56px;
	right: 0;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
}
.lightbox__close:hover { border-color: var(--accent); color: var(--accent); }

/* Branded video player ------------------------------------------------------ */
.player {
	position: absolute;
	inset: 0;
	z-index: 3;
	background: #000;
	color: var(--text);
	outline: none;
}
.player:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.player__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
	cursor: pointer;
}
.player__big {
	position: absolute;
	left: 50%;
	top: 50%;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .72);
	border: 1px solid var(--line-strong);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: opacity 300ms var(--ease), background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.player__big svg { width: 18px; height: 18px; margin-left: 2px; }
.player__big:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.player.is-playing .player__big { opacity: 0; pointer-events: none; }

.player__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 28px 10px 8px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .65));
	transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.player.is-idle .player__bar { opacity: 0; transform: translateY(6px); pointer-events: none; }
.player.is-idle { cursor: none; }
.player.is-idle .player__video { cursor: none; }

.player__btn {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.player__btn:hover { background: rgba(255, 255, 255, .1); color: var(--accent); }

.player__time {
	flex: 0 0 auto;
	padding-inline: 4px;
	font-size: 12px;
	letter-spacing: .04em;
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, .85);
}

.player__seek {
	--p: 0%;
	flex: 1 1 auto;
	min-width: 40px;
	height: 24px;
	margin: 0 6px;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.player__seek::-webkit-slider-runnable-track {
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--accent) var(--p), rgba(255, 255, 255, .25) var(--p));
}
.player__seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .25); }
.player__seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--accent); }
.player__seek::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 12px;
	height: 12px;
	margin-top: -4.5px;
	border-radius: 50%;
	background: var(--text);
	border: 0;
	transition: transform var(--t-fast) var(--ease);
}
.player__seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 0; }
.player__seek:hover::-webkit-slider-thumb { transform: scale(1.25); }
.player__seek:focus-visible { outline: none; }
.player__seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent); }

.player__error {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(20, 20, 20, .85);
	font-size: 14px;
	color: var(--muted);
}
.player__error[hidden] { display: none; }

.player:fullscreen { border-radius: 0; }
.player:-webkit-full-screen { width: 100%; height: 100%; }

@media (max-width: 479px) {
	.player__time [data-p="dur"],
	.player__time { font-size: 11px; }
	.player__btn { width: 36px; height: 36px; }
}

.frame.has-player .frame__corner { border-color: var(--accent); }

/* ==========================================================================
   Phase 3 — Portfolio
   ========================================================================== */

/* Viewfinder corners on any media (.vf) ---------------------------------- */
.vf { position: relative; }
.vf__c {
	position: absolute;
	z-index: 2;
	width: 16px;
	height: 16px;
	border: 0 solid rgba(255, 255, 255, 0);
	pointer-events: none;
	transition: border-color 300ms var(--ease), transform 300ms var(--ease);
}
.vf__c--tl { top: -8px; left: -8px; border-top-width: 1.5px; border-left-width: 1.5px; }
.vf__c--tr { top: -8px; right: -8px; border-top-width: 1.5px; border-right-width: 1.5px; }
.vf__c--bl { bottom: -8px; left: -8px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.vf__c--br { bottom: -8px; right: -8px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Placeholder (editors only) --------------------------------------------- */
.ph {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background:
		repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
		var(--surface);
	border: 1px dashed var(--line-strong);
	border-radius: inherit;
	text-align: center;
}
.ph__tag { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ph__hint { font-size: 13px; color: var(--muted); }
.media-empty { position: absolute; inset: 0; display: grid; place-items: center; background: var(--surface); color: var(--muted); font-size: 13px; }

.media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }

/* Section head with controls on the right -------------------------------- */
.section__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.section__head--split { gap: 28px; }
@media (min-width: 960px) {
	.section__head--split { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}
.section__head + .work__grid,
.section__head + .featured,
.admin-note + .work__grid,
.admin-note + .featured { margin-top: clamp(40px, 5vw, 64px); }
.section__head + .admin-note { margin-top: 32px; }
.admin-note + [data-filter-status] + .work__grid,
.section__head + [data-filter-status] + .work__grid { margin-top: clamp(40px, 5vw, 64px); }

/* Filter chips ----------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	min-height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--accent-ink); }
@media (max-width: 959px) {
	.section__head > .filters { align-self: stretch; min-width: 0; }
}
@media (max-width: 639px) {
	.filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--pad-x) * -1); padding: 2px var(--pad-x) 6px; scrollbar-width: none; }
	.filters::-webkit-scrollbar { display: none; }
	.chip { flex: 0 0 auto; }
}

/* Selected Works grid ---------------------------------------------------- */
.work__grid { display: grid; gap: 48px 24px; }
@media (min-width: 640px) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
	.work__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 72px 32px; align-items: start; }
	.card[data-pos="wide"] { grid-column: span 7; }
	.card[data-pos="narrow"] { grid-column: span 5; }
	.card[data-side="right"] { margin-top: 96px; }
}
.card.is-hidden { display: none; }
.card__link { display: block; }
.card__frame {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
}
.card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .75);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.card__badge svg { width: 10px; height: 10px; color: var(--accent); }
.card__meta { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.card__cat { font-size: var(--fs-label); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card__title { font-size: var(--fs-h3); line-height: 1.2; transition: color var(--t-fast) var(--ease); }
.card__year { font-size: 14px; color: var(--muted); }
.card__go {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 300ms var(--ease);
}
a.card__link:hover .media-img,
a.card__link:focus-visible .media-img { transform: scale(1.04); }
a.card__link:hover .vf__c,
a.card__link:focus-visible .vf__c { border-color: var(--accent); }
a.card__link:hover .vf__c--tl { transform: translate(-3px, -3px); }
a.card__link:hover .vf__c--tr { transform: translate(3px, -3px); }
a.card__link:hover .vf__c--bl { transform: translate(-3px, 3px); }
a.card__link:hover .vf__c--br { transform: translate(3px, 3px); }
a.card__link:hover .card__go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: rotate(-45deg); }
a.card__link:focus-visible { outline: none; }
a.card__link:focus-visible .card__frame { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Video Editing ---------------------------------------------------------- */
.video-sec {
	position: relative;
	background: rgba(20, 20, 20, .72);
	border-block: 1px solid var(--line);
}
.video-sec::before,
.video-sec::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: clamp(10px, 1.4vw, 18px);
	background: #000;
}
.video-sec::before { top: 0; }
.video-sec::after { bottom: 0; }

.featured { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
	.featured { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); }
}
.featured__info { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.featured__title { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; }
.featured__text { color: var(--muted); max-width: 46ch; }

.facts { display: grid; gap: 10px; margin: 4px 0 8px; width: 100%; }
.facts__row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; }

.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--accent);
}
.link-arrow .icon { transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

.vgrid { display: grid; gap: 40px 24px; margin-top: clamp(56px, 7vw, 96px); }
@media (min-width: 640px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; } }
.vcard__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 0 0 1px var(--line);
}
.vcard__play {
	position: absolute;
	left: 50%;
	top: 50%;
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .72);
	border: 1px solid var(--line-strong);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 300ms var(--ease);
}
.vcard__play svg { margin-left: 2px; }
button.vcard__media:hover .media-img { transform: scale(1.04); }
button.vcard__media:hover .vcard__play { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); }
.vcard__title { margin-top: 16px; font-size: 1.25rem; line-height: 1.25; }
.vcard__title a { transition: color var(--t-fast) var(--ease); }
.vcard__title a:hover { color: var(--accent); }
.vcard__text { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* Design & Motion (horizontal gallery) ----------------------------------- */
.design { overflow: hidden; }
.hs-nav { display: none; gap: 8px; }
@media (min-width: 960px) { .hs-nav { display: flex; } }
.hs-btn {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	border: 1px solid var(--line-strong);
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.hs-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hs-btn:disabled { opacity: .3; cursor: default; }

.hs { margin-top: clamp(40px, 5vw, 64px); --edge: max(var(--pad-x), calc((100vw - var(--maxw)) / 2)); --h: clamp(280px, 30vw, 460px); }
.hs__track {
	display: flex;
	gap: clamp(16px, 2vw, 28px);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--edge);
	padding: 0 var(--edge) 20px;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}
.hs__track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.hs__track::-webkit-scrollbar { height: 4px; }
.hs__track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.ditem { flex: 0 0 auto; scroll-snap-align: start; }
.ditem--landscape { width: min(calc(var(--h) * 16 / 9), 86vw); }
.ditem--square { width: min(var(--h), 78vw); }
.ditem--portrait { width: min(calc(var(--h) * 4 / 5), 70vw); }
.ditem__link { display: block; }
.ditem__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
}
.ditem--landscape .ditem__media { aspect-ratio: 16 / 9; }
.ditem--square .ditem__media { aspect-ratio: 1 / 1; }
.ditem--portrait .ditem__media { aspect-ratio: 4 / 5; }
.ditem__loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 500ms var(--ease); }
.ditem__loop.is-playing { opacity: 1; }
.ditem__motion {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(30, 30, 30, .75);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.ditem__meta { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
.ditem__kind { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ditem__title { font-size: 1.125rem; line-height: 1.3; }
a.ditem__link:hover .media-img { transform: scale(1.04); }
a.ditem__link:hover .ditem__title { color: var(--accent); }
a.ditem__link:focus-visible { outline: none; }
a.ditem__link:focus-visible .ditem__media { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Single project --------------------------------------------------------- */
.project__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px));
}
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 600; color: var(--muted); transition: color var(--t-fast) var(--ease); }
.back-link:hover { color: var(--accent); }
.project__title { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.5rem); line-height: 1.04; letter-spacing: -.02em; max-width: 18ch; }
.project__lead { max-width: 60ch; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); color: var(--muted); }
.project__head .facts { max-width: 960px; margin-top: 12px; }
@media (min-width: 760px) {
	.project__head .facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
	.project__head .facts__row { grid-template-columns: 1fr; gap: 6px; }
}
.project__media { margin-top: clamp(40px, 5vw, 64px); }
.project__image img { width: 100%; height: auto; border-radius: var(--radius); }
.project__content { margin: clamp(48px, 6vw, 80px) auto 0; }
.entry__content > * + * { margin-top: 1.25em; }
.entry__content h2, .entry__content h3 { margin-top: 1.8em; line-height: 1.2; }
.entry__content p, .entry__content li { color: rgba(255, 255, 255, .86); }
.entry__content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry__content img { height: auto; border-radius: var(--radius); }
.entry__content figure { margin-inline: 0; }
.entry__content figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.entry__content .alignwide, .entry__content .alignfull { max-width: none; }
.project__pager {
	display: grid;
	gap: 16px;
	margin-top: var(--section-y);
	padding-top: 40px;
	border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .project__pager { grid-template-columns: 1fr 1fr; } }
.pager__link { display: flex; flex-direction: column; gap: 8px; padding: 20px 0; }
.pager__link--next { align-items: flex-end; text-align: right; grid-column: -2; }
.pager__title { font-size: var(--fs-h3); font-weight: 700; transition: color var(--t-fast) var(--ease); }
.pager__link:hover .pager__title { color: var(--accent); }

/* Reveal ------------------------------------------------------------------ */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 600ms var(--ease) var(--d, 0s), transform 600ms var(--ease) var(--d, 0s);
}
.js [data-reveal].is-visible,
.no-reveal [data-reveal] {
	opacity: 1;
	transform: none;
}
.no-reveal [data-reveal] { transition: none; }

/* Reduced motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
	.js [data-reveal] { opacity: 1; transform: none; }
	.marquee__track { width: auto; animation: none; justify-content: center; }
	.marquee__group { flex-wrap: wrap; justify-content: center; row-gap: 12px; padding-inline: var(--pad-x); }
	.marquee__group[aria-hidden="true"] { display: none; }
	.frame:hover [class*="frame__corner"] { transform: none; }
	.media-img { transition: none; }
	.tool:hover, .skills__item:hover .skills__name { transform: none; }
	a.card__link:hover .media-img, a.ditem__link:hover .media-img, button.vcard__media:hover .media-img { transform: none; }
	.hs__track { scroll-behavior: auto; }
	body::before { animation: none; }
}

/* Neon cursor ------------------------------------------------------------- */
/* Mouse and trackpad only; phones and tablets keep their normal touch behaviour.
   Two declarations each: the plain PNG works everywhere, image-set adds the
   sharp 2x version where supported. Text fields keep the normal I-beam. */
@media (hover: hover) and (pointer: fine) {
	html {
		cursor: url("../img/cursors/shq-arrow.png?v=2") 7 5, auto;
		cursor: -webkit-image-set(url("../img/cursors/shq-arrow.png?v=2") 1x, url("../img/cursors/shq-arrow@2x.png?v=2") 2x) 7 5, auto;
	}
	a[href], button:not(:disabled), [role="button"], summary, label[for], select,
	.select select, .chip, .player__video, .player__seek, .hs-btn:not(:disabled),
	input[type="submit"], input[type="button"], input[type="checkbox"], input[type="radio"] {
		cursor: url("../img/cursors/shq-hand.png?v=2") 13 4, pointer;
		cursor: -webkit-image-set(url("../img/cursors/shq-hand.png?v=2") 1x, url("../img/cursors/shq-hand@2x.png?v=2") 2x) 13 4, pointer;
	}
	input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea { cursor: text; }
	.cform__submit[disabled] { cursor: progress; }
	.player.is-idle, .player.is-idle .player__video { cursor: none; }
}
