/* ==========================================================================
   Mo — portfolio theme
   Clean white, near-black ink, indigo accent.
   Fraunces (display) / Inter (body) / IBM Plex Mono (labels).
   ========================================================================== */

:root {
	--paper: #FFFFFF;
	--paper-2: #F7F7F9;
	--paper-3: #EFEFF3;
	--ink: #0E0E12;
	--ink-soft: #3C3C44;
	--ink-mute: #83838D;
	--line: #E6E6EB;
	--line-2: #D3D3DA;
	--accent: #4F46E5;
	--accent-2: #6366F1;
	--accent-soft: #EEEDFC;
	--accent-ink: #3730A3;
	--white: #FFFFFF;

	--font-head: "Fraunces", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

	--wrap: 1140px;
	--pad: 24px;

	--ease: cubic-bezier(0.22, 1, 0.36, 1);

	--anim-duration: 720ms;
	--anim-distance: 24px;
}

* { box-sizing: border-box; }

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink-soft);
	font-family: var(--font-body);
	font-size: 18px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--font-head);
	font-weight: 400;
	color: var(--ink);
	line-height: 1.12;
	letter-spacing: -0.018em;
}

h1 { font-size: 54px; line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: 36px; letter-spacing: -0.024em; }
h3 { font-size: 23px; }
h4 { font-size: 19px; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

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

::selection { background: var(--accent); color: var(--white); }

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* ---------- layout ---------- */

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding-left: var(--pad);
	padding-right: var(--pad);
}

.section {
	padding-top: 108px;
	padding-bottom: 108px;
	position: relative;
}
.section + .section { border-top: 1px solid var(--line); }
.section--alt { background: var(--paper-2); }

/* Section header — big index digit + eyebrow + title */
.section__head {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 28px;
	align-items: start;
	margin-bottom: 72px;
}
.section__index {
	font-family: var(--font-head);
	font-size: 64px;
	line-height: 0.8;
	color: var(--paper-3);
	font-weight: 400;
	-webkit-text-stroke: 1px var(--line-2);
}
.section--alt .section__index { color: var(--white); }
.section__titles { max-width: 30ch; padding-top: 6px; }
.section__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
}
.section__eyebrow::before {
	content: "";
	width: 24px;
	height: 1px;
	background: var(--accent);
}
.section__titles h2 { margin: 0; }

/* ---------- skip link ---------- */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--ink);
	color: var(--white);
	padding: 10px 16px;
	font-family: var(--font-mono);
	font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- buttons ---------- */

.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 15px 24px;
	font-family: var(--font-mono);
	font-size: 14px;
	line-height: 1;
	border: 1px solid transparent;
	border-radius: 4px;
	transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
	            color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--dark {
	background: var(--ink);
	color: var(--white);
	border-color: var(--ink);
}
.btn--dark:hover {
	background: var(--accent);
	border-color: var(--accent);
	box-shadow: 0 12px 28px -12px rgba(79, 70, 229, 0.6);
}

.btn--line { color: var(--ink); border-color: var(--line-2); }
.btn--line:hover { border-color: var(--ink); background: var(--paper-2); }

.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--white); }

/* ---------- header ---------- */

.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	backdrop-filter: blur(12px) saturate(1.4);
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s, background-color 0.25s;
}
.header.is-scrolled {
	border-bottom-color: var(--line);
	background: rgba(255, 255, 255, 0.92);
}
.header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 70px;
}

.header__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	flex-shrink: 0;
}
.header__mark {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ink);
	color: var(--white);
	font-family: var(--font-head);
	font-size: 16px;
	border-radius: 6px;
}
.header__name {
	font-family: var(--font-head);
	font-size: 17px;
	white-space: nowrap;
}

.header__nav {
	margin-left: auto;
	display: flex;
	gap: 2px;
}
.header__nav a {
	position: relative;
	padding: 8px 14px;
	font-family: var(--font-mono);
	font-size: 13.5px;
	color: var(--ink-mute);
	transition: color 0.2s;
}
.header__nav a::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 4px;
	height: 1px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s var(--ease);
}
.header__nav a:hover { color: var(--ink); }
.header__nav a:hover::after { transform: scaleX(1); }

.header__cta { flex-shrink: 0; }

.header__burger {
	display: none;
	width: 42px;
	height: 42px;
	margin-left: auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: none;
	border: 1px solid var(--line-2);
	border-radius: 4px;
	cursor: pointer;
}
.header__burger span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--ink);
	transition: transform 0.25s, opacity 0.25s;
}
.header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; }
.header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- mobile drawer ---------- */

.drawer {
	position: fixed;
	top: 70px;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--paper);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s, visibility 0s linear 0.25s;
}
.drawer.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.25s, visibility 0s;
}
.drawer a {
	font-family: var(--font-head);
	font-size: 32px;
	color: var(--ink);
	padding: 8px 0;
}
.drawer a:last-child { color: var(--accent); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
	position: relative;
	padding-top: 176px;
	padding-bottom: 120px;
	overflow: hidden;
}
/* faint grid, faded at the edges */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(14, 14, 18, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(14, 14, 18, 0.035) 1px, transparent 1px);
	background-size: 76px 76px;
	-webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 28%, #000, transparent 78%);
	mask-image: radial-gradient(ellipse 75% 65% at 50% 28%, #000, transparent 78%);
	pointer-events: none;
}
/* soft indigo glow, top-right */
.hero::after {
	content: "";
	position: absolute;
	top: -180px;
	right: -160px;
	width: 620px;
	height: 620px;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 65%);
	pointer-events: none;
}
.hero .wrap { position: relative; }

.hero__status {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 30px;
	padding: 7px 15px 7px 12px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--white);
	border: 1px solid var(--line-2);
	border-radius: 999px;
	box-shadow: 0 2px 12px -4px rgba(14, 14, 18, 0.08);
}
.hero__status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5);
	animation: ping 2.8s var(--ease) infinite;
}
@keyframes ping {
	0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.5); }
	70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
	100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.hero h1 {
	max-width: 15ch;
	margin: 0 0 20px;
}
.hero h1 em {
	font-style: normal;
	color: var(--accent);
}

.hero__rule {
	width: 72px;
	height: 3px;
	background: var(--accent);
	margin: 0 0 28px;
	border-radius: 2px;
}

.hero__lead {
	max-width: 46ch;
	margin-bottom: 40px;
}
.hero__lead p {
	font-size: 20px;
	line-height: 1.55;
	color: var(--ink-soft);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 72px;
}

.hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border: 1px solid var(--line);
	border-radius: 12px;
	overflow: hidden;
	background: var(--white);
	max-width: 640px;
}
.hero__stats div {
	flex: 1 1 0;
	min-width: 150px;
	padding: 24px 26px;
	border-right: 1px solid var(--line);
}
.hero__stats div:last-child { border-right: 0; }
.hero__stats strong {
	display: block;
	font-family: var(--font-head);
	font-size: 36px;
	font-weight: 400;
	color: var(--ink);
	line-height: 1;
	margin-bottom: 8px;
	font-variant-numeric: tabular-nums;
}
.hero__stats span {
	font-family: var(--font-mono);
	font-size: 11.5px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-mute);
}

/* ==========================================================================
   WORK
   ========================================================================== */

.work {
	border-top: 1px solid var(--ink);
}
.work__item {
	position: relative;
	display: grid;
	grid-template-columns: 64px 250px 1fr;
	gap: 44px;
	padding: 52px 0;
	border-bottom: 1px solid var(--line);
	transition: background-color 0.3s var(--ease);
}
.work__item:hover { background: var(--paper-2); }

.work__num {
	font-family: var(--font-head);
	font-size: 40px;
	line-height: 1;
	color: var(--line-2);
	transition: color 0.3s var(--ease);
}
.work__item:hover .work__num { color: var(--accent); }

.work__head h3 { margin: 0 0 8px; }
.work__sector {
	margin: 0 0 16px;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--ink-mute);
}
.work__tag {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--accent-ink);
	background: var(--accent-soft);
	border-radius: 999px;
}
.work__body { max-width: 60ch; }
.work__body h4 {
	margin: 0 0 12px;
	font-size: 20px;
}
.work__body p { margin: 0; }
.work__arrow {
	position: absolute;
	top: 52px;
	right: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line-2);
	border-radius: 50%;
	color: var(--ink-mute);
	opacity: 0;
	transform: translateX(-8px);
	transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}
.work__item:hover .work__arrow {
	opacity: 1;
	transform: translateX(0);
	background: var(--ink);
	color: var(--white);
	border-color: var(--ink);
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 72px;
	align-items: start;
}
.about__photo {
	position: relative;
}
.about__photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center top;
	filter: grayscale(1) contrast(1.05);
	border-radius: 14px;
	border: 1px solid var(--line);
}
/* accent frame offset behind the photo */
.about__photo::before {
	content: "";
	position: absolute;
	left: -16px;
	bottom: -16px;
	width: 100%;
	height: 100%;
	border: 1px solid var(--accent);
	border-radius: 14px;
	z-index: -1;
}
.about__badge {
	position: absolute;
	left: 16px;
	bottom: 16px;
	padding: 8px 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--white);
	background: var(--ink);
	border-radius: 6px;
}

.about__text .section__index {
	display: block;
	font-size: 52px;
	margin-bottom: 4px;
}
.about__text h2 {
	margin: 8px 0 24px;
	max-width: 20ch;
}
.about__text > p { max-width: 56ch; }

.about__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
}
.about__chips span {
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--ink);
	padding: 8px 14px;
	border: 1px solid var(--line-2);
	border-radius: 999px;
	transition: border-color 0.2s, color 0.2s;
}
.about__chips span:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   STACK — capability matrix
   ========================================================================== */

.stack {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--white);
}
.stack__col {
	padding: 34px 30px;
	border-right: 1px solid var(--line);
	transition: background-color 0.3s var(--ease);
}
.stack__col:last-child { border-right: 0; }
.stack__col:hover { background: var(--paper-2); }

.stack__label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent);
}
.stack__label::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
}
.stack__col h3 {
	margin: 0 0 22px;
	font-size: 21px;
	line-height: 1.3;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--line);
}
.stack__col ul { display: flex; flex-direction: column; gap: 13px; }
.stack__col li {
	position: relative;
	padding-left: 22px;
	font-size: 14.5px;
	color: var(--ink-soft);
}
.stack__col li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 9px;
	height: 2px;
	background: var(--accent);
	border-radius: 1px;
}

/* ==========================================================================
   EXPERIENCE — timeline with a rail
   ========================================================================== */

.exp {
	position: relative;
	padding-left: 32px;
}
.exp::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 8px;
	bottom: 8px;
	width: 1px;
	background: var(--line);
}
.exp__item {
	position: relative;
	display: grid;
	grid-template-columns: 190px 1fr;
	gap: 48px;
	padding: 40px 0;
	border-bottom: 1px solid var(--line);
}
.exp__item:last-child { border-bottom: 0; }
.exp__item::before {
	content: "";
	position: absolute;
	left: -32px;
	top: 47px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--white);
	border: 2px solid var(--line-2);
	transform: translateX(0);
}
.exp__item:first-child::before {
	background: var(--accent);
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--accent-soft);
}
.exp__when {
	font-family: var(--font-mono);
	font-size: 13.5px;
	color: var(--ink-mute);
	padding-top: 3px;
}
.exp__what h3 {
	margin: 0 0 4px;
	font-size: 22px;
}
.exp__company {
	display: block;
	margin-bottom: 16px;
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--accent);
}
.exp__what ul { display: flex; flex-direction: column; gap: 9px; }
.exp__what li {
	position: relative;
	padding-left: 20px;
	font-size: 15px;
	color: var(--ink-soft);
}
.exp__what li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 11px;
	width: 8px;
	height: 1px;
	background: var(--line-2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
	background: var(--ink);
	color: var(--white);
	position: relative;
	overflow: hidden;
}
.footer::before {
	content: "";
	position: absolute;
	bottom: -220px;
	left: -140px;
	width: 560px;
	height: 560px;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.22), transparent 65%);
	pointer-events: none;
}
.footer .wrap { position: relative; }

.footer__cta {
	padding-top: 128px;
	padding-bottom: 128px;
}
.footer__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent-2);
}
.footer__eyebrow::before {
	content: "";
	width: 24px;
	height: 1px;
	background: var(--accent-2);
}
.footer__cta h2 {
	color: var(--white);
	margin: 0 0 20px;
	max-width: 16ch;
	font-size: 44px;
}
.footer__cta p {
	color: rgba(255, 255, 255, 0.6);
	max-width: 44ch;
	margin-bottom: 34px;
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	padding-top: 30px;
	padding-bottom: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-family: var(--font-mono);
	font-size: 13px;
}
.footer__bottom > p { margin: 0; color: rgba(255, 255, 255, 0.5); }
.footer__links { display: flex; gap: 18px; }
.footer__links a { color: rgba(255, 255, 255, 0.8); transition: color 0.2s; }
.footer__links a:hover { color: var(--white); }
.footer__top { margin-left: auto; color: rgba(255, 255, 255, 0.7); transition: color 0.2s; }
.footer__top:hover { color: var(--white); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
	.header__nav,
	.header__cta { display: none; }
	.header__burger { display: flex; }

	h1 { font-size: 36px; }
	.hero h1 { font-size: 40px; }
	h2 { font-size: 29px; }

	.section { padding-top: 80px; padding-bottom: 80px; }
	.section__head { grid-template-columns: 1fr; row-gap: 16px; margin-bottom: 48px; }
	.section__index { font-size: 48px; }

	.about { grid-template-columns: 1fr; gap: 40px; }
	.about__photo { max-width: 320px; }
	.about__photo::before { display: none; }

	.stack { grid-template-columns: 1fr; }
	.stack__col { border-right: 0; border-bottom: 1px solid var(--line); }
	.stack__col:last-child { border-bottom: 0; }

	.work__item {
		grid-template-columns: 44px 1fr;
		gap: 16px 24px;
		padding: 40px 0;
	}
	.work__body { grid-column: 1 / -1; }
	.work__num { font-size: 30px; }
	.work__arrow { display: none; }

	.exp { padding-left: 26px; }
	.exp__item { grid-template-columns: 1fr; gap: 12px; }
	.exp__item::before { left: -26px; top: 44px; }

	.footer__cta { padding-top: 88px; padding-bottom: 88px; }
	.footer__cta h2 { font-size: 34px; }
}

@media (max-width: 560px) {
	.hero { padding-top: 140px; padding-bottom: 88px; }
	.hero__stats div { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
	.hero__stats div:last-child { border-bottom: 0; }
	.hero__actions .btn { flex: 1 1 100%; }
	.footer__bottom { flex-direction: column; align-items: flex-start; }
	.footer__top { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero__status::before { animation: none; }
}
