:root {
	--paper: rgb(253, 253, 251);
	--ink: rgb(21, 22, 22);
	--secondary: rgb(94, 97, 96);
	--line: rgb(214, 216, 212);
	--blue: hsl(219 100% 43%);
	--green: hsl(142 45% 34%);
	--violet: hsl(266 62% 47%);
	--magenta: hsl(327 88% 45%);
	--max-width: 1400px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

BODY {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

A {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.site-header,
.site-footer,
.section-shell {
	width: min(calc(100% - 64px), var(--max-width));
	margin-inline: auto;
}

.site-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 74px;
	border-bottom: 1px solid var(--line);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.site-header NAV {
	display: flex;
	gap: 32px;
}

.site-header A {
	text-decoration: none;
}

.site-header NAV A:hover,
.text-links A:hover {
	text-decoration: underline;
}

.hero {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(500px, 1.05fr);
	gap: clamp(56px, 8vw, 136px);
	align-items: center;
	padding-block: 100px;
}

.eyebrow,
.process-label,
.principle-number,
.comparison-labels {
	margin: 0 0 24px;
	color: var(--blue);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

H1,
H2,
H3,
P {
	margin-top: 0;
}

H1,
H2 {
	max-width: 900px;
	margin-bottom: 32px;
	font-size: clamp(3rem, 5.7vw, 6.6rem);
	font-weight: 650;
	letter-spacing: -0.055em;
	line-height: 0.98;
}

H2 {
	font-size: clamp(2.5rem, 4.5vw, 5.2rem);
}

.lede,
.section-copy > P:last-child,
.section-heading > P:last-child,
.founder-copy > P:first-child {
	max-width: 680px;
	margin-bottom: 0;
	color: var(--secondary);
	font-size: clamp(1.15rem, 1.55vw, 1.45rem);
	line-height: 1.55;
}

.code-figure {
	margin: 0;
}

.code-figure FIGCAPTION,
.comparison-caption {
	margin-top: 20px;
	color: var(--secondary);
	font-size: 0.78rem;
}

.code-surface,
.comparison {
	background: rgb(255, 255, 255);
	border: 1px solid var(--line);
}

.code-surface {
	padding: clamp(32px, 4.5vw, 72px);
	font-size: clamp(1.03rem, 1.42vw, 1.38rem);
}

.code-line {
	display: flex;
	align-items: baseline;
	gap: 0.65em;
	white-space: nowrap;
}

.code-signature {
	margin-bottom: 32px;
}

.keyword {
	color: var(--blue);
}

.type {
	color: var(--green);
}

.operator,
.call {
	color: var(--violet);
}

.muted {
	color: var(--secondary);
}

.token-group,
.token {
	padding: 0.32em 0.58em;
	border: 1px solid var(--line);
	border-radius: 0.55em;
}

.code-block {
	display: grid;
	gap: 20px;
	margin-left: 38px;
	padding: 18px 0 18px 34px;
	border-left: 1px solid rgb(177, 181, 177);
}

.return-line {
	margin-top: 8px;
}

.ruled-section {
	padding-block: clamp(96px, 12vw, 180px);
	border-top: 1px solid var(--line);
}

.problem {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(64px, 10vw, 180px);
}

.process-comparison {
	display: grid;
	align-content: center;
	gap: 72px;
}

.process-row OL {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.process-row LI {
	display: flex;
	align-items: center;
	font-size: 0.9rem;
	white-space: nowrap;
}

.process-row LI:not(:last-child)::after {
	width: clamp(28px, 3.8vw, 58px);
	height: 1px;
	margin-inline: 12px;
	background: var(--line);
	content: "";
}

.uncertain {
	color: var(--magenta);
	text-decoration: line-through;
}

.assured {
	color: var(--green);
	font-weight: 700;
}

.section-heading {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 80px;
	align-items: end;
	margin-bottom: 86px;
}

.section-heading .eyebrow {
	grid-column: 1 / -1;
}

.section-heading H2 {
	margin-bottom: 0;
}

.principles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.principles ARTICLE {
	min-height: 280px;
	padding: 38px;
}

.principles ARTICLE + ARTICLE {
	border-left: 1px solid var(--line);
}

.principles H3 {
	margin-bottom: 18px;
	font-size: clamp(1.75rem, 2.5vw, 2.7rem);
	letter-spacing: -0.035em;
}

.principles ARTICLE > P:last-child {
	max-width: 300px;
	color: var(--secondary);
}

.compact-heading H2 {
	max-width: 680px;
}

.comparison {
	position: relative;
	height: 430px;
	overflow: hidden;
}

.comparison-labels {
	position: absolute;
	z-index: 4;
	top: 24px;
	left: 28px;
	display: flex;
	justify-content: space-between;
	width: calc(100% - 56px);
	pointer-events: none;
}

.comparison-labels SPAN:last-child {
	color: var(--secondary);
}

.comparison-panel {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 70px;
}

.typical-panel {
	z-index: 2;
	width: var(--reveal);
	overflow: hidden;
	background: rgb(255, 255, 255);
	border-right: 1px solid var(--ink);
}

.comparison-code {
	position: absolute;
	left: max(70px, calc((100vw - min(100vw - 64px, var(--max-width))) / 2 + 70px));
	width: max-content;
	font-size: clamp(0.95rem, 1.3vw, 1.3rem);
}

.rust-panel {
	background: rgb(248, 248, 246);
}

.rust-panel PRE {
	margin: 0;
	font-family: "Courier New", Courier, monospace;
	font-size: clamp(0.92rem, 1.3vw, 1.28rem);
	line-height: 1.8;
}

.rust-keyword {
	color: var(--magenta);
}

.comparison-divider {
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	left: var(--reveal);
	width: 1px;
	background: var(--ink);
	pointer-events: none;
}

.comparison-divider::after {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	transform: translate(-50%, -50%);
	background: var(--paper);
	border: 1px solid var(--ink);
	border-radius: 50%;
	content: "↔";
	font-size: 18px;
}

.comparison INPUT {
	position: absolute;
	z-index: 5;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.founder {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(64px, 10vw, 180px);
}

.founder H2 {
	font-size: clamp(2.5rem, 4.2vw, 4.7rem);
}

.project-line,
.text-links {
	display: flex;
	align-items: center;
	margin-top: 64px;
}

.project-line SPAN {
	display: flex;
	align-items: center;
	font-weight: 700;
}

.project-line SPAN:not(:last-child)::after {
	width: clamp(44px, 6vw, 90px);
	height: 1px;
	margin-inline: 18px;
	background: var(--line);
	content: "";
}

.text-links {
	gap: 28px;
	font-size: 0.88rem;
	font-weight: 700;
}

.site-footer {
	display: flex;
	justify-content: space-between;
	padding-block: 30px;
	border-top: 1px solid var(--line);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-footer P {
	margin: 0;
}

@media (max-width: 980px) {
	.hero,
	.problem,
	.founder,
	.section-heading {
		grid-template-columns: 1fr;
	}

	.section-heading {
		gap: 28px;
	}

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

	.principles ARTICLE + ARTICLE {
		border-top: 1px solid var(--line);
		border-left: 0;
	}

	.comparison-code {
		left: 40px;
	}
}

@media (max-width: 640px) {
	.site-header,
	.site-footer,
	.section-shell {
		width: min(calc(100% - 32px), var(--max-width));
	}

	.site-header NAV {
		gap: 16px;
	}

	.site-header NAV A:first-child {
		display: none;
	}

	.hero {
		padding-block: 72px;
	}

	.code-surface {
		overflow-x: auto;
	}

	.process-row OL {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
	}

	.process-row LI:not(:last-child)::after {
		display: none;
	}

	.comparison {
		height: 370px;
	}

	.comparison-panel {
		padding: 72px 28px 28px;
	}

	.comparison-code {
		left: 28px;
		font-size: 0.74rem;
	}

	.rust-panel PRE {
		font-size: 0.72rem;
	}

	.project-line {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
	}

	.project-line SPAN:not(:last-child)::after {
		display: none;
	}

	.text-links,
	.site-footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
	}
}

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