/* Fonts
---------------------------------------------------------------------------- */
@font-face {
	font-family: "Geom";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("../fonts/geom-variable.woff2") format("woff2");
}

@font-face {
	font-family: "Mulish";
	font-style: normal;
	font-weight: 100 800;
	font-display: swap;
	src: url("../fonts/mulish.woff2") format("woff2");
}

/* Tokens
---------------------------------------------------------------------------- */
:root {
	--color-foreground: #000000;
	--color-background: #ffffff;
	--color-tertiary: #f9fafe;
	--color-secondary: #8145f6;

	--font-body: "Mulish", sans-serif;
	--font-heading: "Geom", sans-serif;

	--font-size-body: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.417), 1.125rem);
	--font-size-small: 1rem;
	--font-size-medium: 1.25rem;
	--font-size-large: clamp(1.39rem, 1.39rem + ((1vw - 0.2rem) * 1.433), 2.25rem);
	--font-size-x-large: clamp(1.85rem, 1.85rem + ((1vw - 0.2rem) * 1.917), 3rem);

	--spacing-30: min(2rem, 5vw);
	--spacing-40: min(3rem, 6vw);
	--spacing-50: min(4rem, 7vw);
	--spacing-60: min(6rem, 8vw);
	--spacing-70: min(7rem, 10vw);
	--spacing-80: min(8rem, 12vw);

	--wide-size: 80rem;
	--gap: var(--spacing-30);
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--color-background);
	color: var(--color-foreground);
	font-family: var(--font-body);
	font-size: var(--font-size-body);
	font-weight: 400;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: inherit;
	text-underline-offset: 0.25ch;
}

:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--color-background);
}

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

.wide {
	max-width: var(--wide-size);
	margin-inline: auto;
}

/* Navigation
---------------------------------------------------------------------------- */
.nav-list {
	display: flex;
	gap: var(--spacing-30);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--font-size-small);
}

.nav-list a {
	text-decoration: none;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a[aria-current="page"]:hover {
	text-decoration: underline;
	text-decoration-style: dashed;
}

/* Header
---------------------------------------------------------------------------- */
.site-header {
	padding: var(--spacing-30);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--spacing-30);
}

.site-logo {
	flex: 0 1 408px;
	line-height: 0;
}

.site-logo img {
	width: 408px;
}

.menu-toggle {
	display: none;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.menu-toggle svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.menu-close {
	position: absolute;
	top: var(--spacing-30);
	right: var(--spacing-30);
}

@media (max-width: 599px) {
	.menu-toggle {
		display: block;
		flex-shrink: 0;
	}

	.site-nav .menu-close {
		display: block;
	}

	.site-nav {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 50;
		padding: calc(var(--spacing-30) * 3) var(--spacing-30) var(--spacing-30);
		background: var(--color-background);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .nav-list {
		flex-direction: column;
		gap: 1rem;
		font-size: 1.25rem;
	}

	body.has-menu-open {
		overflow: hidden;
	}
}

/* Projects
---------------------------------------------------------------------------- */
.project {
	padding-inline: var(--spacing-30);
	/* Most projects sit in an extra padded band; the first three and the last override this. */
	padding-top: var(--project-pt, calc(var(--spacing-60) + 1.25em));
	padding-bottom: var(--project-pb, calc(var(--spacing-70) + 1.25em));
	background: var(--color-background);
}

.project + .project {
	margin-top: var(--spacing-30);
}

.project--tertiary {
	background: var(--color-tertiary);
}

.project__intro {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--spacing-30);
	margin-bottom: var(--spacing-30);
}

.project__intro--right {
	margin-right: 0;
}

.project__text {
	flex: 0 1 33.33%;
	box-sizing: content-box;
	min-width: 0;
	padding: var(--spacing-40);
	background: var(--color-background);
	overflow-wrap: break-word;
}

.project__title,
.home-intro__title,
.contact__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: var(--font-size-x-large);
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-transform: uppercase;
	text-wrap: balance;
	hyphens: auto;
}

.project__tags {
	margin: 16px 0 0;
}

.project__cover {
	position: relative;
	flex: 0 1 66.66%;
	min-width: 0;
	min-height: calc(320px + 2em);
	margin: 0;
	overflow: hidden;
	background-color: var(--cover-color, transparent);
}

.project__cover img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 781px) {
	.project__intro {
		flex-wrap: wrap;
	}

	.project__text,
	.project__cover {
		flex-basis: 100%;
	}

	.project__text {
		box-sizing: border-box;
	}
}

/* Home
---------------------------------------------------------------------------- */
.home-intro {
	padding: var(--spacing-60) var(--spacing-30);
}

.home-intro__title {
	max-width: 42rem;
	margin: 0 auto var(--spacing-30);
	text-align: center;
}

.home-wall {
	display: flex;
	gap: 1.5rem;
}

.home-wall__col {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-wall__col--2 {
	padding-top: var(--spacing-40);
}

.home-wall__col--3 {
	padding-top: var(--spacing-60);
}

.home-wall a {
	display: block;
	cursor: zoom-in;
}

.home-wall img {
	width: 100%;
}

@media (max-width: 781px) {
	.home-wall {
		flex-direction: column;
	}
}

/* Suus
---------------------------------------------------------------------------- */
.about,
.expertise {
	padding: var(--spacing-60) var(--spacing-30);
}

.about__inner {
	display: flex;
	gap: var(--spacing-50);
}

.about__photo,
.about__text {
	flex: 1 1 50%;
	min-width: 0;
	margin: 0;
}

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

.about__text > * {
	margin: 0;
}

.about__text > * + * {
	margin-top: var(--spacing-30);
}

.about__title,
.expertise__title,
.expertise__item h3 {
	font-family: var(--font-heading);
	font-weight: 400;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.about__title {
	font-size: clamp(27.894px, 1.743rem + ((1vw - 3.2px) * 2.094), 48px);
	line-height: 1.1;
}

.about__hello {
	color: var(--color-secondary);
	font-size: var(--font-size-medium);
	font-weight: 700;
}

.expertise__intro {
	max-width: 42rem;
}

.expertise__title {
	margin: 0;
	font-size: var(--font-size-large);
	line-height: 1.15;
}

.expertise__intro p {
	margin: 16px 0 0;
}

.expertise__grid {
	display: flex;
	gap: var(--spacing-60) var(--spacing-30);
	margin-top: var(--spacing-50);
}

.expertise__item {
	flex: 1;
	min-width: 0;
}

.expertise__item img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.expertise__item h3 {
	margin: 24px 0 0;
	font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.625), 20px);
	font-weight: 500;
	line-height: 1.5;
}

.expertise__item p {
	margin: 8px 0 0;
	font-size: var(--font-size-small);
}

@media (max-width: 781px) {
	.about__inner,
	.expertise__grid {
		flex-direction: column;
	}
}

/* Contact
---------------------------------------------------------------------------- */
.contact {
	max-width: calc(42rem + 2 * var(--spacing-30));
	margin: 0 auto;
	padding-inline: var(--spacing-30);
	padding-bottom: var(--spacing-70);
	text-align: center;
}

.contact > * {
	margin: 0;
}

.contact > * + * {
	margin-top: var(--spacing-30);
}

.contact__email {
	font-size: var(--font-size-large);
	font-weight: 700;
	overflow-wrap: anywhere;
}

.contact__email-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 1rem;
}

.copy-button {
	padding: 0.4em 1.1em;
	border: 1px solid var(--color-foreground);
	border-radius: 2rem;
	background: none;
	color: inherit;
	font: inherit;
	font-size: var(--font-size-small);
	cursor: pointer;
}

.copy-button:hover,
.copy-button.is-copied {
	background: var(--color-foreground);
	color: var(--color-background);
}

.copy-button[hidden] {
	display: none;
}

/* Gallery
---------------------------------------------------------------------------- */
.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap);
	margin-block: 0;
	padding: 0;
	list-style: none;
}

.gallery + .gallery {
	margin-top: calc(var(--spacing-70) + var(--spacing-30));
}

.gallery__item {
	position: relative;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	justify-content: center;
	width: calc(50% - var(--gap) / 2);
	max-width: 100%;
	margin: 0;
}

.gallery__item:only-child {
	width: 100%;
}

@media (min-width: 600px) {
	.gallery__item {
		width: calc(33.33% - var(--gap) * 0.66667);
	}

	.gallery__item:first-child:nth-last-child(2),
	.gallery__item:first-child:nth-last-child(2) ~ .gallery__item {
		width: calc(50% - var(--gap) * 0.5);
	}
}

.gallery__link {
	display: flex;
	flex: 1 0 0%;
	flex-direction: column;
	cursor: zoom-in;
}

.gallery__link img {
	flex: 1 0 0%;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Lightbox
---------------------------------------------------------------------------- */
.lightbox {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--color-background);
	color: var(--color-foreground);
}

.lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.lightbox:focus {
	outline: none;
}

.lightbox::backdrop {
	background: var(--color-background);
}

.lightbox__image {
	max-width: calc(100% - 8rem);
	max-height: calc(100% - 8rem);
	object-fit: contain;
}

.lightbox__button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.lightbox__button svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.lightbox__close {
	top: 1rem;
	right: 1rem;
}

.lightbox__prev,
.lightbox__next {
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__prev {
	left: 1rem;
}

.lightbox__next {
	right: 1rem;
}

.lightbox__prev[hidden],
.lightbox__next[hidden] {
	display: none;
}

@media (max-width: 599px) {
	.lightbox__image {
		max-width: 100%;
		max-height: calc(100% - 9rem);
	}

	.lightbox__prev,
	.lightbox__next {
		top: auto;
		bottom: 1rem;
		transform: none;
	}
}

/* Footer
---------------------------------------------------------------------------- */
.site-footer {
	padding: var(--spacing-30);
}

.site-footer .nav-list {
	justify-content: flex-end;
	flex-wrap: wrap;
}

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