/* =========================================================================
   Alawad Editorial
   1.  Tokens
   2.  Reset & base
   3.  Typography
   4.  Layout primitives
   5.  Motion primitives
   6.  Header & navigation
   7.  Hero
   8.  About
   9.  Work
   10. Gallery & lightbox
   11. Services
   12. Skills marquee
   13. Contact & footer
   14. Blog / singular / 404
   15. Cursor accent
   16. Reduced motion
   ========================================================================= */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
	/* Warm bone paper, warm ink, one vermilion accent. Nothing else. */
	--paper: #f4f1ea;
	--paper-2: #ebe6d9;
	--paper-3: #e2dccc;
	--ink: #12100e;
	--ink-2: #1b1815;
	--ink-soft: #57534e;
	--ink-mute: #78706a;
	--on-dark: #f4f1ea;
	--on-dark-soft: #a9a199;
	--rule: #d5cec0;
	--rule-dark: #33302b;
	--accent: #d6401e;
	--accent-deep: #b23214;

	--font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-mono: "Space Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* Fluid scale, 360px → 1600px */
	--step-0: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
	--step-1: clamp(1.125rem, 1.05rem + 0.34vw, 1.375rem);
	--step-2: clamp(1.35rem, 1.2rem + 0.65vw, 1.85rem);
	--step-3: clamp(1.7rem, 1.35rem + 1.5vw, 2.85rem);
	--step-4: clamp(2.1rem, 1.5rem + 2.7vw, 4.25rem);
	--step-5: clamp(2.6rem, 1.5rem + 4.9vw, 6.5rem);
	--step-6: clamp(3rem, 0.8rem + 9.6vw, 10rem);

	--gutter: clamp(1.25rem, 5vw, 5rem);
	--wrap: min(100% - (var(--gutter) * 2), 88rem);
	--gap: clamp(1rem, 2.4vw, 2.5rem);
	--section-y: clamp(5rem, 11vw, 11rem);

	--ease: cubic-bezier(0.16, 1, 0.3, 1);
	--dur: 0.32s;

	--z-nav: 40;
	--z-cursor: 60;
	--z-dialog: 80;
}

/* ------------------------------------------------------- 2. Reset & base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 6rem;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.6;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

ul,
ol,
dl,
dd,
figure {
	margin: 0;
	padding: 0;
}

li {
	list-style: none;
}

::selection {
	background: var(--accent);
	color: var(--paper);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	border-radius: 1px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: var(--gutter);
	z-index: 100;
	background: var(--ink);
	color: var(--paper);
	padding: 0.85rem 1.25rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.skip-link:focus {
	top: 0.75rem;
}

/* --------------------------------------------------------- 3. Typography */

.mono {
	font-family: var(--font-mono);
	font-size: clamp(0.7rem, 0.66rem + 0.18vw, 0.8rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.5;
}

.h-display {
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-variation-settings: "SOFT" 0, "WONK" 1;
	font-weight: 500;
	font-size: var(--step-4);
	line-height: 1.02;
	letter-spacing: -0.025em;
	text-wrap: balance;
	margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
	max-width: 18ch;
}

.prose {
	max-width: 68ch;
	line-height: 1.7;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose figure,
.prose pre {
	margin: 0 0 1.4em;
}

.prose ul li,
.prose ol li {
	list-style: revert;
	margin-left: 1.25em;
}

.prose h2,
.prose h3,
.prose h4 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.02em;
	margin: 2em 0 0.6em;
}

.prose h2 {
	font-size: var(--step-3);
}

.prose h3 {
	font-size: var(--step-2);
}

.prose blockquote {
	border-left: 2px solid var(--accent);
	padding-left: 1.25rem;
	font-family: var(--font-display);
	font-size: var(--step-2);
	font-style: italic;
}

.prose a {
	text-decoration: underline;
	text-decoration-color: var(--accent);
}

.link-underline {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 100% 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-underline:hover,
.link-underline:focus-visible {
	color: var(--accent);
	background-size: 0% 1px;
	background-position: 100% 100%;
}

/* ------------------------------------------------- 4. Layout primitives */

.wrap {
	width: var(--wrap);
	margin-inline: auto;
}

.site-main {
	display: block;
}

.section {
	padding-block: var(--section-y);
	position: relative;
}

.section + .section {
	padding-top: 0;
}

.section--work,
.section--contact {
	background: var(--ink);
	color: var(--on-dark);
	padding-top: var(--section-y);
}

.section--work {
	margin-top: var(--section-y);
}

.section--work + .section {
	padding-top: var(--section-y);
}

/* Asymmetric two-column: a narrow label rail, a body that stops short of the
   right edge so the page never feels centred. */
.section__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
	row-gap: clamp(1.25rem, 3vw, 2rem);
	margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section__aside {
	grid-column: 1 / -1;
}

.section__body {
	grid-column: 1 / -1;
}

@media (min-width: 56rem) {
	.section__aside {
		grid-column: 1 / 4;
	}

	.section__body {
		grid-column: 4 / 12;
	}

	.section--gallery .section__body,
	.section--skills .section__body {
		grid-column: 5 / 13;
	}
}

.eyebrow {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0;
	font-family: var(--font-mono);
	font-size: clamp(0.7rem, 0.66rem + 0.18vw, 0.8rem);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.section--work .eyebrow,
.section--contact .eyebrow {
	color: var(--on-dark-soft);
}

.eyebrow__idx {
	color: var(--accent);
}

.eyebrow__rule {
	flex: 0 0 auto;
	width: clamp(1.5rem, 4vw, 3.5rem);
	height: 1px;
	background: currentColor;
	opacity: 0.45;
}

.section__note {
	color: var(--ink-mute);
	margin: 0;
}

.section--work .section__note {
	color: var(--on-dark-soft);
}

/* Image frames */

.frame {
	position: relative;
	aspect-ratio: var(--ratio, 4 / 3);
	overflow: hidden;
	background: var(--paper-2);
	border: 1px solid var(--rule);
}

.section--work .frame,
.section--contact .frame {
	background: var(--ink-2);
	border-color: var(--rule-dark);
}

.frame__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}

.frame__empty {
	position: absolute;
	inset: 0;
	display: grid;
	place-content: center;
	gap: 0.85rem;
	justify-items: center;
	padding: 1.5rem;
	text-align: center;
	background-image: linear-gradient(135deg, transparent calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px)),
		linear-gradient(45deg, transparent calc(50% - 0.5px), var(--rule) 50%, transparent calc(50% + 0.5px));
}

.section--work .frame__empty {
	background-image: linear-gradient(135deg, transparent calc(50% - 0.5px), var(--rule-dark) 50%, transparent calc(50% + 0.5px)),
		linear-gradient(45deg, transparent calc(50% - 0.5px), var(--rule-dark) 50%, transparent calc(50% + 0.5px));
}

.frame__empty-mark {
	width: 0.75rem;
	height: 0.75rem;
	background: var(--accent);
}

.frame__empty-label {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-mute);
	background: var(--paper);
	padding: 0.35rem 0.6rem;
	max-width: 22ch;
}

.section--work .frame__empty-label {
	color: var(--on-dark-soft);
	background: var(--ink);
}

.editor-hint {
	margin: 2rem 0 0;
	padding: 0.85rem 1rem;
	border: 1px dashed var(--accent);
	color: var(--accent-deep);
	text-transform: none;
	letter-spacing: 0.02em;
}

/* Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	min-height: 3rem;
	padding: 0.9rem 1.6rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	cursor: pointer;
	transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn--solid {
	background: var(--ink);
	color: var(--paper);
}

.btn--solid::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent);
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform 0.45s var(--ease);
	z-index: -1;
}

.btn--solid:hover::before,
.btn--solid:focus-visible::before {
	transform: scaleY(1);
}

.btn__arrow {
	transition: transform 0.45s var(--ease);
}

.btn--solid:hover .btn__arrow {
	transform: translateY(3px);
}

.btn--line {
	border-bottom: 1px solid currentColor;
	padding-inline: 0;
	min-height: 3rem;
}

.btn--line:hover,
.btn--line:focus-visible {
	color: var(--accent-deep);
}

/* -------------------------------------------------- 5. Motion primitives */

.mask {
	display: inline-block;
	overflow: hidden;
	vertical-align: bottom;
	padding-bottom: 0.08em;
	margin-bottom: -0.08em;
}

.mask__i {
	display: inline-block;
	will-change: transform;
}

.has-js .mask__i {
	transform: translateY(110%);
}

.has-js .is-in .mask__i {
	animation: mask-up 0.95s var(--ease) forwards;
	animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes mask-up {
	to {
		transform: translateY(0);
	}
}

.has-js .reveal {
	opacity: 0;
	transform: translateY(1.5rem);
	transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
	transition-delay: var(--d, 0ms);
}

.has-js .reveal.is-in {
	opacity: 1;
	transform: none;
}

.scroll-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	z-index: calc(var(--z-nav) + 1);
	pointer-events: none;
}

.scroll-progress__bar {
	display: block;
	height: 100%;
	width: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

/* --------------------------------------------- 6. Header & navigation */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--z-nav);
	transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease), transform 0.45s var(--ease);
	border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
	background: color-mix(in srgb, var(--paper) 92%, transparent);
	backdrop-filter: saturate(120%) blur(8px);
	border-bottom-color: var(--rule);
}

.site-header.is-hidden {
	transform: translateY(-101%);
}

.site-header__inner {
	width: var(--wrap);
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 4.5rem;
	transition: min-height 0.45s var(--ease);
}

.site-header.is-stuck .site-header__inner {
	min-height: 3.75rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.75rem;
	text-decoration: none;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.0625rem;
	letter-spacing: -0.01em;
	z-index: 2;
}

.brand__mark {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	color: var(--accent);
	border: 1px solid currentColor;
	padding: 0.2rem 0.35rem;
	line-height: 1;
}

.brand .custom-logo {
	max-height: 2.25rem;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 3vw, 2.75rem);
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.6vw, 2.25rem);
}

.site-nav__link {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	text-decoration: none;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding-block: 0.6rem;
	transition: color var(--dur) var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link.is-current {
	color: var(--accent-deep);
}

.site-nav__idx {
	color: var(--ink-mute);
	font-size: 0.62rem;
}

.site-nav__link:hover .site-nav__idx,
.site-nav__link.is-current .site-nav__idx {
	color: var(--accent);
}

.site-nav__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid var(--ink);
	padding: 0.7rem 1.1rem;
	min-height: 2.75rem;
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.site-nav__cta:hover,
.site-nav__cta:focus-visible {
	background: var(--ink);
	color: var(--paper);
}

.site-nav__cta-dot {
	width: 6px;
	height: 6px;
	background: var(--accent);
}

.nav-toggle {
	display: none;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	min-height: 2.75rem;
	padding: 0.5rem 0;
	z-index: 2;
}

.nav-toggle__bars {
	display: grid;
	gap: 5px;
	width: 22px;
}

.nav-toggle__bars i {
	display: block;
	height: 1px;
	background: currentColor;
	transition: transform 0.4s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:first-child {
	transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:last-child {
	transform: translateY(-3px) rotate(-45deg);
}

@media (max-width: 55.999rem) {
	.nav-toggle {
		display: inline-flex;
	}

	.site-nav {
		position: fixed;
		inset: 0;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 2rem;
		padding: 6rem var(--gutter) 3rem;
		background: var(--paper);
		clip-path: inset(0 0 100% 0);
		transition: clip-path 0.55s var(--ease);
		pointer-events: none;
	}

	.site-nav.is-open {
		clip-path: inset(0 0 0 0);
		pointer-events: auto;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.site-nav__link {
		font-family: var(--font-display);
		font-size: var(--step-3);
		letter-spacing: -0.02em;
		text-transform: none;
		font-weight: 500;
	}

	.site-nav__idx {
		font-family: var(--font-mono);
		font-size: 0.7rem;
	}
}

/* ------------------------------------------------------------- 7. Hero */

.hero {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-block: 8rem clamp(1.5rem, 4vw, 3rem);
	position: relative;
	overflow: hidden;
}

.hero::after {
	/* A single hairline that ties the hero to the grid. */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(3.75rem, 7vw, 5.5rem);
	height: 1px;
	background: var(--rule);
	z-index: -1;
}

.hero__inner {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
	row-gap: clamp(1.5rem, 4vw, 3rem);
	width: var(--wrap);
	margin-inline: auto;
}

.hero__eyebrow {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin: 0;
	color: var(--ink-soft);
	text-transform: none;
	letter-spacing: 0.1em;
}

.hero__eyebrow-dot {
	width: 8px;
	height: 8px;
	background: var(--accent);
	flex: 0 0 auto;
}

.has-js .hero__eyebrow-dot {
	animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.35;
		transform: scale(0.75);
	}
}

.hero__name {
	grid-column: 1 / -1;
	margin: 0;
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-variation-settings: "SOFT" 0, "WONK" 1;
	font-weight: 600;
	font-size: var(--step-6);
	line-height: 0.85;
	letter-spacing: -0.045em;
}

.hero__name-line {
	display: block;
}

.hero__name-line--shift {
	margin-left: clamp(0.5rem, 9vw, 9rem);
}

.hero__name-em {
	font-style: italic;
	font-weight: 400;
	font-variation-settings: "SOFT" 20, "WONK" 1;
}

/* Italic Fraunces (WONK on) sends the final letter's swash well past its inline
   box. Widen the clip box so the tail of the "d" is not sliced off — padding
   opens the box, the matching negative margin keeps the layout identical, and
   the wipe is vertical so nothing leaks out early. */
.hero__name .mask {
	padding-right: 0.16em;
	margin-right: -0.16em;
}

/* Clear that same swash, and cancel the heading's negative tracking so the
   accent period does not sit on top of the letter. */
.hero__period {
	color: var(--accent);
	margin-left: 0.12em;
	letter-spacing: 0;
	font-style: normal;
}

.hero__meta {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: clamp(0.75rem, 2vw, 1.25rem);
	align-items: flex-start;
}

.hero__title {
	margin: 0;
	font-family: var(--font-mono);
	font-size: clamp(0.78rem, 0.72rem + 0.3vw, 0.95rem);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent-deep);
}

.hero__line {
	margin: 0;
	font-size: var(--step-1);
	line-height: 1.45;
	max-width: 34ch;
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
	margin-top: 0.5rem;
}

.stats {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1fr;
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	margin-top: clamp(1rem, 3vw, 2rem);
}

/* Dividers live on the cells, not on a background behind them, so nothing
   shows through while a cell is still faded out. */
.stat {
	padding: clamp(0.9rem, 2.4vw, 1.65rem) 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	border-bottom: 1px solid var(--rule);
}

.stat:last-child {
	border-bottom: 0;
}

@media (min-width: 34rem) {
	.stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: clamp(0.75rem, 2vw, 1.5rem);
	}

	.stat {
		border-bottom: 0;
		border-right: 1px solid var(--rule);
		padding-right: clamp(0.75rem, 2vw, 1.5rem);
	}

	.stat:last-child {
		border-right: 0;
	}
}

.stat__value {
	font-family: var(--font-display);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	font-size: var(--step-3);
	line-height: 1;
	letter-spacing: -0.03em;
}

.stat:nth-child(2) .stat__value {
	color: var(--accent-deep);
}

.stat__label {
	color: var(--ink-mute);
	letter-spacing: 0.1em;
}

.hero__scroll {
	width: var(--wrap);
	margin: clamp(2rem, 5vw, 3.5rem) auto 0;
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	text-decoration: none;
	color: var(--ink-mute);
	letter-spacing: 0.16em;
	min-height: 2.75rem;
}

.hero__scroll-rule {
	width: 4.5rem;
	height: 1px;
	background: var(--ink-mute);
	position: relative;
	overflow: hidden;
}

.has-js .hero__scroll-rule::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent);
	transform-origin: 0 50%;
	animation: sweep 2.4s var(--ease) infinite;
}

@keyframes sweep {
	0% {
		transform: scaleX(0);
		transform-origin: 0 50%;
	}
	45% {
		transform: scaleX(1);
		transform-origin: 0 50%;
	}
	55% {
		transform: scaleX(1);
		transform-origin: 100% 50%;
	}
	100% {
		transform: scaleX(0);
		transform-origin: 100% 50%;
	}
}

.hero__scroll:hover {
	color: var(--accent-deep);
}

@media (min-width: 56rem) {
	.hero__meta {
		grid-column: 6 / 12;
	}

	.hero__eyebrow {
		grid-column: 1 / 8;
	}
}

/* ------------------------------------------------------------ 8. About */

.about__heading {
	font-size: var(--step-3);
	max-width: 22ch;
}

.about__bio {
	font-size: var(--step-1);
	line-height: 1.6;
	max-width: 58ch;
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
	text-wrap: pretty;
}

.about__bio::first-line {
	font-family: var(--font-display);
	font-weight: 500;
}

.creds {
	display: grid;
	gap: 0;
	border-top: 1px solid var(--rule);
	max-width: 52ch;
}

.creds__item {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid var(--rule);
}

.creds__idx {
	color: var(--accent);
	flex: 0 0 auto;
}

.creds__text {
	font-size: 0.98rem;
	color: var(--ink-soft);
}

/* ------------------------------------------------------------- 9. Work */

.cases {
	border-bottom: 1px solid var(--rule-dark);
}

.case {
	border-top: 1px solid var(--rule-dark);
}

.case__head {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: clamp(0.85rem, 3vw, 3rem);
	padding: clamp(1.4rem, 3.2vw, 2.4rem) 0;
	cursor: pointer;
	list-style: none;
	position: relative;
	transition: color var(--dur) var(--ease);
}

.case__head::-webkit-details-marker {
	display: none;
}

.case__head::after {
	/* Accent wash that wipes in from the left on hover. */
	content: "";
	position: absolute;
	left: calc(var(--gutter) * -0.5);
	right: calc(var(--gutter) * -0.5);
	top: 0;
	bottom: 0;
	background: var(--ink-2);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 0.5s var(--ease);
	z-index: -1;
}

.case__head:hover::after,
.case__head:focus-visible::after {
	transform: scaleX(1);
}

.case__idx {
	color: var(--on-dark-soft);
	transition: color var(--dur) var(--ease), transform 0.5s var(--ease);
}

.case__headline {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	transition: transform 0.55s var(--ease);
}

.case__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--step-3);
	line-height: 1.05;
	letter-spacing: -0.025em;
	transition: color var(--dur) var(--ease);
}

.case__problem {
	font-size: 0.95rem;
	color: var(--on-dark-soft);
	max-width: 46ch;
}

.case__sign {
	color: var(--on-dark-soft);
	display: grid;
	place-items: center;
	transition: color var(--dur) var(--ease), transform 0.5s var(--ease);
}

.case__sign-v {
	transform-origin: center;
	transition: transform 0.5s var(--ease), opacity 0.3s;
}

.case[open] .case__sign-v {
	transform: rotate(90deg);
	opacity: 0;
}

.case[open] .case__title,
.case__head:hover .case__title {
	color: var(--accent);
}

.case__head:hover .case__idx,
.case__head:hover .case__sign {
	color: var(--accent);
}

.case__head:hover .case__headline {
	transform: translateX(clamp(0.35rem, 1.2vw, 1.1rem));
}

.case__head:hover .case__idx {
	transform: skewX(-12deg);
}

.case__panel {
	overflow: hidden;
}

.case[open] .case__panel-inner {
	animation: panel-in 0.6s var(--ease) both;
}

@keyframes panel-in {
	from {
		opacity: 0;
		transform: translateY(1.25rem);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.case__panel-inner {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
	row-gap: 1.75rem;
	padding: 0 0 clamp(2rem, 4vw, 3.25rem);
}

.case__media {
	grid-column: 1 / -1;
}

.case__facts {
	grid-column: 1 / -1;
	display: grid;
	gap: 0.4rem 0;
	align-content: start;
}

.case__facts dt {
	color: var(--accent);
	margin-top: 1.1rem;
}

.case__facts dt:first-child {
	margin-top: 0;
}

.case__facts dd {
	color: var(--on-dark);
	font-size: var(--step-0);
	max-width: 46ch;
}

.case__result {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: var(--step-2);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.case__link {
	grid-column: 1 / -1;
	justify-self: start;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid var(--accent);
	padding-bottom: 0.3rem;
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

@media (min-width: 52rem) {
	.case__media {
		grid-column: 1 / 6;
	}

	.case__facts {
		grid-column: 7 / 12;
	}

	/* No image uploaded yet — let the copy use the width instead of leaving a hole. */
	.case__panel-inner--no-media .case__facts,
	.case__panel-inner--no-media .case__link {
		grid-column: 1 / 9;
	}

	.case__link {
		grid-column: 7 / 12;
	}
}

/* Cursor-following preview, desktop only. */
.case-preview {
	position: fixed;
	top: 0;
	left: 0;
	width: clamp(13rem, 20vw, 20rem);
	aspect-ratio: 3 / 2;
	pointer-events: none;
	opacity: 0;
	z-index: calc(var(--z-cursor) - 1);
	transform: translate3d(-50%, -50%, 0) scale(0.9) rotate(-4deg);
	transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
	overflow: hidden;
	display: none;
}

.case-preview.is-visible {
	opacity: 1;
	transform: translate3d(-50%, -50%, 0) scale(1) rotate(-4deg);
}

.case-preview__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (hover: hover) and (pointer: fine) {
	.has-js .case-preview {
		display: block;
	}
}

/* -------------------------------------------- 10. Gallery & lightbox */

.gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1rem, 3vw, 2.5rem);
	align-items: start;
}

.gallery__item {
	min-width: 0;
}

.gallery .frame {
	aspect-ratio: 1 / 1;
}

@media (min-width: 52rem) {
	.gallery {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		row-gap: clamp(2rem, 5vw, 4.5rem);
	}

	/* Deliberately uneven: nothing lines up in a tidy three-across row. */
	.gallery__item:nth-child(1) {
		grid-column: 1 / 7;
		grid-row: 1;
	}
	.gallery__item:nth-child(1) .frame {
		aspect-ratio: 4 / 3;
	}

	.gallery__item:nth-child(2) {
		grid-column: 8 / 13;
		grid-row: 1;
		margin-top: clamp(2rem, 6vw, 6rem);
	}

	.gallery__item:nth-child(3) {
		grid-column: 2 / 6;
		grid-row: 2;
	}

	.gallery__item:nth-child(4) {
		grid-column: 7 / 12;
		grid-row: 2;
		margin-top: clamp(1rem, 4vw, 4rem);
	}
	.gallery__item:nth-child(4) .frame {
		aspect-ratio: 3 / 4;
	}

	.gallery__item:nth-child(5) {
		grid-column: 1 / 5;
		grid-row: 3;
		margin-top: clamp(1rem, 3vw, 3rem);
	}

	.gallery__item:nth-child(6) {
		grid-column: 6 / 13;
		grid-row: 3;
	}
	.gallery__item:nth-child(6) .frame {
		aspect-ratio: 16 / 10;
	}

	.gallery__item:nth-child(7) {
		grid-column: 3 / 8;
		grid-row: 4;
	}
	.gallery__item:nth-child(7) .frame {
		aspect-ratio: 4 / 3;
	}

	.gallery__item:nth-child(8) {
		grid-column: 9 / 13;
		grid-row: 4;
		margin-top: clamp(1rem, 5vw, 5rem);
	}
}

.gallery__btn {
	display: block;
	width: 100%;
	text-align: left;
	position: relative;
	cursor: pointer;
}

.gallery__btn--empty {
	cursor: default;
}

.gallery__btn .frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent);
	mix-blend-mode: multiply;
	opacity: 0;
	transition: opacity 0.45s var(--ease);
}

.gallery__btn:not(.gallery__btn--empty):hover .frame::after,
.gallery__btn:not(.gallery__btn--empty):focus-visible .frame::after {
	opacity: 0.22;
}

.gallery__btn:not(.gallery__btn--empty):hover .frame__img,
.gallery__btn:not(.gallery__btn--empty):focus-visible .frame__img {
	transform: scale(1.06);
}

.gallery__caption {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	margin-top: 0.85rem;
	color: var(--ink-mute);
	transition: color var(--dur) var(--ease), transform 0.45s var(--ease);
}

.gallery__caption-idx {
	color: var(--accent);
}

.gallery__btn:not(.gallery__btn--empty):hover .gallery__caption {
	color: var(--ink);
	transform: translateX(0.4rem);
}

.lightbox {
	border: 0;
	padding: 0;
	/* The dialog fills the viewport, so it carries the scrim itself. ::backdrop
	   below is belt-and-braces for browsers that paint it. */
	background: rgba(9, 8, 7, 0.95);
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
	color: var(--on-dark);
	z-index: var(--z-dialog);
	overflow: hidden;
}

.lightbox::backdrop {
	background: rgba(9, 8, 7, 0.94);
}

.lightbox__shell {
	position: relative;
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	padding: clamp(3.5rem, 8vw, 5rem) var(--gutter);
}

.lightbox__figure {
	margin: 0;
	display: grid;
	gap: 1rem;
	justify-items: center;
	max-height: 100%;
}

.lightbox__img {
	max-height: min(76vh, 900px);
	width: auto;
	object-fit: contain;
	border: 1px solid var(--rule-dark);
}

.lightbox__caption {
	color: var(--on-dark-soft);
	text-align: center;
}

.lightbox__close {
	position: absolute;
	top: clamp(1rem, 3vw, 2rem);
	right: var(--gutter);
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--on-dark);
	border: 1px solid var(--rule-dark);
	transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.lightbox__close:hover {
	background: var(--accent);
	border-color: var(--accent);
}

.lightbox__nav {
	position: absolute;
	bottom: clamp(1rem, 3vw, 2rem);
	right: var(--gutter);
	display: flex;
	gap: 0.5rem;
}

.lightbox__arrow {
	width: 3rem;
	height: 3rem;
	display: grid;
	place-items: center;
	font-size: 1.1rem;
	color: var(--on-dark);
	border: 1px solid var(--rule-dark);
	transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.lightbox__arrow:hover {
	background: var(--accent);
	border-color: var(--accent);
}

/* ------------------------------------------------------- 11. Services */

.services__intro {
	font-size: var(--step-1);
	max-width: 40ch;
	margin: 0;
	color: var(--ink-soft);
}

.services {
	border-top: 1px solid var(--rule);
}

.services__item {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	gap: clamp(0.85rem, 3vw, 2.5rem);
	padding: clamp(0.9rem, 2.2vw, 1.5rem) 0;
	border-bottom: 1px solid var(--rule);
	transition: color var(--dur) var(--ease);
}

/* Every other item is nudged off the left edge so the column reads as a
   hand-set list rather than a table. */
.services__item:nth-child(even) {
	padding-left: clamp(1rem, 8vw, 8rem);
}

.services__idx {
	color: var(--accent);
}

.services__name {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--step-3);
	line-height: 1.05;
	letter-spacing: -0.025em;
	transition: transform 0.5s var(--ease), color var(--dur) var(--ease);
	display: inline-block;
}

.services__item:hover .services__name {
	color: var(--accent-deep);
	transform: translateX(clamp(0.35rem, 1.5vw, 1.25rem));
}

.services__rule {
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 1px;
	width: 100%;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 0.55s var(--ease);
}

.services__item:hover .services__rule {
	transform: scaleX(1);
}

/* -------------------------------------------------- 12. Skills marquee */

.marquee {
	display: grid;
	gap: clamp(0.75rem, 2vw, 1.25rem);
	overflow: hidden;
	padding-block: clamp(0.5rem, 2vw, 1.5rem);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
	/* Fade the edges so the loop has no hard seam. */
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee__row {
	display: flex;
	width: max-content;
	gap: clamp(0.5rem, 1.5vw, 1rem);
}

.has-js .marquee__row {
	animation: marquee 38s linear infinite;
}

.has-js .marquee__row--reverse {
	animation-direction: reverse;
	animation-duration: 46s;
}

.marquee:hover .marquee__row,
.marquee:focus-within .marquee__row {
	animation-play-state: paused;
}

@keyframes marquee {
	to {
		transform: translate3d(-50%, 0, 0);
	}
}

.marquee__track {
	display: flex;
	gap: clamp(0.5rem, 1.5vw, 1rem);
	padding-right: clamp(0.5rem, 1.5vw, 1rem);
}

.tag {
	white-space: nowrap;
	font-family: var(--font-mono);
	font-size: clamp(0.8rem, 0.7rem + 0.5vw, 1.05rem);
	letter-spacing: 0.04em;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: var(--paper);
}

.tag--outline {
	background: transparent;
	color: var(--ink-soft);
	border-color: var(--rule);
}

.tag--outline:nth-child(3n) {
	color: var(--accent-deep);
	border-color: var(--accent);
}

/* ------------------------------------------------ 13. Contact & footer */

.section--contact {
	padding-bottom: clamp(3rem, 7vw, 6rem);
}

.contact__head {
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.contact__cta {
	margin: 1.25rem 0 0;
	font-family: var(--font-display);
	font-optical-sizing: auto;
	font-variation-settings: "SOFT" 0, "WONK" 1;
	font-weight: 500;
	font-size: var(--step-5);
	line-height: 0.95;
	letter-spacing: -0.04em;
	max-width: 16ch;
	text-wrap: balance;
}

.contact__cta .mask:last-of-type .mask__i::after {
	content: "";
}

.contact__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gap);
	row-gap: clamp(2.5rem, 6vw, 4rem);
}

.contact__details {
	grid-column: 1 / -1;
}

.contact__form {
	grid-column: 1 / -1;
}

@media (min-width: 52rem) {
	.contact__details {
		grid-column: 1 / 6;
	}

	.contact__form {
		grid-column: 7 / 13;
	}
}

.contact__list {
	border-top: 1px solid var(--rule-dark);
}

.contact__row {
	display: grid;
	grid-template-columns: 7rem 1fr;
	align-items: baseline;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--rule-dark);
}

.contact__label {
	color: var(--on-dark-soft);
}

.contact__value {
	font-size: var(--step-1);
	overflow-wrap: anywhere;
}

/* Keep the tap targets at least 44px tall without opening up the rows. */
a.contact__value {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
}

a.contact__value:hover {
	color: var(--accent);
}

.form-slot {
	border: 1px solid var(--rule-dark);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	background: var(--ink-2);
}

.form-slot--placeholder {
	border: 1px dashed var(--accent);
	background: transparent;
	display: grid;
	gap: 0.85rem;
}

.form-slot__tag {
	margin: 0;
	color: var(--accent);
}

.form-slot__text {
	margin: 0;
	color: var(--on-dark);
	max-width: 44ch;
}

.form-slot__code {
	margin: 0;
	color: var(--on-dark-soft);
	text-transform: none;
	letter-spacing: 0.02em;
	background: var(--ink-2);
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--rule-dark);
	justify-self: start;
}

.form-slot__hint {
	margin: 0;
	color: var(--on-dark-soft);
	font-size: 0.9rem;
}

/* WPForms lives inside a dark panel — keep its controls legible. */
.form-slot .wpforms-field-label,
.form-slot label {
	color: var(--on-dark);
}

.form-slot input[type="text"],
.form-slot input[type="email"],
.form-slot input[type="tel"],
.form-slot textarea,
.form-slot select {
	width: 100%;
	background: var(--ink);
	color: var(--on-dark);
	border: 1px solid var(--rule-dark);
	border-radius: 0;
	padding: 0.85rem 1rem;
	font: inherit;
	min-height: 3rem;
}

.form-slot button[type="submit"],
.form-slot input[type="submit"] {
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 0.95rem 1.75rem;
	min-height: 3rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--dur) var(--ease);
}

.form-slot button[type="submit"]:hover,
.form-slot input[type="submit"]:hover {
	background: var(--accent-deep);
}

.site-footer {
	background: var(--ink);
	color: var(--on-dark-soft);
	border-top: 1px solid var(--rule-dark);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 1.75rem;
}

.site-footer p {
	margin: 0;
}

.site-footer__top {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	transition: color var(--dur) var(--ease);
}

.site-footer__top:hover {
	color: var(--accent);
}

/* ------------------------------------------ 14. Blog / singular / 404 */

.section--archive,
.section--single,
.section--404 {
	padding-top: clamp(8rem, 14vw, 12rem);
}

.archive__head {
	margin-bottom: clamp(2.5rem, 6vw, 4rem);
	display: grid;
	gap: 1.25rem;
}

.posts {
	border-top: 1px solid var(--rule);
	max-width: 72ch;
}

.post-row {
	padding: clamp(1.5rem, 3vw, 2.25rem) 0;
	border-bottom: 1px solid var(--rule);
	display: grid;
	gap: 0.5rem;
}

.post-row__date {
	color: var(--ink-mute);
	margin: 0;
}

.post-row__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--step-2);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.post-row__title a {
	text-decoration: none;
	transition: color var(--dur) var(--ease);
}

.post-row__title a:hover {
	color: var(--accent-deep);
}

.post-row__excerpt {
	margin: 0;
	color: var(--ink-soft);
	max-width: 60ch;
}

.entry__head {
	display: grid;
	gap: 0.85rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.entry__date {
	margin: 0;
	color: var(--ink-mute);
}

.entry__title {
	max-width: 24ch;
}

.entry__media {
	margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.error404__inner {
	display: grid;
	gap: 1.5rem;
	justify-items: start;
}

.navigation.pagination {
	margin-top: 3rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.navigation.pagination .nav-links {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.navigation.pagination a,
.navigation.pagination .current {
	text-decoration: none;
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--rule);
	min-height: 2.75rem;
	display: inline-flex;
	align-items: center;
}

.navigation.pagination .current {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

/* WordPress core alignment + caption classes */

.alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
	margin-inline: auto;
}

.alignwide {
	width: min(100%, 72rem);
	margin-inline: auto;
}

.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
}

.wp-caption-text,
.wp-element-caption {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: var(--ink-mute);
	margin-top: 0.6rem;
}

.sticky,
.bypostauthor {
	/* Required by the theme check; no visual change needed here. */
	position: relative;
}

/* --------------------------------------------------- 15. Cursor accent */

/* A lagging accent ring that trails the real pointer. The native cursor is
   never hidden, so pointer affordances stay intact. */
.cursor {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: var(--z-cursor);
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.has-js .cursor {
		display: block;
	}
}

.cursor__dot,
.cursor__ring {
	position: absolute;
	top: 0;
	left: 0;
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.3s var(--ease);
	will-change: transform;
}

.cursor.is-active .cursor__dot,
.cursor.is-active .cursor__ring {
	opacity: 1;
}

.cursor__dot {
	width: 6px;
	height: 6px;
	margin: -3px 0 0 -3px;
	background: var(--accent);
}

.cursor__ring {
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border: 1px solid var(--accent);
	display: grid;
	place-items: center;
	transition: opacity 0.3s var(--ease), width 0.4s var(--ease), height 0.4s var(--ease),
		margin 0.4s var(--ease), background-color 0.4s var(--ease);
}

.cursor.is-link .cursor__ring {
	width: 58px;
	height: 58px;
	margin: -29px 0 0 -29px;
	background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.cursor.is-view .cursor__ring {
	width: 84px;
	height: 84px;
	margin: -42px 0 0 -42px;
	background: var(--accent);
}

.cursor__label {
	color: #fff;
	font-size: 0.6rem;
	letter-spacing: 0.14em;
	opacity: 0;
	transition: opacity 0.25s var(--ease);
}

.cursor.is-view .cursor__label {
	opacity: 1;
}

/* -------------------------------------------------- 16. Reduced motion */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.has-js .reveal,
	.has-js .reveal.is-in {
		opacity: 1;
		transform: none;
	}

	.has-js .mask__i,
	.has-js .is-in .mask__i {
		transform: none;
		animation: none;
	}

	.has-js .marquee__row {
		animation: none;
		transform: none;
	}

	.marquee {
		overflow-x: auto;
	}

	.cursor,
	.case-preview {
		display: none !important;
	}

	.has-js .hero__scroll-rule::after,
	.has-js .hero__eyebrow-dot {
		animation: none;
	}
}
