main {
	display: block;
}

/* Navigation */
.site-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	background: color-mix(in oklch, var(--canvas) 94%, transparent);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(12px);
}

.site-nav {
	width: min(calc(100% - 2rem), var(--content-width));
	min-height: 4.75rem;
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	min-width: 0;
	color: var(--ink);
	text-decoration: none;
}

.brand-name {
	font-family: var(--display);
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.015em;
}

.brand-role {
	color: var(--ink-soft);
	font-size: 0.875rem;
}

.nav-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.nav-menu a {
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.nav-menu a:hover {
	color: var(--steel);
}

.nav-menu a.current:not(.nav-cv) {
	color: var(--steel);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.45rem;
}

.nav-menu .nav-cv {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.55rem 1rem;
	background: var(--steel-dark);
	color: var(--surface);
}

.nav-menu .nav-cv:hover {
	background: var(--accent);
	color: var(--ink);
}

.hamburger,
.nav-overlay {
	display: none;
}

/* Home hero */
#intro {
	width: min(calc(100% - 2rem), var(--content-width));
	margin-inline: auto;
	padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
}

.intro-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
	gap: clamp(3rem, 8vw, 7rem);
	align-items: center;
}

.intro-grid > *,
.project-card > *,
.about-grid > * {
	min-width: 0;
}

.intro-content {
	max-width: 47rem;
}

#intro .name {
	margin-bottom: 1rem;
	color: var(--steel);
	font-size: 1.05rem;
	font-weight: 700;
}

#intro .name span {
	display: inline;
	font: inherit;
	color: inherit;
}

#intro h1 {
	max-width: 12ch;
	margin-bottom: 1.5rem;
	font-family: var(--display);
	font-size: clamp(3.8rem, 8vw, 6rem);
	font-weight: 700;
	line-height: 0.94;
	letter-spacing: -0.025em;
	color: var(--ink);
}

#intro p:not(.name):not(.hero-proof) {
	max-width: 64ch;
	margin-bottom: 1rem;
	font-size: clamp(1.1rem, 2vw, 1.3rem);
	line-height: 1.55;
	color: var(--ink-soft);
}

.hero-proof {
	max-width: 34rem;
	margin: 2rem 0 0;
	padding: 1rem 0 1rem 1.25rem;
	border-left: 1px solid var(--accent);
	color: var(--ink-soft);
}

.hero-proof strong {
	display: block;
	font-family: var(--display);
	font-size: 2rem;
	line-height: 1;
	color: var(--ink);
}

.intro-headshot {
	position: relative;
	justify-self: end;
	width: min(100%, 22rem);
	margin: 0;
}

.intro-headshot::before {
	content: "";
	position: absolute;
	inset: 1rem 0 -1rem 1rem;
	z-index: -1;
	background: var(--accent);
}

.intro-headshot img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 34%;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.cta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

.cta-primary,
.cta-secondary,
.contact-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.7rem 1.2rem;
	font-weight: 700;
	text-decoration: none;
	border-radius: 0;
	transition: background-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}

.cta-primary,
.contact-button {
	background: var(--steel-dark);
	color: var(--surface);
}

.cta-primary:hover,
.contact-button:hover {
	background: var(--accent);
	color: var(--ink);
	transform: translateY(-2px);
}

.cta-secondary {
	border-bottom: 1px solid var(--steel);
	color: var(--steel-dark);
}

.cta-secondary:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.tech-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 2.5rem;
}

/* Projects */
.projectBackground {
	padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 9rem);
	background: var(--surface);
	border-block: 1px solid var(--line);
}

#projects {
	width: min(calc(100% - 2rem), var(--content-width));
	margin-inline: auto;
}

.projects-intro {
	max-width: 48rem;
	margin-bottom: clamp(4.5rem, 8vw, 6.5rem);
}

#projects > .projects-intro h2 {
	max-width: none;
	margin: 0;
	font-family: var(--display);
	font-size: clamp(3.2rem, 6vw, 4.6rem);
	line-height: 0.98;
	letter-spacing: -0.02em;
	text-wrap: balance;
	color: var(--ink);
}

.projects-intro p {
	max-width: 55ch;
	margin: 1.5rem 0 0;
	font-size: 1.2rem;
	line-height: 1.55;
	text-wrap: pretty;
	color: var(--ink-soft);
}

.project-card {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	grid-template-areas:
		"visual heading"
		"visual details";
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
	padding: 0 0 clamp(5rem, 10vw, 9rem);
	margin: 0 0 clamp(5rem, 10vw, 9rem);
	border-bottom: 1px solid var(--line);
	background: transparent;
}

.project-card.featured {
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	grid-template-areas:
		"heading details"
		"visual visual";
	gap: clamp(2.5rem, 5vw, 4.5rem);
	align-items: start;
}

.project-card.reverse {
	grid-template-areas:
		"heading visual"
		"details visual";
}

.project-card.compact {
	padding-bottom: clamp(4rem, 7vw, 6rem);
	margin-bottom: clamp(4rem, 7vw, 6rem);
}

.project-card:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.project-heading,
.project-details {
	min-width: 0;
}

.project-heading {
	grid-area: heading;
}

.project-details {
	grid-area: details;
}

.project-label {
	display: inline-block;
	margin-bottom: 1rem;
	padding: 0.25rem 0.6rem;
	background: color-mix(in oklch, var(--accent) 18%, var(--surface));
	color: var(--ink);
	font-size: 0.85rem;
	font-weight: 700;
}

.project-card h3 {
	margin-bottom: 0.8rem;
	font-family: var(--display);
	font-size: clamp(2.4rem, 5vw, 3.8rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	text-wrap: balance;
	color: var(--ink);
	hyphens: auto;
}

.project-card.featured h3 {
	max-width: 15ch;
	font-size: clamp(3.2rem, 6vw, 4.7rem);
}

.project-tagline {
	margin-bottom: 2rem;
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.45;
	color: var(--steel);
}

.project-impact-summary {
	margin-top: 1.5rem;
}

.project-impact-summary > p {
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ink);
}

.project-impact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
	gap: 0 1.25rem;
	margin: 0;
}

.project-impact > div {
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
}

.project-card.featured .project-impact {
	border-top: 1px solid var(--line);
}

.project-card.featured .project-impact > div {
	border-top: 0;
}

.project-impact dt {
	font-family: var(--display);
	font-size: 1.55rem;
	font-weight: 700;
	line-height: 1;
	color: var(--ink);
}

.project-impact dd {
	margin: 0.25rem 0 0;
	font-size: 0.82rem;
	line-height: 1.3;
	color: var(--ink-soft);
}

.project-story {
	margin: 0;
}

.story-part {
	display: grid;
	grid-template-columns: 7rem minmax(0, 1fr);
	gap: 1rem;
	padding: 1rem 0;
	border-top: 1px solid var(--line);
}

.project-card.featured .story-part:first-child {
	padding-top: 0;
	border-top: 0;
}

.story-part dt {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--ink-soft);
}

.story-part dd {
	margin: 0;
	color: var(--ink-soft);
	line-height: 1.55;
}

.project-tech-title {
	margin: 1.5rem 0 0.65rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ink);
}

.project-scope {
	padding: 1.25rem 0;
	border-top: 1px solid var(--line);
}

.project-scope p {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--ink);
}

.project-scope ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.4rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.project-scope li {
	position: relative;
	padding-left: 0.9rem;
	color: var(--ink-soft);
	font-size: 0.95rem;
}

.project-scope li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.68em;
	width: 0.32rem;
	height: 0.32rem;
	background: var(--accent);
}

.project-tech {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.project-tech li {
	padding: 0.28rem 0.6rem;
	background: var(--surface-strong);
	color: var(--ink-soft);
	font-size: 0.85rem;
	font-weight: 600;
}

.project-visual {
	grid-area: visual;
	align-self: center;
	margin: 0;
	min-width: 0;
	background: var(--surface-strong);
	border: 1px solid var(--line);
	overflow: hidden;
}

.project-visual.multi {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	background: transparent;
	border: 0;
	overflow: visible;
}

.project-shot {
	margin: 0;
	min-width: 0;
	background: var(--surface-strong);
	border: 1px solid var(--line);
	overflow: hidden;
}

.project-visual:not(.multi) .project-shot {
	border: 0;
}

.project-visual picture {
	display: block;
}

.project-visual img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	background: var(--surface);
}

.project-visual.multi img {
	aspect-ratio: 2 / 1;
}

.project-shot figcaption {
	margin: 0;
	padding: 0.7rem 0.85rem;
	border-top: 1px solid var(--line);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-soft);
}

.project-visual img.contain {
	object-fit: contain;
}

.project-visual img.portrait {
	aspect-ratio: 4 / 5;
	padding: 1rem;
	object-fit: contain;
}

/* Contact */
#contact {
	max-width: none;
	margin: 0;
	padding: clamp(5rem, 10vw, 8rem) max(1rem, calc((100vw - var(--content-width)) / 2));
	text-align: left;
	background: var(--steel-dark);
	color: var(--surface);
}

#contact h2 {
	max-width: 15ch;
	margin-bottom: 1rem;
	font-family: var(--display);
	font-size: clamp(3.2rem, 7vw, 5.2rem);
	line-height: 0.98;
	letter-spacing: -0.02em;
	color: var(--surface);
}

#contact p {
	max-width: 54ch;
	margin-bottom: 2rem;
	font-size: 1.25rem;
	color: color-mix(in oklch, var(--surface) 82%, var(--steel-dark));
}

#contact .section-kicker {
	margin-bottom: 1rem;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

#contact .contact-button {
	background: var(--accent);
	color: var(--ink);
}

#contact .contact-button:hover {
	background: var(--surface);
}

.contact-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
}

.contact-email {
	color: var(--surface);
	font-weight: 600;
}

.contact-email:hover {
	color: var(--accent);
}

/* About */
.about-hero {
	width: min(calc(100% - 2rem), var(--content-width));
	margin-inline: auto;
	padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5rem);
}

.about-hero p:first-child {
	margin-bottom: 1rem;
	font-weight: 700;
	color: var(--steel);
}

.about-hero h1 {
	max-width: 13ch;
	margin-bottom: 1.5rem;
	font-family: var(--display);
	font-size: clamp(4rem, 9vw, 6rem);
	line-height: 0.95;
	letter-spacing: -0.025em;
}

.about-hero .about-lede {
	max-width: 55ch;
	margin: 0;
	font-size: 1.35rem;
	color: var(--ink-soft);
}

.about-content {
	padding: clamp(4rem, 8vw, 7rem) 0;
	background: var(--surface);
	border-block: 1px solid var(--line);
}

.about-grid {
	width: min(calc(100% - 2rem), var(--content-width));
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
	gap: clamp(3rem, 8vw, 7rem);
	align-items: start;
}

.about-portrait {
	position: sticky;
	top: 7rem;
	margin: 0;
}

.about-portrait img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 30%;
}

.about-portrait figcaption {
	margin-top: 0.75rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink-soft);
}

.about-copy {
	max-width: 47rem;
}

.about-copy section {
	padding: 0 0 2.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--line);
}

.about-copy section:last-of-type {
	border-bottom: 0;
}

.about-copy h2 {
	margin-bottom: 1rem;
	font-family: var(--display);
	font-size: clamp(2.4rem, 5vw, 3.5rem);
	line-height: 1;
	letter-spacing: -0.015em;
}

.about-copy p {
	max-width: 68ch;
	color: var(--ink-soft);
}

.about-result {
	padding: 1.25rem 1.5rem;
	background: var(--steel-dark);
	color: var(--surface) !important;
	font-size: 1.2rem;
	font-weight: 600;
}

.about-skills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.about-skills h2,
.about-skills h3 {
	flex-basis: 100%;
}

.about-skills h3 {
	margin: 1rem 0 0.15rem;
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.tech-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-bottom: 0.75rem;
}

.drive-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem 1.5rem;
	flex-basis: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.drive-list li {
	padding-bottom: 0.55rem;
	border-bottom: 1px solid var(--line);
	color: var(--ink-soft);
}

/* Shared badge */
.tech-badge {
	display: inline-flex;
	align-items: center;
	min-height: 2.3rem;
	padding: 0.35rem 0.7rem;
	background: var(--surface-strong);
	border: 0;
	border-radius: 0;
	color: var(--ink-soft);
	font-family: var(--sans);
	font-size: 0.9rem;
	font-weight: 600;
	box-shadow: none;
}

/* Footer */
.site-footer {
	padding: 2.25rem max(1rem, calc((100vw - var(--content-width)) / 2));
	background: var(--ink);
	color: var(--surface);
}

.footer-main {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	align-items: center;
}

.footer-identity {
	margin: 0;
	font-weight: 700;
}

.footer-identity span {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.9rem;
	font-weight: 400;
	color: color-mix(in oklch, var(--surface) 72%, var(--ink));
}

.footer-meta {
	margin: 0;
	color: color-mix(in oklch, var(--surface) 72%, var(--ink));
	font-size: 0.9rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-links a {
	color: var(--surface);
	font-weight: 600;
	text-decoration: none;
}

.footer-links a:hover {
	color: var(--accent);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid color-mix(in oklch, var(--surface) 20%, var(--ink));
}

/* Error page */
.error-container {
	color: var(--ink);
}

@media (max-width: 820px) {
	.site-header {
		backdrop-filter: none;
	}

	.brand-role {
		display: none;
	}

	.hamburger {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 3rem;
		height: 3rem;
		padding: 0.65rem;
		border: 1px solid var(--line);
		background: var(--surface);
		flex: 0 0 auto;
	}

	.hamburger .bar {
		display: block;
		width: 100%;
		height: 2px;
		background: var(--ink);
		transition: transform 180ms ease-out, opacity 180ms ease-out;
	}

	.hamburger.active .bar:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.hamburger.active .bar:nth-child(2) {
		opacity: 0;
	}

	.hamburger.active .bar:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.nav-menu {
		position: fixed;
		top: 4.75rem;
		right: 0;
		bottom: 0;
		z-index: var(--z-menu);
		width: min(88vw, 24rem);
		padding: 2rem;
		background: var(--surface);
		border-left: 1px solid var(--line);
		clip-path: inset(0 0 0 100%);
		pointer-events: none;
		visibility: hidden;
		transition:
			clip-path 220ms cubic-bezier(0.16, 1, 0.3, 1),
			visibility 0s linear 220ms;
	}

	.nav-menu.active {
		clip-path: inset(0);
		pointer-events: auto;
		visibility: visible;
		transition-delay: 0s;
	}

	.nav-menu ul {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
	}

	.nav-menu a {
		display: flex;
		align-items: center;
		min-height: 3.5rem;
		padding: 0.75rem 0;
		border-bottom: 1px solid var(--line);
		font-size: 1.15rem;
	}

	.nav-menu .nav-cv {
		justify-content: center;
		margin-top: 1.25rem;
		border: 0;
	}

	.nav-overlay {
		display: block;
		position: fixed;
		inset: 4.75rem 0 0;
		z-index: var(--z-overlay);
		border: 0;
		background: color-mix(in oklch, var(--ink) 45%, transparent);
	}

	.intro-grid,
	.projects-intro,
	.project-card,
	.project-card.reverse,
	.project-card.featured,
	.about-grid {
		grid-template-columns: 1fr;
	}

	.intro-grid {
		gap: 4rem;
	}

	.intro-headshot {
		justify-self: start;
		width: min(80%, 21rem);
	}

	.projects-intro {
		gap: 1.5rem;
	}

	.project-card,
	.project-card.reverse,
	.project-card.featured {
		grid-template-areas:
			"heading"
			"visual"
			"details";
	}

	.project-visual.multi {
		grid-template-columns: 1fr;
	}

	.about-portrait {
		position: static;
		width: min(75%, 22rem);
	}
}

@media (max-width: 560px) {
	.site-nav,
	#intro,
	#projects,
	.about-hero,
	.about-grid {
		width: min(calc(100% - 1.25rem), var(--content-width));
	}

	#intro h1,
	.about-hero h1 {
		max-width: 100%;
		font-size: clamp(2.9rem, 13.5vw, 3.75rem);
		line-height: 0.98;
	}

	.brand-name {
		font-size: 1.35rem;
	}

	.intro-headshot,
	.about-portrait {
		width: calc(100% - 1rem);
	}

	.story-part {
		grid-template-columns: 1fr;
		gap: 0.35rem;
	}

	.cta-group {
		align-items: stretch;
		flex-direction: column;
	}

	.footer-main,
	.footer-bottom {
		align-items: flex-start;
		flex-direction: column;
	}

	.project-scope ul,
	.drive-list {
		grid-template-columns: 1fr;
	}

	.contact-actions {
		align-items: flex-start;
		flex-direction: column;
	}
}
