@import url("https://fonts.googleapis.com/css2?family=Bitter:wght@300;400;600&display=swap");

@font-face {
	font-family: "Roboto Mono";
	src: url("../../fonts/Roboto_Mono/RobotoMono-Light.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Roboto Mono";
	src: url("../../fonts/Roboto_Mono/RobotoMono-Medium.ttf") format("truetype");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

:root {
	--hover-color: #f8915b;
	--header-color: #d2e9e7;
	--color-light: #7fe5e7;
	--color: #2f878c;
	--text: #c2c6ca;
	--header-bg: #212529;
	--header-bg-darker: #0d0e0f;
	--card: #111111;
	--bg-color-0: #272e30;
	--bg-color-1: #262f3b;
	--bg-color: #2e3538;
	--bg-color-2: #323a3e;
	--bg-color-3: #494d50;
	--bg-gradient-color-1: #304a50;
	--bg-gradient-color-2: #1f332a;
	--bg-gradient-color-3: #5f2b1c;
	--bg-gradient-color-4: #284352;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body {
	position: relative;
	display: grid;
    min-height: 100vh;
    overflow-x: hidden;
	grid-template-rows: auto 1fr auto;
	overflow-x: hidden;
	font-family: "Roboto Mono", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--text);
	background: linear-gradient(135deg, var(--bg-color-0), var(--bg-color-1));
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(circle at 18% 16%, rgba(127, 229, 231, 0.16), transparent 40%),
		radial-gradient(circle at 84% 12%, rgba(248, 145, 91, 0.18), transparent 38%),
		radial-gradient(circle at 50% 85%, rgba(47, 135, 140, 0.18), transparent 46%);
	filter: blur(52px) saturate(1.15);
	transform: scale(1.16);
	opacity: 0.22;
	pointer-events: none;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(8, 10, 12, 0.6), rgba(8, 10, 12, 0.82));
	pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 1em;
	font-family: "Roboto Mono", sans-serif;
	font-weight: 500;
	line-height: 1.2;
	color: var(--header-color);
}

p {
	margin: 0 0 2rem;
	line-height: 1.7;
}

a {
	color: var(--header-color);
	text-decoration: none;
	transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

header {
	position: sticky;
	top: 0;
	z-index: 100;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 1.5rem;
	padding: 0.75rem 1.5rem 0.35rem;
	border-bottom: 1px solid var(--header-bg-darker);
	background: linear-gradient(135deg, var(--bg-gradient-color-3), var(--bg-gradient-color-2));
	box-shadow: inset 0 0 80px 20px var(--header-bg-darker);
}

.title h1 {
	margin: 0;
	font-size: clamp(1.4rem, 2.4vw, 1.95rem);
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.9rem 1.2rem;
}

.nav-block {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.nav-block a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.1rem;
	padding: 0.5rem 0.95rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 0.94rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	background: rgba(0, 0, 0, 0.16);
}

.nav-block a:hover,
.nav-block a:focus-visible {
	color: var(--hover-color);
	border-color: var(--hover-color);
	background: rgba(248, 145, 91, 0.08);
	transform: translateY(-1px);
}

main {
	display: grid;
	grid-template-columns:
		[full-width-start]
		minmax(1rem, 1fr)
		[content-start]
		min(100% - 2rem, 69.375rem)
		[content-end]
		minmax(1rem, 1fr)
		[full-width-end];
	align-content: start;
    place-items: center;
	padding: 3rem 0 4rem;
}

main > * {
	grid-column: content;
}

main > h2 {
	position: relative;
	margin-bottom: 1.4rem;
	padding: 0 0 0.8rem;
	font-size: clamp(1.4rem, 1.8vw, 1.8rem);
	color: #f3dcc9;
}

main > h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: min(220px, 52%);
	height: 1px;
	background: linear-gradient(90deg, rgba(248, 145, 91, 0.55), transparent);
}

article {
	position: relative;
	max-width: min(700px, 100%);
	padding: 1.8rem;
	border: 1px solid rgba(210, 233, 231, 0.08);
	border-radius: 24px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
		linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(25, 33, 41, 0.9));
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
	overflow: clip;
}

article::before {
	content: "";
	position: absolute;
	top: -48px;
	right: -54px;
	width: 200px;
	height: 200px;
	background: radial-gradient(circle, rgba(248, 145, 91, 0.14) 0%, rgba(248, 145, 91, 0.08) 28%, transparent 72%);
	filter: blur(28px);
	pointer-events: none;
}

article p {
	color: #d7dde1;
}

article p:last-child {
	margin-bottom: 0;
}

.experiment-link.fancy-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.78rem 1.4rem;
	border: 1px solid rgba(248, 145, 91, 0.56);
	border-radius: 999px;
	background:
		linear-gradient(135deg, rgba(248, 145, 91, 0.16), rgba(127, 229, 231, 0.1)),
		rgba(13, 14, 15, 0.65);
	color: #ffd5bf;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow:
		0 0 0 1px rgba(248, 145, 91, 0.2) inset,
		0 8px 24px rgba(248, 145, 91, 0.18),
		0 0 34px rgba(127, 229, 231, 0.12);
	overflow: hidden;
	isolation: isolate;
}

.experiment-link.fancy-button::before {
	content: "";
	position: absolute;
	inset: -160% auto -160% -35%;
	width: 38%;
	transform: rotate(22deg);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
	opacity: 0;
	transition: transform 420ms ease, opacity 220ms ease;
	pointer-events: none;
	z-index: -1;
}

.experiment-link.fancy-button:hover,
.experiment-link.fancy-button:focus-visible {
	color: #fff6ef;
	border-color: var(--hover-color);
	background:
		linear-gradient(135deg, rgba(248, 145, 91, 0.24), rgba(127, 229, 231, 0.16)),
		rgba(13, 14, 15, 0.82);
	transform: translateY(-2px);
	box-shadow:
		0 0 0 1px rgba(248, 145, 91, 0.32) inset,
		0 12px 30px rgba(248, 145, 91, 0.24),
		0 0 42px rgba(127, 229, 231, 0.2);
}

.experiment-link.fancy-button:hover::before,
.experiment-link.fancy-button:focus-visible::before {
	opacity: 1;
	transform: translateX(245%) rotate(22deg);
}

footer {
	min-height: 3.5rem;
	border-top: 1px solid var(--header-bg-darker);
	background: var(--header-bg);
}

@media (max-width: 900px) {
	body::before {
		opacity: 0.12;
	}

	main {
		padding: 2.25rem 0 3rem;
	}

	article {
		border-radius: 18px;
		padding: 1.35rem;
	}
}

@media (max-width: 768px) {
	header {
		grid-template-columns: 1fr;
		gap: 0.8rem;
		padding: 0.7rem 1rem 0.5rem;
	}

	nav {
		justify-content: flex-start;
	}

	.nav-block a {
		font-size: 0.88rem;
		padding: 0.42rem 0.75rem;
	}
}

@media (max-width: 480px) {
	.title h1 {
		font-size: 1.15rem;
	}

	main {
		padding: 1.7rem 0 2.4rem;
	}

	main > h2 {
		font-size: 1.2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
