:root {
	color-scheme: dark;

	--bg: #07080a;
	--bg-secondary: #0b0e12;
	--surface: #10151b;
	--surface-hover: #161d25;

	--border: #242c35;
	--border-bright: #344252;

	--text: #eef2f7;
	--text-secondary: #b5bfca;
	--text-muted: #7f8b98;

	--blue: #61a8ff;
	--blue-bright: #8bc2ff;
	--cyan: #54d6ff;
	--purple: #c084fc;
	--green: #6ee7a0;
	--yellow: #f5d76e;
	--orange: #ffad66;
	--red: #ff7272;
	--pink: #f58bd5;

	--code-bg: #080b0f;

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

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;

	background:
		radial-gradient(
			circle at 70% -10%,
			rgba(97, 168, 255, 0.07),
			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(97, 168, 255, 0.13),
			transparent 35rem
		);
}

h1 {
	margin: 0;

	background: linear-gradient(
		100deg,
		#ffffff 0%,
		#b9d8ff 45%,
		#72cfff 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: #c8d0d9;
}

.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.35),
		inset 0 1px 0 rgba(255, 255, 255, 0.025);

	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(--blue-bright);
	background: rgba(97, 168, 255, 0.08);
}

.tab.active {
	background:
		linear-gradient(
			135deg,
			rgba(97, 168, 255, 0.14),
			rgba(192, 132, 252, 0.08)
		);

	color: var(--blue-bright);

	box-shadow:
		inset 0 0 0 1px rgba(97, 168, 255, 0.18),
		0 4px 15px rgba(0, 0, 0, 0.2);
}

.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: #eaf3ff;

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

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

h2::before {
	content: "# ";

	color: var(--blue);

	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(--purple);
}

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

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

	text-decoration: none;

	transition: color 0.15s ease;
}

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

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

ul,
ol {
	padding-left: 1.5rem;

	color: #c8d0d9;
}

li {
	margin: 0.4rem 0;
}

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

code {
	padding: 0.16rem 0.42rem;

	border: 1px solid rgba(84, 214, 255, 0.2);
	border-radius: 5px;

	background: rgba(84, 214, 255, 0.07);

	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(97, 168, 255, 0.035),
			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.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

pre::before {
	content: "";

	position: absolute;

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

	width: 3px;

	background: linear-gradient(
		180deg,
		var(--blue),
		var(--purple),
		var(--cyan)
	);

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

pre code {
	padding: 0;

	border: 0;

	background: transparent;

	color: #dce7f5;

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

pre code::selection {
	background: rgba(97, 168, 255, 0.3);
}

blockquote {
	margin: 1.5rem 0;

	padding: 1rem 1.25rem;

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

	background:
		linear-gradient(
			90deg,
			rgba(192, 132, 252, 0.08),
			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: #303a45 transparent;
}

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

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

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

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

::selection {
	background: rgba(97, 168, 255, 0.3);
	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;
	}
}
