/* ==========================================================================
   Kaylee Jensen — main stylesheet
   1. Fonts  2. Tokens  3. Base  4. Type  5. Layout  6. Components
   7. Header  8. Footer  9. Home  10. Work  11. Case study  12. About
   13. Contact  14. Trekkers  15. Motion  16. Utilities
   ========================================================================== */

/* 1. Fonts (self-hosted, latin) ------------------------------------------ */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-normal-300-800.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-normal-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-normal-400.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }

/* 2. Tokens --------------------------------------------------------------- */
:root {
	/* Colour: black & white */
	--bone: #FFFFFF;
	--paper: #FFFFFF;
	--sand: #F3F3F3;
	--ink: #141414;
	--graphite: #2A2826;

	--bg: var(--bone);
	--fg: var(--ink);
	--muted: #6B675F;      /* 5.7:1 on white */
	--line: #E4E4E4;
	--surface: var(--sand);

	/* Type */
	--font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
	--font-serif: "Instrument Serif", ui-serif, Georgia, serif;
	--font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

	--fs-xl: clamp(3.4rem, 10.5vw, 13.5rem);
	--fs-l: clamp(2.6rem, 6.8vw, 8rem);
	--fs-m: clamp(2.1rem, 4.6vw, 4.75rem);
	--fs-s: clamp(1.6rem, 2.7vw, 2.6rem);
	--fs-lede: clamp(1.15rem, 1.5vw, 1.45rem);
	--fs-body: clamp(1rem, 1.05vw, 1.0625rem);
	--fs-label: 0.75rem;

	/* Space & grid */
	--gutter: clamp(16px, 2vw, 32px);
	--pad: clamp(16px, 3.2vw, 56px);
	--max: 1760px;
	--section: clamp(4.5rem, 10vw, 9rem);
	--header-h: 72px;

	/* Motion */
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--dur: 0.9s;

	color-scheme: light;
}

[data-theme="dark"] {
	--bg: var(--ink);
	--fg: var(--bone);
	--muted: #9E9A92;      /* 6.6:1 on ink */
	--line: #33312E;
	--surface: var(--graphite);
	background: var(--bg);
	color: var(--fg);
}

/* 3. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
/* Very small phones (320–360px): scale the two biggest heading sizes with the screen so long single words still fit. */
@media (max-width: 360px) { :root { --fs-xl: 12vw; --fs-l: 10.5vw; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	overflow-x: clip; /* safety net: nothing can make the page wider than the phone screen */
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	font-optical-sizing: auto;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, video, iframe, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; }
::selection { background: var(--fg); color: var(--bg); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.site-main:focus { outline: none; }

.skip-link {
	position: fixed; top: 12px; left: 12px; z-index: 1000;
	padding: 12px 18px; background: var(--ink); color: var(--bone);
	font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase;
	transform: translateY(-160%); transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: none; }

/* 4. Type ----------------------------------------------------------------- */
.display-xl, .display-l, .display-m, .display-s {
	font-family: var(--font-sans);
	font-weight: 600;
	letter-spacing: -0.045em;
	line-height: 0.9;
	text-wrap: balance;
}
.display-xl { font-size: var(--fs-xl); line-height: 0.86; letter-spacing: -0.055em; }
.display-l  { font-size: var(--fs-l); }
.display-m  { font-size: var(--fs-m); letter-spacing: -0.04em; line-height: 0.95; }
.display-s  { font-size: var(--fs-s); letter-spacing: -0.03em; line-height: 1.05; font-weight: 500; }

.serif, em.serif {
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: -0.02em;
	padding-right: 0.04em;
}
/* In paragraph-sized text the serif's letters run smaller than the sans around it, so nudge it up to match. */
.lede em.serif, .prose em.serif, p:not([class*="display"]) > em.serif { font-size: 1.2em; line-height: 1; letter-spacing: -0.01em; }
.display-xl .serif, .display-l .serif { letter-spacing: -0.035em; }

.label {
	font-family: var(--font-mono);
	font-size: var(--fs-label);
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--muted);
}
.lede { font-size: var(--fs-lede); line-height: 1.45; letter-spacing: -0.01em; max-width: 40ch; text-wrap: pretty; }

.prose { max-width: 64ch; text-wrap: pretty; }
/* No single words left alone on the last line. */
p, li, dd, dt, figcaption, blockquote { text-wrap: pretty; }
h1, h2, h3, h4, .display-xl, .display-l, .display-m, .display-s, .label { text-wrap: balance; }
.prose > * + * { margin-top: 1.1em; }
.prose a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose h2, .prose h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-top: 1.8em; }
.prose--large { font-size: var(--fs-lede); line-height: 1.5; letter-spacing: -0.01em; max-width: 46ch; }
.prose--page { margin-inline: auto; }

/* 5. Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section) 0; }
.section--tight { padding-block: clamp(3rem, 6vw, 6rem); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

/* 6. Components ----------------------------------------------------------- */

/* Links */
.link-underline {
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	transition: background-size 0.6s var(--ease);
	padding-bottom: 0.08em;
}
.link-underline:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-slide { display: inline-flex; align-items: center; gap: 0.5em; position: relative; }
.link-slide::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
	transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.link-slide:hover::after { transform: scaleX(1); transform-origin: left; }
.arrow { flex: none; transition: transform 0.5s var(--ease); }
a:hover > .arrow, button:hover > .arrow { translate: 3px 0; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 0.75em;
	padding: 1em 1.6em; border: 1px solid currentColor; border-radius: 999px;
	font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em;
	position: relative; overflow: hidden; isolation: isolate;
	transition: color 0.5s var(--ease);
}
.btn::before {
	content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg);
	transform: translateY(101%); border-radius: inherit; transition: transform 0.5s var(--ease);
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn--light { color: var(--fg); }
.btn--ghost { border-color: var(--line); }
.btn--circle {
	width: clamp(9rem, 14vw, 13rem); aspect-ratio: 1; padding: 0; justify-content: center; flex-direction: column;
	text-align: center; gap: 0.6em; background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.btn--circle::before { background: var(--bg); }
.btn--circle:hover { color: var(--fg); }
.btn--circle span { max-width: 9ch; line-height: 1.35; }

/* Status dot */
.status { display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.02em; }
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative; }
.status__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid currentColor; opacity: 0; animation: kj-ping 2.4s var(--ease) infinite; }
@keyframes kj-ping { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }

.plain-list { list-style: none; display: grid; gap: 0.35em; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.2rem; }
.tags li { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.02em; padding: 0.45em 0.9em; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

/* Section head */
.section-head {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end;
	padding-bottom: clamp(1.5rem, 3vw, 3rem); margin-bottom: clamp(2rem, 5vw, 5rem); border-bottom: 1px solid var(--line);
}
.section-head__label { grid-column: 1 / span 2; align-self: start; padding-top: 0.6em; }
.section-head__title { grid-column: 3 / span 8; display: flex; align-items: flex-start; }
.section-head__count { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0; margin-left: 0.75em; font-weight: 400; color: var(--muted); line-height: 1; flex: none; }
.section-head__link { grid-column: 11 / span 2; justify-self: end; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; display: inline-flex; gap: 0.5em; align-items: center; white-space: nowrap; }
@media (max-width: 767px) {
	.section-head { grid-template-columns: 1fr auto; row-gap: 1rem; }
	.section-head__label { grid-column: 1 / -1; }
	.section-head__title { grid-column: 1 / -1; }
	.section-head__link { grid-column: 1 / -1; justify-self: start; }
}

/* Project card */
.card { position: relative; }
.card__link { display: block; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); border-radius: 2px; }
.card__media img, .card__media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity 0.6s var(--ease); }
.card__video { position: absolute; inset: 0; opacity: 0; }
.card__link:hover .card__media img, .card__link:hover .card__video { transform: scale(1.04); }
.card__link:hover .card__video { opacity: 1; }
.card__meta {
	display: grid; grid-template-columns: auto 1fr auto; column-gap: 1rem; row-gap: 0.25rem; align-items: baseline;
	padding-top: 1rem;
}
.card__index { grid-row: 1; }
.card__title { font-size: clamp(1.15rem, 1.6vw, 1.6rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; transition: transform 0.6s var(--ease); }
.card__link:hover .card__title { transform: translateX(6px); }
.card__year { justify-self: end; }
.card__tags { grid-column: 2 / -1; }
.card__meta:not(:has(.card__index)) { grid-template-columns: 1fr auto; }
.card__meta:not(:has(.card__index)) .card__tags { grid-column: 1 / -1; }

/* Rails (horizontal scrollers) */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(260px, 30vw, 460px); gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.5rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rail__item { scroll-snap-align: start; }

/* Media boxes */
.media { position: relative; width: 100%; background: var(--surface); overflow: hidden; border-radius: 2px; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--9x16 { aspect-ratio: 9 / 16; }
.media--1x1 { aspect-ratio: 1; }
.media iframe, .media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.media__play {
	position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center;
	width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.92); color: var(--ink);
	box-shadow: 0 6px 24px rgb(0 0 0 / 0.25); cursor: pointer; transition: transform 0.3s var(--ease), opacity 0.3s;
}
.media__play svg { width: 22px; height: 22px; margin-left: 3px; }
.media__play:hover { transform: scale(1.08); }
.media__play:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.media.is-playing .media__play { opacity: 0; pointer-events: none; }

/* Filters / chips */
.filter {
	display: inline-flex; align-items: baseline; gap: 0.35em; padding: 0.7em 1.15em; border: 1px solid var(--line); border-radius: 999px;
	font-size: 0.95rem; letter-spacing: -0.01em; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.filter sup { font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted); transition: color 0.4s; }
.filter:hover { border-color: var(--fg); }
.filter.is-active, .filter[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filter.is-active sup, .filter[aria-selected="true"] sup { color: inherit; opacity: 0.7; }

.notice { padding: 1rem 1.25rem; border: 1px solid currentColor; margin-bottom: 2rem; border-radius: 2px; }
.notice--error { border-style: dashed; }

/* Custom cursor label (mouse only): small frosted pill that trails the pointer */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
	.cursor {
		display: inline-flex; align-items: center; gap: 0.5em; position: fixed; top: 0; left: 0; z-index: 900; pointer-events: none;
		padding: 0.7em 1.05em 0.7em 1.15em; border-radius: 999px;
		background: rgb(255 255 255 / 0.78); color: var(--ink);
		border: 1px solid rgb(20 20 20 / 0.08);
		box-shadow: 0 10px 30px -12px rgb(20 20 20 / 0.35);
		backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
		font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
		transform: translate3d(var(--x, -200px), var(--y, -200px), 0) translate(18px, 18px) scale(0.85);
		opacity: 0; transition: opacity 0.35s var(--ease), scale 0.35s var(--ease);
		will-change: transform;
	}
	.cursor.is-active { opacity: 1; transform: translate3d(var(--x), var(--y), 0) translate(18px, 18px) scale(1); }
	.cursor__arrow { flex: none; }
}

/* 7. Header --------------------------------------------------------------- */
.site-header {
	position: fixed; inset: 0 0 auto; z-index: 500; height: var(--header-h);
	transition: transform 0.6s var(--ease), background 0.4s var(--ease), border-color 0.4s;
	border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--bone) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.site-header__logo { font-weight: 600; letter-spacing: -0.03em; font-size: 1.05rem; margin-right: auto; }
.site-header__status { color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list { list-style: none; display: flex; gap: 1.75rem; }
.site-nav__list a, .site-nav__resume {
	font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em;
	position: relative; display: inline-flex; gap: 0.4em; align-items: center;
}
.site-nav__list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.site-nav__list a:hover::after, .site-nav__list .current-menu-item a::after, .site-nav__list .current_page_item a::after, .site-nav__list .current-menu-ancestor a::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; }
.site-nav__extra { display: none; }

@media (max-width: 900px) {
	.site-header__status { display: none; }
	.menu-toggle {
		display: inline-flex; align-items: center; gap: 0.75rem; z-index: 2;
		font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em;
		min-height: 44px;
	}
	.menu-toggle__icon { width: 22px; height: 10px; position: relative; }
	.menu-toggle__icon span { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.5s var(--ease), top 0.5s var(--ease); }
	.menu-toggle__icon span:first-child { top: 0; }
	.menu-toggle__icon span:last-child { top: 8px; }
	.menu-open .menu-toggle__icon span:first-child { top: 4px; transform: rotate(45deg); }
	.menu-open .menu-toggle__icon span:last-child { top: 4px; transform: rotate(-45deg); }

	/* Mobile menu: full-screen panel, numbered rows with hairlines, contact details at the bottom. */
	.site-header__logo { position: relative; z-index: 2; }
	.site-nav {
		position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.75rem;
		padding: calc(var(--header-h) + 1.25rem) var(--pad) calc(1.75rem + env(safe-area-inset-bottom)); background: var(--bone); overflow-y: auto;
		opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s 0.4s;
	}
	.menu-open .site-nav { opacity: 1; visibility: visible; transition: opacity 0.4s var(--ease); }
	.site-nav__list { flex-direction: column; gap: 0; counter-reset: nav; border-top: 1px solid var(--line); }
	.site-nav__list li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); }
	.menu-open .site-nav__list li { opacity: 1; transform: none; }
	.menu-open .site-nav__list li:nth-child(2) { transition-delay: 0.05s; }
	.menu-open .site-nav__list li:nth-child(3) { transition-delay: 0.1s; }
	.menu-open .site-nav__list li:nth-child(4) { transition-delay: 0.15s; }
	.menu-open .site-nav__list li:nth-child(5) { transition-delay: 0.2s; }
	.site-nav__list a {
		display: flex; width: 100%; justify-content: space-between; align-items: baseline; padding: 1rem 0;
		font-family: var(--font-sans); font-size: clamp(2.25rem, 10.5vw, 3.5rem); font-weight: 600; letter-spacing: -0.045em; text-transform: none; line-height: 1;
	}
	.site-nav__list a::before { counter-increment: nav; content: "0" counter(nav); order: 2; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 400; letter-spacing: 0.04em; color: var(--muted); }
	.site-nav__list a::after { display: none; }
	.site-nav__list .current-menu-item > a, .site-nav__list .current_page_item > a, .site-nav__list .current-menu-ancestor > a { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
	.site-nav__list .current-menu-item > a::before, .site-nav__list .current_page_item > a::before, .site-nav__list .current-menu-ancestor > a::before { font-style: normal; }
	.site-nav__resume { align-self: flex-start; padding: 0.85em 1.4em; border: 1px solid currentColor; border-radius: 999px; }
	.site-nav__extra { display: grid; gap: 0.9rem; margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); }
	.site-nav__extra .status { color: var(--muted); }
	.site-nav__email { font-size: 1.15rem; letter-spacing: -0.02em; }
	.site-nav__socials { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
	.site-nav__socials a { display: inline-flex; align-items: center; gap: 0.35em; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em; }
	.menu-open { overflow: hidden; }
	.menu-open .site-header { background: transparent; backdrop-filter: none; border-color: transparent; transform: none; }
}

/* 8. Footer --------------------------------------------------------------- */
.site-footer { margin-top: var(--section); padding-top: var(--section); overflow: hidden; position: relative; isolation: isolate; }
/* Hidden detail: faint topographic contour lines behind the giant name, fading out toward the top. */
.site-footer::before {
	content: ""; position: absolute; inset: auto 0 0 0; height: 62%; z-index: -1; pointer-events: none;
	background: url("../img/topo.svg") center bottom / cover no-repeat;
	opacity: 0.055; /* ~25% lighter than before */
	/* Strongest behind the giant name, easing out well before the contact details at the top. */
	-webkit-mask-image: linear-gradient(to top, #000 12%, rgb(0 0 0 / 0.55) 40%, rgb(0 0 0 / 0.18) 65%, transparent 88%);
	mask-image: linear-gradient(to top, #000 12%, rgb(0 0 0 / 0.55) 40%, rgb(0 0 0 / 0.18) 65%, transparent 88%);
}
.site-footer__cta { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: var(--section); } /* Matches the footer's top padding so the block sits centered. */
.site-footer__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.site-footer__top .label, .site-footer__status { margin: 0; }
.site-footer__status { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.site-footer__heading { max-width: none; margin-top: clamp(1rem, 3vw, 3rem); }
/* Big email: keeps the underline + arrow hover. */
.site-footer__email { font-size: clamp(1.4rem, 3.4vw, 3.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; justify-self: start; display: inline-flex; align-items: center; gap: 0.3em; word-break: break-all; padding-bottom: 0.08em; }
.site-footer__email .arrow { width: 0.55em; height: 0.55em; flex: none; }
.site-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); padding-block: 2rem; border-top: 1px solid var(--line); }
.site-footer__col .label { margin-bottom: 1rem; }
.site-footer__col .plain-list { list-style: none; }
.site-footer__col .plain-list a { font-size: 1.05rem; }
.site-footer__col .plain-list li { margin: 0; }
.site-footer__col .label.site-footer__coords { margin: 0.9rem 0 0; color: var(--muted); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
/* Every footer column: same label spacing and the same line box for each value, so all four columns line up row for row. */
.site-footer__cols { align-items: start; }
.site-footer__col .label { margin: 0 0 1rem; line-height: 1.2; }
.site-footer__col .plain-list { margin: 0; padding: 0; gap: 0.35rem; }
.site-footer__col .plain-list a, .site-footer__col .site-footer__time { display: block; width: fit-content; font-size: 1.05rem; line-height: 1.5; margin: 0; padding: 0; }
.site-footer__time { font-size: 1.05rem; margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
	.site-footer__cols { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
}

.giant-name {
	display: flex; flex-wrap: nowrap; justify-content: center; gap: 0.25em;
	padding-inline: var(--pad);
	font-size: var(--giant-size, 15vw);
	font-weight: 700; letter-spacing: 0.03em; line-height: 0.8; text-transform: uppercase;
	color: var(--fg); user-select: none; white-space: nowrap;
	margin-top: clamp(1rem, 3vw, 3rem);
}
.giant-name__word { display: inline-flex; overflow: hidden; padding-block: 0.12em 0.06em; }
.giant-name__ch { display: inline-block; }
@media (max-width: 640px) {
	.giant-name { flex-direction: column; align-items: flex-start; gap: 0; }
}

.site-footer__bar {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
	padding-block: 1.5rem 2rem; margin-top: clamp(1.5rem, 3vw, 3rem);
	font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted);
}

/* 9. Home ----------------------------------------------------------------- */
.hero { display: flex; flex-direction: column; gap: clamp(1.75rem, 3.5vw, 3rem); padding-top: calc(var(--header-h) + clamp(1.5rem, 3.5vw, 3rem)); padding-bottom: clamp(1rem, 2vw, 2rem); }
.hero__top { display: flex; justify-content: space-between; gap: 1rem; }
.hero__title { max-width: 15ch; text-wrap: balance; line-height: 0.98; } /* a little more room so the g in “Designing” clears the f and l below */
.hero__title em.serif { display: inline-block; }
.hero__bottom { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; align-items: end; border-top: 1px solid var(--line); padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero__about { grid-column: 1 / span 5; display: grid; gap: 1.1rem; align-self: end; }
.hero__greeting { margin: 0; font-weight: 600; font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -0.045em; line-height: 1; }
.hero__intro { margin: 0; }
.stats { grid-column: 7 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--gutter); }
.stats__item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 0.4rem; } /* numbers line up along the top, labels hang below */
@media (max-width: 640px) {
	/* Phones: all three stats on one row. */
	.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 1rem; }
	.stats__value { font-size: clamp(1.9rem, 9vw, 2.4rem); }
}
.stats__value { font-size: clamp(2.2rem, 4.2vw, 4.5rem); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; }
@media (max-width: 900px) {
	.hero__about, .stats { grid-column: 1 / -1; }
	.hero__scroll { display: none; }
}

/* Selected work: even two-column grid, filters, description on hover */
.selected__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.selected__title { color: var(--fg); }
.selected__count { color: var(--muted); margin-left: 0.4em; }
.selected__all { color: var(--fg); }
.filters.filters--home { border-bottom: 1px solid var(--line); padding-block: clamp(1.25rem, 2.2vw, 1.75rem); margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
/* Buttons sit centered between the line above and the line below. */
.selected__head:has(+ .filters--home) { margin-bottom: 0; }
.selected__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.selected__grid .card__media { aspect-ratio: 16 / 9; border-radius: 4px; }
.selected__grid .card__title { font-size: clamp(1.15rem, 1.5vw, 1.45rem); }
@media (max-width: 767px) { .selected__grid { grid-template-columns: 1fr; } }

.card__hover {
	position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: clamp(1.5rem, 5vw, 4.5rem);
	background: var(--bone); color: var(--ink); text-align: center; opacity: 0; transition: opacity 0.45s var(--ease);
	box-shadow: inset 0 0 0 1px var(--line); border-radius: inherit;
}
.card__hover p { max-width: 38ch; font-size: clamp(1rem, 1.35vw, 1.3rem); line-height: 1.45; letter-spacing: -0.01em; transform: translateY(10px); transition: transform 0.6s var(--ease); }
@media (hover: hover) {
	.card__link:hover .card__hover, .card__link:focus-visible .card__hover { opacity: 1; }
	.card__link:hover .card__hover p, .card__link:focus-visible .card__hover p { transform: none; }
}
@media (hover: none) { .card__hover { display: none; } }

/* Expertise / approach rows */
.expertise { list-style: none; }
.expertise__item {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0.75rem;
	padding-block: clamp(1.75rem, 3vw, 3rem); border-bottom: 1px solid var(--line);
	transition: padding 0.6s var(--ease);
}
.expertise__num { grid-column: 1 / span 2; padding-top: 0.5em; }
.expertise__title { grid-column: 3 / span 4; font-size: var(--fs-s); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.expertise__text { grid-column: 8 / -1; color: var(--muted); max-width: 46ch; }
.expertise__item .tags { grid-column: 8 / -1; margin-top: 0.25rem; }
@media (hover: hover) { .expertise__item:hover .expertise__title { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; } }
@media (max-width: 767px) {
	.expertise__num, .expertise__title, .expertise__text, .expertise__item .tags { grid-column: 1 / -1; }
}

/* Twilight Trekkers band */
.trekkers-band { margin-top: var(--section); padding-block: var(--section); }
.trekkers-band__inner { display: grid; gap: clamp(3rem, 6vw, 5rem); }
/* Photo mosaic: 1 2 small + 3 large on the left, 4 tall in the middle, 5 large + 6 7 small on the right. */
.trekkers-band__images { display: grid; grid-template-columns: 1fr 1fr 2.55fr 1fr 1fr; grid-template-rows: repeat(3, clamp(80px, 13vw, 260px)); gap: clamp(8px, 1.1vw, 20px); }
.trekkers-band__img { position: relative; margin: 0; overflow: hidden; border-radius: 2px; background: var(--surface); }
.trekkers-band__img img { width: 100%; height: 100%; object-fit: cover; }
.trekkers-band__img--1 { grid-column: 1; grid-row: 1; }
.trekkers-band__img--2 { grid-column: 2; grid-row: 1; }
.trekkers-band__img--3 { grid-column: 1 / span 2; grid-row: 2 / span 2; }
.trekkers-band__img--4 { grid-column: 3; grid-row: 1 / span 3; }
.trekkers-band__img--5 { grid-column: 4 / span 2; grid-row: 1 / span 2; }
.trekkers-band__img--6 { grid-column: 4; grid-row: 3; }
.trekkers-band__img--7 { grid-column: 5; grid-row: 3; }
.trekkers-band__copy { display: grid; gap: clamp(2rem, 3.5vw, 3rem); }
.trekkers-band__head { display: grid; gap: 1.25rem; }
/* Rotating italic phrase after "Off the clock, I". All phrases share one grid cell, so the box is always as wide as the longest one and nothing shifts. */
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; padding: 0 0.12em 0.14em 0; margin-bottom: -0.14em; white-space: nowrap; }
.rotator__item { grid-area: 1 / 1; opacity: 0; }
.rotator__item.is-active { opacity: 1; }
.trekkers-band__copy .lede { color: var(--muted); max-width: 72rem; }
/* Full-width strip: big follower count on the left, button on the right. */
.trekkers-band__stats { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid rgb(255 255 255 / 0.18); }
.trekkers-band__count { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; margin: 0; }
.trekkers-band__count .display-xl { letter-spacing: -0.06em; line-height: 0.85; }
@media (max-width: 900px) {
	/* Phones/tablets: a two-column mosaic. Arch tall on the left with 1 + 2 beside it,
	   then the beach full width. Photos 5–7 show on desktop only. */
	.trekkers-band__images { grid-template-columns: 1fr 1fr; grid-template-rows: 32vw 32vw 46vw; gap: 8px; }
	.trekkers-band__img--5, .trekkers-band__img--6, .trekkers-band__img--7 { display: none; }
	.trekkers-band__img--4 { grid-column: 1; grid-row: 1 / span 2; }
	.trekkers-band__img--1 { grid-column: 2; grid-row: 1; }
	.trekkers-band__img--2 { grid-column: 2; grid-row: 2; }
	.trekkers-band__img--3 { grid-column: 1 / -1; grid-row: 3; }
}

/* CTA */
.cta { padding-top: var(--section); display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem 4rem; flex-wrap: wrap; }
.cta__heading { max-width: 13ch; }
.cta--wide { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: clamp(2rem, 4vw, 3rem); }
.cta--wide .cta__heading { max-width: none; }
.btn--large { padding: 1.15rem 1.9rem; font-size: 0.85rem; }

/* 10. Work ---------------------------------------------------------------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(1.5rem, 3.5vw, 3rem)); padding-bottom: clamp(2rem, 4vw, 3.5rem); display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.page-hero--404 { min-height: 80svh; align-content: center; justify-items: start; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); margin-bottom: clamp(2.5rem, 5vw, 5rem); }
.filter--client { border-style: dashed; }
.view-toggle { margin-left: auto; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.view-toggle__btn { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; padding: 0.6em 1em; border-radius: 999px; min-height: 36px; }
.view-toggle__btn.is-active { background: var(--fg); color: var(--bg); }
@media (max-width: 640px) { .view-toggle { margin-left: 0; } }

.page-hero--work { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.page-hero--work .display-xl { max-width: 14ch; }
.work .filters { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); transition: top 0.6s var(--ease); }
.site-header:not(.is-hidden) ~ .site-main .work .filters { top: var(--header-h); }

.work-grid[data-view="grid"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.work-grid[data-view="grid"] .card__media { aspect-ratio: 16 / 9; border-radius: 4px; }
.work-grid[data-view="grid"] .card__title { font-size: clamp(1.15rem, 1.5vw, 1.45rem); }
@media (max-width: 767px) { .work-grid[data-view="grid"] { grid-template-columns: 1fr; } }

/* List view: rows with a small thumbnail, big title, tags, year and an arrow */
.work-grid[data-view="list"] { display: block; margin-top: calc(-1 * clamp(2rem, 4vw, 3.5rem)); }
.work-grid[data-view="list"] .card { border-bottom: 1px solid var(--line); }
.work-grid[data-view="list"] .card__link {
	display: grid; grid-template-columns: clamp(110px, 11vw, 176px) minmax(0, 1fr) 2.5rem; align-items: center; column-gap: clamp(1rem, 2.5vw, 2.5rem);
	padding-block: clamp(1rem, 1.8vw, 1.5rem); transition: padding 0.6s var(--ease);
}
.work-grid[data-view="list"] .card__media { aspect-ratio: 16 / 9; border-radius: 3px; }
.work-grid[data-view="list"] .card__hover { display: none; }
.work-grid[data-view="list"] .card__meta { padding: 0; grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 16rem) 6rem; column-gap: var(--gutter); align-items: center; }
.work-grid[data-view="list"] .card__title { font-size: clamp(1.4rem, 3vw, 2.75rem); letter-spacing: -0.04em; font-weight: 500; line-height: 1.05; grid-column: 2; }
.work-grid[data-view="list"] .card__tags { grid-column: 3; grid-row: 1; }
.work-grid[data-view="list"] .card__year { grid-column: 4; grid-row: 1; justify-self: end; }
.work-grid[data-view="list"] .card__link::after {
	content: ""; justify-self: end; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 50%;
	background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M1 7h11M7.5 2.5 12 7l-4.5 4.5' fill='none' stroke='%23141414' stroke-width='1.4'/%3E%3C/svg%3E");
	transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.5s var(--ease);
}
@media (hover: hover) {
	.work-grid[data-view="list"] .card__link:hover::after { background-color: var(--sand); border-color: var(--fg); transform: rotate(-45deg); }
	.work-grid[data-view="list"] .card__link:hover .card__media img { transform: scale(1.06); }
}
@media (max-width: 900px) {
	.work-grid[data-view="list"] .card__meta { grid-template-columns: 2.25rem minmax(0, 1fr) auto; row-gap: 0.35rem; }
	.work-grid[data-view="list"] .card__tags { grid-column: 2 / -1; grid-row: 2; }
	.work-grid[data-view="list"] .card__year { grid-column: 3; }
}
@media (max-width: 640px) {
	.work-grid[data-view="list"] .card__link { grid-template-columns: 96px minmax(0, 1fr); }
	.work-grid[data-view="list"] .card__link::after { display: none; }
	.work-grid[data-view="list"] .card__meta { grid-template-columns: minmax(0, 1fr) auto; }
	.work-grid[data-view="list"] .card__index { display: none; }
	.work-grid[data-view="list"] .card__title { grid-column: 1; font-size: 1.15rem; letter-spacing: -0.02em; }
	.work-grid[data-view="list"] .card__tags { grid-column: 1 / -1; }
	.work-grid[data-view="list"] .card__year { grid-column: 2; }
}
.card[hidden] { display: none !important; }
.card.is-entering { animation: kj-fade-up 0.7s var(--ease) both; }
@keyframes kj-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* 11. Case study ---------------------------------------------------------- */
.case-hero { padding-top: calc(var(--header-h) + clamp(1.5rem, 3.5vw, 3rem)); display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.case-hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9em; }
.case-hero__star { font-size: 0.7em; }
.case-hero__title { max-width: 18ch; text-transform: uppercase; letter-spacing: -0.045em; }
.case-hero__summary { font-family: var(--font-serif); font-size: clamp(1.5rem, 2.6vw, 2.5rem); line-height: 1.2; letter-spacing: -0.015em; max-width: 42ch; text-wrap: pretty; }
.case-hero__summary .serif { font-style: italic; }
.case-hero__media { width: 100%; max-height: 92svh; overflow: hidden; background: var(--surface); }
.case-hero__media img, .case-hero__media video { width: 100%; height: 100%; max-height: 92svh; object-fit: cover; }
.case-hero__media--inset { border-radius: 4px; margin-top: clamp(1rem, 2vw, 1.5rem); }

.case-facts {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem var(--gutter);
	margin-top: clamp(0.5rem, 1.5vw, 1rem); padding-top: clamp(1.25rem, 2vw, 1.75rem); border-top: 1px solid var(--line);
}
.case-facts__item { flex: 0 1 auto; max-width: 30ch; }
.case-facts__item:last-child:not(:first-child) { text-align: right; }
.case-facts__item dt { margin-bottom: 0.45rem; }
.case-facts__item dd { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; }
.case-facts__item dd a { display: inline-flex; align-items: center; gap: 0.4em; }
@media (max-width: 767px) {
	.case-facts { display: grid; grid-template-columns: 1fr 1fr; }
	.case-facts__item:last-child:not(:first-child) { text-align: left; }
}

.case-body { counter-reset: cs; padding-bottom: 2rem; }
.cs {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.25rem;
	padding-top: clamp(4.5rem, 10vw, 10rem); counter-increment: cs;
}
.cs__label { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
.cs__num::before { content: "(" counter(cs, decimal-leading-zero) ")"; }
.cs__body { grid-column: 4 / span 8; display: grid; gap: clamp(1.5rem, 2.5vw, 2.5rem); }
.cs__heading { max-width: 22ch; }
@media (max-width: 900px) { .cs__label, .cs__body { grid-column: 1 / -1; position: static; } }

.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); margin-top: 0.5rem; }
.steps__item { border-top: 1px solid var(--fg); padding-top: 1.25rem; display: grid; gap: 0.6rem; align-content: start; }
.steps__title { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }
.steps__item p { color: var(--muted); }

.decisions { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
/* Without images, decisions sit side by side, three to a row. */
.decisions:not(:has(.has-image)) { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: clamp(2rem, 3.5vw, 3rem); }
.decisions:not(:has(.has-image)) .decisions__copy { align-content: start; }
.decisions:not(:has(.has-image)) .decisions__title { font-size: clamp(1.35rem, 1.9vw, 1.85rem); }
@media (max-width: 900px) { .decisions:not(:has(.has-image)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .decisions:not(:has(.has-image)) { grid-template-columns: 1fr; } }
.decisions__item { display: grid; gap: var(--gutter); border-top: 1px solid var(--line); padding-top: 1.5rem; }
.decisions__item.has-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.decisions__copy { display: grid; gap: 0.6rem; }
.decisions__title { font-size: var(--fs-s); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.decisions__copy p { color: var(--muted); max-width: 48ch; }
.decisions__img { overflow: hidden; border-radius: 2px; }
@media (max-width: 767px) { .decisions__item.has-image { grid-template-columns: 1fr; } }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gutter); }
.metrics__item { display: flex; flex-direction: column; gap: 0.75rem; border-top: 1px solid var(--fg); padding-top: 1.25rem; }
.metrics__label { color: var(--muted); max-width: 26ch; }

.cs-media { margin-top: clamp(2.5rem, 6vw, 6rem); }
.cs-media img { width: 100%; border-radius: 2px; }
.cs-media figcaption { margin-top: 0.9rem; }
.cs-media--contained { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.cs-media--contained > * { grid-column: 4 / -1; }
.cs-media--small { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.cs-media--small > * { grid-column: 1 / span 6; }
.cs-media--wide { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.cs-media--narrow { width: 100%; max-width: 520px; margin-inline: auto; padding-inline: var(--pad); }
.cs-media--medium { width: 100%; max-width: calc(760px + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.cs-media--full img { border-radius: 0; }
@media (max-width: 900px) { .cs-media--contained > *, .cs-media--small > * { grid-column: 1 / -1; } }

.cs-pair__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: start; }
@media (max-width: 640px) { .cs-pair__grid { grid-template-columns: 1fr; } }

.link-grid__heading { margin-bottom: 1.25rem; }
.link-grid__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) var(--gutter); align-items: start; }
.link-grid__media { display: block; position: relative; overflow: hidden; border-radius: 4px; background: var(--surface); }
.link-grid__media img { width: 100%; transition: transform 1.2s var(--ease); }
.link-grid__hover {
	position: absolute; inset: 0; display: grid; place-items: center; background: rgb(20 20 20 / 0.72); color: var(--bone);
	font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.04em; opacity: 0; transition: opacity 0.45s var(--ease);
}
.link-grid__hover span { display: inline-flex; align-items: center; gap: 0.6em; padding: 0.9em 1.4em; border: 1px solid currentColor; border-radius: 999px; }
@media (hover: hover) {
	a.link-grid__media:hover .link-grid__hover, a.link-grid__media:focus-visible .link-grid__hover { opacity: 1; }
	a.link-grid__media:hover img { transform: scale(1.03); }
}
.link-grid__caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; padding-top: 1rem; }
.link-grid__title { font-size: clamp(1.1rem, 1.4vw, 1.35rem); font-weight: 500; letter-spacing: -0.02em; }
.link-grid__links { display: flex; flex-wrap: wrap; gap: 6px; }
.link-grid__pill { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.5em 0.95em; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.02em; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s; }
.link-grid__pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
@media (max-width: 640px) { .link-grid__grid { grid-template-columns: 1fr; } }

.cs-gallery + .cs-gallery { margin-top: var(--gutter); }
.cs-gallery__grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
@media (max-width: 640px) {
	.cs-gallery:not([style*="--cols:1"]) .cs-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cs-gallery[style*="--cols:2"] .cs-gallery__grid { grid-template-columns: 1fr; }
}

.reels { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 21vw, 320px); gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.25rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.reels__item { scroll-snap-align: start; }
.reels--page { padding-inline: var(--pad); scroll-padding-inline: var(--pad); }
/* Gallery rows that scroll sideways (one carousel per row) */
.cs-gallery--rows { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
/* Same height for every image in a row, width follows each image's shape (no stretching or cropping). */
.cs-gallery--rows .reels { grid-auto-columns: max-content; align-items: start; }
.cs-gallery--rows .reels__item .lightbox-link { width: max-content; }
.cs-gallery--rows .reels__item img { height: clamp(340px, 42vw, 560px); width: auto; max-width: none; }
@media (max-width: 640px) { .cs-gallery--rows .reels__item img { height: 88vw; } }
.cs-reels__heading { margin-bottom: 1.25rem; }

.cs-quote { padding-top: clamp(4.5rem, 10vw, 10rem); display: grid; gap: 1.5rem; }
.cs-quote blockquote { margin: 0; max-width: 28ch; font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }

.more { overflow: hidden; }

.next-project { display: block; position: relative; margin-top: var(--section); border-top: 1px solid var(--line); overflow: hidden; }
.next-project__inner { display: grid; gap: 1.25rem; padding-block: clamp(3rem, 8vw, 8rem); position: relative; z-index: 1; }
.next-project__title { transition: transform 0.8s var(--ease), color 0.5s var(--ease); max-width: 16ch; }
.next-project__media { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease); }
.next-project__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--ease); }
.next-project__media::after { content: ""; position: absolute; inset: 0; background: rgb(20 20 20 / 0.55); }
@media (hover: hover) {
	.next-project:hover { color: var(--bone); }
	.next-project:hover .label { color: var(--bone); }
	.next-project:hover .next-project__media { opacity: 1; }
	.next-project:hover .next-project__media img { transform: none; }
	.next-project:hover .next-project__title { transform: translateX(1.5rem); }
}

/* Lightbox (case-study images) */
.lightbox-link { display: block; cursor: zoom-in; }
.lightbox-link img { transition: transform 1.2s var(--ease), opacity 0.4s var(--ease); }
@media (hover: hover) { .lightbox-link:hover img { opacity: 0.92; } }
.lightbox {
	width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: var(--ink); color: var(--bone); overscroll-behavior: contain;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; animation: kj-fade 0.35s var(--ease); }
@keyframes kj-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: clamp(4rem, 8vh, 6rem) clamp(1rem, 7vw, 7rem); }
.lightbox__img { max-width: calc(100vw - 2 * clamp(1rem, 7vw, 7rem)); max-height: calc(100dvh - 2 * clamp(4rem, 8vh, 6rem)); width: auto; height: auto; object-fit: contain; border-radius: 2px; opacity: 0; transition: opacity 0.35s var(--ease); }
.lightbox__img.is-loaded { opacity: 1; }
.lightbox.is-tall .lightbox__stage { place-items: start center; overflow-y: auto; overscroll-behavior: contain; }
.lightbox.is-tall .lightbox__img { width: min(1100px, 100%); max-width: 100%; max-height: none; }
.lightbox__counter { position: absolute; top: 1.5rem; left: var(--pad); color: var(--bone); opacity: 0.8; }
.lightbox__caption { position: absolute; bottom: 1.5rem; left: var(--pad); right: var(--pad); text-align: center; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.02em; opacity: 0.75; }
.lightbox__btn {
	position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
	border: 1px solid rgb(255 255 255 / 0.35); color: var(--bone); background: rgb(20 20 20 / 0.4);
	transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s;
}
.lightbox__btn:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.lightbox__btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.lightbox__close { top: 1rem; right: var(--pad); font-size: 0.95rem; }
.lightbox__prev { left: var(--pad); top: 50%; translate: 0 -50%; }
.lightbox__next { right: var(--pad); top: 50%; translate: 0 -50%; }
@media (max-width: 640px) {
	.lightbox__prev, .lightbox__next { top: auto; bottom: 1rem; translate: none; width: 46px; height: 46px; }
	.lightbox__caption { bottom: 5rem; }
}
.lightbox-open { overflow: hidden; }
.lightbox-open .cursor { display: none; }

/* 12. About --------------------------------------------------------------- */
/* About top: headline overlapping a centered portrait, small photo + card layered on the sides */
.about-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-top: calc(var(--header-h) + clamp(1.5rem, 3.5vw, 3rem)); }
.about-top__title { grid-column: 1 / -1; grid-row: 2; text-align: center; position: relative; z-index: 2; }
.about-top__kicker { grid-column: 1 / -1; grid-row: 1; text-align: center; margin: 0 0 clamp(1rem, 2vw, 1.5rem); }
.about-top__portrait { grid-column: 5 / span 4; grid-row: 3; margin: calc(var(--fs-xl) * -0.42) 0 0; overflow: hidden; border-radius: 2px; aspect-ratio: 4 / 5; background: var(--surface); }
.about-top__portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-top__card { grid-column: 5 / span 4; grid-row: 4; margin: clamp(-5.5rem, -6vw, -3rem) clamp(0.75rem, 1.6vw, 1.75rem) 0; /* narrower than the headshot */ position: relative; z-index: 2; /* overlaps the bottom of the headshot */ display: grid; gap: 1.25rem; justify-items: center; text-align: center; padding: clamp(1.5rem, 2.5vw, 2.5rem) clamp(1rem, 1.6vw, 1.75rem); background: var(--bone); box-shadow: 0 20px 60px rgb(20 20 20 / 0.08); }
.about-top__card-heading { white-space: nowrap; font-family: var(--font-serif); font-size: clamp(1.2rem, 1.7vw, 1.9rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
.about-top__card-text { color: var(--muted); margin: 0; }
.about-story { padding-top: clamp(4rem, 8vw, 8rem); display: grid; gap: clamp(3rem, 6vw, 5.5rem); }
.about-story__statement { font-family: var(--font-serif); font-size: clamp(2rem, 4.6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.02em; text-align: center; max-width: 36ch; margin: 0 auto; text-wrap: balance; }
.about-story__cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2rem; align-items: start; }
.about-story__lead { grid-column: 2 / span 5; font-family: var(--font-serif); font-size: clamp(1.5rem, 2.4vw, 2.25rem); line-height: 1.2; margin: 0; }
.about-story__body { grid-column: 8 / span 4; color: var(--muted); }
@media (min-width: 901px) and (max-width: 1150px) { .about-top__portrait, .about-top__card { grid-column: 4 / span 6; } }
@media (max-width: 900px) {
	.about-top__portrait, .about-top__card { grid-column: 1 / -1; }
	.about-top__portrait { grid-row: 3; margin-top: calc(var(--fs-xl) * -0.3); }
	.about-top__card { grid-row: 4; margin-top: -3rem; width: calc(100% - 3rem); max-width: 26rem; justify-self: center; }
	.about-top__card-heading { font-size: clamp(1.15rem, 5vw, 1.6rem); }
	.about-top__portrait { max-width: 30rem; justify-self: center; width: 100%; }
	.about-story__lead, .about-story__body { grid-column: 1 / -1; }
}

.capabilities { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3rem var(--gutter); }
@media (max-width: 1200px) { .capabilities { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .capabilities { grid-template-columns: 1fr; } }
.capabilities__group .label { margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.capabilities__list { font-size: 1.1rem; line-height: 1.3; letter-spacing: -0.015em; gap: 0.55em; text-wrap: balance; }

.timeline { list-style: none; border-top: 1px solid var(--line); }
.timeline__link { margin-left: 1em; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; display: inline-flex; gap: 0.4em; align-items: center; }
.timeline__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0.5rem; padding-block: clamp(1.25rem, 2.4vw, 2rem); border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline__role { grid-column: 1 / span 5; font-size: clamp(1.25rem, 2vw, 1.9rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.timeline__org { grid-column: 6 / span 4; font-size: 1.05rem; }
.timeline__dates { grid-column: 10 / -1; justify-self: end; }
.timeline__summary { grid-column: 6 / -1; color: var(--muted); max-width: 56ch; }
@media (max-width: 767px) {
	.timeline__role, .timeline__org, .timeline__summary { grid-column: 1 / -1; }
	.timeline__dates { grid-column: 1 / -1; justify-self: start; grid-row: 1; }
}

/* 13. Contact ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 4rem; align-items: start; }
.contact__info { grid-column: 1 / span 5; display: grid; gap: 2.5rem; justify-items: start; }
.contact__list { display: grid; gap: 1.75rem; }
.contact__list dt { margin-bottom: 0.4rem; }
.contact__list dd { font-size: 1.15rem; }
.contact__email { font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -0.02em; word-break: break-all; }
.contact__form { grid-column: 7 / -1; }
@media (max-width: 900px) { .contact__info, .contact__form { grid-column: 1 / -1; } }

.form { display: grid; gap: 2rem; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
@media (max-width: 640px) { .form__row--2 { grid-template-columns: 1fr; gap: 2rem; } }
.field { display: grid; gap: 0.5rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); padding: 0; }
.field input, .field textarea {
	width: 100%; font: inherit; font-size: 1.15rem; color: var(--fg); background: transparent;
	border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0.6rem 0; transition: border-color 0.3s;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--fg); }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 1px 0 0 var(--fg); }
.field--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field--chips legend { margin-bottom: 0.75rem; width: 100%; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 0.65em 1.1em; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: all 0.3s var(--ease); }
.chip input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 3px; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }

/* 14. Twilight Trekkers --------------------------------------------------- */
.tt-intro { display: grid; gap: clamp(2rem, 4vw, 3.5rem); padding-top: clamp(3rem, 7vw, 7rem); }
.tt-intro__count { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; margin: 0; }
.tt-intro__count .display-xl { letter-spacing: -0.07em; line-height: 0.85; }
.tt-intro__copy { display: grid; gap: 2.5rem; }
/* Intro paragraphs stacked, stretched across the full width. */
.tt-intro__copy .prose { display: grid; row-gap: 1.1em; max-width: none; }
.tt-intro__copy .prose > * { margin: 0; }
.tt-intro__links { display: flex; flex-wrap: wrap; gap: 10px; }
/* Label above the title, both flush left (Trekkers page). */
.section-head--stacked { row-gap: 0.75rem; margin-bottom: clamp(1.25rem, 2.2vw, 2rem); }
.section-head--stacked .section-head__label { grid-column: 1 / -1; padding-top: 0; }
.section-head--stacked .section-head__title { grid-column: 1 / -1; }

.tt-reels { margin-top: var(--section); padding-bottom: var(--section); }
.tt-reels__text { margin-bottom: clamp(2rem, 4vw, 3.5rem); color: var(--muted); max-width: none; }

.series-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
/* Rows of 3, filled left to right so photos stay in number order. */
.masonry { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.masonry[hidden] { display: none; }
.masonry__item { margin: 0; overflow: hidden; border-radius: 2px; aspect-ratio: 3 / 2; background: var(--surface); } /* soft placeholder while a photo loads */
.masonry__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.masonry__item .lightbox-link { height: 100%; }
.masonry__item:hover img { transform: scale(1.03); }
@media (max-width: 900px) { .masonry { grid-template-columns: repeat(2, 1fr); } }

/* 15. Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	/* Headline lines rise into view */
	.js [data-reveal-lines] .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
	.js [data-reveal-lines] .line__inner { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
	.js [data-reveal-lines].is-in .line__inner { transform: none; }
	/* Hero headline: the sans words stay put; the italic words (see, feel, remember) fade up one after another, 0.2s apart.
	   Transforms only, so nothing around them shifts. */
	.js .hero__title .line__inner { transform: none; transition: none; }
	.js .hero__title em.serif { opacity: 0; transform: translateY(0.28em); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(0.35s + var(--w, 0) * 0.2s); will-change: opacity, transform; }
	.js .hero__title.is-in em.serif { opacity: 1; transform: none; }
	/* Home divider lines draw in from left to right */
	.js .home [data-line] { border-color: transparent !important; background-repeat: no-repeat; background-size: 0% 1px; transition: background-size 1.2s cubic-bezier(0.65, 0, 0.35, 1); }
	.js .home [data-line="top"] { background-image: linear-gradient(var(--line), var(--line)); background-position: left top; }
	.js .home [data-line="bottom"] { background-image: linear-gradient(var(--line), var(--line)); background-position: left bottom; }
	.js .home .trekkers-band__stats[data-line] { background-image: linear-gradient(rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.18)); }
	.js .home [data-line].is-in { background-size: 100% 1px; }
	.js .home .expertise__item[data-line] { transition: background-size 1.2s cubic-bezier(0.65, 0, 0.35, 1), padding 0.6s var(--ease); }
	/* Rotator: current phrase slides up and fades out while the next slides up into place */
	.js .rotator__item { transform: translateY(70%); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
	.js .rotator__item.is-active { transform: none; }
	.js .rotator__item.is-leaving { opacity: 0; transform: translateY(-70%); }
	/* About card: "real things" pops into place once "Hi, I'm Kaylee." has finished typing (~0.65s), with a beat to read it */
	.js .about-top__card-heading em.serif { display: inline-block; opacity: 0; transform: translateY(0.35em) scale(0.55); transform-origin: 50% 80%; transition: opacity 0.4s ease, transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: 1.4s; }
	.js .about-top__card.is-in .about-top__card-heading em.serif { opacity: 1; transform: none; }
	/* Photo group: each picture appears as you scroll (order set in scrollGroups) */
	.js [data-reveal-group]:not([data-wipe-reveal]) > * { opacity: 0; transform: translateY(14px) scale(0.97); transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
	.js [data-reveal-group]:not([data-wipe-reveal]) > .is-in { opacity: 1; transform: none; }
	/* Photography grid: each photo fades and rises in once loaded, staggered across the row */
	.js .masonry__item img { opacity: 0; transform: translateY(18px) scale(1.03); transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--i, 0) * 80ms); }
	.js .masonry__item.is-loaded img { opacity: 1; transform: none; }
	.js .masonry__item.is-loaded:hover img { transform: scale(1.03); transition-delay: 0s; }
	/* Trekkers photos wipe in from left to right as each one's turn comes (order set in scrollGroups) */
	.js [data-wipe-reveal] > * img { clip-path: inset(0 100% 0 0); transform: scale(1.08); transform-origin: left center; transition: clip-path 1s cubic-bezier(0.77, 0, 0.18, 1), transform 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
	.js [data-wipe-reveal] > .is-in img { clip-path: inset(0 0 0 0); transform: none; }
	/* CTA: letters type out one at a time, then the button rises in */
	.js [data-reveal-words] .word { display: inline-block; white-space: nowrap; }
	.js [data-reveal-words] .char { opacity: 0; transition: opacity 0.06s linear; transition-delay: calc(var(--i) * 0.045s); }
	.js [data-reveal-words].is-in .char { opacity: 1; }
	.js [data-reveal-words] .cta__action { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
	.js [data-reveal-words].is-in .cta__action { opacity: 1; transform: none; transition-delay: calc(var(--chars, 30) * 0.045s + 0.2s); }
	.js [data-reveal-lines].is-in .line:nth-child(2) .line__inner { transition-delay: 0.08s; }
	.js [data-reveal-lines].is-in .line:nth-child(3) .line__inner { transition-delay: 0.16s; }
	.js [data-reveal-lines].is-in .line:nth-child(4) .line__inner { transition-delay: 0.24s; }

	/* Blocks fade up; images unmask */
	.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
	.js [data-reveal].is-in { opacity: 1; transform: none; }
	/* The observed element stays fully visible (Chrome's IntersectionObserver ignores fully clipped targets);
	   the unmask is applied to its children instead. */
	.js .card__media[data-reveal], .js .case-hero__media[data-reveal], .js .cs-media[data-reveal], .js .trekkers-band__img[data-reveal], .js .masonry__item[data-reveal] { opacity: 1; transform: none; }
	.js .card__media[data-reveal] > *, .js .case-hero__media[data-reveal] > *, .js .cs-media[data-reveal] > *, .js .trekkers-band__img[data-reveal] > *, .js .masonry__item[data-reveal] > * {
		clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease), transform 1.4s var(--ease), opacity 0.6s var(--ease);
	}
	.js .card__media[data-reveal].is-in > *, .js .case-hero__media[data-reveal].is-in > *, .js .cs-media[data-reveal].is-in > *, .js .trekkers-band__img[data-reveal].is-in > *, .js .masonry__item[data-reveal].is-in > * { clip-path: inset(0 0 0 0); }
	.js .case-hero__media[data-reveal] img { transform: scale(1.12); transition: clip-path 1.3s var(--ease), transform 2s var(--ease); }
	.js .case-hero__media[data-reveal].is-in img { transform: none; }

	/* Giant footer name: letters rise one after another */
	.js .giant-name__ch { transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 35ms); }
	.js .giant-name.is-in .giant-name__ch { transform: none; }

	/* Soft page transition */
	body { animation: kj-page-in 0.7s var(--ease) both; }
	body.is-leaving { opacity: 0; transition: opacity 0.3s var(--ease); }
	@keyframes kj-page-in { from { opacity: 0; } to { opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 16. Utilities ----------------------------------------------------------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
