/* ===== tokens ===== */
:root {
	--bg: #0b0b0d;
	--surface: #121215;
	--surface-2: #17171b;
	--border: #232329;
	--border-strong: #33333b;
	--text: #ececef;
	--muted: #9b9ba6;
	--faint: #6b6b76;
	--accent: #b49cff;
	--accent-soft: rgba(180, 156, 255, 0.12);
	--green: #4ade80;

	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--radius: 14px;
	--max: 1040px;
	--gutter: clamp(16px, 4vw, 32px);
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1,
h2,
h3,
p {
	margin: 0;
}

strong {
	color: var(--text);
	font-weight: 600;
}

::selection {
	background: var(--accent);
	color: #0b0b0d;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.container {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 8px 14px;
	background: var(--accent);
	color: #0b0b0d;
	border-radius: 8px;
	font-weight: 600;
}

.skip-link:focus {
	top: 12px;
}

.accent {
	color: var(--accent);
}

.label {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--accent);
	letter-spacing: 0.02em;
}

/* ===== nav ===== */
.nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(11, 11, 13, 0.75);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.nav.scrolled {
	border-bottom-color: var(--border);
}

.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 14px;
}

.brand-mark {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	color: var(--accent);
	font-weight: 500;
}

.brand-name {
	color: var(--muted);
}

.nav-links {
	display: flex;
	gap: 28px;
	font-family: var(--mono);
	font-size: 13px;
}

.nav-links a {
	color: var(--muted);
	transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
	color: var(--text);
}

.menu-btn {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 40px;
	height: 40px;
	padding: 0 9px;
	background: none;
	border: 1px solid var(--border);
	border-radius: 10px;
	cursor: pointer;
}

.menu-btn span {
	display: block;
	height: 1.5px;
	background: var(--text);
	transition: transform 0.2s ease;
}

.menu-btn[aria-expanded="true"] span:first-child {
	transform: translateY(3.75px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
	transform: translateY(-3.75px) rotate(-45deg);
}

/* ===== hero ===== */
.hero {
	padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px);
}

.hero-grid {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 56px;
	align-items: center;
}

.status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
	padding: 6px 14px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--muted);
}

.dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

h1 {
	font-size: clamp(40px, 7vw, 72px);
	line-height: 1.02;
	letter-spacing: -0.035em;
	font-weight: 700;
}

.lead {
	max-width: 560px;
	margin-top: 20px;
	color: var(--muted);
	font-size: clamp(16px, 1.6vw, 18px);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.btn {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 20px;
	border: 1px solid var(--border-strong);
	border-radius: 10px;
	font-size: 14.5px;
	font-weight: 500;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

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

.btn-primary {
	background: var(--text);
	color: var(--bg);
	border-color: var(--text);
}

.btn-primary:hover {
	background: #fff;
	border-color: #fff;
}

.socials {
	display: flex;
	gap: 20px;
	margin-top: 28px;
	font-family: var(--mono);
	font-size: 13px;
}

.socials a {
	color: var(--faint);
	transition: color 0.15s ease;
}

.socials a:hover {
	color: var(--text);
}

.hero-photo {
	margin: 0;
	width: clamp(200px, 26vw, 300px);
}

.hero-photo img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 20px;
	border: 1px solid var(--border);
	filter: grayscale(0.25);
}

.hero-photo figcaption {
	margin-top: 12px;
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--faint);
	text-align: center;
}

/* ===== sections ===== */
.section {
	padding: clamp(56px, 9vw, 96px) 0;
	border-top: 1px solid var(--border);
}

.section-head {
	margin-bottom: 40px;
}

.section-head h2,
.contact h2 {
	margin-top: 8px;
	font-size: clamp(26px, 3.6vw, 36px);
	line-height: 1.15;
	letter-spacing: -0.025em;
	font-weight: 650;
}

/* ===== about ===== */
.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px 48px;
	color: var(--muted);
}

.facts {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 16px 0 0;
}

.facts div {
	padding: 16px 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.facts dt {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--faint);
}

.facts dd {
	margin: 4px 0 0;
	color: var(--text);
	font-size: 14.5px;
}

/* ===== experience ===== */
.timeline {
	display: grid;
	gap: 16px;
}

.job {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	padding: 28px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.date {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--faint);
}

.job h3 {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.at {
	color: var(--accent);
	font-weight: 500;
}

.bullets {
	display: grid;
	gap: 10px;
	margin-top: 16px;
	color: var(--muted);
	font-size: 15px;
}

.bullets li {
	position: relative;
	padding-left: 20px;
}

.bullets li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.72em;
	width: 8px;
	height: 1px;
	background: var(--faint);
}

.bullets.small {
	gap: 6px;
	font-size: 14px;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

.tags li {
	padding: 4px 10px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--muted);
	background: var(--bg);
}

/* ===== projects ===== */
.featured {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.card {
	display: flex;
	flex-direction: column;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
	border-color: var(--border-strong);
	transform: translateY(-2px);
}

.card h3 {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.card > p,
.split-a > p {
	margin-top: 8px;
	color: var(--muted);
	font-size: 14.5px;
}

.card .tags {
	margin-top: auto;
	padding-top: 18px;
}

.card-featured {
	padding: 28px;
	background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.card-featured h3 {
	font-size: 22px;
}

.card-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.kicker {
	font-family: var(--mono);
	font-size: 12px;
	color: var(--faint);
}

.metric {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--mono);
	font-size: 12px;
	white-space: nowrap;
}

.thumb {
	display: block;
	margin: -8px -8px 18px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--bg);
	aspect-ratio: 16 / 10;
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	opacity: 0.9;
	transition: transform 0.4s ease, opacity 0.2s ease;
}

.card:hover .thumb img {
	transform: scale(1.03);
	opacity: 1;
}

.card-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px 40px;
	align-items: center;
}

.split-a,
.split-b {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.card-split .tags {
	margin-top: 20px;
	padding-top: 0;
}

.card-split .split-b > .bullets {
	margin-top: 0;
}

.screens {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--bg);
}

.screens img {
	width: 100%;
	aspect-ratio: 9 / 16;
	object-fit: cover;
	object-position: top;
	border-radius: 8px;
	border: 1px solid var(--border-strong);
	transition: transform 0.3s ease;
}

.card:hover .screens img:nth-child(2) {
	transform: translateY(-4px);
}

.link {
	display: inline-block;
	margin-top: 14px;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--accent);
}

.link:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.more {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 16px;
	margin-top: 24px;
	padding: 16px 20px;
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	color: var(--muted);
	font-size: 14.5px;
}

.more a:hover {
	color: var(--text);
}

/* ===== skills ===== */
.skills {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.skill-group {
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.skill-group h3 {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	color: var(--faint);
}

.skill-group .tags {
	margin-top: 16px;
}

/* ===== contact ===== */
.contact h2 {
	font-size: clamp(32px, 6vw, 56px);
	letter-spacing: -0.035em;
}

.mail {
	display: inline-block;
	margin-top: 28px;
	font-family: var(--mono);
	font-size: clamp(15px, 2.2vw, 20px);
	color: var(--text);
	border-bottom: 1px solid var(--border-strong);
	padding-bottom: 4px;
	overflow-wrap: anywhere;
	transition: border-color 0.15s ease, color 0.15s ease;
}

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

/* ===== footer ===== */
.footer {
	border-top: 1px solid var(--border);
	padding: 28px 0;
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--faint);
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.footer ul {
	display: flex;
	gap: 20px;
}

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

/* ===== reveal animation ===== */
.js .reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.js .reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.card,
	.btn,
	.thumb img {
		transition: none;
	}
}

/* ===== responsive ===== */
@media (max-width: 900px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.skills {
		grid-template-columns: 1fr;
	}
	.job {
		grid-template-columns: 1fr;
		gap: 8px;
	}
}

@media (max-width: 720px) {
	.menu-btn {
		display: flex;
	}

	.nav-links {
		position: fixed;
		inset: 64px 0 auto 0;
		flex-direction: column;
		gap: 0;
		padding: 8px var(--gutter) 20px;
		background: var(--bg);
		border-bottom: 1px solid var(--border);
		font-size: 15px;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.nav-links.open {
		transform: none;
		opacity: 1;
		visibility: visible;
	}

	.nav-links a {
		display: block;
		padding: 12px 0;
	}

	.hero-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.hero-photo {
		order: -1;
		width: 132px;
	}

	.hero-photo img {
		border-radius: 16px;
	}

	.hero-photo figcaption {
		text-align: left;
		white-space: nowrap;
	}

	.about-grid,
	.card-split,
	.grid,
	.facts {
		grid-template-columns: 1fr;
	}

	.job,
	.card-featured {
		padding: 22px;
	}

	.card-split {
		gap: 20px;
	}

	.card-top {
		flex-wrap: wrap;
	}
}
