.home_hero,
.home_experience,
.home_projects,
.home_stack {
	max-width: var(--header-bar-max-width);
	margin: 0 auto;
	padding: var(--space-md) var(--space-lg) var(--space-xl);
}

#experience {
	scroll-margin-top: var(--header-offset);
}

.home_hero { padding-top: var(--space-xl); }

.home_hero-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	grid-template-areas:
		"meta media"
		"title media"
		"tagline media"
		"actions media";
	align-items: center;
	column-gap: var(--space-xl);
	row-gap: 0;
}

.home_hero-meta {
	grid-area: meta;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: var(--space-sm);
	margin-bottom: var(--space-md);
}

.home_hero-title {
	grid-area: title;
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	margin: 0;
	font-family: var(--font-title);
	font-size: clamp(2.75rem, 6vw, 4.5rem);
	line-height: 1.15;
	text-align: left;
	color: var(--color-primary);
}

.home_hero-media {
	grid-area: media;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	align-self: center;
}

.home_hero-headshot {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	width: min(100%, 22rem);
	border: 1px dashed var(--color-border);
	border-radius: 50%;
	background: color-mix(in srgb, var(--color-surface) 70%, transparent);
	color: var(--color-text-muted);
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.home_hero-tagline {
	grid-area: tagline;
	margin: calc(var(--space-lg) + var(--space-md)) 0 0;
	max-width: 32rem;
	text-align: left;
}

.home_hero-actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: var(--space-md);
	margin-top: var(--space-lg);
}

.home_hero-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 1.625rem;
	padding: 0.2rem 0.65rem;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background-color: var(--color-surface);
	box-shadow: var(--color-shadow);
	color: var(--color-text-muted);
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.01em;
}

.home_hero-pill--time {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
}

.home_hero-time {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.02em;
}

.home_hero-tagline-lead {
	color: var(--color-text-muted);
	opacity: 0.65;
}

.home_hero-tagline-emphasis { color: var(--color-text); }

.home_hero-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.25rem;
	padding: 0.4rem 1.1rem;
	border-radius: 0.375rem;
	border: 1px solid transparent;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1;
	will-change: transform;
	transition:
		background-color 0.15s ease,
		border-color 0.15s ease,
		color 0.15s ease,
		transform 0.15s ease;
}

.home_hero-button:hover,
.home_hero-button:focus-visible {
	transform: translate3d(0, -2px, 0);
}

.home_hero-button-icon {
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("/assets/images/arrow.png") center / contain no-repeat;
	mask: url("/assets/images/arrow.png") center / contain no-repeat;
}

.home_hero-button--primary {
	background: var(--color-primary);
	color: #fff;
}

.home_hero-button--primary:hover,
.home_hero-button--primary:focus-visible {
	background: color-mix(in srgb, var(--color-primary) 82%, #000);
}

.home_hero-button--pill {
	position: relative;
	isolation: isolate;
	background-color: var(--color-surface);
	border-color: var(--color-border);
	box-shadow: var(--color-shadow);
	color: var(--color-text);
}

.home_hero-button--pill::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background-color: var(--color-surface);
	backdrop-filter: blur(12px);
}

.home_hero-button--pill:hover,
.home_hero-button--pill:focus-visible {
	background-color: color-mix(in srgb, var(--color-surface) 75%, #000);
}

.home_hero-button--pill:hover::before,
.home_hero-button--pill:focus-visible::before {
	background-color: color-mix(in srgb, var(--color-surface) 75%, #000);
}

.home_section-title {
	margin: 0;
	font-size: 1.6rem;
	font-variant: small-caps;
	letter-spacing: 0.04em;
	text-align: left;
}

.home_projects-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-lg);
	margin: var(--space-xl) 0 0;
	padding: 0;
}

.home_project {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	min-width: 0;
	height: 100%;
	padding: var(--space-md);
	border: 1px solid var(--color-border);
	border-radius: 1.25rem;
	background: color-mix(in srgb, var(--color-surface) 70%, transparent);
	color: inherit;
	transition: border-color 0.15s ease;
}

.home_project:hover {
	border-color: color-mix(
		in srgb,
		var(--color-border) 70%,
		var(--color-primary) 30%
	);
}

.home_project-media {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	width: 100%;
	border-radius: 0.75rem;
	background: var(--color-bg);
	color: var(--color-text-muted);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.home_project-name {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-text);
}

.home_project-date {
	margin: 0;
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

.home_project-langs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	margin: 0;
	padding: 0;
}

.home_project-lang {
	display: inline-flex;
	align-items: center;
	min-height: 1.375rem;
	padding: 0.15rem 0.55rem;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background-color: var(--color-surface);
	color: var(--color-text-muted);
	font-size: 0.7rem;
	line-height: 1;
}

.home_project--all {
	display: flex;
	min-height: 100%;
}

.home_project-all {
	display: grid;
	place-items: center;
	flex: 1;
	width: 100%;
	min-height: 100%;
	padding: var(--space-md);
	border: 1px dashed var(--color-border);
	border-radius: 1.25rem;
	background: color-mix(in srgb, var(--color-surface) 70%, transparent);
	color: var(--color-text-muted);
	transition: border-color 0.15s ease;
}

.home_project-all:hover {
	border-color: color-mix(
		in srgb,
		var(--color-border) 70%,
		var(--color-primary) 30%
	);
}

.home_project-all-label {
	font-size: 0.95rem;
	font-weight: 500;
	letter-spacing: 0.02em;
}

@media (max-width: 900px) {
	.home_projects-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 450px) {
	.home_projects-grid {
		grid-template-columns: 1fr;
	}
}

.home_timeline {
	position: relative;
	margin: var(--space-xl) 0 0;
}

.home_timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: var(--color-primary);
}

.home_timeline-item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 0;
	margin-bottom: var(--space-xl);
	align-items: start;
}

.home_timeline-item:last-child { margin-bottom: 0; }

.home_timeline-marker {
	position: absolute;
	top: 0;
	left: 50%;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	transform: translateX(-50%);
	background: var(--color-bg);
	border: 2px solid var(--color-primary);
	overflow: hidden;
}

.home_timeline-logo {
	width: 70%;
	height: 70%;
	object-fit: contain;
}

.home_timeline-logo--white { filter: brightness(0) invert(1); }

html[data-theme="light"] .home_timeline-logo--white {
	filter: brightness(0);
}

.home_timeline-initials {
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	color: #fff;
}

html[data-theme="light"] .home_timeline-initials { color: #000; }

.home_timeline-card {
	width: 100%;
	max-width: none;
}

.home_timeline-item--left .home_timeline-card {
	grid-column: 1;
	grid-row: 1;
	justify-self: stretch;
	text-align: left;
	padding-right: calc(1.5rem + var(--space-md));
}

.home_timeline-item--right .home_timeline-card {
	grid-column: 2;
	grid-row: 1;
	justify-self: stretch;
	text-align: left;
	padding-left: calc(1.5rem + var(--space-md));
}

.home_timeline-dates {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	width: 100%;
}

.home_timeline-item--left .home_timeline-dates {
	grid-column: 2;
	grid-row: 1;
	align-self: start;
	padding-left: calc(1.5rem + var(--space-md));
	text-align: left;
}

.home_timeline-item--right .home_timeline-dates {
	grid-column: 1;
	grid-row: 1;
	align-self: start;
	padding-right: calc(1.5rem + var(--space-md));
	text-align: right;
}

.home_timeline-range {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-text);
}

.home_timeline-range + .home_timeline-range {
	margin-top: var(--space-xs);
}

.home_timeline-length {
	margin: var(--space-xs) 0 0;
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

.home_timeline-role {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--color-text);
}

.home_timeline-company {
	margin: var(--space-xs) 0 0;
	font-size: 0.85rem;
	color: var(--color-text-muted);
}

.home_timeline-description {
	margin: var(--space-sm) 0 0;
	padding-left: 1.15rem;
	font-size: 0.85rem;
	color: var(--color-text-muted);
	line-height: 1.5;
	list-style: disc;
}

.home_timeline-description li + li { margin-top: var(--space-sm); }

@media (max-width: 450px) {
	.home_hero-layout {
		grid-template-columns: 1fr;
		grid-template-areas:
			"meta"
			"title"
			"tagline"
			"actions";
		justify-items: center;
		row-gap: var(--space-md);
	}

	.home_hero-meta {
		justify-content: center;
		margin-bottom: 0;
	}

	.home_hero-title { text-align: center; }
	.home_hero-media { display: none; }

	.home_hero-tagline {
		margin-top: var(--space-md);
		max-width: 100%;
		text-align: center;
	}

	.home_hero-actions {
		justify-content: center;
		margin-top: var(--space-md);
	}

	.home_timeline::before {
		left: 1.5rem;
		transform: none;
	}

	.home_timeline-item {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		padding-left: calc(3rem + var(--space-md));
	}

	.home_timeline-marker {
		left: 1.5rem;
		transform: translateX(-50%);
	}

	.home_timeline-item--left .home_timeline-card,
	.home_timeline-item--right .home_timeline-card {
		order: 2;
		max-width: none;
		width: 100%;
		text-align: left;
		padding-left: 0;
		padding-right: 0;
		justify-self: stretch;
	}

	.home_timeline-item--left .home_timeline-dates,
	.home_timeline-item--right .home_timeline-dates {
		order: 1;
		margin-bottom: var(--space-sm);
		padding-left: 0;
		padding-right: 0;
		text-align: left;
	}
}
