/* Fonts (self-hosted, latin subset) */
@font-face {
	font-family: "Anton";
	src: url("/assets/fonts/anton-latin.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Manrope";
	src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	--ink: #111;
	--text: #343434;
	--muted: #5b5a5a;
	--line: #d9d9d9;
	--line-strong: #b0b0b0;
	--pill: #ececec;
	--bg: #fff;
	--gutter: clamp(16px, 2vw, 30px);
	--radius: 6px;
	--display: "Anton", Impact, "Arial Narrow", sans-serif;
	--body: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.45 var(--body);
	-webkit-font-smoothing: antialiased;
}
img, video, picture { display: block; max-width: 100%; }
img, video { width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }

/* Shared bits */
.wordmark {
	font: 16px/1 var(--display);
	text-transform: uppercase;
	color: var(--muted);
}
.pill {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--pill);
	color: var(--muted);
	font-size: 11px;
	line-height: 1.3;
	white-space: nowrap;
}
a.pill { transition: background-color .2s, color .2s; }
a.pill:hover { background: var(--text); color: var(--bg); }
.pill--outline { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Header & footer */
.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px var(--gutter);
}
.footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: 60px;
	padding: 60px var(--gutter) 90px;
	border-top: 1px solid var(--line);
}
.footer .wordmark { font-size: 28px; color: var(--ink); }

/* Home: hero */
.hero {
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: clamp(50px, 8vw, 110px) var(--gutter) clamp(50px, 6vw, 80px);
}
.hero__name {
	font: clamp(52px, 10vw, 140px)/1 var(--display);
	text-transform: uppercase;
	color: var(--ink);
	white-space: nowrap;
	letter-spacing: -.005em;
}
.hero__intro {
	max-width: 30em;
	margin: 24px 0 18px;
	font-size: clamp(16px, 1.35vw, 19px);
	line-height: 1.4;
	color: var(--ink);
}
.hero .pill { font-size: 13px; padding: 5px 16px; }

/* Home: skills marquee */
.marquee {
	overflow: hidden;
	border-block: 1px solid var(--line-strong);
	padding: 12px 0;
	font-size: 14px;
	color: var(--muted);
}
.marquee__track {
	display: flex;
	width: max-content;
	animation: marquee 45s linear infinite;
}
.marquee__list { display: flex; }
.marquee__list li { padding: 0 20px; white-space: nowrap; }
.marquee__list li::after { content: "•"; margin-left: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* Project cards */
.cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 45px 15px;
	padding: 30px var(--gutter);
}
.card { display: flex; flex-direction: column; gap: 10px; }
.card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--radius);
}
.card__media img, .card__media video {
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card__media img, .card:hover .card__media video { transform: scale(1.03); }
.card__title {
	margin-top: 8px;
	font: clamp(22px, 2vw, 28px)/1.1 var(--display);
	text-transform: uppercase;
	color: var(--ink);
}

/* Project page */
.project__hero {
	height: clamp(260px, 40vw, 580px);
	overflow: hidden;
}
.project__hero img, .project__hero video { height: 100%; object-fit: cover; }
.project__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	padding: 30px var(--gutter) 60px;
}
.project__title {
	font: clamp(34px, 3.9vw, 56px)/1 var(--display);
	text-transform: uppercase;
	color: var(--ink);
}
.project__head .pills { justify-content: flex-end; max-width: 40%; }

.intro { padding: 0 var(--gutter); }
.intro__row {
	display: grid;
	grid-template-columns: 135px minmax(0, 555px) 1fr minmax(0, 300px);
	align-items: start;
	padding: 12px 0 50px;
	border-top: 1px solid var(--line);
	font-size: 15px;
	line-height: 1.4;
}
.intro__label, .section__label {
	font: 400 15px/1.4 var(--body);
	color: var(--muted);
}
.intro__text { grid-column: 2; color: var(--ink); }
.intro__text p + p, .section__body p + p { margin-top: 1.4em; }

.meta { grid-column: 4; margin-top: -12px; font-size: 14px; }
.meta div {
	display: grid;
	grid-template-columns: 105px 1fr;
	padding: 6px 0;
	border-bottom: 1px solid var(--line);
}
.meta dt { color: var(--muted); }
.meta dd { color: var(--ink); }
.tools { display: flex; gap: 6px; align-items: center; }
.tools img { width: 16px; height: 16px; }

.project__body {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding: 20px var(--gutter) 0;
}
.project__body > *, .grid > * { min-width: 0; }
.project__body > .media img, .project__body > .media video,
.grid > .media img, .grid > .media video { border-radius: var(--radius); }
.grid { display: grid; gap: 30px 15px; }
.grid--tight { gap: 8px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* Panels: one slide at a time, caption overlaid at the bottom */
.panel {
	position: relative;
	border-radius: var(--radius);
	background: var(--panel-bg, #a59385);
	color: #fff;
	overflow: hidden;
}
.grid .panel { height: 100%; }
.panel__track {
	display: flex;
	min-width: 0;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.panel__track::-webkit-scrollbar { display: none; }
.panel__track > * { flex: 0 0 100%; scroll-snap-align: start; }
.panel__track img, .panel__track video { height: 100%; object-fit: contain; }
.panel__track picture { height: 100%; }
.panel__caption {
	position: absolute;
	inset: auto 0 clamp(20px, 7%, 60px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 0 20px;
	text-align: center;
	pointer-events: none;
}
.panel__caption strong { font: 400 clamp(16px, 1.4vw, 20px)/1.1 var(--display); text-transform: uppercase; }
.panel__caption span { font-size: 13px; opacity: .9; }
.panel__arrow {
	position: absolute;
	top: 50%;
	width: 26px;
	height: 26px;
	margin-top: -13px;
	border: 0;
	border-radius: 50%;
	background: rgb(0 0 0 / .25);
	cursor: pointer;
	transition: background-color .2s;
}
.panel__arrow:hover { background: rgb(0 0 0 / .45); }
.panel__arrow::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 7px;
	height: 7px;
	border: solid #fff;
	border-width: 0 1.5px 1.5px 0;
	transform: translateX(-1px) rotate(-45deg);
}
.panel__arrow--prev { left: 16px; }
.panel__arrow--prev::before { transform: translateX(1px) rotate(135deg); }
.panel__arrow--next { right: 16px; }
.panel__dots {
	position: absolute;
	left: 50%;
	bottom: calc(clamp(20px, 7%, 60px) + 42px);
	display: flex;
	gap: 4px;
	padding: 5px 8px;
	border-radius: 999px;
	background: rgb(0 0 0 / .25);
	transform: translateX(-50%);
}
.panel__dots button { width: 4px; height: 4px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .5); cursor: pointer; }
.panel__dots button.is-active { background: #fff; }

.section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 12px 0 60px;
	border-top: 1px solid var(--line);
	font-size: 15px;
	line-height: 1.4;
}
.section__label { color: var(--muted); }
.section__body { color: var(--ink); columns: 2; column-gap: 20px; }
.section__body p { break-inside: avoid; }
.section__body p + p { margin-top: 0; }
.section__body p:not(:last-child) { margin-bottom: 1.4em; }

/* 404 */
.notfound .hero__name { font-size: clamp(90px, 16vw, 200px); }

/* More work */
.more { margin-top: 90px; padding-top: 16px; border-top: 1px solid var(--line); }
.more__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0 var(--gutter) 30px;
}
.more__title {
	font: clamp(34px, 3.9vw, 56px)/1 var(--display);
	text-transform: uppercase;
	color: var(--ink);
}
.more .card:nth-child(2) { align-items: flex-end; text-align: right; }
.more .card:nth-child(2) .pills { justify-content: flex-end; }

/* Tablet & phone */
@media (max-width: 1100px) {
	.intro__row { grid-template-columns: 110px minmax(0, 1fr); row-gap: 20px; }
	.meta { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 810px) {
	.cards, .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
	.grid--5, .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.more .card:nth-child(2) { align-items: stretch; text-align: left; }
	.more .card:nth-child(2) .pills { justify-content: flex-start; }
	.hero__name { white-space: normal; }
	.project__head { flex-direction: column; padding-bottom: 40px; }
	.project__head .pills { justify-content: flex-start; max-width: none; }
	.intro__row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
	.intro__text { grid-column: 1; }
	.section { grid-template-columns: minmax(0, 1fr); }
	.section__body { columns: 1; }
	/* Panels: caption and dots move below the slide so they never cover it */
	.panel { display: flex; flex-direction: column; }
	.panel__caption, .panel__dots { position: static; transform: none; }
	.panel__dots { order: 1; align-self: center; margin-top: 12px; }
	.panel__caption { order: 2; padding: 10px 20px 16px; }
	.panel__arrow { top: calc(50% - 28px); }
}
