:root {
	color-scheme: dark;
	--bg: #000000;
	--bg-deep: #0a0a0c;
	--surface: #121216;
	--surface-hover: #1a1a20;
	--taupe: #e5c378;
	--taupe-deep: #caa355;
	--taupe-faint: rgba(229, 195, 120, 0.15);
	--ink: #ffffff;
	--ink-soft: #a1a1aa;
	--ink-faint: #3f3f46;
	--line: rgba(255, 255, 255, 0.12);
	--line-subtle: rgba(255, 255, 255, 0.06);
	--shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
	--shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
	--radius: 1.35rem;
	--radius-sm: 0.95rem;
	--font-fancy: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-italic-fancy: "Instrument Serif", "Playfair Display", Georgia, serif;
	--font-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--max: 1180px;
	--header-h: 4.5rem;
	--section: clamp(4rem, 9vw, 6.5rem);
	--header-bg: rgba(0, 0, 0, 0.85);
	--header-bg-scrolled: rgba(10, 10, 12, 0.95);
	--btn-primary-bg: #ffffff;
	--btn-primary-text: #000000;
	--btn-primary-hover: #e8e8e8;
}

[data-theme="light"] {
	color-scheme: light;
	--bg: #ffffff;
	--bg-deep: #f8f8fa;
	--surface: #f1f1f4;
	--surface-hover: #e7e7ec;
	--taupe: #111111;
	--taupe-deep: #2a2a2a;
	--taupe-faint: rgba(0, 0, 0, 0.06);
	--ink: #000000;
	--ink-soft: #52525b;
	--ink-faint: #d4d4d8;
	--line: rgba(0, 0, 0, 0.09);
	--line-subtle: rgba(0, 0, 0, 0.04);
	--shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
	--shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.04);
	--header-bg: rgba(255, 255, 255, 0.88);
	--header-bg-scrolled: rgba(255, 255, 255, 0.96);
	--btn-primary-bg: #000000;
	--btn-primary-text: #ffffff;
	--btn-primary-hover: #222222;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.05rem;
	line-height: 1.65;
	color: var(--ink-soft);
	background: var(--bg);
	overflow-x: hidden;
	transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
	color: var(--ink);
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

h1, h2, h3, h4 {
	font-family: var(--font-fancy);
	font-weight: 700;
	line-height: 1.1;
	color: var(--ink);
	letter-spacing: -0.025em;
	margin: 0 0 0.75rem;
}

p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.1rem; }
li + li { margin-top: 0.3rem; }

.container {
	width: min(100% - 2rem, var(--max));
	margin-inline: auto;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.text-link {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--ink);
	border-bottom: 1px solid var(--taupe);
	padding-bottom: 0.1rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.9rem;
	padding: 0.7rem 1.35rem;
	font-family: var(--font-body);
	font-size: 0.92rem;
	font-weight: 600;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn--primary {
	background: var(--btn-primary-bg);
	color: var(--btn-primary-text);
	box-shadow: var(--shadow-soft);
	font-weight: 700;
}

.btn--primary:hover {
	background: var(--btn-primary-hover);
	color: var(--btn-primary-text);
	transform: translateY(-1px);
}

.btn--ghost {
	background: var(--surface);
	color: var(--ink);
	border: 1px solid var(--line);
	box-shadow: var(--shadow-soft);
}

.btn--ghost:hover {
	transform: translateY(-1px);
	border-color: var(--taupe);
	color: var(--ink);
}

.btn--block { width: 100%; border-radius: var(--radius-sm); }

/* Header */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: var(--header-h);
	padding: 0.85rem clamp(1rem, 3vw, 2rem);
	background: var(--header-bg);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
	transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
	background: var(--header-bg-scrolled);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	flex-shrink: 0;
}

.brand__logo {
	display: block;
	width: auto;
	height: 2.7rem;
	object-fit: contain;
	object-position: left center;
}

/* Dark theme: white logo. Light theme: black logo. */
.brand__logo--dark { display: none; }
.brand__logo--light { display: block; }

[data-theme="light"] .brand__logo--light { display: none; }
[data-theme="light"] .brand__logo--dark { display: block; }

.brand__text {
	display: none;
	flex-direction: column;
	line-height: 1.15;
}

.brand__name {
	font-family: var(--font-fancy);
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--ink);
	letter-spacing: -0.015em;
}

.brand__role {
	font-size: 0.7rem;
	font-weight: 500;
	color: var(--ink-soft);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.site-nav {
	display: none;
	align-items: center;
	gap: 1.25rem;
	margin-left: auto;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ink-soft);
}

.site-nav a { color: inherit; }
.site-nav a:hover { color: var(--ink); }

/* Theme Toggle */
.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	cursor: pointer;
	box-shadow: var(--shadow-soft);
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
	border-color: var(--taupe);
	transform: scale(1.05);
	color: var(--taupe);
}

.theme-toggle__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* In dark mode: show Sun icon to switch to light, hide Moon icon */
:root:not([data-theme="light"]) .theme-toggle__icon--moon { display: none; }
:root:not([data-theme="light"]) .theme-toggle__icon--sun { display: inline-flex; }

/* In light mode: show Moon icon to switch to dark, hide Sun icon */
[data-theme="light"] .theme-toggle__icon--sun { display: none; }
[data-theme="light"] .theme-toggle__icon--moon { display: inline-flex; }

.header-cta {
	display: none;
	margin-left: 0.25rem;
}

.site-header__contacts { display: none; }

.nav-toggle {
	margin-left: auto;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.6rem;
	height: 2.6rem;
	padding: 0;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 999px;
	box-shadow: var(--shadow-soft);
	cursor: pointer;
}

.nav-toggle span {
	display: block;
	height: 2px;
	width: 1.05rem;
	margin-inline: auto;
	background: var(--ink);
	border-radius: 99px;
}

.menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-menu {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 60;
	width: min(19rem, 86vw);
	height: 100%;
	padding: 1.4rem;
	background: var(--surface);
	border-left: 1px solid var(--line);
	transform: translateX(100%);
	transition: transform 0.28s ease, visibility 0.28s ease;
	display: flex;
	flex-direction: column;
	visibility: hidden;
	pointer-events: none;
	box-shadow: var(--shadow);
}

.mobile-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.menu-open .menu-overlay {
	opacity: 1;
	visibility: visible;
}

.menu-open .mobile-menu {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
}

.mobile-menu__close {
	align-self: flex-end;
	border: 0;
	background: var(--bg-deep);
	color: var(--ink);
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 999px;
	font-size: 1.4rem;
	cursor: pointer;
	line-height: 1;
}

.mobile-menu__nav {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2rem;
	font-size: 1.3rem;
	font-weight: 650;
}

.mobile-menu__social {
	margin-top: auto;
	display: flex;
	gap: 0.9rem;
	font-size: 1.4rem;
}

/* ==========================================================================
   Hero - Minimal full-bleed
   ========================================================================== */
.hero {
	position: relative;
	isolation: isolate;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: calc(var(--header-h) + 1rem) 0 0;
	overflow: hidden;
	overflow-x: clip;
	color: #f5f5f4;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: #0a0a0c;
}

.hero__media-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 58% 16%;
	transform: scale(1.04);
	animation: heroKen 22s ease-out forwards;
	filter: saturate(0.95) contrast(1.03);
}

@keyframes heroKen {
	from { transform: scale(1.06); }
	to { transform: scale(1); }
}

.hero__media-veil {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(105deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0.1) 100%),
		linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.04) 45%, rgba(0, 0, 0, 0.7) 100%);
}

[data-theme="light"] .hero__media-veil {
	background:
		linear-gradient(105deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.52) 48%, rgba(255, 255, 255, 0.18) 100%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.82) 100%);
}

.hero__container {
	position: relative;
	z-index: 1;
	width: min(100% - 2rem, var(--max));
	margin-inline: auto;
	margin-left: max(1rem, calc((100% - var(--max)) / 2));
	padding: clamp(3rem, 10vh, 6rem) 0 clamp(2.5rem, 7vh, 4.5rem);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.85rem;
	max-width: 36rem;
	min-width: 0;
}

.hero__brand,
.hero__heading,
.hero__lead,
.hero__actions {
	animation: heroRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__heading { animation-delay: 0.08s; }
.hero__lead { animation-delay: 0.16s; }
.hero__actions { animation-delay: 0.24s; }

@keyframes heroRise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

.hero__brand {
	margin: 0;
	font-family: var(--font-fancy);
	font-size: clamp(3rem, 9vw, 5.75rem);
	font-weight: 700;
	letter-spacing: -0.045em;
	line-height: 0.94;
	color: #ffffff;
	text-wrap: balance;
}

[data-theme="light"] .hero__brand {
	color: #000000;
}

.hero__heading {
	margin: 0;
	font-family: var(--font-body);
	font-size: clamp(0.95rem, 1.5vw, 1.05rem);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .hero__heading {
	color: rgba(0, 0, 0, 0.58);
}

.hero__lead {
	margin: 0.15rem 0 0;
	max-width: 28rem;
	font-size: clamp(1rem, 1.5vw, 1.12rem);
	line-height: 1.6;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.78);
}

[data-theme="light"] .hero__lead {
	color: rgba(0, 0, 0, 0.68);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.7rem;
	margin-top: 0.85rem;
}

.btn--hero {
	min-height: 2.9rem;
	padding: 0.7rem 1.45rem;
	font-size: 0.92rem;
	font-weight: 600;
	border-radius: 0.35rem;
	box-shadow: none;
}

.btn--hero:hover {
	transform: none;
}

.btn--hero-ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.35);
	color: #ffffff;
}

.btn--hero-ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.55);
	color: #ffffff;
}

[data-theme="light"] .btn--hero-ghost {
	background: transparent;
	border-color: rgba(0, 0, 0, 0.22);
	color: #000000;
}

[data-theme="light"] .btn--hero-ghost:hover {
	background: rgba(0, 0, 0, 0.05);
	border-color: rgba(0, 0, 0, 0.4);
	color: #000000;
}

@media (prefers-reduced-motion: reduce) {
	.hero__media-img {
		animation: none;
		transform: scale(1);
	}

	.hero__brand,
	.hero__heading,
	.hero__lead,
	.hero__actions {
		animation: none;
	}
}

/* Section scaffolding */
.section {
	padding: var(--section) 0;
	position: relative;
}

#work {
	overflow-x: clip;
}

.section__rail {
	display: grid;
	gap: 1.5rem;
}

.rail-label {
	font-family: var(--font-fancy);
	font-size: clamp(2.8rem, 10vw, 5.5rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	color: var(--ink-faint);
	line-height: 0.9;
	margin: 0;
}

.rail-label--stroke {
	color: transparent;
	-webkit-text-stroke: 1.5px var(--ink-faint);
}

.section__label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--taupe);
	margin-bottom: 0.65rem;
}

.section__title {
	font-family: var(--font-fancy);
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	text-transform: uppercase;
	color: var(--ink);
	margin: 0 0 1rem;
}

.section__lead {
	margin: -0.35rem 0 0;
	max-width: 34rem;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--ink-soft);
}

.section__header {
	margin-bottom: 2rem;
	max-width: 36rem;
}

.section__header--split {
	max-width: none;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
}

/* About */
.about-panel {
	display: grid;
	gap: 1rem;
}

.about-card,
.skills-strip,
.focus-card,
.edu-item,
.timeline__item,
.contact-grid__info,
.contact-grid__form,
.work-card,
.case {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow-soft);
}

.about-card {
	padding: clamp(1.4rem, 3vw, 2rem);
}

.about-card__hook {
	font-size: clamp(1.2rem, 2.4vw, 1.55rem);
	font-weight: 650;
	color: var(--ink);
	line-height: 1.3;
}

.skills-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1.2rem;
	align-items: center;
	justify-content: center;
	padding: 1.35rem 1.25rem;
}

.skills-strip span {
	font-size: clamp(1rem, 2.4vw, 1.35rem);
	font-weight: 700;
	color: var(--ink);
	letter-spacing: -0.02em;
}

.skills-strip span:nth-child(odd) { color: var(--taupe-deep); }

.focus-grid {
	display: grid;
	gap: 0.9rem;
}

.focus-card {
	padding: 1.5rem;
	min-height: 8.5rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: var(--surface);
	border: 1px solid var(--line);
	color: var(--ink);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.focus-card:nth-child(1) { border-left: 3px solid var(--taupe); }
.focus-card:nth-child(2) { background: var(--bg-deep); }
.focus-card:nth-child(3) { background: var(--surface); }
.focus-card:nth-child(4) { background: var(--surface-hover); }

.focus-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow);
	border-color: var(--taupe);
	color: inherit;
}

.focus-card h3 {
	font-family: var(--font-fancy);
	font-size: clamp(1.35rem, 2.6vw, 1.85rem);
	text-transform: uppercase;
	color: inherit;
	margin: 0;
}

.focus-card p {
	margin: 0;
	font-weight: 600;
	opacity: 0.85;
}

/* Projects rail */
.projects-rail {
	display: grid;
	gap: 1.25rem;
	min-width: 0;
	width: 100%;
}

.projects-rail > div {
	min-width: 0;
	max-width: 100%;
	overflow-x: clip;
}

.work-scroll {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(16rem, 78%);
	gap: 1rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding: 0.35rem 0.15rem 1rem;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	min-width: 0;
	max-width: 100%;
}

.work-scroll::-webkit-scrollbar { height: 6px; }
.work-scroll::-webkit-scrollbar-thumb {
	background: var(--taupe);
	border-radius: 99px;
}

.work-see-all {
	flex-shrink: 0;
	border-radius: 0.35rem;
	box-shadow: none;
	min-height: 2.6rem;
	padding: 0.55rem 1.15rem;
}

.work-see-all-wrap {
	display: none;
	justify-content: flex-start;
	margin-top: 0.35rem;
}

.work-see-all--footer {
	width: auto;
	min-width: 10rem;
}

.work-card {
	scroll-snap-align: start;
	padding: 0.85rem;
	display: grid;
	gap: 0.85rem;
	color: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	color: inherit;
}

.work-card__media {
	margin: 0;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	border-radius: 1rem;
	background: var(--bg-deep);
}

.work-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.work-card__index {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--taupe-deep);
	margin: 0;
}

.work-card__title {
	font-size: 1.2rem;
	margin: 0 0 0.25rem;
}

.work-card__desc {
	margin: 0;
	font-size: 0.95rem;
}

/* Resume */
.resume-block {
	margin-bottom: 2.25rem;
}

.edu-grid,
.timeline {
	display: grid;
	gap: 0.9rem;
}

.edu-item,
.timeline__item {
	padding: 1.35rem 1.4rem;
}

.edu-item h4,
.timeline__role {
	font-size: 1.15rem;
	margin-bottom: 0.25rem;
}

.edu-item__dates,
.timeline__dates {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--taupe-deep);
	margin: 0 0 0.4rem;
}

.timeline__item {
	display: grid;
	gap: 0.75rem;
}

.timeline__num {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	color: var(--ink-faint);
	line-height: 1;
	margin: 0;
}

.timeline__company {
	color: var(--ink);
	margin-bottom: 0.55rem;
}

.timeline__tech {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
	margin: 0.5rem 0 0;
}

/* Partners - cards follow theme; logo wells stay light for contrast */
.partners {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	padding: 0;
	background: transparent;
}

.partners__item {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 7.25rem;
	padding: 0.9rem 0.8rem 0.8rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-soft);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.partners__item:hover {
	transform: translateY(-3px);
	border-color: var(--taupe);
	background: var(--surface-hover);
}

.partners__logo {
	width: 100%;
	height: 3.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.65rem;
	border-radius: 0.75rem;
	background: #f3f3f6;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .partners__logo {
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.08);
}

.partners__item img {
	max-height: 2.55rem;
	max-width: 8.25rem;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0.96;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.partners__item:hover img {
	opacity: 1;
	transform: scale(1.04);
}

.partners__name {
	max-width: 100%;
	padding: 0 0.15rem;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.25;
	text-align: center;
	color: var(--ink-soft);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Contact */
.contact-grid {
	display: grid;
	gap: 0.9rem;
}

.contact-grid__info,
.contact-grid__form {
	padding: clamp(1.4rem, 3vw, 2rem);
}

.contact-grid__info a {
	font-size: clamp(1.15rem, 2.4vw, 1.5rem);
	font-weight: 700;
	color: var(--ink);
}

.contact-grid__place {
	color: var(--ink);
	margin-bottom: 1rem;
}

.contact-form {
	display: grid;
	gap: 0.8rem;
}

.form-row {
	display: grid;
	gap: 0.8rem;
}

.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 0.95rem 1rem;
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	background: var(--bg);
	color: var(--ink);
	font: inherit;
	outline: none;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
	border-color: var(--taupe);
	box-shadow: 0 0 0 2px var(--taupe-faint);
}

.contact-form textarea {
	min-height: 7.5rem;
	resize: vertical;
}

/* Work page */
.page-hero {
	padding: calc(var(--header-h) + 3rem) 0 1.5rem;
}

.page-hero__title {
	font-family: var(--font-fancy);
	font-size: clamp(2.4rem, 7vw, 4rem);
	text-transform: uppercase;
	color: var(--ink);
}

.page-hero__lead {
	max-width: 34rem;
}

.case-list {
	display: grid;
	gap: 1.1rem;
}

.case {
	display: grid;
	gap: 1.25rem;
	padding: 1rem;
}

.case__media {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: 1.1rem;
	background: var(--bg-deep);
}

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

.case__body { padding: 0.35rem 0.5rem 0.65rem; }

.case__title {
	font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

.case__meta { margin-top: 1rem; }

.case__meta-label {
	font-size: 0.76rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 0.3rem;
	color: var(--taupe-deep);
}

.case__tech,
.case__link {
	font-weight: 600;
	color: var(--ink);
}

.case__link {
	border-bottom: 1px solid var(--taupe);
}

/* Footer */
.site-footer {
	padding: 1.5rem 0 2.2rem;
	border-top: 1px solid var(--line);
}

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

.site-footer__copy {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 500;
}

.site-footer__social {
	display: flex;
	gap: 0.75rem;
	font-size: 1.35rem;
}

.site-footer__social a {
	width: 2.6rem;
	height: 2.6rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--surface);
	box-shadow: var(--shadow-soft);
}

.reveal {
	opacity: 0;
	transform: translateY(0.7rem);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1 !important; transform: none !important; }
}

@media (min-width: 768px) {
	.brand__text { display: flex; }

	.brand__logo {
		height: 3rem;
	}

	.site-nav { display: flex; }
	.header-cta { display: inline-flex; }
	.nav-toggle { display: none; }

	.section__rail,
	.projects-rail {
		grid-template-columns: auto 1fr;
		align-items: start;
		gap: 1.5rem 2rem;
	}

	.rail-label {
		writing-mode: vertical-rl;
		transform: rotate(180deg);
		position: sticky;
		top: calc(var(--header-h) + 1.5rem);
	}

	.work-scroll {
		grid-auto-columns: minmax(18rem, 42%);
	}

	.focus-grid {
		grid-template-columns: 1.1fr 0.9fr;
	}

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

	.timeline__item {
		grid-template-columns: 5rem 1fr;
		align-items: start;
	}

	.partners {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0.85rem;
	}

	.partners__item {
		min-height: 7.75rem;
		padding: 1.15rem 1rem 0.95rem;
	}

	.partners__logo {
		height: 3.5rem;
	}

	.partners__item img {
		max-height: 3rem;
		max-width: 9.5rem;
	}

	.partners__name {
		font-size: 0.72rem;
	}

	.contact-grid {
		grid-template-columns: 0.9fr 1.1fr;
	}

	.form-row {
		grid-template-columns: 1fr 1fr;
	}

	.case {
		grid-template-columns: 1.05fr 0.95fr;
		align-items: center;
		padding: 1.15rem;
	}

	.case--reverse .case__media { order: 2; }
	.case--reverse .case__body { order: 1; }
}

@media (min-width: 992px) {
	.hero {
		min-height: 100svh;
		padding-top: calc(var(--header-h) + 1rem);
	}

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

/* Tablet + mobile: portrait band, copy below - keeps face visible */
@media (max-width: 991px) {
	.hero {
		min-height: auto;
		height: auto;
		justify-content: flex-start;
		padding-top: var(--header-h);
		color: var(--ink);
		background: var(--bg);
		overflow: hidden;
		overflow-x: clip;
	}

	.hero__media {
		position: relative;
		inset: auto;
		width: 100%;
		height: clamp(26rem, 62vh, 38rem);
		flex-shrink: 0;
	}

	.hero__media-img {
		object-position: 66% 12%;
		transform: none;
		animation: none;
		filter: saturate(1) contrast(1.04);
	}

	.hero__media-veil {
		background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 55%, rgba(0, 0, 0, 0.45) 100%);
	}

	[data-theme="light"] .hero__media-veil {
		background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0.55) 100%);
	}

	.hero__container {
		width: min(100% - 2rem, var(--max));
		max-width: none;
		margin: 0 auto;
		padding: 1.5rem 0 2.25rem;
		gap: 0.7rem;
	}

	.hero__brand {
		color: var(--ink);
		font-size: clamp(2.4rem, 9vw, 3.75rem);
	}

	.hero__heading {
		color: var(--ink-soft);
	}

	.hero__lead {
		color: var(--ink-soft);
		max-width: 34rem;
	}

	.hero__actions {
		width: 100%;
		margin-top: 0.45rem;
	}

	.btn--hero-ghost {
		border-color: var(--line);
		color: var(--ink);
	}

	.btn--hero-ghost:hover {
		background: var(--surface);
		border-color: var(--taupe);
		color: var(--ink);
	}
}

/* Mobile refinements */
@media (max-width: 767px) {
	:root {
		--section: 3.25rem;
		--header-h: 4rem;
	}

	.site-header {
		padding-inline: 0.9rem;
	}

	.site-header > .theme-toggle {
		display: none;
	}

	.brand__logo {
		height: 2.45rem;
	}

	.hero__media {
		height: clamp(22rem, 56vh, 30rem);
	}

	.hero__media-img {
		object-position: 70% 10%;
	}

	.hero__container {
		padding-top: 1.25rem;
		padding-bottom: 1.85rem;
		gap: 0.6rem;
	}

	.hero__brand {
		font-size: clamp(2.35rem, 11vw, 3.1rem);
	}

	.hero__lead {
		font-size: 0.98rem;
	}

	.hero__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 0.55rem;
	}

	.hero__actions .btn {
		width: 100%;
		justify-content: center;
	}

	.section__header--split .work-see-all {
		display: none;
	}

	.work-see-all-wrap {
		display: flex;
	}

	.work-see-all--footer {
		width: 100%;
	}

	.rail-label {
		font-size: 1.7rem;
		letter-spacing: 0.08em;
		writing-mode: horizontal-tb;
		transform: none;
		margin-bottom: 0.35rem;
	}

	.section__rail,
	.projects-rail {
		gap: 0.75rem;
		grid-template-columns: 1fr;
	}

	.section__title {
		font-size: 1.7rem;
		margin-bottom: 0.65rem;
	}

	.section__header {
		margin-bottom: 1.15rem;
	}

	.work-scroll {
		display: grid;
		grid-auto-flow: row;
		grid-template-columns: 1fr;
		grid-auto-columns: unset;
		gap: 0.85rem;
		overflow: visible;
		scroll-snap-type: none;
		margin-inline: 0;
		padding: 0;
		max-width: 100%;
	}

	.work-card {
		width: 100%;
		max-width: 100%;
	}

	.work-card:hover {
		transform: none;
	}

	.skills-strip {
		justify-content: flex-start;
		gap: 0.55rem 0.9rem;
		padding: 1rem;
	}

	.skills-strip span {
		font-size: 0.98rem;
	}

	.focus-card {
		min-height: 6.5rem;
		padding: 1.15rem;
	}

	.focus-card h3 {
		font-size: 1.35rem;
	}

	.resume-block {
		margin-bottom: 1.5rem;
	}

	.timeline__num {
		font-size: 1.8rem;
	}

	.partners {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem;
	}

	.partners__item {
		min-height: 6.4rem;
		padding: 0.8rem 0.55rem 0.7rem;
		gap: 0.4rem;
	}

	.partners__logo {
		height: 2.7rem;
	}

	.partners__item img {
		max-height: 2.3rem;
		max-width: 6.8rem;
	}

	.partners__name {
		font-size: 0.62rem;
	}

	.contact-grid__info,
	.contact-grid__form {
		padding: 1.15rem;
	}

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