:root {
	--bg: #f7f8f6;
	--surface: #ffffff;
	--surface-alt: #eef3f2;
	--ink: #17202a;
	--muted: #596673;
	--line: #d8dee3;
	--teal: #007c7a;
	--teal-dark: #005f5d;
	--blue: #2f5f98;
	--rust: #a4562b;
	--gold: #b78a22;
	--soft-blue: #e8f0f8;
	--soft-green: #e7f3ef;
	--soft-rust: #f5ece6;
	--shadow: 0 18px 42px rgba(23, 32, 42, 0.08);
	--max-width: 1180px;
	--header-height: 72px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	letter-spacing: 0;
	text-rendering: optimizeLegibility;
}

body.is-viewer-open {
	overflow: hidden;
}

body,
button,
input,
textarea {
	letter-spacing: 0;
}

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

a {
	color: var(--teal-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--rust);
}

:focus-visible {
	outline: 3px solid rgba(0, 124, 122, 0.45);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -10rem;
	z-index: 20;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: var(--ink);
	color: #ffffff;
}

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

/* ─── Header ─────────────────────────────────────────────────── */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	min-height: var(--header-height);
	border-bottom: 1px solid rgba(216, 222, 227, 0.85);
	background: rgba(247, 248, 246, 0.94);
	backdrop-filter: blur(16px);
}

.site-header__inner,
.section-inner {
	width: min(100% - 2rem, var(--max-width));
	margin: 0 auto;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--header-height);
}

.brand {
	color: var(--ink);
	font-size: 1.05rem;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.site-nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.site-nav a {
	padding: 0.45rem 0.7rem;
	border-radius: 8px;
	color: var(--muted);
	font-size: 0.94rem;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	background: var(--surface-alt);
	color: var(--ink);
}


/* ─── Common section bands ────────────────────────────────────── */

.section-band {
	padding: 4rem 0;
	background: var(--bg);
}

.section-band--alt {
	background: var(--surface-alt);
}

/* ─── Typography ─────────────────────────────────────────────── */

.eyebrow {
	margin: 0 0 0.75rem;
	color: var(--rust);
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
	overflow-wrap: anywhere;
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.12;
}

h1 {
	font-size: 4rem;
	font-weight: 850;
}

h2 {
	font-size: 2.15rem;
	font-weight: 820;
}

h3 {
	font-size: 1.12rem;
	font-weight: 780;
}

/* ─── Home Hero ───────────────────────────────────────────────── */

.page-home body,
body.page-home {
	/* Prevent any overflow from showing */
	overflow: hidden;
}

.home-hero {
	height: calc(100vh - var(--header-height));
	display: grid;
	place-items: center;
	padding: 2rem 1rem;
}

.home-hero__inner {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 4rem;
	align-items: center;
	width: min(100% - 2rem, var(--max-width));
}

.home-hero__photo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.home-hero__photo img {
	width: 280px;
	height: 280px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid var(--surface);
	box-shadow: 0 24px 56px rgba(23, 32, 42, 0.14), 0 0 0 1px var(--line);
}

.home-hero__copy {
	max-width: 640px;
}

.home-hero__copy h1 {
	margin: 0.5rem 0 0;
	font-size: clamp(2.8rem, 5vw, 4.5rem);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.home-hero__headline {
	margin: 1rem 0 0;
	color: var(--blue);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.5;
}

.home-hero__statement {
	margin: 1rem 0 0;
	color: var(--muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

/* ─── Sticky footer for inner pages ──────────────────────────── */

body:not(.page-home) {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body:not(.page-home) main {
	flex: 1;
}

/* ─── Inner page header ───────────────────────────────────────── */

.page-header {
	padding-top: 3rem;
	padding-bottom: 3rem;
}

.page-header h1 {
	margin-top: 0.4rem;
	font-size: clamp(2.4rem, 4vw, 3.5rem);
}

.page-header__summary {
	margin: 0.9rem 0 0;
	max-width: 760px;
	color: var(--muted);
	font-size: 1.05rem;
}

.page-header__cv-note {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 1.2rem 0 0;
	color: var(--muted);
	font-size: 0.94rem;
}

.page-header__cv-note .icon {
	color: var(--teal-dark);
	font-size: 0.9rem;
}

/* ─── Section headings ────────────────────────────────────────── */

.section-heading {
	max-width: 760px;
	margin-bottom: 1.8rem;
}

.section-heading--split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
	gap: 2rem;
	max-width: none;
	align-items: end;
}

.section-summary {
	margin: 0.6rem 0 0;
	color: var(--muted);
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 2.75rem;
	padding: 0.72rem 1rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 8px 22px rgba(23, 32, 42, 0.05);
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.button:hover {
	border-color: var(--teal);
	background: #f9fbfb;
	color: var(--teal-dark);
}

.button--primary {
	border-color: var(--teal-dark);
	background: var(--teal-dark);
	color: #ffffff;
}

.button--primary:hover {
	border-color: var(--ink);
	background: var(--ink);
	color: #ffffff;
}

.button--ghost {
	background: transparent;
	box-shadow: none;
}

.button .icon {
	line-height: 1;
}

/* ─── Projects ────────────────────────────────────────────────── */

.project-grid {
	display: grid;
	gap: 1.25rem;
}

.project-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 1.2rem;
	scroll-margin-top: calc(var(--header-height) + 1rem);
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(23, 32, 42, 0.05);
}

.project-card__body {
	min-width: 0;
}

.project-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.project-card__status {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	min-height: 1.75rem;
	padding: 0.25rem 0.55rem;
	border-radius: 8px;
	background: var(--soft-blue);
	color: var(--blue);
	font-size: 0.78rem;
	font-weight: 850;
}

.project-card__description {
	margin: 0 0 0.85rem;
	color: var(--muted);
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0.85rem 0 1rem;
	padding: 0;
	list-style: none;
}

.tag-list li {
	padding: 0.25rem 0.52rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fbfcfc;
	color: #42505c;
	font-size: 0.78rem;
	font-weight: 750;
	line-height: 1.25;
}

.project-highlights {
	display: grid;
	gap: 0.35rem;
	margin: 0 0 1rem;
}

.project-highlights {
	padding-left: 1.2rem;
	color: var(--muted);
}

.project-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 1rem;
}

.project-links .button {
	min-height: 2.35rem;
	padding: 0.58rem 0.78rem;
	font-size: 0.88rem;
}

/* ─── Project demo / media ────────────────────────────────────── */

.project-demo {
	display: grid;
	grid-template-rows: minmax(220px, 1fr) auto;
	min-height: 100%;
	margin: 0;
	border-radius: 8px;
	background: #f4f7f6;
	overflow: hidden;
}

.project-demo__visual,
.project-demo .media-frame {
	position: relative;
	min-height: 220px;
	border: 1px solid var(--line);
	border-radius: 8px 8px 0 0;
	background: #f3f6f5;
	overflow: hidden;
}

.project-demo img {
	width: 100%;
	height: 100%;
	min-height: 220px;
	object-fit: cover;
}

.image-zoom-button {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 220px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: zoom-in;
	font: inherit;
}

.project-demo--contain .media-frame {
	background: #ffffff;
}

.project-demo--contain img {
	padding: 0.75rem;
	object-fit: contain;
}

.project-demo figcaption,
.project-demo__caption {
	padding: 0.75rem;
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 8px 8px;
	background: var(--surface);
	color: var(--muted);
	font-size: 0.88rem;
}

/* ─── Image viewer (lightbox) ─────────────────────────────────── */

.image-fallback {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 1rem;
	background: repeating-linear-gradient(135deg, #f1f4f3 0, #f1f4f3 10px, #e3e9e8 10px, #e3e9e8 20px);
	color: var(--muted);
	font-weight: 800;
	text-align: center;
}

.media-frame {
	position: relative;
}

.media-frame.is-missing .image-fallback {
	display: flex;
}

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

.image-viewer {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: clamp(0.8rem, 3vw, 2rem);
}

.image-viewer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(23, 32, 42, 0.78);
}

.image-viewer__panel {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	width: min(100%, 1120px);
	max-height: min(92vh, 920px);
	padding: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.image-viewer__close {
	justify-self: end;
	display: grid;
	width: 2.5rem;
	height: 2.5rem;
	margin-bottom: 0.75rem;
	padding: 0;
	place-items: center;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #ffffff;
	color: var(--ink);
	cursor: pointer;
	font: inherit;
}

.image-viewer__close:hover,
.image-viewer__close:focus-visible {
	border-color: var(--teal);
	color: var(--teal-dark);
}

.image-viewer__image {
	width: 100%;
	max-height: calc(92vh - 8.5rem);
	object-fit: contain;
	background: #ffffff;
}

.image-viewer__caption {
	margin: 0.75rem 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

/* ─── Placeholder visuals ─────────────────────────────────────── */

.placeholder-visual {
	display: grid;
	align-content: center;
	gap: 1rem;
	min-height: 220px;
	padding: 1.2rem;
}

.placeholder-visual__title {
	margin: 0;
	color: var(--ink);
	font-weight: 850;
}

.placeholder-visual__detail {
	margin: 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.forecast-bars,
.dashboard-layout,
.pipeline-steps,
.ai-log,
.architecture-flow {
	display: grid;
	gap: 0.55rem;
}

.forecast-bars span,
.ai-log span {
	display: block;
	height: 0.7rem;
	border-radius: 999px;
	background: var(--teal);
}

.forecast-bars span:nth-child(2),
.ai-log span:nth-child(2) {
	width: 78%;
	background: var(--blue);
}

.forecast-bars span:nth-child(3),
.ai-log span:nth-child(3) {
	width: 58%;
	background: var(--gold);
}

.forecast-bars span:nth-child(4),
.ai-log span:nth-child(4) {
	width: 86%;
	background: var(--rust);
}

.dashboard-layout {
	grid-template-columns: 1fr 1fr;
}

.dashboard-layout span {
	min-height: 3.2rem;
	border-radius: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
}

.dashboard-layout span:first-child {
	grid-column: 1 / -1;
	background: var(--soft-blue);
}

.pipeline-steps,
.architecture-flow {
	grid-template-columns: repeat(3, 1fr);
	align-items: center;
}

.pipeline-steps span,
.architecture-flow span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 4rem;
	padding: 0.5rem;
	border-radius: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.82rem;
	font-weight: 800;
	text-align: center;
}

.architecture-flow span:nth-child(2) {
	background: var(--soft-green);
	color: var(--teal-dark);
}

.pipeline-steps span:nth-child(2) {
	background: var(--soft-rust);
	color: var(--rust);
}

/* ─── Experience / Timeline ───────────────────────────────────── */

.timeline {
	display: grid;
	gap: 0.8rem;
}

.timeline-item {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 1rem 1.5rem;
	padding: 1.25rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(23, 32, 42, 0.05);
}

.timeline-item__meta {
	/* left column */
}

.timeline-item__role {
	margin: 0;
	color: var(--ink);
	font-weight: 850;
	line-height: 1.3;
}

.timeline-item__org {
	margin: 0.3rem 0 0;
	color: var(--blue);
	font-weight: 780;
}

.timeline-item__period {
	margin: 0.25rem 0 0;
	color: var(--muted);
	font-size: 0.88rem;
}

.timeline-item__content {
	/* right column */
}

.timeline-item__summary {
	margin: 0;
	color: var(--muted);
	line-height: 1.65;
}

.timeline-item__details {
	margin: 0.75rem 0 0;
	padding-left: 1.2rem;
	color: var(--muted);
	font-size: 0.93rem;
	line-height: 1.65;
	display: grid;
	gap: 0.35rem;
}

/* ─── Capabilities grid ───────────────────────────────────────── */

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

.capability-card {
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(23, 32, 42, 0.05);
}

.capability-card ul {
	display: grid;
	gap: 0.3rem;
	margin: 0.65rem 0 0;
	padding-left: 1.2rem;
	color: var(--muted);
}

.capability-card p {
	margin: 0.55rem 0 0;
	color: var(--muted);
}

/* ─── Contact standalone ──────────────────────────────────────── */

.contact-standalone {
	max-width: 780px;
}

.contact-panel {
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(23, 32, 42, 0.05);
}

.link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-bottom: 1.5rem;
}

.contact-list {
	display: grid;
	gap: 1rem;
	margin: 0;
}

.contact-list div {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}

.contact-list dt {
	color: var(--muted);
	font-weight: 850;
}

.contact-list dd {
	margin: 0;
}

/* ─── Interests / Beyond Work ─────────────────────────────────── */

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

.beyond-card {
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	box-shadow: 0 12px 30px rgba(23, 32, 42, 0.05);
	overflow: hidden;
	transition: box-shadow 0.2s;
}

.beyond-card:hover {
	box-shadow: 0 20px 48px rgba(23, 32, 42, 0.1);
}

.beyond-card__thumb {
	aspect-ratio: 4 / 3;
	background: #f3f6f5;
	border-bottom: 1px solid var(--line);
}

.beyond-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.beyond-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--soft-green);
	color: var(--teal-dark);
	font-size: 1.5rem;
	font-weight: 850;
}

.beyond-card__body {
	padding: 1.1rem 1.1rem 1.3rem;
}

.beyond-card__body h3 {
	margin: 0;
}

.beyond-card p {
	margin: 0.5rem 0 0;
	color: var(--muted);
	font-size: 0.93rem;
	line-height: 1.65;
}

/* ─── Footer ──────────────────────────────────────────────────── */

.site-footer {
	padding: 1.5rem 0;
	background: var(--ink);
	color: rgba(255, 255, 255, 0.78);
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-footer p {
	margin: 0;
}

.site-footer a {
	color: #ffffff;
	font-weight: 800;
}

/* ─── Text links ──────────────────────────────────────────────── */

.text-link {
	font-weight: 800;
}

/* ─── Responsive: 980px ───────────────────────────────────────── */

@media (max-width: 980px) {
	.home-hero__inner {
		grid-template-columns: 1fr;
		text-align: center;
		justify-items: center;
		gap: 2.5rem;
	}

	.home-hero__photo img {
		width: 220px;
		height: 220px;
	}

	.home-hero__copy {
		max-width: 100%;
	}

	.project-card,
	.section-heading--split,
	.timeline-item {
		grid-template-columns: 1fr;
	}

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

	.contact-standalone {
		max-width: 100%;
	}
}

/* ─── Responsive: 720px ───────────────────────────────────────── */

@media (max-width: 720px) {
	:root {
		--header-height: auto;
	}

	html {
		scroll-behavior: auto;
	}

	.site-header__inner {
		align-items: flex-start;
		flex-direction: column;
		padding: 0.85rem 0;
	}

	.site-nav {
		justify-content: flex-start;
	}

	.site-nav a {
		padding-left: 0;
		padding-right: 0.75rem;
	}

	.home-hero {
		height: auto;
		padding: 3rem 1rem;
	}

	.section-band {
		padding: 3rem 0;
	}

	h1 {
		font-size: 2.6rem;
	}

	h2 {
		font-size: 1.8rem;
	}

	.home-hero__copy h1 {
		font-size: 2.6rem;
	}

	.home-hero__headline {
		font-size: 1rem;
	}

	.capability-grid,
	.interests-grid,
	.contact-list div {
		grid-template-columns: 1fr;
	}

	.project-card__header {
		flex-direction: column;
	}

	.site-footer__inner {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
