:root {
	color-scheme: dark;

	--bg: #050605;
	--bg-secondary: #080a08;
	--surface: #0c0f0c;
	--surface-hover: #121712;

	--border: #202820;
	--border-bright: #303c31;

	--text: #edf4ee;
	--text-secondary: #b8c4ba;
	--text-muted: #788378;

	--green: #8ccf78;
	--green-bright: #a6e89a;
	--cyan: #63d6b2;
	--teal: #54c7a5;
	--yellow: #e5d477;
	--orange: #e5a96b;
	--red: #ef7777;
	--purple: #b9a0dc;
	--pink: #d89abb;

	--code-bg: #060806;

	--content-width: 1100px;
	--radius: 10px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;

	background:
		radial-gradient(
			circle at 70% -10%,
			rgba(140, 207, 120, 0.035),
			transparent 32rem
		),
		var(--bg);

	color: var(--text);

	font-family:
		Inter,
		ui-sans-serif,
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		"Segoe UI",
		sans-serif;

	line-height: 1.7;
}

.container {
	width: min(100% - 2rem, var(--content-width));
	margin-left: auto;
	margin-right: auto;
}

.hero {
	padding: 5rem 0 3.5rem;

	border-bottom: 1px solid var(--border);

	background:
		radial-gradient(
			circle at 55% -30%,
			rgba(140, 207, 120, 0.055),
			transparent 35rem
		);
}

h1 {
	margin: 0;

	background: linear-gradient(
		100deg,
		#ffffff 0%,
		#c9e8c1 45%,
		#8fe0a0 100%
	);

	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;

	font-size: clamp(2.4rem, 5vw, 4rem);
	line-height: 1.1;
	letter-spacing: -0.045em;
}

.lead {
	max-width: 720px;
	margin: 1.3rem 0 0;

	color: var(--text-secondary);

	font-size: 1.1rem;
}

.content {
	padding: 2rem 0 5rem;
}

article {
	font-size: 1rem;
}

article p {
	color: #c4cec6;
}

.tabs {
	display: flex;
	gap: 0.4rem;

	margin-bottom: 2.5rem;
	padding: 0.4rem;

	overflow-x: auto;

	background: var(--surface);

	border: 1px solid var(--border);
	border-radius: var(--radius);

	box-shadow:
		0 15px 40px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.02);

	position: sticky;
	top: 1rem;
	z-index: 10;

	backdrop-filter: blur(14px);
}

.tab {
	flex: 1;

	padding: 0.7rem 1rem;

	border: 0;
	border-radius: 7px;

	background: transparent;

	color: var(--text-secondary);

	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;

	white-space: nowrap;

	cursor: pointer;

	transition:
		color 0.15s ease,
		background 0.15s ease,
		transform 0.15s ease;
}

.tab:hover {
	color: var(--green-bright);
	background: rgba(140, 207, 120, 0.07);
}

.tab.active {
	background:
		linear-gradient(
			135deg,
			rgba(140, 207, 120, 0.12),
			rgba(84, 199, 165, 0.06)
		);

	color: var(--green-bright);

	box-shadow:
		inset 0 0 0 1px rgba(140, 207, 120, 0.16),
		0 4px 15px rgba(0, 0, 0, 0.25);
}

.tab-content {
	display: none;

	animation: tabFade 0.2s ease;
}

.tab-content.active {
	display: block;
}

@keyframes tabFade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

h2,
h3,
h4 {
	scroll-margin-top: 5rem;
}

h2 {
	margin-top: 3rem;
	padding-bottom: 0.7rem;

	border-bottom: 1px solid var(--border);

	color: #e8f1e9;

	font-size: 1.9rem;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

h2:first-child {
	margin-top: 0;
}

h2::before {
	content: "# ";

	color: var(--green);

	font-family: monospace;
	font-weight: 400;
}

h3 {
	margin-top: 2rem;

	color: var(--cyan);

	font-size: 1.3rem;
	line-height: 1.3;
}

h3::before {
	content: "› ";

	color: var(--green);
}

h4 {
	color: var(--teal);
}

a {
	color: var(--green-bright);

	text-decoration: none;

	transition: color 0.15s ease;
}

a:hover {
	color: var(--cyan);
	text-decoration: underline;
}

strong {
	color: #d7e8d2;
	font-weight: 700;
}

ul,
ol {
	padding-left: 1.5rem;

	color: #c4cec6;
}

li {
	margin: 0.4rem 0;
}

li::marker {
	color: var(--green);
}

code {
	padding: 0.16rem 0.42rem;

	border: 1px solid rgba(99, 214, 178, 0.18);
	border-radius: 5px;

	background: rgba(99, 214, 178, 0.055);

	color: var(--cyan);

	font-family:
		"JetBrains Mono",
		"Fira Code",
		"Cascadia Code",
		ui-monospace,
		monospace;

	font-size: 0.86em;
}

pre {
	position: relative;

	margin: 1.4rem 0;
	padding: 1.25rem 1.4rem;

	overflow-x: auto;

	background:
		linear-gradient(
			135deg,
			rgba(140, 207, 120, 0.025),
			transparent 50%
		),
		var(--code-bg);

	border: 1px solid var(--border-bright);
	border-radius: var(--radius);

	box-shadow:
		0 15px 40px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

pre::before {
	content: "";

	position: absolute;

	top: 0;
	left: 0;
	bottom: 0;

	width: 3px;

	background: linear-gradient(
		180deg,
		var(--green),
		var(--teal),
		var(--cyan)
	);

	border-radius: var(--radius) 0 0 var(--radius);
}

pre code {
	padding: 0;

	border: 0;

	background: transparent;

	color: #dce8df;

	font-size: 0.86rem;
	line-height: 1.75;
}

pre code::selection {
	background: rgba(140, 207, 120, 0.28);
}

blockquote {
	margin: 1.5rem 0;

	padding: 1rem 1.25rem;

	border-left: 3px solid var(--green);
	border-radius: 0 var(--radius) var(--radius) 0;

	background:
		linear-gradient(
			90deg,
			rgba(140, 207, 120, 0.06),
			transparent
		);

	color: var(--text-secondary);
}

blockquote strong {
	color: var(--yellow);
}

.references {
	margin-top: 4rem;
	padding-top: 1rem;

	border-top: 1px solid var(--border);
}

.references h2 {
	margin-top: 0;
}

footer {
	border-top: 1px solid var(--border);

	color: var(--text-muted);

	font-size: 0.85rem;
}

footer .container {
	padding: 1.5rem 0;
}

* {
	scrollbar-width: thin;
	scrollbar-color: #303b32 transparent;
}

*::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

*::-webkit-scrollbar-track {
	background: transparent;
}

*::-webkit-scrollbar-thumb {
	background: #303b32;
	border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
	background: #455448;
}

::selection {
	background: rgba(140, 207, 120, 0.28);
	color: white;
}

@media (max-width: 700px) {
	.hero {
		padding: 3.5rem 0 2.5rem;
	}

	.tabs {
		top: 0.5rem;
	}

	.tab {
		flex: 0 0 auto;
	}

	h1 {
		font-size: 2.4rem;
	}

	h2 {
		font-size: 1.6rem;
	}
}

@media (max-width: 500px) {
	.container {
		width: min(100% - 1.25rem, var(--content-width));
	}

	.hero {
		padding: 3rem 0 2rem;
	}

	.lead {
		font-size: 1rem;
	}

	.content {
		padding-top: 1.25rem;
	}

	.tabs {
		margin-bottom: 2rem;
		padding: 0.3rem;
	}

	.tab {
		padding: 0.6rem 0.8rem;
		font-size: 0.82rem;
	}

	pre {
		padding: 1rem;

		border-radius: 8px;
	}

	pre code {
		font-size: 0.8rem;
	}
}
