/* ==========================================================================
   Blockfield Portfolio v3: cinematic streaming style
   Display: Archivo (900, wide) / Body: Inter / Labels: JetBrains Mono
   ========================================================================== */

:root {
	--c-bg: #0e0e10;
	--c-bg-rgb: 14, 14, 16;
	--c-bg-deep: #08080a;
	--c-bg-2: #141417;
	--c-panel: #1a1a1e;
	--c-panel-2: #222227;
	--c-card: #141414;
	--c-card-2: #0a0a0a;
	--grad-card: linear-gradient(160deg, var(--c-card) 0%, var(--c-card-2) 100%);
	--c-text: #f5f5f5;
	--c-muted: #b8b3a8;
	--c-dim: #8f8a80;
	--c-line: rgba(253, 230, 138, 0.1);
	--c-line-2: rgba(253, 230, 138, 0.2);
	--c-accent: #f5b544;
	--c-accent-hot: #fbc86a;
	--c-accent-text: #fcd34d;
	--c-accent-rgb: 245, 181, 68;
	--c-accent-glow: rgba(245, 181, 68, 0.55);
	--c-accent-soft: rgba(245, 181, 68, 0.12);
	--c-accent-2: #f97316;
	--c-accent-2-rgb: 249, 115, 22;
	--c-accent-3: #fde68a;
	--c-accent-3-rgb: 253, 230, 138;
	--grad-accent: linear-gradient(120deg, #fde68a 0%, #f5b544 45%, #f97316 100%);
	--grad-button: linear-gradient(120deg, #b45309 0%, #c2410c 100%);
	--c-success: #46d369;
	--c-error: #ff6b6b;

	--f-display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
	--f-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

	--wrap: 1920px;
	--gutter: clamp(20px, 3.6vw, 56px);
	--section: clamp(96px, 11vw, 160px);
	--header-h: 72px;
	--radius: 18px;
	--ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
	--ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

	color-scheme: dark;
	box-sizing: border-box;
	padding-top: env(safe-area-inset-top, 0px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.55) var(--c-bg);
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
	-webkit-text-size-adjust: 100%;
	background: var(--c-bg);
}

body {
	margin: 0;
	background: transparent;
	color: var(--c-text);
	font-family: var(--f-body);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

a:hover {
	color: var(--c-accent-text);
}

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

::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.55);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--c-accent-hot);
}

::selection {
	background: var(--c-accent-2);
	color: #fff;
}

h1,
h2,
h3 {
	margin: 0;
}

p {
	margin: 0 0 1em;
}

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site-main {
	overflow-x: clip;
}

.mono {
	font-family: var(--f-mono);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

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

.skip-link:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	top: 12px;
	left: 12px;
	z-index: 10000;
	padding: 12px 18px;
	background: var(--c-accent);
	color: #fff;
}

.empty-note {
	color: var(--c-muted);
}

/* Shared pieces
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 22px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s, background-position 0.5s var(--ease-out), color 0.2s, border-color 0.2s, box-shadow 0.3s, transform 0.35s var(--ease-out);
}

.btn--white {
	background: #fff;
	color: #0a0a0a;
	box-shadow: 0 0 28px rgba(255, 255, 255, 0.18);
}

.btn--white:hover {
	background: rgba(255, 255, 255, 0.82);
	color: #0a0a0a;
}

.btn--dark {
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--c-line-2);
	color: var(--c-text);
}

.btn--dark:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--c-text);
}

.btn--red {
	background: var(--grad-button);
	background-size: 160% 100%;
	background-position: 0% 50%;
	color: #fff;
	box-shadow: 0 0 24px rgba(var(--c-accent-rgb), 0.45);
}

.btn--red:hover {
	background: var(--grad-button);
	background-size: 160% 100%;
	background-position: 100% 50%;
	color: #fff;
	box-shadow: 0 0 36px rgba(var(--c-accent-2-rgb), 0.55);
}

.btn--sm {
	padding: 10px 16px;
	font-size: 0.75rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 8px;
	border-radius: 3px;
	background: var(--grad-button);
	color: #fff;
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.badge--line {
	background: var(--c-accent-soft);
	border: 1px solid rgba(var(--c-accent-rgb), 0.55);
	color: var(--c-accent-text);
}

.tag {
	display: inline-flex;
	padding: 6px 10px;
	border: 1px solid rgba(var(--c-accent-rgb), 0.55);
	border-radius: 4px;
	background: var(--c-accent-soft);
	color: var(--c-accent-text);
	font-size: 0.6875rem;
	box-shadow: 0 0 16px rgba(var(--c-accent-rgb), 0.15);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip {
	display: inline-flex;
	padding: 7px 11px;
	border: 1px solid var(--c-line-2);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.04);
	color: rgba(245, 245, 245, 0.88);
	font-family: var(--f-mono);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.chips--caps .chip {
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.chips--sm .chip {
	padding: 5px 9px;
	font-size: 0.6875rem;
}

.red-dot {
	position: absolute;
	right: 18px;
	bottom: 18px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c-accent-hot);
	box-shadow: 0 0 10px var(--c-accent-hot);
}

.live-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--c-accent-hot);
	box-shadow: 0 0 8px var(--c-accent-hot);
}

.live-dot--pulse {
	animation: blockfield-pulse 1.8s ease-in-out infinite;
}

@keyframes blockfield-pulse {
	50% {
		opacity: 0.35;
	}
}

/* Episode label */
.episode {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
	padding: 7px 12px;
	border: 1px solid rgba(var(--c-accent-rgb), 0.45);
	border-radius: 4px;
	background: rgba(var(--c-accent-rgb), 0.07);
	font-family: var(--f-mono);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

.episode__ep {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--c-accent-text);
}

.episode__ep::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--c-accent-hot);
	box-shadow: 0 0 8px var(--c-accent-hot);
}

.episode__sep {
	color: var(--c-dim);
}

/* Ambient glows behind every section so long stretches of background aren't flat. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(900px 600px at 88% 8%, rgba(var(--c-accent-2-rgb), 0.13), transparent 60%),
		radial-gradient(900px 700px at 8% 55%, rgba(var(--c-accent-rgb), 0.11), transparent 60%);
	pointer-events: none;
}

/* Big two-line headline */
.headline {
	font-family: var(--f-display);
	font-size: clamp(2.1rem, 5.2vw + 0.3rem, 5.25rem);
	overflow-wrap: anywhere;
	font-weight: 900;
	font-stretch: 100%;
	line-height: 0.92;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.headline__line {
	display: block;
	position: relative;
	width: fit-content;
	max-width: 100%;
}

.headline__line--red {
	color: var(--c-accent);
	filter: drop-shadow(0 0 22px rgba(var(--c-accent-rgb), 0.45));
}

.hero__copy {
	container-type: inline-size;
}

.headline--hero {
	font-size: clamp(2.2rem, 3.6vw + 0.9rem, 4rem);
	font-size: clamp(2.2rem, 10cqi, 7rem); /* scales with the hero column so the name never wraps */
	line-height: 0.9;
}

.headline--page {
	font-size: clamp(2.5rem, 6vw, 5.5rem);
}

/* Heading scale: H1 70/80, H2 60/70, both 800. Shrinks on phones so words never overflow. */
h1.headline,
h1.page-title {
	font-size: clamp(2.25rem, 9vw, 70px);
	font-weight: 800;
	line-height: 1.143; /* 80px at 70px */
}

h2.headline {
	font-size: clamp(2rem, 8vw, 60px);
	font-weight: 800;
	line-height: 1.167; /* 70px at 60px */
}

.headline__inner {
	display: inline-block;
}

.headline__line--red .headline__inner {
	background: var(--grad-accent);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* Reveal: heading lines rise out of a blur, one after another (main.js adds .is-revealed). */
.js .headline .headline__inner {
	opacity: 0;
	transform: translate3d(0, 0.5em, 0) scale(0.98);
	filter: blur(14px);
}

.js .headline.is-revealed .headline__inner {
	opacity: 1;
	transform: none;
	filter: none;
	transition:
		opacity 0.9s var(--ease-expo),
		transform 1.2s var(--ease-expo),
		filter 1s var(--ease-expo);
}

.js .headline.is-revealed .headline__line + .headline__line .headline__inner {
	transition-delay: 0.16s;
}

.js .hero .headline.is-revealed .headline__inner {
	transition-delay: 0.45s;
}

.js .hero .headline.is-revealed .headline__line + .headline__line .headline__inner {
	transition-delay: 0.62s;
}

.hero__copy > .headline {
	opacity: 1;
	transform: none;
	animation: none;
}

/* Content blocks fade up as they scroll in; siblings are staggered via --reveal-i. */
[data-reveal] {
	opacity: 0;
	transform: translate3d(0, 40px, 0);
	filter: blur(6px);
}

[data-reveal].is-revealed {
	opacity: 1;
	transform: none;
	filter: none;
	transition:
		opacity 0.9s var(--ease-expo),
		transform 1.1s var(--ease-expo),
		filter 0.9s var(--ease-expo);
	transition-delay: calc(var(--reveal-i, 0) * 110ms);
}

/* Section head */
.section {
	position: relative;
	padding-block: var(--section);
}

.section--page {
	padding-top: calc(var(--header-h) + clamp(48px, 7vw, 96px));
}

/* Phones: every section gets 50px top and bottom. */
@media (max-width: 760px) {
	:root {
		--section: 50px;
	}

	.section.contact {
		padding-top: var(--section);
	}
}

.section-head {
	position: relative;
	margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head--split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
	align-items: end;
	gap: 24px 48px;
}

@media (max-width: 860px) {
	.section-head--split {
		grid-template-columns: minmax(0, 1fr);
	}
}

.section-head__text {
	max-width: 22rem;
	margin: 0 0 8px;
	color: var(--c-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.outline-word {
	position: absolute;
	left: 50%;
	top: 50%;
	margin: 0;
	transform: translate(-50%, -50%);
	color: transparent;
	font-family: var(--f-display);
	font-size: clamp(6rem, 24vw, 22rem);
	font-weight: 900;
	font-stretch: 112%;
	line-height: 0.8;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	-webkit-text-stroke: 1.5px rgba(var(--c-accent-rgb), 0.28);
	pointer-events: none;
	user-select: none;
}

.outline-word--top {
	top: clamp(120px, 12vw, 190px);
	-webkit-text-stroke-color: rgba(255, 255, 255, 0.07);
}

/* Header
   ========================================================================== */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	padding-top: env(safe-area-inset-top, 0px);
	border-bottom: 1px solid transparent;
	transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out);
}

/* Sit below the WordPress admin bar when logged in. */
.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

.site-header.is-hidden {
	transform: translateY(-100%);
}

.site-header.is-scrolled,
.site-header.is-open {
	background: rgba(var(--c-bg-rgb), 0.78);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom-color: var(--c-line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--header-h);
}

.wordmark {
	display: inline-flex;
	align-items: flex-start;
	gap: 3px;
	color: var(--c-accent);
	font-family: var(--f-display);
	font-size: 1.375rem;
	font-weight: 900;
	font-stretch: 100%;
	letter-spacing: -0.01em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	text-shadow: 0 0 18px rgba(var(--c-accent-rgb), 0.45);
	white-space: nowrap;
}

.wordmark:hover {
	color: var(--c-accent-hot);
}

.wordmark__dot {
	width: 6px;
	height: 6px;
	margin-top: 2px;
	border-radius: 50%;
	background: #fff;
}

.custom-logo {
	max-height: 38px;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: clamp(20px, 3vw, 40px);
}

.site-nav__list {
	display: flex;
	gap: clamp(16px, 2.2vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	color: rgba(245, 245, 245, 0.72);
	font-family: var(--f-mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.2s;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a {
	color: #fff;
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	margin-inline: auto;
	background: currentColor;
	transition: transform 0.3s var(--ease-out), background-color 0.2s;
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bars::before {
	top: -7px;
}

.nav-toggle__bars::after {
	top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
		padding: 24px var(--gutter) 32px;
		background: rgba(var(--c-bg-rgb), 0.97);
		border-bottom: 1px solid var(--c-line);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.25s, transform 0.3s var(--ease-out), visibility 0.3s;
	}

	.site-header.is-open .site-nav {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.site-nav__list {
		flex-direction: column;
		gap: 16px;
	}

	.site-nav__list a {
		font-size: 0.9375rem;
		color: #fff;
	}
}

/* Hero
   ========================================================================== */

.hero {
	--mx: 0;
	--my: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	padding-top: calc(var(--header-h) + 8px);
	overflow: hidden;
	isolation: isolate;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(120% 80% at 50% 0%, rgba(var(--c-accent-2-rgb), 0.16) 0%, transparent 60%),
		linear-gradient(to bottom, var(--c-bg-deep) 0%, rgba(var(--c-bg-rgb), 0) 100%);
}

.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
	-webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
}

.hero__glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0;
	animation: blockfield-fade 1.6s ease forwards 0.1s;
}

.hero__glow--a {
	left: -8%;
	top: 34%;
	width: max(52vw, 420px);
	height: max(26vw, 260px);
	background: radial-gradient(ellipse, rgba(var(--c-accent-rgb), 0.42) 0%, rgba(var(--c-accent-rgb), 0.12) 45%, transparent 70%);
	transform: translate3d(calc(var(--mx) * 24px), calc(var(--my) * 14px), 0);
}

.hero__glow--b {
	right: 4%;
	top: 22%;
	width: max(30vw, 280px);
	height: max(30vw, 280px);
	background: radial-gradient(circle, rgba(var(--c-accent-2-rgb), 0.3) 0%, transparent 65%);
	transform: translate3d(calc(var(--mx) * -30px), calc(var(--my) * -18px), 0);
}

.hero__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	font-size: 0.6875rem;
	opacity: 0;
	animation: blockfield-fade 0.8s ease forwards 0.2s;
}

.series {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 7px 12px;
	border: 1px solid rgba(var(--c-accent-rgb), 0.5);
	border-radius: 4px;
	background: rgba(var(--c-accent-rgb), 0.08);
	box-shadow: 0 0 20px rgba(var(--c-accent-rgb), 0.15);
}

.series__label {
	color: var(--c-accent-text);
}

.series__sep {
	color: var(--c-dim);
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--c-muted);
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 40px clamp(48px, 8vw, 160px);
	margin-block: auto;
	padding-block: 48px;
}

.hero__copy > * {
	opacity: 0;
	transform: translateY(22px);
	animation: blockfield-rise-in 0.9s var(--ease-out) forwards;
}

.hero__copy > :nth-child(1) { animation-delay: 0.3s; }
.hero__copy > :nth-child(2) { animation-delay: 0.4s; }
.hero__copy > :nth-child(3) { animation-delay: 0.6s; }
.hero__copy > :nth-child(4) { animation-delay: 0.7s; }
.hero__copy > :nth-child(5) { animation-delay: 0.8s; }

.hero__role {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 22px;
	color: rgba(245, 245, 245, 0.82);
	font-size: 0.75rem;
}

.headline--hero {
	margin-bottom: 26px;
}

.hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0 0 22px;
	color: rgba(245, 245, 245, 0.78);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: none;
}

.match {
	padding: 4px 8px;
	border: 1px solid rgba(var(--c-accent-rgb), 0.6);
	border-radius: 3px;
	background: var(--c-accent-soft);
	color: var(--c-accent-text);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.hero__stack-item::before {
	content: "\2022";
	margin-right: 10px;
	color: var(--c-accent-hot);
}

.hero__text {
	max-width: 34rem;
	margin: 0 0 32px;
	color: rgba(245, 245, 245, 0.78);
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	line-height: 1.6;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero__visual {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end; /* right edge lines up with the header button */
	gap: 32px;
	perspective: 1100px;
}

.poster {
	position: relative;
	flex: none;
	width: clamp(190px, 18vw, 340px);
	transform-style: preserve-3d;
	opacity: 0;
	transform: translate3d(0, 24px, 0);
	animation: blockfield-rise-in 1s var(--ease-out) forwards 0.5s;
	cursor: pointer;
}

/* Stands still; one full 360deg turn each time the pointer enters (main.js adds .is-spinning). */
.poster__spin {
	position: relative;
	transform-style: preserve-3d;
}

.poster__spin.is-spinning {
	animation: blockfield-spin 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes blockfield-spin {
	from {
		transform: rotateY(0deg);
	}

	to {
		transform: rotateY(360deg);
	}
}

.poster__inner {
	position: relative;
	aspect-ratio: 3 / 4.2;
	overflow: hidden;
	border: 1px solid var(--c-line-2);
	border-radius: 14px;
	background:
		radial-gradient(90% 70% at 60% 70%, rgba(var(--c-accent-rgb), 0.55) 0%, rgba(var(--c-accent-2-rgb), 0.3) 45%, transparent 75%),
		linear-gradient(160deg, var(--c-panel-2) 0%, var(--c-bg-2) 100%);
	box-shadow:
		0 40px 80px -30px rgba(0, 0, 0, 0.9),
		0 0 70px -6px rgba(var(--c-accent-rgb), 0.45);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.poster__back {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border: 1px solid rgba(var(--c-accent-rgb), 0.6);
	border-radius: 14px;
	background:
		radial-gradient(90% 70% at 40% 70%, rgba(var(--c-accent-rgb), 0.55) 0%, rgba(var(--c-accent-2-rgb), 0.3) 45%, transparent 75%),
		linear-gradient(160deg, var(--c-panel-2) 0%, var(--c-bg-2) 100%);
	box-shadow: 0 0 70px -6px rgba(var(--c-accent-rgb), 0.6);
	transform: rotateY(180deg);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
}

.poster__inner img,
.poster__back img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0; /* anchor to the top so the head keeps its headroom */
}

.poster__label {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 4px 8px;
	border-radius: 3px;
	background: var(--c-accent);
	color: #fff;
	font-size: 0.625rem;
}

/* Light sweep that follows the tilt. */
.poster__shine {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		115deg,
		transparent 30%,
		rgba(255, 255, 255, 0.14) 48%,
		transparent 62%
	);
	mix-blend-mode: screen;
	pointer-events: none;
}

.hero__side {
	max-width: 18rem;
	opacity: 0;
	animation: blockfield-fade 0.8s ease forwards 1s;
}

.hero__side-title {
	margin: 0 0 10px;
	color: var(--c-accent-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 23px;
}

.hero__side-text {
	margin: 0;
	color: rgba(245, 245, 245, 0.78);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.hero__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 28px;
	color: var(--c-muted);
	font-size: 0.6875rem;
	opacity: 0;
	animation: blockfield-fade 0.8s ease forwards 1.1s;
}

.hero__scroll {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.hero__scroll-line {
	position: relative;
	width: 40px;
	height: 1px;
	overflow: hidden;
	background: var(--c-line-2);
}

.hero__scroll-line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--c-accent-hot);
	animation: blockfield-scan 2.2s ease-in-out infinite;
}

@keyframes blockfield-scan {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

@keyframes blockfield-fade {
	to { opacity: 1; }
}

@keyframes blockfield-rise-in {
	to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
	.hero__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
		padding-block: 36px;
	}

	.hero__visual {
		justify-content: flex-start;
	}

	.poster {
		width: min(62vw, 260px);
	}
}

@media (max-width: 520px) {
	.hero__top .status {
		display: none;
	}

	.hero__visual {
		flex-direction: column;
		align-items: stretch;
	}

	/* Portrait card spans the full content width. */
	.poster {
		width: 100%;
	}

	.hero__side {
		max-width: none;
	}
}

/* Episode 01: about bento
   ========================================================================== */

.bento {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 20px;
}

.panel {
	position: relative;
	padding: clamp(24px, 3vw, 40px);
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--grad-card);
}

.panel--cast {
	grid-column: span 8;
}

.panel--miles {
	grid-column: span 4;
	display: flex;
	flex-direction: column;
}

.panel--stack {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 28px 48px;
	border-color: rgba(var(--c-accent-rgb), 0.55);
	background:
		radial-gradient(60% 120% at 20% 100%, rgba(var(--c-accent-rgb), 0.16) 0%, transparent 70%),
		radial-gradient(50% 120% at 90% 0%, rgba(var(--c-accent-2-rgb), 0.14) 0%, transparent 70%),
		var(--grad-card);
	box-shadow: 0 0 40px -8px rgba(var(--c-accent-rgb), 0.35), inset 0 0 30px rgba(var(--c-accent-rgb), 0.06);
}

.panel__num {
	position: absolute;
	top: 18px;
	right: 24px;
	color: rgba(255, 255, 255, 0.05);
	font-family: var(--f-display);
	font-size: 4rem;
	font-weight: 900;
	line-height: 1;
}

.panel__label {
	margin: 0 0 16px;
	color: var(--c-accent-text);
	font-size: 0.75rem;
}

.panel__intro {
	max-width: 40rem;
	margin: 0 0 16px;
	font-size: clamp(1.125rem, 1.7vw, 1.4375rem);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.panel__text {
	max-width: 40rem;
	margin: 0 0 26px;
	color: var(--c-muted);
	font-size: 1rem;
}

.panel__title {
	max-width: 26rem;
	margin: 0;
	font-family: var(--f-display);
	font-size: clamp(1.375rem, 2.2vw, 1.875rem);
	font-weight: 800;
	line-height: 1.15;
}

.panel--stack .chips {
	justify-content: flex-end;
}

.miles {
	display: grid;
	gap: 14px;
	margin: 0 0 auto;
	padding: 0;
	list-style: none;
}

.miles li {
	position: relative;
	padding-left: 20px;
	color: rgba(245, 245, 245, 0.86);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.miles li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	background: var(--c-accent-hot);
	box-shadow: 0 0 8px var(--c-accent-hot);
	transform: rotate(45deg);
}

.panel__note {
	margin: 28px 0 0;
	color: var(--c-dim);
	font-size: 0.6875rem;
	text-transform: none;
}

@media (max-width: 980px) {
	.panel--cast,
	.panel--miles {
		grid-column: 1 / -1;
	}

	.panel--stack {
		grid-template-columns: 1fr;
	}

	.panel--stack .chips {
		justify-content: flex-start;
	}
}

/* Episode 02: stacking capability cards
   ========================================================================== */

.stack-cards {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cap-card {
	position: sticky;
	top: calc(var(--header-h) + 28px + var(--i) * 18px);
	display: grid;
	grid-template-rows: auto 1fr;
	gap: 28px;
	min-height: clamp(220px, 24vw, 260px);
	margin-bottom: 28px;
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	background: var(--grad-card);
	box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.9);
	transition: border-color 0.35s, box-shadow 0.35s;
}

/* Light strip on the top edge. */
.cap-card::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 50%;
	width: 140px;
	height: 2px;
	transform: translateX(-50%);
	background: var(--c-accent-hot);
	box-shadow: 0 0 18px 2px var(--c-accent-hot);
	opacity: 0.6;
}

.cap-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.cap-card__num {
	color: rgba(255, 255, 255, 0.14);
	font-family: var(--f-display);
	font-size: 1.5rem;
	font-weight: 900;
}

.cap-card__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: end;
	gap: 16px 48px;
}

.cap-card__title {
	font-family: var(--f-display);
	font-size: clamp(1.625rem, 3vw, 2.5rem);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.05;
	transition: color 0.3s, text-shadow 0.3s;
}

.cap-card__text {
	align-self: start;
	margin: 0;
	color: var(--c-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.cap-card.is-active {
	border-color: rgba(var(--c-accent-rgb), 0.65);
	box-shadow: 0 0 44px -10px rgba(var(--c-accent-rgb), 0.55), inset 0 0 30px rgba(var(--c-accent-rgb), 0.05);
}

.cap-card.is-active .cap-card__title {
	color: var(--c-accent);
	text-shadow: 0 0 22px rgba(var(--c-accent-rgb), 0.5);
}

@media (max-width: 760px) {
	.cap-card {
		position: relative;
		top: auto;
	}

	.cap-card__body {
		grid-template-columns: 1fr;
	}
}

/* Episode 03: 3D skills coverflow
   ========================================================================== */

.skills {
	--intro: 0.35;
	position: relative;
	height: 340vh;
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 14%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.35) 86%, rgba(0, 0, 0, 0) 100%);
}

.skills__sticky {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: radial-gradient(70% 60% at 50% 55%, rgba(var(--c-accent-rgb), 0.3) 0%, rgba(var(--c-accent-2-rgb), 0.14) 45%, transparent 75%);
}

.skills__glow {
	position: absolute;
	left: 50%;
	top: 52%;
	width: 70vmin;
	height: 70vmin;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(var(--c-accent-rgb), 0.5) 0%, rgba(var(--c-accent-rgb), 0.12) 40%, transparent 70%);
	filter: blur(30px);
	opacity: calc(1.2 - var(--intro));
	pointer-events: none;
}

.skills .outline-word {
	top: 52%;
	font-size: clamp(6rem, 21vw, 20rem);
	letter-spacing: 0.12em;
	-webkit-text-stroke: 1.5px rgba(var(--c-accent-rgb), 0.45);
	padding-left: 0.12em;
}

.ring-stage {
	position: relative;
	flex: 1;
	display: grid;
	place-items: center;
	perspective: 1600px;
	cursor: grab;
	touch-action: pan-y;
}

.ring-stage.is-dragging {
	cursor: grabbing;
}

.ring {
	position: relative;
	width: clamp(250px, 23vw, 330px);
	aspect-ratio: 3 / 4;
	margin: 0;
	padding: 0;
	list-style: none;
	transform-style: preserve-3d;
	transform: scale(var(--intro));
}

.skill-card {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px 22px;
	border: 1px solid var(--c-line-2);
	border-radius: var(--radius);
	background: var(--grad-card);
	box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9);
	transition: border-color 0.3s, box-shadow 0.3s;
	will-change: transform, opacity;
}

.skill-card.is-front {
	border-color: rgba(var(--c-accent-rgb), 0.75);
	box-shadow: 0 0 50px -8px rgba(var(--c-accent-rgb), 0.6), 0 30px 60px -24px rgba(0, 0, 0, 0.9);
}

.skill-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: auto; /* with the chips' auto margin, centres the title, text and chips */
}

.skill-card__num {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--c-dim);
	font-size: 0.6875rem;
}

.red-dot--inline {
	position: static;
	width: 5px;
	height: 5px;
}

.skill-card__title {
	text-align: center;
	font-family: var(--f-display);
	font-size: clamp(1.375rem, 1.9vw, 1.75rem);
	font-weight: 800;
	line-height: 1.05;
	transition: color 0.3s, text-shadow 0.3s;
}

.skill-card.is-front .skill-card__title {
	color: var(--c-accent);
	text-shadow: 0 0 20px rgba(var(--c-accent-rgb), 0.45);
}

.skill-card__text {
	margin: 0;
	color: rgba(245, 245, 245, 0.72);
	font-size: 0.875rem;
	line-height: 1.55;
	text-align: center;
}

.skill-card .chips {
	justify-content: center;
	margin-top: 8px;
	margin-bottom: auto;
	/* Offsets the top bar so the group centres on the whole card. */
	padding-bottom: 38px;
}

.skills__counter {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 auto 28px;
	padding: 9px 14px;
	border: 1px solid var(--c-line-2);
	border-radius: 999px;
	background: rgba(var(--c-bg-rgb), 0.85);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	font-size: 0.6875rem;
}

.skills__counter-name {
	color: var(--c-accent-text);
}

.skills__counter-num {
	color: var(--c-muted);
}

/* Small screens: swipeable row instead of the 3D coverflow. */
@media (max-width: 760px) {
	.skills {
		--intro: 1;
		height: auto;
		padding-block: var(--section);
	}

	.skills__sticky {
		position: relative;
		height: auto;
		overflow: visible;
		background: none;
	}

	.skills__glow {
		display: none;
	}

	.skills .outline-word {
		top: 40px;
		font-size: 14vw; /* the whole word fits the screen width */
	}

	.ring-stage {
		display: block;
		place-items: normal;
		perspective: none;
		margin-top: 90px;
		cursor: auto;
		touch-action: auto;
	}

	.ring {
		display: flex;
		gap: 14px;
		width: 100%;
		aspect-ratio: auto;
		padding: 4px var(--gutter) 16px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		transform: none !important;
		scrollbar-width: none;
	}

	.ring::-webkit-scrollbar {
		display: none;
	}

	.skill-card {
		position: relative;
		inset: auto;
		flex: 0 0 80%;
		min-height: 360px;
		scroll-snap-align: center;
		transform: none !important;
		opacity: 1 !important;
		filter: none !important;
	}

	.skills__counter {
		display: none;
	}
}

/* Projects bento
   ========================================================================== */

.work {
	overflow: hidden;
}

.big-word {
	margin: 0;
	font-family: var(--f-display);
	font-weight: 900;
	line-height: 0.82;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

.big-word--gray {
	margin-bottom: clamp(-40px, -2.4vw, -16px);
	color: rgba(255, 255, 255, 0.16);
	font-size: clamp(4rem, 15.5vw, 19rem);
	filter: blur(0.6px);
}

.big-word--red {
	position: absolute;
	top: 0;
	left: var(--gutter);
	color: var(--c-bg-2);
	font-size: clamp(5rem, 22vw, 20rem);
	-webkit-text-stroke: 1.5px rgba(var(--c-accent-rgb), 0.55);
	text-shadow: 0 0 40px rgba(var(--c-accent-rgb), 0.25);
}

/* Phones: big words shrink so the whole word stays on screen. */
@media (max-width: 760px) {
	.big-word--gray {
		margin-bottom: 24px; /* no overlap: the cards would hide half of the smaller word */
		font-size: 13.5vw;
	}

	.big-word--red {
		font-size: 16vw;
	}
}

.project-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Cards fly out of the folder, then float (main.js sets --fx / --fy). */
.project-grid--fly > .project-card {
	position: relative;
	z-index: 1;
}

.project-grid--fly > .archive-tile {
	position: relative;
	z-index: 3;
}

.js .project-grid--fly > .project-card {
	opacity: 0;
	transform: translate3d(var(--fx, 0), var(--fy, 0), 0) scale(0.28) rotate(var(--frot, 0deg));
	transition:
		transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) calc(0.35s + var(--d, 0) * 90ms),
		opacity 0.45s ease calc(0.35s + var(--d, 0) * 90ms);
}

.js .project-grid--fly > .archive-tile {
	opacity: 0;
	transform: scale(0.85);
	transition: transform 0.7s var(--ease-out), opacity 0.5s ease;
}

.js .project-grid--fly.is-in > .project-card,
.js .project-grid--fly.is-in > .archive-tile {
	opacity: 1;
	transform: none;
}

.project-grid--fly.is-floating .project-card__link {
	animation: blockfield-float var(--fdur, 6s) ease-in-out infinite var(--fdel, 0s);
}

.project-grid--fly.is-floating .folder {
	animation: blockfield-float-folder 7s ease-in-out infinite;
}

@keyframes blockfield-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0) rotate(0deg);
	}

	50% {
		transform: translate3d(0, -10px, 0) rotate(var(--frot, 0.35deg));
	}
}

@keyframes blockfield-float-folder {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-6px);
	}
}

.project-card__link {
	--x: 50%;
	--y: 50%;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	min-height: 260px;
	padding: 22px 22px 26px;
	overflow: hidden;
	border: 1px solid var(--c-line);
	border-radius: 16px;
	background:
		radial-gradient(260px circle at var(--x) var(--y), rgba(var(--c-accent-rgb), 0.12), transparent 70%),
		var(--grad-card);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.3s, box-shadow 0.3s, translate 0.4s var(--ease-out);
}

.project-card__link:hover,
.project-card__link:focus-visible {
	border-color: rgba(var(--c-accent-rgb), 0.65);
	box-shadow: 0 0 46px -10px rgba(var(--c-accent-rgb), 0.55);
	translate: 0 -6px;
	color: inherit;
}

.project-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.project-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.match-text {
	color: var(--c-accent-text);
	font-size: 0.75rem;
	font-weight: 700;
}

.hd {
	padding: 1px 5px;
	border: 1px solid var(--c-line-2);
	border-radius: 3px;
	color: rgba(245, 245, 245, 0.8);
	font-size: 0.5625rem;
}

.project-card__label {
	color: var(--c-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
}

.project-card__title {
	font-family: var(--f-display);
	font-size: clamp(1.25rem, 1.7vw, 1.5rem);
	font-weight: 800;
	line-height: 1.12;
	transition: color 0.25s, text-shadow 0.25s;
}

.project-card__link:hover .project-card__title {
	color: var(--c-accent);
	text-shadow: 0 0 18px rgba(var(--c-accent-rgb), 0.45);
}

.project-card__text {
	display: -webkit-box;
	overflow: hidden;
	color: var(--c-muted);
	font-size: 0.875rem;
	line-height: 1.55;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.project-card .chips {
	margin-top: auto;
	padding-top: 10px;
}

/* Featured image: pops up above the card on hover, outside its frame. */
.project-card__media {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	z-index: 20;
	width: min(100%, 440px);
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border: 1px solid rgba(var(--c-accent-rgb), 0.6);
	border-radius: 14px;
	background: var(--c-panel-2);
	box-shadow:
		0 30px 60px -20px rgba(0, 0, 0, 0.95),
		0 0 50px -10px rgba(var(--c-accent-rgb), 0.55);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 16px) scale(0.94);
	transform-origin: 50% 100%;
	transition: opacity 0.3s ease, transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
	pointer-events: none;
}

.project-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-card {
	position: relative; /* anchors the preview */
}

/* The hovered card rises above its neighbours so the preview is never covered. */
.project-grid > .project-card:hover,
.project-grid > .project-card:focus-within {
	z-index: 10;
}

.project-card:hover .project-card__media,
.project-card:focus-within .project-card__media {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0) scale(1);
	transition: opacity 0.3s ease, transform 0.45s var(--ease-out), visibility 0s;
}

/* Touch screens have no hover, so no preview there. */
@media (hover: none) {
	.project-card__media {
		display: none;
	}
}

.archive-tile__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	height: 100%;
	min-height: 260px;
	padding: 22px;
	border-radius: 16px;
	background: radial-gradient(55% 55% at 50% 50%, rgba(var(--c-accent-rgb), 0.26) 0%, rgba(var(--c-accent-rgb), 0.06) 55%, transparent 75%);
	color: inherit;
	text-decoration: none;
}

.archive-tile__link:hover {
	color: inherit;
}

/* Folder */
.folder {
	position: relative;
	display: block;
	width: min(80%, 290px);
	aspect-ratio: 1.4;
	perspective: 800px;
	filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 26px rgba(var(--c-accent-rgb), 0.35));
}

.folder__back {
	position: absolute;
	inset: 13% 0 0;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0 12px 12px 12px;
	background: linear-gradient(180deg, var(--c-panel-2) 0%, var(--c-panel) 100%);
}

/* Tab on the top-left of the folder. */
.folder__back::before {
	content: "";
	position: absolute;
	left: -1px;
	bottom: 100%;
	width: 42%;
	height: 22%;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-bottom: 0;
	border-radius: 10px 4px 0 0;
	background: var(--c-panel-2);
	clip-path: polygon(0 0, 78% 0, 100% 100%, 0 100%);
}

.folder__paper {
	position: absolute;
	top: 8%;
	bottom: 18%;
	border-radius: 6px;
	transform-origin: 50% 100%;
	transition: transform 0.7s var(--ease-out);
}

.folder__paper--1 {
	left: 8%;
	right: 10%;
	background: linear-gradient(180deg, #e8e8e8 0%, #bdbdbd 100%);
	transform: rotate(-3deg) translateY(6%);
}

.folder__paper--2 {
	left: 16%;
	right: 5%;
	background: linear-gradient(180deg, var(--c-accent-3) 0%, var(--c-accent) 100%);
	box-shadow: 0 0 22px rgba(var(--c-accent-rgb), 0.55);
	transform: rotate(3deg) translateY(12%);
}

.folder__front {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	place-items: center;
	align-content: center;
	gap: 12px;
	height: 70%;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-top-color: rgba(255, 255, 255, 0.28);
	border-radius: 10px 10px 12px 12px;
	background:
		repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
		linear-gradient(180deg, var(--c-panel-2) 0%, var(--c-panel) 100%);
	transform-origin: 50% 100%;
	transform: rotateX(-12deg);
	transition: transform 0.8s var(--ease-out);
}

.folder__line {
	width: 42%;
	height: 2px;
	border-radius: 2px;
	background: var(--c-accent-hot);
	box-shadow: 0 0 10px var(--c-accent-hot);
}

.archive-tile__link:hover .folder__front,
.project-grid--fly.is-opening .folder__front {
	transform: rotateX(-40deg);
}

.archive-tile__link:hover .folder__paper--1,
.project-grid--fly.is-opening .folder__paper--1 {
	transform: rotate(-5deg) translateY(-6%);
}

.archive-tile__link:hover .folder__paper--2,
.project-grid--fly.is-opening .folder__paper--2 {
	transform: rotate(5deg) translateY(-12%);
}

.archive-tile__label {
	position: relative;
	color: var(--c-accent-hot);
	font-size: clamp(0.875rem, 1.3vw, 1.0625rem);
	letter-spacing: 0.14em;
	text-shadow: 0 0 14px rgba(var(--c-accent-3-rgb), 0.7);
}

.archive-tile__count {
	color: var(--c-dim);
	font-size: 0.625rem;
}

@media (max-width: 980px) {
	.project-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.project-grid {
		grid-template-columns: 1fr;
	}
}

/* Episode 04: contact
   ========================================================================== */

.contact {
	overflow: hidden;
	padding-top: clamp(56px, 7vw, 96px);
}

.contact__wrap {
	position: relative;
	padding-top: clamp(90px, 14vw, 220px);
}

.contact-card {
	position: relative;
	max-width: 1400px;
	margin-inline: auto;
	padding: clamp(28px, 4vw, 52px);
	border: 1px solid var(--c-line-2);
	border-radius: 22px;
	background: var(--grad-card);
	box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.contact-card__lamp {
	position: absolute;
	top: -1px;
	left: 50%;
	width: 160px;
	height: 2px;
	transform: translateX(-50%);
	background: var(--c-accent-hot);
	box-shadow: 0 0 22px 3px var(--c-accent-hot), 0 6px 40px 6px rgba(var(--c-accent-rgb), 0.35);
}

.contact-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: clamp(28px, 4vw, 44px);
}

.contact-card__label {
	position: relative;
	margin: 0;
	padding: 9px 14px;
	border: 1px solid rgba(var(--c-accent-rgb), 0.6);
	border-radius: 4px;
	background: rgba(var(--c-accent-rgb), 0.14);
	color: var(--c-accent-text);
	font-size: 0.8125rem;
	box-shadow: 0 0 26px rgba(var(--c-accent-rgb), 0.3);
	text-shadow: 0 0 10px rgba(var(--c-accent-3-rgb), 0.5);
}

.contact-card__note {
	margin: 0;
	color: var(--c-dim);
	font-size: 0.6875rem;
	line-height: 1.7;
	text-align: right;
	text-transform: none;
}

.contact-card__note a {
	color: var(--c-muted);
	text-decoration: none;
}

.contact-card__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 28px clamp(32px, 5vw, 72px);
}

.contact-card__fields {
	display: grid;
	gap: 26px;
}

.line-field {
	display: grid;
	gap: 6px;
}

.line-field label {
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 600;
}

.line-field input,
.line-field textarea {
	width: 100%;
	padding: 10px 0 12px;
	border: 0;
	border-bottom: 1px solid var(--c-line-2);
	border-radius: 0;
	background: transparent;
	color: var(--c-text);
	font: inherit;
	font-size: 0.9375rem;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.line-field input::placeholder,
.line-field textarea::placeholder {
	color: var(--c-dim);
}

.line-field textarea {
	flex: 1;
	min-height: 180px;
	resize: vertical;
}

.line-field--area {
	display: flex;
	flex-direction: column;
}

.line-field input:focus,
.line-field textarea:focus {
	outline: none;
	border-bottom-color: var(--c-accent-hot);
	box-shadow: 0 1px 0 0 var(--c-accent-hot), 0 8px 18px -12px rgba(var(--c-accent-rgb), 0.8);
}

.field--hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
	margin-top: clamp(32px, 4vw, 48px);
}

.check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: 24rem;
	color: rgba(245, 245, 245, 0.86);
	font-size: 0.875rem;
	line-height: 1.5;
	cursor: pointer;
}

.check input {
	position: absolute;
	opacity: 0;
	width: 18px;
	height: 18px;
	margin: 0;
}

.check__box {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 1px solid var(--c-line-2);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.9);
	transition: background-color 0.2s, border-color 0.2s;
}

.check input:checked + .check__box {
	border-color: var(--c-accent);
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat,
		var(--c-accent);
}

.check input:focus-visible + .check__box {
	outline: 2px solid var(--c-accent-hot);
	outline-offset: 2px;
}

.contact-card__send {
	display: flex;
	align-items: center;
	gap: 24px;
}

.contact-card__side {
	max-width: 28rem;
	margin: 0;
	color: var(--c-dim);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.notice {
	margin: 0 0 24px;
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 0.9375rem;
}

.notice--success {
	background: rgba(70, 211, 105, 0.12);
	color: var(--c-success);
}

.notice--error {
	background: rgba(134, 178, 255, 0.12);
	color: var(--c-error);
}

@media (max-width: 760px) {
	.contact-card__grid {
		grid-template-columns: 1fr;
	}

	.contact-card__note {
		text-align: left;
	}

	.contact-card__send {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Contact popup
   ========================================================================== */

.has-modal {
	overflow: hidden; /* page stays put behind the popup */
}

.modal {
	width: min(100% - 2 * var(--gutter), 640px);
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
	color: var(--c-text);
}

.modal::backdrop {
	background: rgba(5, 5, 7, 0.78);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.modal[open] {
	animation: blockfield-modal-in 0.4s var(--ease-out);
}

.modal[open]::backdrop {
	animation: blockfield-fade 0.3s ease;
}

@keyframes blockfield-modal-in {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.97);
	}
}

.modal__card {
	position: relative;
	max-height: calc(100dvh - 32px);
	padding: clamp(24px, 4vw, 40px);
	overflow-y: auto;
	border: 1px solid var(--c-line-2);
	border-radius: 22px;
	background: var(--grad-card);
	box-shadow:
		0 40px 100px -30px rgba(0, 0, 0, 0.95),
		0 0 60px -20px rgba(var(--c-accent-rgb), 0.45);
}

.modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--c-line-2);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	font-size: 1.375rem;
	line-height: 1;
	transition: border-color 0.2s, color 0.2s;
}

.modal__close:hover,
.modal__close:focus-visible {
	border-color: rgba(var(--c-accent-rgb), 0.7);
	color: var(--c-accent-text);
}

.modal__head {
	display: grid;
	justify-items: start;
	gap: 12px;
	margin-bottom: 26px;
	padding-right: 44px;
}

.modal__title {
	font-family: var(--f-display);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
}

.modal__text {
	margin: 0;
	color: var(--c-muted);
	font-family: var(--f-mono);
	font-size: 0.75rem;
}

.modal__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 22px 28px;
}

.modal__wide {
	grid-column: 1 / -1;
}

.modal .line-field textarea {
	min-height: 110px;
}

.modal__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 24px;
	margin-top: 28px;
}

.modal__foot .btn[disabled] {
	opacity: 0.6;
	pointer-events: none;
}

/* The popup sits above the custom cursor, so it uses the system cursor. */
.has-cursor .modal,
.has-cursor .modal * {
	cursor: auto !important;
}

.has-cursor .modal :is(button, a, label, .check) {
	cursor: pointer !important;
}

.has-cursor .modal :is(input, textarea) {
	cursor: text !important;
}

@media (max-width: 560px) {
	.modal__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Footer
   ========================================================================== */

.site-footer {
	padding-block: 100px 30px;
	border-top: 1px solid var(--c-line);
	background: var(--c-bg);
}

.site-footer__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
}

.site-footer__row--meta {
	align-items: center;
	padding-top: 36px;
	font-size: 0.6875rem;
}

.wordmark--xl {
	font-size: clamp(1.5rem, 8.5vw, 50px); /* 50px on desktop, shrinks to fit phones */
	font-weight: 800;
	line-height: 1.2;
}

.wordmark--xl .wordmark__dot {
	width: 10px;
	height: 10px;
	margin-top: 6px;
}

.site-footer__line {
	margin: 12px 0 0;
	color: var(--c-muted);
	font-size: 0.6875rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links a {
	color: rgba(245, 245, 245, 0.78);
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
}

.footer-links a:hover,
.social-line a:hover {
	color: var(--c-accent-text);
}

.social-line {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.social-line li:not(:last-child)::after {
	content: "//";
	margin-left: 10px;
	color: var(--c-dim);
}

.social-line a {
	color: rgba(245, 245, 245, 0.85);
	text-decoration: none;
}

.site-footer__credit {
	margin: 0;
	color: var(--c-accent-text);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--c-line-2);
	color: var(--c-dim);
	font-size: 0.625rem;
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__bottom a {
	margin-left: auto; /* stays on the right even when the row wraps */
	text-decoration: none;
}

@media (max-width: 760px) {
	.site-footer {
		padding-top: 50px;
	}
}

/* Single project and posts
   ========================================================================== */

.project__head {
	padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px));
}

.back-link {
	display: inline-block;
	margin-bottom: 24px;
	color: var(--c-muted);
	font-size: 0.6875rem;
	text-decoration: none;
}

.project__lede {
	max-width: 40rem;
	margin: 24px 0 0;
	color: rgba(245, 245, 245, 0.82);
	font-size: 1.125rem;
}

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 20px 32px;
	max-width: 900px;
	margin: 40px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--c-line);
}

.facts dt {
	margin-bottom: 4px;
	color: var(--c-accent-text);
	font-size: 0.6875rem;
}

.facts dd {
	margin: 0;
	font-weight: 600;
}

.project__media {
	margin-block: clamp(40px, 6vw, 80px);
}

.project__media img {
	width: 100%;
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
}

.page-title {
	max-width: 18ch;
	margin-bottom: 24px;
	font-family: var(--f-display);
	font-size: clamp(2.25rem, 5vw, 4rem);
	font-weight: 900;
	font-stretch: 112%;
	line-height: 0.95;
	text-transform: uppercase;
}

.entry__date {
	margin-bottom: 40px;
	color: var(--c-muted);
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: var(--section);
	padding-block: 32px;
	border-top: 1px solid var(--c-line);
}

.post-nav a {
	display: grid;
	gap: 6px;
	font-family: var(--f-display);
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
}

.post-nav a span {
	color: var(--c-accent-text);
	font-size: 0.6875rem;
}

.post-nav__next {
	text-align: right;
}

.post-list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--c-line);
}

.post-list__item {
	padding-block: 28px;
	border-bottom: 1px solid var(--c-line);
}

.post-list__link {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	text-decoration: none;
}

.post-list__title {
	font-family: var(--f-display);
	font-size: 1.5rem;
	font-weight: 800;
}

.post-list__date,
.post-list__excerpt {
	color: var(--c-muted);
}

.post-list__excerpt {
	max-width: 42rem;
	margin: 10px 0 0;
}

.nav-links {
	display: flex;
	gap: 16px;
	margin-top: 40px;
	font-family: var(--f-mono);
	font-size: 0.8125rem;
}

.nav-links .current {
	color: var(--c-accent-text);
}

.not-found p {
	max-width: 36rem;
	color: var(--c-muted);
}

.search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin-top: 32px;
}

.search-form label {
	flex: 1;
}

.search-field {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--c-line-2);
	border-radius: 4px;
	background: var(--c-panel);
	color: var(--c-text);
	font: inherit;
}

.search-submit {
	padding: 12px 18px;
	border: 0;
	border-radius: 4px;
	background: var(--c-accent);
	color: #fff;
	font-family: var(--f-mono);
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}

.entry-content {
	padding-inline: var(--gutter);
}

.entry-content > * {
	max-width: 720px;
	margin-inline: auto;
}

.entry-content > .alignwide {
	max-width: 1120px;
}

.entry-content > .alignfull {
	max-width: none;
	margin-inline: calc(-1 * var(--gutter));
}

.entry-content p,
.entry-content li {
	color: rgba(245, 245, 245, 0.86);
	font-size: 1.0625rem;
	line-height: 1.75;
}

.entry-content h2 {
	margin: 2.2em auto 0.6em;
	font-family: var(--f-display);
	font-size: 1.75rem;
	font-weight: 800;
}

.entry-content h3 {
	margin: 1.8em auto 0.5em;
	font-size: 1.25rem;
}

.entry-content a {
	color: var(--c-accent-text);
}

.entry-content figure {
	margin-block: 2.5em;
}

.entry-content figure img {
	border-radius: 12px;
}

.entry-content figcaption {
	margin-top: 10px;
	color: var(--c-muted);
	font-size: 0.875rem;
}

.entry-content blockquote {
	margin-block: 2em;
	padding-left: 24px;
	border-left: 3px solid var(--c-accent);
	font-size: 1.25rem;
}

.entry-content code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--c-panel-2);
	font-family: var(--f-mono);
	font-size: 0.88em;
}

.entry-content pre {
	overflow-x: auto;
	padding: 20px;
	border: 1px solid var(--c-line);
	border-radius: 10px;
	background: var(--c-panel);
}

.entry-content pre code {
	padding: 0;
	background: none;
}

.wrap--narrow {
	max-width: calc(720px + 2 * var(--gutter));
}

.comments {
	margin-top: var(--section);
}

.comments__title {
	margin-bottom: 24px;
	font-family: var(--f-display);
	font-size: 1.5rem;
}

.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-form input,
.comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--c-line-2);
	border-radius: 6px;
	background: var(--c-panel);
	color: var(--c-text);
	font: inherit;
}

/* Custom cursor
   ========================================================================== */

.cursor {
	display: none;
}

.has-cursor .cursor {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
}

.has-cursor,
.has-cursor * {
	cursor: none !important;
}

.has-cursor :is(input, textarea) {
	cursor: text !important;
}

.cursor__ring,
.cursor__dot {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
	will-change: transform;
	transition: opacity 0.2s;
}

.cursor.is-visible .cursor__ring,
.cursor.is-visible .cursor__dot {
	opacity: 1;
}

.cursor__dot {
	width: 6px;
	height: 6px;
	margin: -3px 0 0 -3px;
	border-radius: 50%;
	background: var(--c-accent-hot);
	box-shadow: 0 0 8px var(--c-accent-hot);
}

.cursor__shape {
	position: absolute;
	left: 0;
	top: 0;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition:
		width 0.4s var(--ease-out),
		height 0.4s var(--ease-out),
		background-color 0.25s,
		border-color 0.25s,
		transform 0.2s var(--ease-out);
}

.cursor__label {
	color: #fff;
	font-family: var(--f-mono);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.2s;
}

.cursor.is-link .cursor__shape {
	width: 56px;
	height: 56px;
	border-color: var(--c-accent-hot);
	background: rgba(var(--c-accent-rgb), 0.1);
}

.cursor.is-view .cursor__shape {
	width: 88px;
	height: 88px;
	border-color: var(--c-accent);
	background: var(--c-accent);
	box-shadow: 0 0 30px rgba(var(--c-accent-rgb), 0.6);
}

.cursor.is-view .cursor__label {
	opacity: 1;
}

.cursor.is-view .cursor__dot,
.cursor.is-text .cursor__ring {
	opacity: 0;
}

.cursor.is-down .cursor__shape {
	transform: translate(-50%, -50%) scale(0.82);
}

.cursor.is-hidden .cursor__ring,
.cursor.is-hidden .cursor__dot {
	opacity: 0;
}

/* Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.hero__copy > *,
	.hero__top,
	.hero__bottom,
	.hero__side,
	.hero__glow,
	.poster,
	.js .headline .headline__inner,
	[data-reveal],
	.js .project-grid--fly > li {
		opacity: 1;
		transform: none;
	}

	.js .headline .headline__inner,
	[data-reveal] {
		filter: none;
	}

	.project-grid--fly.is-floating .project-card__link,
	.project-grid--fly.is-floating .folder {
		animation: none;
	}

	.poster__spin,
	.poster__spin.is-spinning {
		animation: none;
	}
}
