html {
	scroll-behavior: smooth;
}

body {
	overflow-y: auto;
}

#header h1,
.portfolio-intro h2,
.feature-box strong,
.section-header h3,
.project-heading h3,
.project-copy h3,
.contact-panel h3 {
	font-family: 'Space Grotesk', 'Source Sans Pro', sans-serif;
	font-weight: 700;
}

#wrapper {
	position: relative;
	height: auto;
	min-height: 100vh;
}

#main {
	position: relative;
	top: 0;
	left: 0;
	height: auto;
	min-height: 100vh;
	justify-content: flex-start;
	padding: 2rem 0 4rem;
	overflow-y: auto;
}

#header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 4rem);
	min-height: calc(100svh - 4rem);
	padding: 0 0 3.5em;
	top: 0;
}

#header::after {
	content: "↓  SCROLL TO EXPLORE";
	position: absolute;
	bottom: 0.75em;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.7em;
	letter-spacing: 0.16em;
	white-space: nowrap;
	opacity: 0.7;
}

#content {
	max-width: 80em;
	width: min(80em, 92%);
	margin: 0 auto;
	padding: 2.5rem 2.5rem 2rem;
	text-align: left;
	background: rgba(10, 12, 20, 0.28);
	border-radius: 1.5em;
	backdrop-filter: blur(6px);
}

.page-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.25em 0 0;
}

.page-nav a {
	display: inline-block;
	padding: 0.62rem 0.9rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.04);
	font-size: 0.82em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

.portfolio-intro {
	display: grid;
	grid-template-columns: 1.6fr 0.9fr;
	gap: 2.5em;
	align-items: center;
}

.portfolio-intro h2 {
	margin: 0 0 0.5em;
	font-size: clamp(2.2em, 4vw, 4em);
	line-height: 1em;
	letter-spacing: -0.04em;
}

.portfolio-intro p {
	margin: 0;
	max-width: 46ch;
	line-height: 1.7;
	font-size: 1.05em;
	color: rgba(255, 255, 255, 0.8);
}

.portfolio-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85em;
	margin-top: 1.5em;
}

.portfolio-link,
.portfolio-button {
	display: inline-block;
	padding: 0.85rem 1.4rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font-weight: 600;
	transition: transform 0.2s ease, background 0.2s ease;
	backdrop-filter: blur(8px);
}

.portfolio-link:hover,
.portfolio-button:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, 0.14);
}

.portfolio-link.primary,
.portfolio-button.primary {
	background: rgba(255, 255, 255, 0.16);
}

.feature-box {
	background: rgba(255, 255, 255, 0.06);
	border: solid 1px rgba(255, 255, 255, 0.14);
	border-radius: 1.25em;
	padding: 1.5em 1.4em;
	text-align: left;
}

.feature-box .tag {
	display: inline-block;
	margin-bottom: 0.5em;
	font-size: 0.72em;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.8);
}

.feature-box strong {
	display: block;
	font-size: clamp(2.2em, 4vw, 3.3em);
	line-height: 1;
	letter-spacing: -0.04em;
	margin-bottom: 0.2em;
}

.feature-box span {
	font-size: 0.9em;
	color: rgba(255, 255, 255, 0.75);
}

.portfolio-section {
	margin-top: 3.5rem;
}

.section-header {
	max-width: 60ch;
	margin-bottom: 1.75rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.section-header h3 {
	margin: 0 0 0.3em;
	font-size: clamp(1.8em, 2vw, 2.6em);
	letter-spacing: -0.04em;
}

.section-header p {
	margin: 0;
	color: rgba(255, 255, 255, 0.75);
}

.portfolio-project + .portfolio-project {
	margin-top: 3rem;
}

.project-heading {
	max-width: 60ch;
	margin-bottom: 1.5em;
}

.project-heading .meta {
	display: block;
	margin-bottom: 0.35em;
	font-size: 0.72em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.project-heading h3 {
	margin: 0 0 0.35em;
	font-size: clamp(1.7em, 2vw, 2.4em);
	letter-spacing: -0.04em;
}

.project-heading p {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
}

.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1em;
}

.project-card {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.05);
	border: solid 1px rgba(255, 255, 255, 0.12);
	border-radius: 1.2em;
	overflow: hidden;
}

.project-visual {
	height: 12em;
	flex: 0 0 auto;
	position: relative;
	overflow: hidden;
}

.project-visual.placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.04);
}

.project-visual.placeholder span {
	font-size: 0.72em;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.45);
}

.project-card .project-visual.project-artwork {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25em;
	padding: 0.5em;
	background: #f4f5f6;
}

.project-artwork a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border: 0;
	cursor: zoom-in;
}

.project-artwork img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.project-spread a {
	flex: 1;
	min-width: 0;
}

.image-preview {
	position: fixed;
	max-width: 92vw;
	max-height: 92vh;
	padding: 2.75rem 1rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 0.75rem;
	background: rgba(15, 18, 24, 0.96);
	box-shadow: 0 1.25em 3em rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: scale(0.96);
	transition: opacity 220ms ease, transform 220ms ease, display 220ms allow-discrete, overlay 220ms allow-discrete;
	overflow: visible;
}

.image-preview[open] {
	opacity: 1;
	transform: scale(1);
}

.image-preview::backdrop {
	background: rgba(0, 0, 0, 0);
	backdrop-filter: blur(0);
	transition: background 220ms ease, backdrop-filter 220ms ease, display 220ms allow-discrete, overlay 220ms allow-discrete;
}

.image-preview[open]::backdrop {
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: blur(5px);
}

@starting-style {
	.image-preview[open] {
		opacity: 0;
		transform: scale(0.96);
	}

	.image-preview[open]::backdrop {
		background: rgba(0, 0, 0, 0);
		backdrop-filter: blur(0);
	}
}

.image-preview img {
	display: block;
	max-width: 88vw;
	max-height: 82vh;
	object-fit: contain;
}

.image-preview-close {
	position: absolute;
	top: 0.45rem;
	right: 0.65rem;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.image-preview-close:hover,
.image-preview-close:focus-visible {
	background: rgba(255, 255, 255, 0.25);
}

@media (prefers-reduced-motion: reduce) {
	.image-preview,
	.image-preview::backdrop {
		transition: none;
	}
}

.project-3 .project-artwork img {
	width: 78%;
	height: auto;
	max-height: 75%;
}

.project-copy {
	flex: 1;
	padding: 1.15em 1.1em 1.3em;
}

.project-copy h3 {
	margin: 0 0 0.45em;
	font-size: 1.15em;
	letter-spacing: -0.02em;
}

.project-copy p {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.8);
}

.contact-panel {
	margin-top: 3.5rem;
	padding: 2rem 1.75rem;
	border-radius: 1.25em;
	background: rgba(255, 255, 255, 0.06);
	border: solid 1px rgba(255, 255, 255, 0.14);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1.25rem;
}

.contact-panel h3 {
	margin: 0;
	font-size: clamp(1.7em, 2vw, 2.4em);
	letter-spacing: -0.04em;
}

.contact-panel p {
	margin: 0.35rem 0 0;
	max-width: 46ch;
	color: rgba(255, 255, 255, 0.75);
}

#footer {
	position: relative;
	height: auto;
	line-height: 1.5;
	padding: 1.5em 0 0;
	background: none;
}

#footer .version {
	display: block;
	margin-top: 0.6em;
	font-size: 0.7em;
	letter-spacing: 0.12em;
	opacity: 0.55;
}

@media screen and (max-width: 980px) {
	.portfolio-intro,
	.contact-panel {
		grid-template-columns: 1fr;
		display: block;
	}

	.portfolio-intro .feature-box {
		margin-top: 1.75em;
	}

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

	.contact-panel {
		padding: 1.5rem 1.25rem;
	}

	.contact-panel .portfolio-button {
		margin-top: 1.25rem;
	}
}

@media screen and (max-width: 600px) {
	#content {
		padding: 1.25rem 1rem;
	}

	.portfolio-grid {
		grid-template-columns: 1fr;
	}
}
