@font-face { font-family: "Styrene A LC"; src: url("fonts/styrene-a-lc-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
	color-scheme: dark;
	--surface-page: #080808;
	--label-primary: #f5f5f7;
	--label-secondary: #86868b;
	--surface-tile: #fff;
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--spring: cubic-bezier(.34, 1.28, .42, 1);
	--space: 32px;
	--gutter: 16px;
	--rhythm: 96px;   /* logo → text and text → tiles */
	--type-display: 1.125rem;
	--type-body: 1.0625rem;
	--reading-width: 36rem;   /* name + two lines of intro */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; }
body {
	background: var(--surface-page);
	color: var(--label-primary);
	font: 400 var(--type-body)/1.53 "Styrene A LC", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
h1, p, figure { margin: 0; font: inherit; }
a { color: inherit; text-decoration: none; transition: color 180ms ease; }
a:focus-visible { outline: 2px solid var(--label-primary); outline-offset: 5px; }

/* top — this site's white star */
.top { display: flex; align-items: center; gap: 8px; padding: var(--gutter) var(--gutter) 0; }
.logo { display: block; width: 24px; height: 24px; color: #fff; }
.logo svg { display: block; width: 100%; height: 100%; fill: currentColor; transition: transform .8s var(--spring); }
.logo:hover svg { transform: rotate(90deg); }

/* intro — reading column on the left edge, in line with the logo and tiles */
.page { padding-top: var(--rhythm); }
.intro { max-width: var(--reading-width); padding-inline: var(--gutter); box-sizing: content-box; }
.name, .about { font-size: var(--type-display); line-height: 1.4; text-wrap: pretty; }
.about { color: var(--label-secondary); }
.about .hl { color: var(--label-primary); }
.about a.hl:hover { color: var(--label-secondary); }

/* gallery — full width, packed by gallery.js */
.works { margin-top: var(--rhythm); padding-inline: var(--gutter); }
.works-grid { position: relative; max-width: 1920px; margin-inline: auto; }
.tile { position: absolute; overflow: hidden; background: var(--surface-tile); }
.tile img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: contain; transform: scale(var(--scale, 0.86));
	opacity: 0; transition: opacity 240ms ease;
}
.tile img.is-ready { opacity: 1; }
.tile-label {
	position: absolute; left: 16px; bottom: 16px; z-index: 2;
	color: #fff; mix-blend-mode: difference; opacity: 0.72;
	font-size: 12px; line-height: 16px; white-space: nowrap;
}

/* footer — the portfolio's bottom row, no menu and no divider */
.frow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px var(--gutter); font-size: 14px; line-height: 1; }
.who { display: flex; align-items: center; gap: .3em; white-space: nowrap; }
.who .sprints { color: var(--label-secondary); }
@media (hover: none) { .who .sprints { display: none; } }
@media (hover: hover) {
	.who .sprints span { display: inline-block; opacity: 0; filter: blur(10px); transition: opacity .5s var(--ease), filter .5s var(--ease); transition-delay: calc((2 - var(--i)) * .12s); }
	.who:hover .sprints span { opacity: 1; filter: none; transition-duration: .5s; transition-delay: calc(var(--i) * .12s); }
}
.fl { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.fl button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.fl a, .fl button { transition: color .2s; }
.fl a:hover, .fl button:hover, .who .me:hover { color: var(--label-secondary); }
.who .me { transition: color .2s; }
.fl .lab { color: var(--label-secondary); }
.toast { position: fixed; bottom: 28px; left: 50%; z-index: 10; padding: 12px 20px; border-radius: 999px; background: #fff; color: #080808; font-size: 15px; opacity: 0; transform: translate(-50%, 20px) scale(.9); transition: opacity .3s var(--ease), transform .5s var(--spring); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (max-width: 640px) {
	/* phones: centred, links in two rows of three, © last */
	.frow { flex-direction: column-reverse; gap: 24px; padding: 16px var(--gutter); text-align: center; }
	.fl { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 24px 28px; }
	.fl .lab { display: none; }
}
@media (prefers-reduced-motion: reduce) { .who .sprints span { transition: none; } }

/* 404 — just the number in the middle of the screen, the logo stays top left */
.nf { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; }
.nf .intro { margin: 0; padding: 0; font-size: var(--type-display); line-height: 1.4; }

/* arrival — FadeContent "mist" (fade.js, reveal.js); hidden until it starts, only when JS runs */
.js :is(.logo, .intro, .tile, .frow) { visibility: hidden; }

@media (max-width: 809.98px) {
	:root { --space: 24px; --rhythm: 64px; }
}
