/**
 * Jack Portfolio — front end stylesheet.
 *
 * Static, hand written CSS. Mobile first, fluid at every size, no framework and
 * nothing generated at runtime.
 *
 *  1. Fonts
 *  2. Tokens
 *  3. Reset and base
 *  4. Layout
 *  5. Headlines that fill their container
 *  6. Buttons
 *  7. Header and navigation
 *  8. Hero
 *  9. Marquee
 * 10. Skills
 * 11. About
 * 12. Services
 * 13. Projects
 * 14. Footer
 * 15. Editorial templates
 * 16. WordPress core classes
 * 17. Motion, reduced motion, touch
 */

/* ------------------------------------------------------------------ 1. Fonts */

/* Kanit ships with the theme, so the front end makes no third party request. */
@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/kanit-300-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/kanit-300-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/kanit-400-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/kanit-400-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/kanit-500-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/kanit-500-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/kanit-700-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/kanit-700-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/kanit-900-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Kanit';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/kanit-900-latin-ext.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Onest covers Cyrillic. Kanit has no Cyrillic glyphs, so these files only
 * load when Russian copy is on the page. */
@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/onest-300-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url('../fonts/onest-300-cyrillic-ext.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/onest-400-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/onest-400-cyrillic-ext.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/onest-500-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/onest-500-cyrillic-ext.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/onest-700-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/onest-700-cyrillic-ext.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/onest-900-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Onest';
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url('../fonts/onest-900-cyrillic-ext.woff2') format('woff2');
	unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ----------------------------------------------------------------- 2. Tokens */

:root {
	--jack-bg: #0c0c0c;
	--jack-text: #d7e2ea;
	--jack-light: #ffffff;
	--jack-dark: #0c0c0c;
	--jack-grad-from: #646973;
	--jack-grad-to: #bbccd7;
	--jack-rule: rgba(12, 12, 12, 0.15);

	--jack-gutter: 16px;
	--jack-max: 1600px;

	--jack-radius-section: 40px;
	--jack-radius-card: 40px;
	--jack-radius-tile: 16px;
	--jack-gap-tile: 12px;

	/* Height of the header, so the hero can still be exactly one screen tall. */
	--jack-header-h: calc(clamp(14px, 3vw, 26px) + 44px + clamp(8px, 2vw, 16px));

	--jack-sticky-top: clamp(72px, 9vh, 104px);
	--jack-stack-step: 18px;

	--jack-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
	--jack-reveal-duration: 700ms;
}

@media (min-width: 640px) {
	:root {
		--jack-gutter: 24px;
		--jack-radius-section: 50px;
		--jack-radius-card: 50px;
		--jack-radius-tile: 18px;
	}
}

@media (min-width: 1024px) {
	:root {
		--jack-gutter: 40px;
		--jack-radius-section: 60px;
		--jack-radius-card: 60px;
		--jack-radius-tile: 20px;
		--jack-stack-step: 28px;
	}
}

@media (min-width: 1600px) {
	:root {
		--jack-gutter: 64px;
	}
}

@media (min-width: 2200px) {
	:root {
		--jack-gutter: 96px;
	}
}

/* --------------------------------------------------------- 3. Reset and base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	/* clip never creates a scroll container, so position:sticky keeps working. */
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--jack-bg);
	color: var(--jack-text);
	font-family: 'Kanit', 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	font-weight: 400;
	line-height: 1.45;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.jack-page {
	overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

ul[class],
ol[class] {
	list-style: none;
}

img,
picture,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--jack-text);
	outline-offset: 3px;
	border-radius: 6px;
}

.jack-services a:focus-visible,
.jack-services button:focus-visible {
	outline-color: var(--jack-dark);
}

.jack-skip-link {
	position: absolute;
	top: 0;
	left: -9999px;
	z-index: 1000;
	padding: 12px 20px;
	background-color: var(--jack-text);
	color: var(--jack-dark);
	font-weight: 500;
	border-radius: 0 0 8px 0;
}

.jack-skip-link:focus {
	left: 0;
}

/* Anchor targets never hide under the top edge of the viewport. */
#jack-main,
#about,
#stack,
#services,
#projects,
#contact {
	scroll-margin-top: clamp(12px, 3vw, 40px);
}

/* ----------------------------------------------------------------- 4. Layout */

.jack-container {
	width: min(100% - (var(--jack-gutter) * 2), var(--jack-max));
	margin-inline: auto;
}

/* --------------------------------------- 5. Headlines that fill a container */

/*
 * PHP measures each headline with the real Kanit Black metrics and writes the
 * ratio into --jack-fit. Dividing the available width by that ratio yields a
 * headline that fills its line exactly: no overflow, no clipping, no JS and no
 * layout shift once the webfont arrives.
 */
.jack-hero__title,
.jack-section-title {
	--jack-fit-width: min(100vw - (var(--jack-gutter) * 2), var(--jack-max));
	--jack-fit-size: calc(var(--jack-fit-width) / var(--jack-fit, 5));

	display: block;
	margin: 0;
	font-weight: 900;
	line-height: 0.9;
	letter-spacing: -0.025em;
	text-transform: uppercase;
	white-space: nowrap;
	/* Last line of defence if a fallback font renders wider than Kanit. */
	overflow-x: clip;
}

.jack-hero__title {
	font-size: var(--jack-fit-size);
}

/* Section headings keep the cap of the reference design. */
.jack-section-title {
	font-size: min(var(--jack-fit-size), clamp(3rem, 12vw, 160px));
	text-align: center;
}

.jack-hero__title-wrap {
	container-type: inline-size;
	overflow-x: clip;
}

@supports (font-size: 1cqi) {
	/* Exact: container query units ignore the scrollbar width. */
	.jack-hero__title {
		font-size: calc(100cqi / var(--jack-fit, 5));
	}
}

.jack-gradient-text {
	color: var(--jack-grad-to);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.jack-gradient-text {
		background-image: linear-gradient(180deg, var(--jack-grad-from) 0%, var(--jack-grad-to) 100%);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-fill-color: transparent;
	}
}

/* ---------------------------------------------------------------- 6. Buttons */

.jack-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 0;
	border-radius: 999px;
	font-weight: 500;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	cursor: pointer;
	transition: transform 200ms var(--jack-ease), background-color 200ms var(--jack-ease);
}

.jack-button--contact {
	padding: 0.85rem clamp(1.5rem, 4vw, 2.5rem);
	font-size: clamp(0.6875rem, 1.4vw, 1rem);
	color: #ffffff;
	background-image: linear-gradient(123deg, #18011f 7%, #b600a8 37%, #7621b0 72%, #be4c00 100%);
	box-shadow: 0 4px 4px rgba(181, 1, 167, 0.25), inset 4px 4px 12px #7721b1;
}

/*
 * The inner white ring of the reference design. Drawn with a pseudo element
 * instead of `outline`, so the keyboard focus ring stays visible.
 */
.jack-button--contact::after {
	content: '';
	position: absolute;
	inset: 3px;
	border: 2px solid #ffffff;
	border-radius: inherit;
	pointer-events: none;
}

.jack-button--ghost {
	padding: 0.75rem clamp(1.25rem, 3vw, 2rem);
	font-size: clamp(0.75rem, 1.2vw, 1rem);
	letter-spacing: 0.14em;
	color: var(--jack-text);
	background-color: transparent;
	border: 2px solid var(--jack-text);
}

@media (hover: hover) and (pointer: fine) {
	.jack-button--contact:hover {
		transform: translateY(-2px);
	}

	.jack-button--ghost:hover {
		background-color: rgba(215, 226, 234, 0.1);
	}
}

.jack-button:active {
	transform: translateY(1px);
}

/* ---------------------------------------------- 7. Header and navigation */

.jack-header {
	position: relative;
	z-index: 5;
	padding-block: clamp(14px, 3vw, 26px) clamp(8px, 2vw, 16px);
}

.jack-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(12px, 3vw, 32px);
}

.jack-header__logo {
	flex: 0 0 auto;
}

.jack-header__logo img {
	max-height: 44px;
	width: auto;
}

.jack-nav {
	flex: 1 1 auto;
	min-width: 0;
}

.jack-nav__list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(6px, 2vw, 40px);
	list-style: none;
}

.jack-nav__list > li {
	margin: 0;
	min-width: 0;
}

.jack-nav__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 4px 2px;
	color: var(--jack-text);
	font-weight: 500;
	font-size: clamp(0.6875rem, 2.4vw, 1.4rem);
	line-height: 1.1;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: opacity 200ms var(--jack-ease);
}

@media (hover: hover) and (pointer: fine) {
	.jack-nav__list a:hover {
		opacity: 0.7;
	}
}

.jack-nav__list .current-menu-item > a {
	opacity: 0.6;
}

/* ------------------------------------------------------------------- 8. Hero */

.jack-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Fallback first, then the dynamic unit for mobile browser chrome. */
	min-height: calc(100vh - var(--jack-header-h));
	min-height: calc(100svh - var(--jack-header-h));
	padding-bottom: clamp(24px, 5vw, 40px);
	padding-inline: var(--jack-gutter);
}

.jack-hero__inner {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: clamp(14px, 4vw, 28px);
	width: 100%;
	max-width: var(--jack-max);
	min-height: 0;
}

.jack-hero__title-wrap {
	margin-top: clamp(4px, 2vw, 20px);
}

.jack-hero__portrait {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	width: clamp(200px, 58vw, 340px);
	margin-inline: auto;
}

.jack-hero__image {
	width: 100%;
	height: auto;
}

.jack-hero__bottom {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(16px, 4vw, 24px);
	width: 100%;
	margin-top: auto;
	padding-top: clamp(8px, 2vw, 16px);
	box-sizing: border-box;
}

.jack-hero__lead {
	max-width: 38ch;
	color: var(--jack-text);
	font-weight: 300;
	font-size: clamp(0.75rem, 1.4vw, 1.5rem);
	line-height: 1.3;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.jack-hero__cta {
	flex: 0 0 auto;
}

@media (min-width: 640px) {
	.jack-hero__bottom {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
		gap: clamp(16px, 4vw, 48px);
	}

	.jack-hero__lead {
		max-width: clamp(220px, 32vw, 360px);
	}
}

/* From the medium breakpoint the portrait floats over the headline. */
@media (min-width: 768px) {
	.jack-hero__inner {
		position: relative;
		justify-content: flex-end;
	}

	.jack-hero__title-wrap {
		position: relative;
		z-index: 1;
		margin-top: auto;
	}

	.jack-hero__portrait {
		position: absolute;
		left: 50%;
		bottom: 0;
		width: clamp(320px, 34vw, 520px);
		margin: 0;
		transform: translateX(-50%);
		/* Decorative: never steals a click from the copy underneath. */
		pointer-events: none;
	}

	.jack-hero__bottom {
		position: relative;
		z-index: 3;
		margin-top: 0;
	}
}

/* Short or landscape windows: shrink the portrait rather than crowd the copy. */
@media (min-width: 768px) and (max-height: 640px) {
	.jack-hero__portrait {
		width: clamp(200px, 24vw, 320px);
	}
}

/* ---------------------------------------------------------------- 9. Marquee */

.jack-marquee {
	display: flex;
	flex-direction: column;
	gap: var(--jack-gap-tile);
	padding-block: clamp(48px, 10vw, 96px) clamp(20px, 5vw, 40px);
}

.jack-marquee__row {
	/* `hidden` rather than `clip` so iOS 15 also contains the oversized track. */
	overflow: hidden;
}

.jack-marquee__track {
	display: flex;
	width: max-content;
	transform: translate3d(var(--jack-marquee-x, 0px), 0, 0);
}

.jack-marquee__row.is-animated .jack-marquee__track {
	will-change: transform;
}

.jack-marquee__set {
	display: flex;
	gap: var(--jack-gap-tile);
	/* Keeps the two copies of the row a constant distance apart. */
	padding-right: var(--jack-gap-tile);
}

.jack-marquee__tile {
	flex: 0 0 auto;
	width: clamp(240px, 42vw, 420px);
}

.jack-marquee__image {
	width: 100%;
	height: auto;
	aspect-ratio: 420 / 270;
	object-fit: cover;
	border-radius: var(--jack-radius-tile);
	background-image: linear-gradient(135deg, #161616 0%, #26262b 100%);
}

/* Phones render a shorter row: fewer tiles to decode and paint. */
@media (max-width: 639px) {
	.jack-marquee__tile--extra {
		display: none;
	}
}

/* ----------------------------------------------------------------- 10. Skills */

.jack-skills {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 4vw, 36px);
	padding-block: clamp(28px, 6vw, 56px) clamp(40px, 8vw, 80px);
}

.jack-skills__title {
	margin: 0;
	color: var(--jack-text);
	font-weight: 500;
	font-size: clamp(0.75rem, 1.2vw, 0.875rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.72;
}

.jack-skills__rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jack-skills__row {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.jack-skills__track {
	display: flex;
	width: max-content;
	animation: jack-skills-ticker 42s linear infinite;
}

.jack-skills__row--reverse .jack-skills__track {
	animation-duration: 52s;
	animation-direction: reverse;
}

.jack-skills__set {
	display: flex;
	gap: 12px;
	padding-right: 12px;
	margin: 0;
	list-style: none;
}

.jack-skills__item {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.75rem clamp(1.25rem, 3vw, 2rem);
	border: 2px solid var(--jack-text);
	border-radius: 999px;
	background-color: transparent;
	color: var(--jack-text);
	font-weight: 500;
	font-size: clamp(0.75rem, 1.2vw, 1rem);
	letter-spacing: 0.14em;
	line-height: 1.1;
	text-transform: uppercase;
	text-align: center;
	white-space: nowrap;
	cursor: default;
	transition: background-color 200ms var(--jack-ease);
}

@keyframes jack-skills-ticker {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(-50%, 0, 0);
	}
}

@media (hover: hover) and (pointer: fine) {
	.jack-skills__row:hover .jack-skills__track {
		animation-play-state: paused;
	}

	.jack-skills__item:hover {
		background-color: rgba(215, 226, 234, 0.1);
	}
}

/* ----------------------------------------------------------------- 11. About */

.jack-about {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 100vh;
	min-height: 100svh;
	overflow: clip;
}

.jack-about__decorations {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.jack-about__decor {
	position: absolute;
}

.jack-about__decor-image {
	width: 100%;
	height: auto;
}

.jack-about__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(20px, 5vw, 40px);
	text-align: center;
	/*
	 * Reserves the corners the 3D objects live in. On a 320px screen this is
	 * what keeps the paragraph clear of the decorations instead of relying on
	 * luck with percentage positions.
	 */
	padding-block: clamp(104px, 26vw, 150px);
}

.jack-about__text {
	max-width: 560px;
	color: var(--jack-text);
	font-weight: 500;
	font-size: clamp(1rem, 2vw, 1.35rem);
	line-height: 1.65;
}

.jack-about__cta {
	margin-top: clamp(12px, 4vw, 32px);
}

/* Narrow screens: the objects sit inside the reserved padding. */
.jack-about__decor--tl {
	top: 0;
	left: -2%;
	width: clamp(78px, 22vw, 120px);
}

.jack-about__decor--tr {
	top: 0;
	right: -2%;
	width: clamp(78px, 22vw, 120px);
}

.jack-about__decor--bl {
	bottom: 0;
	left: 0;
	width: clamp(66px, 18vw, 104px);
}

.jack-about__decor--br {
	bottom: 0;
	right: 0;
	width: clamp(72px, 20vw, 112px);
}

@media (min-width: 640px) {
	.jack-about__inner {
		padding-block: clamp(80px, 12vw, 120px);
	}

	.jack-about__decor--tl {
		top: 4%;
		left: 2%;
		width: clamp(120px, 16vw, 210px);
	}

	.jack-about__decor--tr {
		top: 4%;
		right: 2%;
		width: clamp(120px, 16vw, 210px);
	}

	.jack-about__decor--bl {
		bottom: 8%;
		left: 6%;
		width: clamp(100px, 13vw, 180px);
	}

	.jack-about__decor--br {
		bottom: 8%;
		right: 6%;
		width: clamp(112px, 15vw, 220px);
	}
}

@media (min-width: 1024px) {
	.jack-about__decor--tl {
		left: 4%;
	}

	.jack-about__decor--tr {
		right: 4%;
	}

	.jack-about__decor--bl {
		left: 10%;
	}

	.jack-about__decor--br {
		right: 10%;
	}
}

/* Very short windows: shrink the decorations instead of overlapping the copy. */
@media (max-height: 560px) {
	.jack-about__decor {
		width: clamp(64px, 12vw, 110px);
		opacity: 0.7;
	}
}

/* -------------------------------------------------------------- 12. Services */

.jack-services {
	position: relative;
	z-index: 1;
	background-color: var(--jack-light);
	color: var(--jack-dark);
	border-start-start-radius: var(--jack-radius-section);
	border-start-end-radius: var(--jack-radius-section);
	/* The extra bottom padding leaves room for the overlapping projects card. */
	padding-block: clamp(48px, 9vw, 80px) clamp(88px, 14vw, 140px);
}

.jack-services__title {
	margin-bottom: clamp(32px, 7vw, 64px);
	color: var(--jack-dark);
}

.jack-services__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2px, 1vw, 10px);
	padding-block: clamp(20px, 5vw, 32px);
	border-top: 1px solid var(--jack-rule);
}

.jack-services__item:last-child {
	border-bottom: 1px solid var(--jack-rule);
}

.jack-services__number {
	display: block;
	color: var(--jack-dark);
	font-weight: 900;
	font-size: clamp(3rem, 10vw, 140px);
	line-height: 0.9;
	letter-spacing: -0.03em;
}

.jack-services__body {
	min-width: 0;
}

.jack-services__name {
	margin-bottom: 0.35em;
	font-weight: 500;
	font-size: clamp(1rem, 2.2vw, 2.1rem);
	line-height: 1.15;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.jack-services__description {
	max-width: 100%;
	font-weight: 300;
	font-size: clamp(0.85rem, 1.6vw, 1.25rem);
	line-height: 1.6;
	opacity: 0.6;
}

@media (min-width: 768px) {
	.jack-services__item {
		grid-template-columns: clamp(3.5rem, 11vw, 155px) minmax(0, 1fr);
		align-items: center;
		gap: clamp(20px, 4vw, 56px);
	}

	.jack-services__description {
		max-width: 60ch;
	}
}

/* -------------------------------------------------------------- 13. Projects */

.jack-projects {
	position: relative;
	z-index: 2;
	margin-top: calc(-1 * clamp(38px, 7vw, 56px));
	padding-block: clamp(40px, 8vw, 72px) clamp(56px, 10vw, 96px);
	background-color: var(--jack-bg);
	border-start-start-radius: var(--jack-radius-section);
	border-start-end-radius: var(--jack-radius-section);
}

.jack-projects__title {
	margin-bottom: clamp(24px, 5vw, 48px);
}

.jack-projects__stack {
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 4vw, 32px);
}

.jack-projects__slot {
	position: relative;
}

.jack-project {
	padding: clamp(14px, 2.2vw, 24px);
	background-color: var(--jack-bg);
	border: 2px solid var(--jack-text);
	border-radius: var(--jack-radius-card);
}

.jack-project__head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: clamp(10px, 2vw, 24px);
	row-gap: clamp(10px, 2vw, 16px);
}

.jack-project__number {
	display: block;
	color: var(--jack-text);
	font-weight: 900;
	font-size: clamp(2.25rem, 9vw, 140px);
	line-height: 0.85;
	letter-spacing: -0.03em;
}

.jack-project__meta {
	min-width: 0;
}

.jack-project__category {
	display: block;
	margin-bottom: 0.3em;
	font-weight: 300;
	font-size: clamp(0.6875rem, 1.1vw, 0.95rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.6;
}

.jack-project__name {
	font-weight: 500;
	font-size: clamp(1.05rem, 2.2vw, 2.1rem);
	line-height: 1.1;
	text-transform: uppercase;
	overflow-wrap: break-word;
}

.jack-project__link {
	grid-column: 1 / -1;
	justify-self: start;
}

.jack-project__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	grid-column: 1 / -1;
	justify-self: start;
	margin-bottom: 16px;
}

.jack-project__copy {
	max-width: 72ch;
}

.jack-project__subtitle {
	margin: 0;
	font-weight: 500;
	font-size: clamp(0.95rem, 1.7vw, 1.25rem);
	line-height: 1.3;
}

.jack-project__description {
	margin: 0.55em 0 0;
	font-weight: 300;
	font-size: clamp(0.85rem, 1.45vw, 1.05rem);
	line-height: 1.55;
	opacity: 0.72;
}

@media (min-width: 768px) {
	.jack-project__head {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.jack-project__link,
	.jack-project__actions {
		grid-column: auto;
		justify-self: end;
	}

	.jack-project__actions {
		justify-content: flex-end;
		margin-bottom: 0;
	}
}

.jack-project__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(10px, 1.6vw, 16px);
	margin-top: clamp(14px, 2.4vw, 24px);
}

.jack-project__column {
	display: grid;
	gap: clamp(10px, 1.6vw, 16px);
	min-width: 0;
}

.jack-project__figure {
	overflow: hidden;
	border-radius: max(18px, calc(var(--jack-radius-card) - 10px));
	background-color: #16161a;
	aspect-ratio: 4 / 3;
}

.jack-project__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 768px) {
	.jack-project__grid {
		grid-template-columns: 40fr 60fr;
		align-items: stretch;
	}

	.jack-project__column--right {
		grid-template-rows: minmax(0, 1fr);
	}

	.jack-project__figure {
		aspect-ratio: auto;
	}

	.jack-project__figure--short {
		height: clamp(130px, 16vw, 230px);
	}

	.jack-project__figure--tall {
		height: clamp(160px, 22vw, 340px);
	}

	.jack-project__figure--full {
		height: 100%;
		min-height: 100%;
	}
}

/*
 * Sticky stacking. Active from the medium breakpoint up unless projects.js
 * decides the device is better served by a plain list, in which case it sets
 * data-projects-mode="list". Without JavaScript the cards simply stack, which
 * is the safe default.
 */
@media (min-width: 768px) {
	.jack-projects__stack[data-projects-mode='sticky'],
	.jack-projects__stack[data-projects-mode='auto'] {
		gap: 0;
	}

	.jack-projects__stack[data-projects-mode='sticky'] .jack-projects__slot,
	.jack-projects__stack[data-projects-mode='auto'] .jack-projects__slot {
		/* min-height, so a tall card is never cropped by its own slot. */
		min-height: min(85svh, 820px);
	}

	.jack-projects__stack[data-projects-mode='sticky'] .jack-project,
	.jack-projects__stack[data-projects-mode='auto'] .jack-project {
		position: sticky;
		top: calc(var(--jack-sticky-top) + (var(--jack-card-index, 0) * var(--jack-stack-step)));
		transform: scale(var(--jack-scale, 1));
		transform-origin: center top;
	}

	.jack-projects__stack.is-stacking .jack-project {
		will-change: transform;
	}
}

html.jack-dialog-open {
	overflow: hidden;
}

.jack-project-dialog {
	width: min(680px, calc(100vw - 24px));
	max-height: min(90vh, 920px);
	max-height: min(90dvh, 920px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 2px solid var(--jack-text);
	border-radius: var(--jack-radius-card);
	background-color: var(--jack-bg);
	color: var(--jack-text);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
	clip-path: inset(0 round var(--jack-radius-card));
}

.jack-project-dialog[open] {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: min(90vh, max-content);
	height: min(90dvh, max-content);
	max-height: min(90vh, 920px);
	max-height: min(90dvh, 920px);
}

.jack-project-dialog::backdrop {
	background-color: rgba(12, 12, 12, 0.72);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.jack-project-dialog__frame {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	max-height: inherit;
	overflow: hidden;
	border-radius: inherit;
}

.jack-project-dialog__chrome {
	display: flex;
	flex: 0 0 auto;
	justify-content: flex-end;
	padding: 16px 16px 0;
}

.jack-project-dialog__close {
	min-height: 40px;
	padding-inline: 18px;
	font-size: 0.75rem;
}

.jack-project-dialog__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 8px 12px clamp(24px, 5vw, 40px) clamp(20px, 4vw, 36px);
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	border-end-start-radius: calc(var(--jack-radius-card) - 2px);
	border-end-end-radius: calc(var(--jack-radius-card) - 2px);
	scrollbar-width: thin;
	scrollbar-color: rgba(215, 226, 234, 0.45) transparent;
	scrollbar-gutter: stable;
}

.jack-project-dialog__body::-webkit-scrollbar {
	width: 10px;
}

.jack-project-dialog__body::-webkit-scrollbar-track {
	margin-block: 8px 24px;
	background-color: transparent;
	border-radius: 999px;
}

.jack-project-dialog__body::-webkit-scrollbar-thumb {
	background-color: rgba(215, 226, 234, 0.38);
	border: 2px solid var(--jack-bg);
	border-radius: 999px;
}

.jack-project-dialog__body::-webkit-scrollbar-thumb:hover {
	background-color: var(--jack-text);
}

.jack-project-panel {
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 3vw, 28px);
}

.jack-project-panel__kicker {
	margin: 0;
	font-weight: 300;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.6;
}

.jack-project-panel__title {
	margin: 0;
	font-weight: 500;
	font-size: clamp(1.35rem, 3vw, 2rem);
	line-height: 1.1;
	text-transform: uppercase;
}

.jack-project-panel__subtitle {
	margin: 0;
	font-weight: 400;
	font-size: clamp(1rem, 1.8vw, 1.2rem);
	line-height: 1.4;
}

.jack-project-panel__tags,
.jack-project-panel__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jack-project-panel__tags li,
.jack-project-panel__pills li {
	padding: 8px 14px;
	border: 1px solid rgba(215, 226, 234, 0.28);
	border-radius: 999px;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
}

.jack-project-panel__section {
	padding-top: 4px;
	border-top: 1px solid rgba(215, 226, 234, 0.14);
}

.jack-project-panel__section h4 {
	margin: 16px 0 12px;
	font-weight: 500;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.65;
}

.jack-project-panel__section p {
	margin: 0;
	font-weight: 300;
	font-size: clamp(0.95rem, 1.5vw, 1.05rem);
	line-height: 1.6;
}

.jack-project-panel__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.jack-project-panel__list li {
	position: relative;
	padding-left: 1.1em;
	font-weight: 300;
	font-size: clamp(0.95rem, 1.5vw, 1.05rem);
	line-height: 1.55;
}

.jack-project-panel__list li::before {
	content: '';
	position: absolute;
	top: 0.55em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--jack-text);
	opacity: 0.55;
}

.jack-project-panel__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* ---------------------------------------------------------------- 14. Footer */

.jack-footer {
	padding-block: clamp(48px, 9vw, 96px) clamp(24px, 5vw, 48px);
	background-color: var(--jack-bg);
}

.jack-footer__widgets {
	display: grid;
	gap: 24px;
	margin-bottom: clamp(32px, 6vw, 64px);
}

.jack-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(10px, 2vw, 18px);
	text-align: center;
}

.jack-footer__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 28px;
}

.jack-footer__heading {
	font-weight: 500;
	font-size: clamp(1.25rem, 4vw, 2.75rem);
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

.jack-footer__email {
	display: inline-block;
	padding: 8px 4px;
	color: var(--jack-text);
	font-weight: 300;
	font-size: clamp(1rem, 2.6vw, 1.75rem);
	letter-spacing: 0.02em;
	border-bottom: 1px solid rgba(215, 226, 234, 0.35);
	transition: border-color 200ms var(--jack-ease);
	overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
	.jack-footer__email:hover {
		border-bottom-color: var(--jack-text);
	}
}

.jack-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	margin-top: clamp(32px, 7vw, 72px);
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.5;
}

/* ------------------------------------------------------ 15. Editorial pages */

.jack-main--content {
	padding-block: clamp(40px, 8vw, 80px);
}

.jack-prose {
	max-width: 72ch;
}

.jack-page-title {
	margin-bottom: clamp(24px, 5vw, 40px);
	font-weight: 900;
	font-size: clamp(2rem, 6vw, 3.5rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.jack-entry {
	margin-bottom: clamp(32px, 7vw, 64px);
}

.jack-entry__title {
	margin-bottom: 0.5em;
	font-weight: 700;
	font-size: clamp(1.35rem, 3.5vw, 2.25rem);
	line-height: 1.15;
}

.jack-entry__thumb {
	margin-bottom: 1.5em;
	overflow: hidden;
	border-radius: 20px;
}

.jack-entry__content > * + * {
	margin-top: 1em;
}

.jack-entry__content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jack-prose ul:not([class]),
.jack-prose ol:not([class]) {
	padding-left: 1.4em;
	list-style: disc;
}

.jack-prose ol:not([class]) {
	list-style: decimal;
}

.navigation.pagination {
	margin-top: clamp(24px, 5vw, 48px);
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.navigation.pagination a,
.navigation.pagination .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(215, 226, 234, 0.3);
	border-radius: 999px;
}

.navigation.pagination .current {
	background-color: rgba(215, 226, 234, 0.15);
}

/* ---------------------------------------------------- 16. WordPress classes */

.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;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	opacity: 0.7;
}

.widget-title {
	margin-bottom: 0.75em;
	font-size: 1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* The admin bar eats into the first screen. */
@media screen and (min-width: 783px) {
	.admin-bar .jack-hero {
		min-height: calc(100svh - var(--jack-header-h) - 32px);
	}
}

@media screen and (max-width: 782px) {
	.admin-bar .jack-hero {
		min-height: calc(100svh - var(--jack-header-h) - 46px);
	}
}

/* --------------------------------------- 17. Motion, reduced motion, touch */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/*
 * The hidden state only exists once main.js has added .jack-js, so content is
 * never stuck at opacity 0 when scripts fail or are blocked.
 */
.jack-js [data-reveal] {
	opacity: 0;
	transform: translate3d(var(--jack-reveal-x, 0px), var(--jack-reveal-y, 30px), 0);
	transition:
		opacity var(--jack-reveal-duration) var(--jack-ease) var(--jack-reveal-delay, 0ms),
		transform var(--jack-reveal-duration) var(--jack-ease) var(--jack-reveal-delay, 0ms);
}

.jack-js [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

/* Scroll driven paragraph. animations.js sets the per piece opacity. */
.jack-word {
	display: inline-block;
}

.jack-js .jack-piece {
	opacity: 0.2;
}

.jack-lazy {
	opacity: 0;
	transition: opacity 400ms var(--jack-ease);
}

.jack-lazy.is-loaded {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.jack-js [data-reveal] {
		opacity: 1 !important;
		transform: none !important;
	}

	.jack-js .jack-piece {
		opacity: 1 !important;
	}

	.jack-marquee__track {
		transform: none !important;
	}

	.jack-skills__row {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.jack-skills__track {
		flex-wrap: wrap;
		width: 100%;
		max-width: var(--jack-max);
		margin-inline: auto;
		padding-inline: var(--jack-gutter);
		animation: none !important;
		justify-content: center;
	}

	.jack-skills__set[aria-hidden="true"] {
		display: none;
	}

	.jack-skills__set {
		flex-wrap: wrap;
		justify-content: center;
		padding-right: 0;
	}

	.jack-project {
		transform: none !important;
	}

	.jack-project-dialog {
		transition: none;
	}

	.jack-hero__magnet {
		transform: none !important;
	}

	.jack-lazy {
		opacity: 1;
	}
}

/* Pointer driven effects never run on touch. */
@media (hover: none), (pointer: coarse) {
	.jack-hero__magnet {
		transform: none !important;
	}
}
