/*
	Personal site visual upgrades
	----------------------------
	This file intentionally sits after assets/css/main.css so the original
	HTML5 UP template remains intact. The goal is to improve style, layout,
	and interaction while keeping the updates easy to review.
*/

:root {
	--site-bg: #e7e3e1;
	--site-panel: #d8d4d2;
	--site-panel-raised: #ece9e7;
	--site-text: #262322;
	--site-muted: #5f5a58;
	--site-border: rgba(0, 0, 0, 0.12);
	--site-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
	--site-accent: #b4232a;
	--site-accent-soft: rgba(180, 35, 42, 0.1);
	--site-radius: 8px;
}

html {
	scroll-behavior: smooth;
}

body {
	background: var(--site-bg);
	color: var(--site-muted);
}

a {
	color: var(--site-accent);
}

a:hover {
	color: var(--site-accent) !important;
}

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
	color: #202020;
}

body::before {
	background: var(--site-accent);
	content: "";
	height: 0.28rem;
	left: 0;
	position: fixed;
	top: 0;
	transform: scaleX(var(--scroll-progress, 0));
	transform-origin: left center;
	width: 100%;
	z-index: 2000;
}

#header {
	background-color: #111111;
	background-image:
		linear-gradient(135deg, rgba(0, 0, 0, 0.88), rgba(17, 17, 17, 0.76) 52%, rgba(180, 35, 42, 0.44)),
		url("../../images/bg.jpg");
	background-position: center;
	background-size: cover;
	box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1), 12px 0 50px rgba(0, 0, 0, 0.18);
	overflow: hidden;
}

#header::before,
#header::after {
	border: 1px solid rgba(255, 255, 255, 0.16);
	content: "";
	position: absolute;
}

#header::before {
	height: 13rem;
	right: -3.5rem;
	top: 7rem;
	transform: rotate(24deg);
	width: 13rem;
}

#header::after {
	bottom: 3rem;
	height: 7rem;
	left: 15%;
	transform: rotate(-16deg);
	width: 7rem;
}

#header .inner {
	position: relative;
	z-index: 1;
}

#header h2 {
	font-size: clamp(1.75rem, 3vw, 2.6rem);
	letter-spacing: 0;
	margin-bottom: 0.35em;
}

#header p {
	font-size: 1.05rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#header .image.avatar {
	border: 1px solid rgba(255, 255, 255, 0.42);
	box-shadow:
		0 0 0 4px rgba(255, 255, 255, 0.18),
		0 0 24px rgba(255, 255, 255, 0.34),
		0 20px 45px rgba(0, 0, 0, 0.24);
	padding: 0.25rem;
	transition: transform 220ms ease, box-shadow 220ms ease;
}

#header .image.avatar:hover {
	box-shadow:
		0 0 0 5px rgba(255, 255, 255, 0.2),
		0 0 30px rgba(255, 255, 255, 0.38),
		0 28px 60px rgba(0, 0, 0, 0.32);
	transform: translateY(-4px) scale(1.03);
}

#main {
	max-width: 64em;
}

#main > section {
	border-top: 1px solid var(--site-border);
}

#main > section#one {
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 45%),
		#141313;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--site-radius);
	box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24);
	margin-bottom: 3rem;
	overflow: hidden;
	padding: 2.75rem 3rem 2.75rem 4.5rem;
	position: relative;
}

#main > section#one::before {
	background:
		linear-gradient(135deg, transparent 0 42%, var(--site-accent) 42% 58%, transparent 58% 100%) 0 0 / 1.1rem 1.1rem repeat-y;
	content: "";
	height: calc(100% - 2.5rem);
	left: 1.45rem;
	opacity: 0.95;
	position: absolute;
	top: 1.25rem;
	width: 1.1rem;
}

#main > section#one header,
#main > section#one .actions {
	position: relative;
	z-index: 1;
}

#main > section#one h2 {
	color: #f2efed;
}

#main > section#one .button {
	background: transparent;
	border-color: transparent;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
	color: #f2efed !important;
	isolation: isolate;
	line-height: 2.75em;
	overflow: visible;
	position: relative;
	text-decoration: none;
	text-shadow: none;
	transform: translateZ(0);
}

#main > section#one .button::before,
#main > section#one .button::after {
	content: "";
	pointer-events: none;
	position: absolute;
}

#main > section#one .button::before {
	background: conic-gradient(
		from 0deg,
		rgba(180, 35, 42, 0.2) 0deg,
		rgba(180, 35, 42, 0.28) 62deg,
		rgba(180, 35, 42, 0.68) 122deg,
		var(--site-accent) 156deg,
		#ff6a70 180deg,
		var(--site-accent) 204deg,
		rgba(180, 35, 42, 0.68) 238deg,
		rgba(180, 35, 42, 0.28) 298deg,
		rgba(180, 35, 42, 0.2) 360deg
	);
	border-radius: inherit;
	filter: blur(0.9px);
	inset: -2px;
	-webkit-mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask:
		linear-gradient(#000 0 0) content-box,
		linear-gradient(#000 0 0);
	mask-composite: exclude;
	opacity: 0;
	padding: 2px;
	transform-origin: center;
	transition: opacity 180ms ease;
	z-index: -2;
}

#main > section#one .button::after {
	background: #211f1f;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: inherit;
	box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.03);
	inset: 2px;
	z-index: -1;
}

#main > section#one .button:hover {
	background: transparent;
	border-color: transparent;
	color: #f2efed !important;
}

#main > section#one .button:hover::before {
	animation: section-one-button-spin 2.9s linear infinite;
	opacity: 1;
}

#main > section#one .actions {
	margin-top: 1.25rem;
}

@keyframes section-one-button-spin {
	0% {
		transform: rotate(0deg) scale(1);
	}

	25% {
		transform: rotate(56.25deg) scale(0.75);
	}

	40% {
		transform: rotate(90deg) scale(0.9);
	}

	50% {
		transform: rotate(180deg) scale(1);
	}

	75% {
		transform: rotate(236.25deg) scale(0.75);
	}

	90% {
		transform: rotate(270deg) scale(0.9);
	}

	100% {
		transform: rotate(1turn) scale(1);
	}
}

#main > section:first-child {
	padding-top: 2rem;
}

header.major h2 {
	color: #181818;
	font-size: clamp(1.7rem, 3vw, 2.55rem);
	line-height: 1.15;
	max-width: 12em;
}

#snapshot h2,
#two h2,
#three h2 {
	align-items: center;
	display: flex;
	font-size: 1.9rem;
	gap: 0.7rem;
}

#snapshot h2::after,
#two h2::after,
#three h2::after {
	background: linear-gradient(90deg, var(--site-accent), rgba(0, 0, 0, 0.08), transparent);
	content: "";
	flex: 1;
	height: 2px;
}

ul.actions {
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-left: 0;
}

ul.actions li {
	padding: 0;
}

.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
	background: var(--site-panel-raised);
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	color: #262626 !important;
	font-weight: 600;
	letter-spacing: 0.01em;
	min-width: 9.4em;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
	background: var(--site-panel-raised);
	border-color: rgba(180, 35, 42, 0.55);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.13);
	color: var(--site-accent) !important;
	transform: translateY(-2px);
}

.professional-snapshot {
	position: relative;
}

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

.snapshot-grid article {
	background: var(--site-panel);
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	padding: 1.25rem;
	position: relative;
}

.snapshot-grid article::before {
	background: var(--site-accent);
	border-radius: 999px;
	content: "";
	height: calc(100% - 2rem);
	left: 0;
	position: absolute;
	top: 1rem;
	width: 0.25rem;
}

.snapshot-grid h3 {
	color: #181818;
	font-size: 1rem;
	font-weight: 700;
	margin-bottom: 0.55rem;
}

.snapshot-grid p {
	color: var(--site-text);
	font-size: 0.9rem;
	line-height: 1.55;
	margin-bottom: 0;
}

.featured-timeline {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.15rem;
	padding-left: 6.75rem;
	position: relative;
}

.featured-timeline::before {
	background: rgba(0, 0, 0, 0.22);
	content: "";
	height: calc(100% - 0.5rem);
	left: 4.8rem;
	position: absolute;
	top: 0.25rem;
	width: 2px;
}

.work-item {
	background: var(--site-panel);
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
	transform: none;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.work-item::before {
	background: transparent;
	content: "";
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 0;
	z-index: 1;
}

.work-item:hover {
	border-color: rgba(180, 35, 42, 0.32);
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.09);
	transform: translateY(-2px);
}

.timeline-item {
	align-items: start;
	display: grid;
	gap: 0;
	grid-template-columns: 1fr;
	min-height: 0;
	overflow: visible;
}

.timeline-item.is-featured {
	background: var(--site-panel-raised);
	border-color: rgba(180, 35, 42, 0.36);
}

.timeline-year {
	color: #181818;
	font-size: 0.86rem;
	font-weight: 800;
	left: -6.75rem;
	letter-spacing: 0.02em;
	line-height: 1;
	position: absolute;
	text-align: right;
	top: 1.05rem;
	width: 4.1rem;
}

.timeline-marker {
	background: var(--site-bg);
	border: 2px solid var(--site-accent);
	border-radius: 999px;
	box-shadow: 0 0 0 4px var(--site-bg);
	height: 0.82rem;
	left: -2.35rem;
	position: absolute;
	top: 1rem;
	width: 1.05rem;
	z-index: 2;
}

.timeline-item.is-featured .timeline-marker {
	background: var(--site-accent);
}

.timeline-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.95rem 1rem 1rem;
}

.work-item h3,
.work-item p,
.work-item .case-study-trigger {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.timeline-content h3,
.timeline-content p,
.timeline-content .case-study-trigger {
	padding-left: 0;
	padding-right: 0;
}

.timeline-kicker {
	color: var(--site-accent) !important;
	font-size: 0.66rem !important;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2 !important;
	margin: 0 0 0.45rem !important;
	text-transform: uppercase;
}

.work-item h3 {
	color: #181818;
	font-size: 0.98rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
}

.work-item p {
	color: var(--site-text);
	font-size: 0.84rem;
	line-height: 1.45;
}

.case-study-trigger {
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(180, 35, 42, 0.35);
	color: var(--site-accent);
	cursor: pointer;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	margin: 0.6rem 1.25rem 0;
	padding: 0 0 0.1rem;
}

.timeline-content .case-study-trigger {
	align-self: flex-start;
	margin-left: 0;
}

.case-study-trigger:hover,
.case-study-trigger:focus {
	border-bottom-color: transparent;
	color: var(--site-accent);
	outline: none;
}

.case-study-trigger:focus-visible,
.case-study-close:focus-visible {
	outline: 3px solid rgba(180, 35, 42, 0.28);
	outline-offset: 4px;
}

.case-study-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 1.5rem;
	position: fixed;
	z-index: 3000;
}

.case-study-modal[hidden] {
	display: none;
}

.case-study-backdrop {
	background: rgba(0, 0, 0, 0.72);
	inset: 0;
	position: absolute;
}

.case-study-panel {
	background: var(--site-panel-raised);
	border-radius: var(--site-radius);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
	max-height: min(88vh, 42rem);
	max-width: 38rem;
	overflow: auto;
	padding: 2rem;
	position: relative;
	width: min(100%, 38rem);
}

.case-study-panel h2 {
	color: #181818;
	font-size: 1.7rem;
	margin-bottom: 0.65rem;
	padding-right: 2rem;
}

.case-study-intro {
	margin-bottom: 1rem;
}

.case-study-detail-row {
	align-items: start;
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 1fr) minmax(33%, 42%);
}

.case-study-image {
	background: #1b1b1b;
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	display: block;
	aspect-ratio: 16 / 10;
	height: auto;
	margin: 0;
	max-height: 12rem;
	object-fit: contain;
	padding: 0.35rem;
	width: 100%;
}

.case-study-image[hidden] {
	display: none;
}

.case-study-summary p,
.case-study-body p {
	color: var(--site-text);
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.case-study-body p:last-child {
	margin-bottom: 0;
}

.case-study-close {
	background: #f1f1f1;
	border: 1px solid var(--site-border);
	border-radius: 999px;
	color: #262626;
	cursor: pointer;
	font-size: 1.5rem;
	height: 2.35rem;
	line-height: 1;
	position: absolute;
	right: 1rem;
	top: 1rem;
	width: 2.35rem;
}

.case-study-close:hover {
	background: #e4e4e4;
}

body.case-study-open {
	overflow: hidden;
}

#three .labeled-icons {
	background: var(--site-panel);
	border: 1px solid var(--site-border);
	border-radius: var(--site-radius);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	display: inline-block;
	margin-bottom: 0;
	padding: 1.35rem 1.6rem;
}

#three .labeled-icons li {
	margin-top: 1rem;
}

#three .labeled-icons li:first-child {
	margin-top: 0;
}

#three .labeled-icons a {
	border-bottom-color: transparent;
	color: #262626;
	font-weight: 600;
}

.site-enhanced .reveal-ready {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 520ms ease, transform 520ms ease;
}

.site-enhanced .reveal-ready.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media screen and (max-width: 980px) {
	#header {
		box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14), 0 16px 48px rgba(0, 0, 0, 0.16);
	}

	#header::before {
		right: 5%;
		top: 3rem;
	}

	#main {
		padding-top: 4em;
	}

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

@media screen and (max-width: 736px) {
	#main > section#one {
		padding: 1.75rem 1.5rem 1.75rem 2rem;
	}

	.featured-timeline {
		padding-left: 4.75rem;
	}

	.featured-timeline::before {
		left: 3.4rem;
	}

	.timeline-year {
		left: -4.75rem;
		width: 2.85rem;
	}

	.timeline-marker {
		left: -1.72rem;
	}

	#two h2,
	#snapshot h2,
	#three h2 {
		font-size: 1.45rem;
	}

	.case-study-panel {
		padding: 1.5rem;
	}

	.case-study-detail-row {
		grid-template-columns: 1fr;
	}

	#three .labeled-icons {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}

	.site-enhanced .reveal-ready {
		opacity: 1;
		transform: none;
	}
}
