:root {
	--black: #0d0d0d;
	--white: #fff;
	--bg: #f7f5f2;
	--dark-text: #0d0d0d;
	--lavender: #cdb6f0;
	--experience: #cce822;
	--pistachio: #c4e5d6;
	--light-human: #fbdff3;
	--light-impact: #cfdaff;
	--sand: #eee9e3;
	--border-radius: 16px;

	--mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco,
		Consolas, 'Liberation Mono', 'Courier New', monospace;

	/* Legacy aliases kept so existing components keep rendering during migration */
	--space: var(--white);
	--impact: #1145ff;
	--human: #e52ab1;
	--plum: #821054;
	--hoover: rgb(255 255 255 / 4%);
	--fixel: var(--white);
	--blush: #ebced4;
	--cyprus: #033a37;
	--air-blue: rgb(255 255 255 / 14%);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	/* Safety belt for accidental horizontal bleed (e.g. decorative
	   elements that translate past the container's edge on mobile).
	   `clip` instead of `hidden` so it doesn't create a scroll
	   container that would break `position: sticky` (e.g. the
	   on-this-page TOC sidebar). */
	overflow-x: clip;
	/* Match body so macOS/iOS elastic overscroll at the top doesn't
	   flash a lighter chrome background behind the floating header
	   capsule. */
	background-color: var(--black);
}

/* Anchor targets sit below the fixed header — give them a scroll
   offset so the section title lands clear of the nav. */
[id] {
	scroll-margin-top: 80px;
}

body {
	background-color: var(--black);
	color: var(--white);
	font-family: 'Fixel', FixelDisplay, -apple-system, BlinkMacSystemFont,
		'Helvetica Neue', Arial, sans-serif;
	font-size: 17px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

svg {
	vertical-align: top;
}

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

p {
	margin: 0;
	line-height: 1.6;
}

p + p {
	margin-top: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.15;
	font-family: 'Fixel Display', 'Fixel', FixelDisplay, -apple-system,
		BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

h1 {
	font-size: 2.5rem;
	line-height: 1.1;
}

h2 {
	font-size: 2rem;
	line-height: 1.15;
}

h3 {
	font-size: 1.4rem;
}

h4 {
	font-size: 1.15rem;
}

h5 {
	font-size: 1rem;
}

h6 {
	font-size: 0.9rem;
}

@media (min-width: 768px) {
	h1 {
		font-size: 3.5rem;
	}
	h2 {
		font-size: 2.6rem;
	}
}

@media (min-width: 1280px) {
	h1 {
		font-size: 4.5rem;
	}
	h2 {
		font-size: 3rem;
	}
}

b,
strong {
	font-weight: 600;
}

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

figure {
	margin: 2rem 0;
}

figcaption {
	margin-top: 12px;
	font-size: 0.85rem;
	text-align: center;
	color: rgb(255 255 255 / 60%);
}

video {
	display: block;
	max-width: 100%;
	max-height: 600px;
	margin: 2rem auto;
	border-radius: 12px;
}

.youtube {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1.777;
	margin: 2rem auto;
	border-radius: 12px;
}

table {
	margin: 1rem 0;
	font-size: 0.9rem;
	border-collapse: collapse;
}

th {
	font-weight: 600;
}

td,
th {
	padding: 12px 16px;
	border: 1px solid rgb(255 255 255 / 12%);
}

blockquote {
	margin: 1rem 0;
	padding: 0.8rem 1.2rem;
	border-left: 4px solid var(--lavender);
	background: rgb(255 255 255 / 3%);
	border-radius: 0 8px 8px 0;
	font-size: 0.95rem;
	color: rgb(255 255 255 / 85%);
}

ul,
ol {
	margin: 1rem 0;
	padding-left: 1.2rem;
	line-height: 1.6;
}

li:not(:last-child) {
	margin-bottom: 0.6rem;
}

:is(ul, ol):last-child {
	margin-bottom: 0;
}

hr {
	margin: 1.6rem 0;
	border: none;
	padding: 0;
	height: 1px;
	background: rgb(255 255 255 / 12%);
}

code.language-mermaid {
	visibility: hidden;
}

.mermaid {
	margin: 1.4em 0;
	padding: 24px;
	text-align: center;
	background: rgb(255 255 255 / 3%);
	border: 1px solid rgb(255 255 255 / 8%);
	border-radius: 12px;
}

/* Mermaid renders a few light-mode defaults inline on <text> nodes;
   override so legends/edge labels read against the dark wrapper. */
.mermaid text {
	fill: #ffffff;
}

.mermaid .edgeLabel,
.mermaid .nodeLabel {
	color: #ffffff;
}

.mermaid .edgeLabel rect {
	fill: rgb(13 13 13 / 85%);
}

[hidden] {
	display: none !important;
}

/* ===== Layout utilities ===== */
.container {
	width: 100%;
	max-width: 1440px;
	padding: 0 16px;
	margin: 0 auto;
}

@media (min-width: 768px) {
	.container {
		padding: 0 32px;
	}
}

@media (min-width: 1280px) {
	.container {
		padding: 0 80px;
	}
}

.section-title-center {
	text-align: center;
	margin-bottom: 16px;
}

.section-subtitle-center {
	text-align: center;
	color: rgb(255 255 255 / 70%);
	max-width: 540px;
	margin: 0 auto 48px;
	font-size: 1.125rem;
}

.center-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
	text-align: center;
	margin-bottom: 64px;
}

.center-header p {
	color: rgb(255 255 255 / 70%);
	max-width: 580px;
	font-size: 1.125rem;
}

/* ===== Buttons ===== */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 14px 24px;
	font-size: 1rem;
	font-weight: 500;
	font-family: inherit;
	border: none;
	border-radius: 100px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
		opacity 0.15s ease;
}

.btn-primary {
	background: var(--white);
	color: var(--black);
}

.btn-primary:hover {
	background: rgb(255 255 255 / 88%);
}

.btn-secondary {
	background: transparent;
	color: var(--white);
	border: 1px solid rgb(255 255 255 / 32%);
}

.btn-secondary:hover {
	background: rgb(255 255 255 / 6%);
	border-color: rgb(255 255 255 / 56%);
}

.btn-link {
	color: var(--white);
	padding: 8px 0;
	background: transparent;
}

.btn-arrow {
	font-size: 1.2em;
	line-height: 1;
}
