/* ==========================================================================
   amcmahon.co.uk: site stylesheet
   Layout and flow inspired by brand.dropbox.com: a calm paper / near-black
   base, colour saved for tiles, separate rounded tiles on a 10px gap,
   medium-weight grotesk type and quick, eased transitions.
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
	--font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

	--paper: #f6f4ef;
	--paper-2: #ece8df;
	--ink: #16131f;
	--ink-2: #4b4658;
	--line: #d8d2c6;
	--night: #14111c;
	--night-2: #221d2e;

	/* Brand palette, used on tiles and accents */
	--purple: #3a0ca3;
	--blue: #4361ee;
	--violet: #7209b7;
	--pink: #f72585;
	--cyan: #4cc9f0;
	--sun: #fbda61;
	--mint: #23d5ab;

	--margin: clamp(16px, 6vw, 120px);
	--gap: 10px;
	--radius: 14px;
	--radius-lg: 22px;
	--header-h: 72px;
	--ease: cubic-bezier(0.4, 0, 0.2, 1);
	--t: 0.35s var(--ease);
	--measure: 44rem;
}

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	font-weight: 400;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.page-home {
	background: var(--night);
	color: #fff;
}

body.menu-open {
	overflow: hidden;
}

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

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

a:hover {
	text-decoration-thickness: 2px;
}

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

::selection {
	background: var(--purple);
	color: #fff;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.015em;
	margin: 2.5rem 0 0.75rem;
	color: inherit;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.05rem; margin-top: 1.5rem; }

p {
	margin: 0 0 1.1rem;
}

ul,
ol {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
}

li {
	margin-bottom: 0.4rem;
}

li::marker {
	color: var(--purple);
}

strong,
b {
	font-weight: 600;
}

em,
i {
	font-style: italic;
}

blockquote {
	margin: 0 0 1rem;
}

[hidden] {
	display: none !important;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: var(--margin);
	top: -100px;
	z-index: 300;
	background: var(--ink);
	color: #fff;
	padding: 0.6rem 1rem;
	border-radius: 8px;
}

.skip-link:focus {
	top: 0.75rem;
}

/* Gentle page fade-in in place of the old wipe transition */
@keyframes page-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

main {
	animation: page-in 0.6s var(--ease) both;
}

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

.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 var(--margin);
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--t), background-color var(--t);
}

.page-home .site-header {
	background: color-mix(in srgb, var(--night) 82%, transparent);
	color: #fff;
}

.site-header.is-scrolled {
	border-bottom-color: var(--line);
}

.page-home .site-header.is-scrolled {
	border-bottom-color: var(--night-2);
}

.wordmark {
	font-weight: 600;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	text-decoration: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
}

/* Monogram mark: matches the "am" favicon (rounded square, purple to blue).
   The span is empty in the HTML; the letters come from ::after. */
.wordmark__dot {
	position: relative;
	flex: none;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 0.55rem;
	background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 55%, var(--cyan) 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
	transition: transform var(--t);
}

.wordmark__dot::after {
	content: "am";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding-bottom: 0.1em;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1;
}

.wordmark:hover .wordmark__dot {
	transform: rotate(-8deg) scale(1.06);
}

.site-header__nav {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.site-header__link {
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	transition: background-color var(--t);
}

.site-header__link:hover {
	background: color-mix(in srgb, currentColor 10%, transparent);
}

.menu-button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font: 500 0.95rem/1 var(--font);
	color: #fff;
	background: var(--ink);
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.1rem;
	margin-left: 0.5rem;
	cursor: pointer;
	transition: background-color var(--t), transform var(--t);
}

.page-home .menu-button {
	background: #fff;
	color: var(--ink);
}

.menu-button:hover {
	background: var(--purple);
	color: #fff;
}

.menu-button__icon {
	display: inline-grid;
	gap: 4px;
}

.menu-button__icon span {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

/* ==========================================================================
   Menu overlay (tile menu)
   ========================================================================== */

.site-menu {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: var(--night);
	color: #fff;
	overflow-y: auto;
	padding: 0 var(--margin) 2rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--t), visibility 0s linear 0.35s;
}

.site-menu.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--t), visibility 0s;
}

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

.site-menu__close {
	font: 500 0.95rem/1 var(--font);
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: #fff;
	color: var(--ink);
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.1rem;
	cursor: pointer;
}

.site-menu__close:hover {
	background: var(--sun);
}

.site-menu__close span {
	font-size: 1.3rem;
	line-height: 0.6;
}

.site-menu__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--gap);
	margin-top: 1rem;
}

.menu-tile {
	border-radius: var(--radius);
	padding: 1.5rem;
	min-height: 18rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transform: translateY(16px);
	opacity: 0;
	transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}

.site-menu.is-open .menu-tile {
	transform: none;
	opacity: 1;
}

.site-menu.is-open .menu-tile:nth-child(2) { transition-delay: 0.04s; }
.site-menu.is-open .menu-tile:nth-child(3) { transition-delay: 0.08s; }
.site-menu.is-open .menu-tile:nth-child(4) { transition-delay: 0.12s; }
.site-menu.is-open .menu-tile:nth-child(5) { transition-delay: 0.16s; }

.menu-tile--wide {
	grid-column: span 2;
	grid-row: span 2;
}

.menu-tile h2 {
	font-size: clamp(1.5rem, 2.4vw, 2.25rem);
	font-weight: 500;
	margin: 0 0 1.25rem;
}

.menu-tile h3 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 1rem 0 0.25rem;
	opacity: 0.75;
}

.menu-tile ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.menu-tile li {
	margin: 0;
	border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}

.menu-tile li:last-child {
	border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}

.menu-tile a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.55rem 0;
	text-decoration: none;
	font-weight: 500;
	line-height: 1.3;
	transition: padding var(--t);
}

.menu-tile a::after {
	content: "→";
	transition: transform var(--t);
}

.menu-tile a:hover {
	padding-left: 0.4rem;
}

.menu-tile a:hover::after {
	transform: translateX(0.25rem);
}

.menu-tile a[aria-current="page"] {
	font-weight: 700;
}

.menu-tile a[aria-current="page"]::after {
	content: "●";
	font-size: 0.6rem;
}

.menu-tile__cols {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1.5rem;
}

/* ==========================================================================
   Colour utilities (tiles, menu tiles)
   White text on dark colours; ink text on light ones for contrast.
   ========================================================================== */

.c-purple { background: var(--purple); color: #fff; }
.c-blue   { background: var(--blue);   color: #fff; }
.c-violet { background: var(--violet); color: #fff; }
.c-pink   { background: var(--pink);   color: var(--ink); }
.c-cyan   { background: var(--cyan);   color: var(--ink); }
.c-sun    { background: var(--sun);    color: var(--ink); }
.c-mint   { background: var(--mint);   color: var(--ink); }
.c-paper  { background: var(--paper);  color: var(--ink); }
.c-night  { background: var(--night-2); color: #fff; }

/* ==========================================================================
   Layout scaffolding
   ========================================================================== */

.wrap {
	padding-left: var(--margin);
	padding-right: var(--margin);
}

.site-main {
	padding-top: var(--header-h);
}

/* ==========================================================================
   Tiles
   ========================================================================== */

.tile-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: minmax(18rem, auto);
	gap: var(--gap);
}

.tile-grid--home {
	grid-template-areas:
		"ecom    ecom   games  games"
		"ecom    ecom   apps   brand"
		"design  ux     apps   showcase"
		"endorse about  contact contact";
}

.tile-grid--home .t-ecom     { grid-area: ecom; }
.tile-grid--home .t-games    { grid-area: games; }
.tile-grid--home .t-apps     { grid-area: apps; }
.tile-grid--home .t-brand    { grid-area: brand; }
.tile-grid--home .t-design   { grid-area: design; }
.tile-grid--home .t-ux       { grid-area: ux; }
.tile-grid--home .t-showcase { grid-area: showcase; }
.tile-grid--home .t-endorse  { grid-area: endorse; }
.tile-grid--home .t-about    { grid-area: about; }
.tile-grid--home .t-contact  { grid-area: contact; }

.tile-grid--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: minmax(24rem, auto);
}

.tile-grid--pager {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: minmax(10rem, auto);
}

.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	overflow: hidden;
	isolation: isolate;
	text-decoration: none;
	transition: transform var(--t), box-shadow var(--t), opacity 0.6s var(--ease);
}

/* default colour when a tile has no c-* utility */
.tile:not([class*="c-"]) {
	background: var(--paper);
	color: var(--ink);
}

a.tile:hover,
.tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
}

/* reveal on scroll (class added by site.js) */
.js-reveal .tile-grid > .tile {
	opacity: 0;
	transform: translateY(24px);
}

.js-reveal .tile-grid > .tile.is-in {
	opacity: 1;
	transform: none;
}

.js-reveal .tile-grid > .tile.is-in:hover {
	transform: translateY(-4px);
}

.tile__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.tile__num {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	opacity: 0.8;
}

.tile__badge {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	background: var(--sun);
	color: var(--ink);
	padding: 0.4rem 0.6rem;
	border-radius: 999px;
}

/* .tile__body stays unpositioned so a title link's ::before can cover the
   whole tile; media and shapes sit on z-index -1 underneath it. */

.tile__title {
	font-size: clamp(1.5rem, 2.3vw, 2.25rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
	color: inherit;
}

.tile--xl .tile__title {
	font-size: clamp(2rem, 3.8vw, 3.75rem);
}

.tile__title a {
	text-decoration: none;
}

.tile__title a::before {
	/* whole tile is the click target for the title link */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
}

.tile__title a:hover {
	text-decoration: underline;
}

.tile__text {
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0.5rem 0 0;
	max-width: 34ch;
	opacity: 0.9;
}

.tile__arrow {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 1.5rem;
	line-height: 1;
	transition: transform var(--t);
}

.tile:hover .tile__arrow {
	transform: translateX(0.4rem);
}

.tile__links {
	list-style: none;
	padding: 0;
	margin: 1rem 0 0;
	position: relative;
	z-index: 2;
}

.tile__links li {
	margin: 0;
	border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.tile__links li:last-child {
	border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.tile__links a {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 0;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: padding var(--t);
}

.tile__links a::after {
	content: "→";
	transition: transform var(--t);
}

.tile__links a:hover {
	padding-left: 0.4rem;
}

.tile__links a:hover::after {
	transform: translateX(0.25rem);
}

/* Media thumbnail
   Sits in the normal flow (between the top row and the body) so it can
   never cover the copy, whatever the tile's size. z-index -1 keeps it under
   the title link's full-tile click target. */
.tile__media {
	position: relative;
	z-index: -1;
	align-self: flex-end;
	flex: none;
	width: 46%;
	aspect-ratio: 4 / 3;
	/* pull up level with the "01 / Case studies" label, which sits on the left */
	margin-top: -2.15rem;
	margin-bottom: auto;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
	transform: rotate(2deg);
	transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.tile:hover .tile__media {
	transform: rotate(-3deg) scale(1.04);
}

.tile--xl .tile__media { width: 62%; }
.tile--compact .tile__media { width: 40%; }

/* Wide tiles: copy on the left, image on the right, in their own columns */
.tile--wide:has(.tile__media) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 44%);
	grid-template-rows: auto 1fr;
	column-gap: 2rem;
	row-gap: 1.25rem;
}

.tile--wide:has(.tile__media) .tile__top { grid-column: 1; grid-row: 1; }
.tile--wide:has(.tile__media) .tile__body { grid-column: 1; grid-row: 2; align-self: end; }
.tile--wide .tile__media {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	width: 100%;
	margin: 0;
}

/* Illustrations */
.tile__shape {
	position: absolute;
	z-index: -1;
	top: 1.25rem;
	right: 1.25rem;
	width: 7rem;
	height: 7rem;
}

.tile__shape span {
	position: absolute;
	transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), background-color var(--t);
}

.shape-circles span { border-radius: 50%; }
.shape-circles span:nth-child(1) { inset: 0 2rem 2rem 0; background: var(--sun); }
.shape-circles span:nth-child(2) { inset: 2rem 0 0 2rem; background: #fff; mix-blend-mode: overlay; }
.tile:hover .shape-circles span:nth-child(1) { transform: translate(1rem, 1rem); }
.tile:hover .shape-circles span:nth-child(2) { transform: translate(-1rem, -1rem); }

.shape-quote {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 9rem;
	line-height: 1;
	font-weight: 700;
	text-align: right;
	opacity: 0.9;
	transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tile:hover .shape-quote { transform: rotate(-12deg) scale(1.1); }

.shape-doc span {
	border-radius: 8px;
	width: 4.5rem;
	height: 6rem;
	border: 2px solid currentColor;
}
.shape-doc span:nth-child(1) { right: 0; top: 0; background: var(--paper); }
.shape-doc span:nth-child(2) { right: 1rem; top: 0.75rem; background: var(--sun); }
.tile:hover .shape-doc span:nth-child(1) { transform: rotate(12deg) translate(0.5rem, -0.25rem); }
.tile:hover .shape-doc span:nth-child(2) { transform: rotate(-8deg); }

.shape-bubble span:nth-child(1) {
	inset: 0;
	border-radius: 2rem 2rem 2rem 0.25rem;
	background: var(--paper);
}
.shape-bubble span:nth-child(2) {
	width: 0.9rem; height: 0.9rem; top: 3rem; left: 1.4rem; border-radius: 50%;
	background: var(--blue);
	box-shadow: 1.6rem 0 0 var(--blue), 3.2rem 0 0 var(--blue);
}
.tile:hover .shape-bubble span:nth-child(1) { transform: scale(1.1) rotate(-6deg); }

.shape-phones { width: 9rem; height: 11rem; }
.shape-phones span {
	border-radius: 1.1rem;
	width: 5rem;
	height: 9.5rem;
	border: 3px solid var(--ink);
}
.shape-phones span::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 0.4rem;
	width: 1.5rem;
	height: 0.35rem;
	border-radius: 999px;
	background: var(--ink);
	transform: translateX(-50%);
}
.shape-phones span:nth-child(1) { left: 0; top: 1rem; background: var(--cyan); transform: rotate(-8deg); }
.shape-phones span:nth-child(2) { right: 0; top: 0; background: var(--sun); transform: rotate(6deg); }
.tile:hover .shape-phones span:nth-child(1) { transform: rotate(-16deg) translate(-0.5rem, 0.5rem); background: var(--pink); }
.tile:hover .shape-phones span:nth-child(2) { transform: rotate(12deg) translate(0.5rem, -0.5rem); }

/* ==========================================================================
   Homepage
   ========================================================================== */

.home-intro {
	min-height: calc(88vh - var(--header-h));
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-top: 4rem;
	padding-bottom: 3rem;
}

.home-intro__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cyan);
	margin: 0 0 1.5rem;
}

.home-intro__eyebrow::before {
	content: "";
	width: 2.5rem;
	height: 2px;
	background: currentColor;
}

.home-intro__title {
	font-size: clamp(2.6rem, 7.5vw, 7.5rem);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.04em;
	margin: 0;
	max-width: 15ch;
}

.home-intro__title span {
	color: var(--sun);
}

.home-intro__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2rem;
	align-items: end;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--night-2);
}

.home-intro__lede {
	font-size: clamp(1.1rem, 1.6vw, 1.35rem);
	line-height: 1.45;
	color: #cfcadb;
	margin: 0;
	max-width: 36ch;
}

.home-intro__cta {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 500;
	text-decoration: none;
	padding: 0.8rem 1.25rem;
	border-radius: 999px;
	border: 1px solid currentColor;
	transition: background-color var(--t), color var(--t), border-color var(--t);
}

.pill:hover {
	background: #fff;
	color: var(--ink);
	border-color: #fff;
}

.pill--solid {
	background: var(--sun);
	color: var(--ink);
	border-color: var(--sun);
}

.section-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	margin: 0 0 1rem;
	opacity: 0.75;
}

.home-work {
	padding-bottom: var(--gap);
}

/* Client logos */
.logo-strip {
	margin-top: 5rem;
	padding: 2.5rem 0;
	border-top: 1px solid var(--night-2);
	border-bottom: 1px solid var(--night-2);
	overflow: hidden;
}

/* Two identical sets of logos; moving the track by exactly half its width
   loops seamlessly. Spacing is padding on each item (not flex gap) so the
   halves are exactly equal. */
.logo-strip__track {
	--logo-gap: 4.5rem;
	display: flex;
	align-items: center;
	width: max-content;
	animation: logo-scroll 45s linear infinite;
	list-style: none;
	margin: 0;
	padding: 0;
}

.logo-strip__track li {
	margin: 0;
	padding-right: var(--logo-gap);
	flex: none;
}

.logo-strip__track img {
	height: 3.25rem;
	width: auto;
	opacity: 0.75;
	transition: opacity var(--t);
}

.logo-strip:hover .logo-strip__track {
	animation-play-state: paused;
}

.logo-strip__track img:hover {
	opacity: 1;
}

@keyframes logo-scroll {
	to { transform: translateX(-50%); }
}

/* ==========================================================================
   Inner pages: page header (built from the existing .hero markup)
   ========================================================================== */

.page-inner .hero {
	padding: calc(var(--header-h) + clamp(3rem, 8vw, 7rem)) var(--margin) clamp(2rem, 4vw, 3.5rem);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(2rem, 5vw, 4rem);
}

.page-inner .hero_space {
	display: none;
}

/* "Case Study:" style label + big title in a span */
.page-inner .hero h1 {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2;
	margin: 0;
	color: var(--violet);
}

.page-inner .hero h1 br {
	display: none;
}

.page-inner .hero h1 .font-creative,
.page-inner .hero h1.font-creative {
	display: block;
	margin-top: 1rem;
	font-size: clamp(2.6rem, 7vw, 6.5rem);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.04em;
	text-transform: none;
	color: var(--ink);
	max-width: 18ch;
}

.page-inner .hero h1.font-creative {
	margin-top: 0;
}

/* Titles with no separate big part (e.g. "Contact Me", "My Resume") */
.page-inner .hero h1:not(:has(.font-creative)) {
	font-size: clamp(2.6rem, 7vw, 6.5rem);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.04em;
	text-transform: none;
	color: var(--ink);
}

.page-inner .hero h2 {
	font-size: clamp(1.1rem, 1.6vw, 1.35rem);
	font-weight: 400;
	color: var(--ink-2);
	margin: 1.25rem 0 0;
}

/* section headings inside a page (Creative Showcase) */
.page-inner .hero.hero-title {
	padding: 0;
	margin: clamp(3rem, 6vw, 5rem) var(--margin) 1.5rem;
	border-bottom: 0;
	border-top: 1px solid var(--line);
}

.page-inner .hero.hero-title h2 {
	font-size: clamp(1.6rem, 3vw, 2.5rem);
	font-weight: 500;
	color: var(--ink);
	margin: 1.25rem 0 0;
}

/* ==========================================================================
   Inner pages: content (existing .panel / .frow markup)
   ========================================================================== */

.panel-wrapper {
	padding: 0 var(--margin);
}

.panel-wrapper > .panel {
	width: 100%;
}

.panel-copy {
	max-width: var(--measure);
	margin: 0 auto 3rem;
}

.panel-copy > h2:first-child,
.panel-copy > .copy-image-holder:first-child + h2 {
	margin-top: 0;
}

.panel-copy h2 {
	margin-top: 3.5rem;
}

.panel-copy h3 {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.panel-copy h4 {
	margin-top: 1.75rem;
}

.panel-copy p,
.panel-copy li {
	color: #2b2735;
}

/* Images inside copy run wider than the text column */
.copy-image-holder {
	margin: 2rem 0;
}

.copy-image-holder img,
.copy-image-holder video {
	width: 100%;
	border-radius: var(--radius);
	background: var(--paper-2);
}

.copy-image-holder.no-margin {
	margin: 0;
}

@media (min-width: 1100px) {
	.panel-copy > .copy-image-holder {
		margin-left: -8rem;
		margin-right: -8rem;
	}
}

/* Project details / skills panels become bordered cards */
.panel-copy .frow.gutters {
	margin: 2.5rem 0;
}

.panel-copy .frow.gutters > .panel {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem;
	background: #fff;
}

.panel-copy .frow.gutters > .panel h4 {
	margin-top: 0;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--violet);
}

.panel-copy .frow.gutters > .panel ul {
	margin-bottom: 0;
}

/* Logo/icon rows (e.g. software icons) stay plain */
.panel-copy .frow.gutters > .panel:has(> img:only-child) {
	border: 0;
	background: none;
	padding: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Quotes / endorsements */
.panel-copy blockquote {
	position: relative;
	background: #fff !important;
	border-radius: var(--radius);
	padding: 3.5rem 2rem 1.25rem;
	font-size: 1.15rem;
	line-height: 1.55;
	margin: 0 0 1rem;
}

.panel-copy blockquote::before {
	content: "\201C";
	position: absolute;
	top: -0.35rem;
	right: 1.25rem;
	font-family: Georgia, serif;
	font-size: 6rem;
	line-height: 1;
	color: var(--pink);
}

.panel-copy blockquote + div {
	margin-bottom: 1rem;
	padding-left: 2rem;
	line-height: 1.4;
}

.panel-copy blockquote + div em {
	font-style: normal;
	color: var(--ink-2);
	font-size: 0.95rem;
}

/* ---------- Simple fraction grid (replaces the frow CDN) ---------- */

.frow {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	width: 100%;
}

.frow.gutters {
	gap: var(--gap);
}

.frow > * {
	--g: 0px;
	flex: 0 0 100%;
	max-width: 100%;
	min-width: 0;
}

.frow.gutters > * {
	--g: var(--gap);
}

@media (min-width: 576px) {
	.frow > .col-sm-1-2 { flex-basis: calc(50% - var(--g, 0px) / 2); max-width: calc(50% - var(--g, 0px) / 2); }
	.frow > .col-sm-1-3 { flex-basis: calc(33.333% - var(--g, 0px) * 2 / 3); max-width: calc(33.333% - var(--g, 0px) * 2 / 3); }
	.frow > .col-sm-1-6 { flex-basis: calc(16.666% - var(--g, 0px) * 5 / 6); max-width: calc(16.666% - var(--g, 0px) * 5 / 6); }
}

.frow > .col-xs-1-3 { flex-basis: calc(33.333% - var(--g, 0px) * 2 / 3); max-width: calc(33.333% - var(--g, 0px) * 2 / 3); }

@media (min-width: 768px) {
	.frow > .col-md-1-1 { flex-basis: 100%; max-width: 100%; }
	.frow > .col-md-1-2 { flex-basis: calc(50% - var(--g, 0px) / 2); max-width: calc(50% - var(--g, 0px) / 2); }
	.frow > .col-md-1-3 { flex-basis: calc(33.333% - var(--g, 0px) * 2 / 3); max-width: calc(33.333% - var(--g, 0px) * 2 / 3); }
	.frow > .col-md-1-4 { flex-basis: calc(25% - var(--g, 0px) * 3 / 4); max-width: calc(25% - var(--g, 0px) * 3 / 4); }
	.frow > .col-md-1-5 { flex-basis: calc(20% - var(--g, 0px) * 4 / 5); max-width: calc(20% - var(--g, 0px) * 4 / 5); }
	.frow > .col-md-1-6 { flex-basis: calc(16.666% - var(--g, 0px) * 5 / 6); max-width: calc(16.666% - var(--g, 0px) * 5 / 6); }
}

@media (min-width: 992px) {
	.frow > .col-lg-1-3 { flex-basis: calc(33.333% - var(--g, 0px) * 2 / 3); max-width: calc(33.333% - var(--g, 0px) * 2 / 3); }
}

.mt-0 { margin-top: 0 !important; }
.mt-30 { margin-top: 1.875rem; }
.mt-60 { margin-top: 3.75rem; }
.mb-10 { margin-bottom: 0.625rem; }
.mb-20 { margin-bottom: 1.25rem; }
.mb-30 { margin-bottom: 1.875rem; }
.mr-10 { margin-right: 0.5rem; }

/* ==========================================================================
   Creative Showcase galleries
   ========================================================================== */

.panel-imagery {
	padding: 0;
}

.panel-imagery > .frow.gutters > .panel {
	position: relative;
}

.panel-video .m-3,
.panel-content-preview {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
	color: var(--ink);
	text-decoration: none;
	height: 100%;
}

.panel-video a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.panel-video video {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.panel-content-preview {
	aspect-ratio: 4 / 3;
	background-color: #fff;
	background-size: 55% auto;
	background-position: 50% 42%;
	background-repeat: no-repeat;
	border: 1px solid var(--line);
	transition: transform var(--t), box-shadow var(--t);
}

.panel-content-preview:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}

/* photo thumbnails (not logos) fill the card */
.panel-content-preview[style*="print-irl"],
.panel-content-preview[style*="/img/bb/"] {
	background-size: cover;
	background-position: 50% 50%;
}

.panel-label {
	position: absolute;
	left: 0.75rem;
	right: 0.75rem;
	bottom: 0.75rem;
	background: var(--ink);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.3;
	padding: 0.55rem 0.8rem;
	border-radius: 10px;
}

.panel-video .panel-label {
	position: static;
	border-radius: 0;
	background: #fff;
	color: var(--ink);
	padding: 0.9rem 1rem;
}

.panel-overlay {
	position: absolute;
	inset: 0 0 auto;
	aspect-ratio: 16 / 9;
	background: color-mix(in srgb, var(--purple) 92%, transparent);
	color: #fff;
	padding: 1.25rem;
	opacity: 0;
	transition: opacity var(--t);
	font-size: 0.95rem;
	line-height: 1.4;
}

.panel-overlay h4 {
	margin: 0 0 0.5rem;
	color: #fff;
}

.panel-overlay ul {
	margin: 0;
}

.panel-overlay li::marker {
	color: var(--sun);
}

.panel-video a:hover .panel-overlay,
.panel-video a:focus-visible .panel-overlay {
	opacity: 1;
}

/* ==========================================================================
   Lightbox (site.js)
   ========================================================================== */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 400;
	display: grid;
	place-items: center;
	padding: 4rem var(--margin) 2rem;
	background: rgba(20, 17, 28, 0.94);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--t), visibility 0s linear 0.35s;
}

.lightbox.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--t), visibility 0s;
}

.lightbox__stage {
	max-width: min(1200px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.lightbox__stage img,
.lightbox__stage video {
	max-height: calc(100vh - 9rem);
	width: auto;
	border-radius: var(--radius);
	object-fit: contain;
}

.lightbox__caption {
	color: #fff;
	text-align: center;
	max-width: 60ch;
	line-height: 1.4;
	margin: 0;
}

.lightbox__close {
	position: absolute;
	top: 1rem;
	right: var(--margin);
	font: 500 0.95rem/1 var(--font);
	background: #fff;
	color: var(--ink);
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.1rem;
	cursor: pointer;
}

/* ==========================================================================
   About (CV) and Contact
   ========================================================================== */

.pdf-container {
	width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--line);
}

.pdf-container object,
.pdf-container iframe {
	display: block;
	width: 100%;
	height: 80vh;
	border: 0;
}

.pdf-download {
	margin: 1.5rem 0;
}

.download-button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--ink);
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	padding: 0.8rem 1.3rem;
	border-radius: 999px;
	transition: background-color var(--t);
}

.download-button:hover {
	background: var(--purple);
}

.contact-form {
	display: grid;
	gap: 1.25rem;
	margin-top: 1.5rem;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
}

.contact-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1.25rem;
}

.field {
	display: grid;
	gap: 0.4rem;
}

.field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
	width: 100%;
	font: inherit;
	color: var(--ink);
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
	transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}

.field textarea {
	resize: vertical;
	min-height: 9rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--purple);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 20%, transparent);
}

.field [aria-invalid="true"] {
	border-color: var(--pink);
}

/* spam trap, kept off-screen rather than display:none so bots still see it */
.field--trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.button-primary {
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--ink);
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.6rem;
	cursor: pointer;
	transition: background-color var(--t), transform var(--t);
}

.button-primary:hover {
	background: var(--purple);
	transform: translateY(-2px);
}

.button-primary:disabled {
	opacity: 0.6;
	cursor: progress;
	transform: none;
}

.contact-form__status {
	margin: 0;
	font-weight: 500;
}

.contact-form__status.is-error { color: #c2185b; }
.contact-form__status.is-success { color: #0d7a5f; }

.contact-form.is-sent .field,
.contact-form.is-sent .contact-form__row,
.contact-form.is-sent .cf-turnstile,
.contact-form.is-sent .button-primary {
	display: none;
}

/* ==========================================================================
   App pages
   ========================================================================== */

.app-store-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0 1.5rem;
}

.store-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: var(--ink);
	color: #fff;
	padding: 0.6rem 1.1rem;
	border-radius: 12px;
	text-decoration: none;
	line-height: 1.1;
	transition: background-color var(--t), transform var(--t);
}

.store-badge:hover {
	background: var(--purple);
	transform: translateY(-2px);
}

.store-badge i {
	font-size: 1.6rem;
}

.store-badge small {
	display: block;
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.store-badge strong {
	display: block;
	font-size: 1rem;
	font-weight: 600;
}

.app-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: var(--gap);
	margin: 1.5rem 0;
}

.app-meta > div {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
}

.app-meta h4 {
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--violet);
	margin: 0 0 0.35rem;
}

.app-meta p {
	margin: 0;
	line-height: 1.4;
}

.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	gap: var(--gap);
	margin: 1rem 0 1.5rem;
}

.screenshot-grid a,
.screenshot-grid .shot-slot {
	display: block;
	aspect-ratio: 9 / 19.5;
	border-radius: 1.25rem;
	overflow: hidden;
	background: var(--paper-2);
}

.screenshot-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.app-hero-slot {
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	background: linear-gradient(135deg, #e9e3f6, #dcf2f9);
	margin-bottom: 1rem;
}

.app-icon {
	width: 5rem;
	height: 5rem;
	border-radius: 1.2rem;
	background: linear-gradient(135deg, var(--cyan), var(--violet));
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.5rem;
	margin: 0 0 1rem;
}

img.app-icon {
	background: none;
	object-fit: cover;
	box-shadow: 0 6px 18px rgba(22, 19, 31, 0.18);
}

.app-hero {
	margin: 0 0 1.5rem;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--night);
}

.app-hero img {
	width: 100%;
}

.app-lede {
	font-size: 1.2rem;
	line-height: 1.5;
	color: var(--ink-2);
}

.store-badge--soon {
	background: var(--paper-2);
	color: var(--ink);
	cursor: default;
}

.store-badge--soon:hover {
	background: var(--paper-2);
	transform: none;
}

.store-badge--site {
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--line);
}

.store-badge--site:hover {
	background: var(--sun);
}

.screenshot-grid--landscape {
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.screenshot-grid--landscape a {
	aspect-ratio: 2868 / 1320;
	border-radius: var(--radius);
}

.screenshot-grid a {
	transition: transform var(--t), box-shadow var(--t);
}

.screenshot-grid a:hover,
.screenshot-grid a:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(22, 19, 31, 0.18);
}

/* Placeholder content waiting for real copy / imagery.
   Remove the "placeholder" class once real content is in. */
.placeholder {
	outline: 2px dashed var(--pink);
	outline-offset: 4px;
	border-radius: 4px;
}

.shot-slot.placeholder,
.app-hero-slot.placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1rem;
	color: var(--violet);
	font-size: 0.85rem;
	line-height: 1.3;
}

/* Tile sections on inner pages */
.grid-section {
	padding: 0 var(--margin);
	margin: 0 0 3rem;
}

/* ==========================================================================
   Pager (previous / next)
   ========================================================================== */

.case-pager {
	padding: 0 var(--margin);
	margin: 4rem 0 var(--gap);
}

.case-pager .tile__title {
	font-size: clamp(1.25rem, 2vw, 2rem);
}

.case-pager .tile--next {
	text-align: right;
	align-items: flex-end;
}

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

.site-footer {
	background: var(--night);
	color: #fff;
	padding: clamp(3rem, 7vw, 6rem) var(--margin) 2rem;
	margin-top: var(--gap);
}

.page-home .site-footer {
	margin-top: 0;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 2rem 3rem;
	align-items: end;
}

.site-footer__heading {
	font-size: clamp(2.5rem, 6.5vw, 6rem);
	font-weight: 500;
	line-height: 0.95;
	letter-spacing: -0.04em;
	margin: 0;
}

.site-footer__heading span {
	color: var(--sun);
}

.site-footer__text {
	color: #cfcadb;
	margin: 0 0 1.25rem;
	line-height: 1.5;
}

.site-footer__links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.site-footer__links li {
	margin: 0;
	border-top: 1px solid var(--night-2);
}

.site-footer__links li:last-child {
	border-bottom: 1px solid var(--night-2);
}

.site-footer__links a {
	display: flex;
	justify-content: space-between;
	padding: 0.8rem 0;
	font-weight: 500;
	text-decoration: none;
	transition: color var(--t), padding var(--t);
}

.site-footer__links a::after {
	content: "→";
}

.site-footer__links a:hover {
	color: var(--sun);
	padding-left: 0.4rem;
}

.site-footer__small {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: clamp(3rem, 6vw, 5rem);
	font-size: 0.85rem;
	color: #9c96ab;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.tile-grid--home {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-areas:
			"ecom    ecom"
			"games   games"
			"apps    brand"
			"apps    design"
			"ux      showcase"
			"endorse about"
			"contact contact";
	}

	.tile-grid--home .t-ecom {
		min-height: 28rem;
	}

	.site-menu__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-footer__grid,
	.home-intro__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.home-intro__cta {
		justify-content: flex-start;
	}
}

@media (max-width: 760px) {
	.site-header__link {
		display: none;
	}
}

@media (max-width: 620px) {
	:root {
		--header-h: 64px;
	}

	body {
		font-size: 1rem;
	}

	.tile-grid,
	.tile-grid--home,
	.tile-grid--two,
	.tile-grid--pager,
	.site-menu__grid {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: none;
		grid-auto-rows: auto;
	}

	.tile-grid--home > .tile {
		grid-area: auto;
	}

	.tile--wide:has(.tile__media) {
		display: flex;
	}

	.tile__media,
	.tile--xl .tile__media,
	.tile--compact .tile__media {
		width: 72%;
		margin-top: 0;
	}

	.menu-tile--wide {
		grid-column: auto;
		grid-row: auto;
	}

	.menu-tile {
		min-height: 0;
	}

	.menu-tile__cols {
		grid-template-columns: minmax(0, 1fr);
	}

	.tile {
		min-height: 16rem;
		padding: 1.25rem;
	}

	/* thumbnails sit in the flow above the title on phones */
	.tile__media,
	.tile--xl .tile__media,
	.tile--compact .tile__media,
	.tile--wide .tile__media,
	.tile--wide:hover .tile__media,
	.tile:hover .tile__media {
		position: relative;
		top: auto;
		right: auto;
		z-index: 0;
		width: 100%;
		aspect-ratio: 16 / 9;
		transform: none;
	}

	.tile--wide .tile__body {
		max-width: none;
	}

	/* illustrations too: right-aligned in the flow */
	.tile__shape {
		position: relative;
		top: auto;
		right: auto;
		align-self: flex-end;
		margin: -2.5rem 0 -0.5rem;
	}

	.tile-grid--home .t-ecom,
	.tile-grid--home .t-games,
	.tile-grid--home .t-apps {
		min-height: 0;
	}

	.case-pager .tile--next {
		text-align: left;
		align-items: flex-start;
	}

	.logo-strip__track {
		--logo-gap: 3rem;
	}

	.logo-strip__track img {
		height: 2.5rem;
	}

	.panel-copy blockquote {
		padding: 3.25rem 1.25rem 1rem;
	}

	.panel-copy blockquote + div {
		padding-left: 0;
	}
}

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

	.logo-strip__track {
		--logo-gap: 0;
		animation: none;
		flex-wrap: wrap;
		width: auto;
		justify-content: center;
		gap: 2rem 3rem;
	}

	.logo-strip__track li[aria-hidden="true"] {
		display: none;
	}
}

/* ==========================================================================
   About: experience timeline
   ========================================================================== */

.cv-timeline {
	list-style: none;
	margin: 1.5rem 0 2.5rem;
	padding: 0;
}

.cv-timeline > li {
	position: relative;
	margin: 0;
	padding: 0 0 2rem 2rem;
	border-left: 2px solid var(--line);
}

.cv-timeline > li:last-child {
	padding-bottom: 0;
	border-left-color: transparent;
}

.cv-timeline > li::before {
	content: "";
	position: absolute;
	left: -0.5rem;
	top: 0.2rem;
	width: 0.875rem;
	height: 0.875rem;
	border-radius: 50%;
	background: var(--paper);
	border: 3px solid var(--purple);
}

.cv-timeline > li:first-child::before {
	background: var(--purple);
}

.cv-timeline__when {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--violet);
	line-height: 1.4;
}

.cv-timeline h3 {
	margin: 0.25rem 0 0;
}

.cv-timeline h3 small {
	font-size: 0.6em;
	font-weight: 500;
	color: var(--ink-2);
}

.cv-timeline__role {
	margin: 0.1rem 0 0.5rem;
	font-weight: 600;
	color: var(--ink-2);
}

.cv-timeline ul {
	margin: 0;
}

.cv-skills {
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* Before / after pair on case studies */
.compare-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: var(--gap);
	margin: 1.5rem 0;
}

.compare-grid figure {
	margin: 0;
}

.compare-grid a {
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--paper-2);
	box-shadow: 0 10px 30px -18px rgba(22, 19, 31, 0.5);
	transition: transform var(--t);
}

.compare-grid a:hover {
	transform: translateY(-3px);
}

.compare-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.compare-grid figcaption {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: var(--ink-2);
}

/* Mosaic of crops: one wide shot, then two shots and a phone */
.shot-mosaic {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.55fr);
	gap: var(--gap);
	align-items: start;
	margin: 1.5rem 0;
}

.shot-mosaic figure {
	margin: 0;
}

.shot-mosaic__wide {
	grid-column: 1 / -1;
}

.shot-mosaic a {
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--paper-2);
	box-shadow: 0 10px 30px -18px rgba(22, 19, 31, 0.5);
	transition: transform var(--t);
}

.shot-mosaic a:hover {
	transform: translateY(-3px);
}

.shot-mosaic img {
	width: 100%;
}

/* phone screenshot gets a simple device frame */
.shot-mosaic__phone a {
	border: 6px solid var(--ink);
	border-radius: 1.6rem;
}

.shot-mosaic figcaption {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: var(--ink-2);
}

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

	.shot-mosaic__phone {
		grid-column: 1 / -1;
		justify-self: center;
		width: 60%;
	}
}
