:root {
	--bg: #0f1711;
	--bg-2: #16261d;
	--text: #f2f6ef;
	--muted: #c4d2c2;
	--accent: #8dcf7b;
	--accent-rgb: 141, 207, 123;
	--card: rgba(30, 44, 35, 0.74);
	--border: rgba(171, 214, 158, 0.28);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	height: 100%;
	background: var(--bg);
}

body {
	min-height: 100vh;
	background:
		radial-gradient(circle at 15% 20%, rgba(110, 160, 110, 0.14), transparent 42%),
		radial-gradient(circle at 85% 80%, rgba(96, 140, 112, 0.16), transparent 40%),
		fixed linear-gradient(180deg, var(--bg), var(--bg-2));
	background-attachment: fixed;
	color: var(--text);
	font-family: Roboto, sans-serif;
	overflow-x: hidden;
	line-height: 1.5;
	width: 100vw;
}

body::before,
body::after {
	content: "";
	position: fixed;
	width: 42vmax;
	height: 42vmax;
	border-radius: 50%;
	filter: blur(80px);
	opacity: 0.24;
	z-index: 0;
	pointer-events: none;
	animation: driftGlow 20s ease-in-out infinite alternate;
}

body::before {
	left: -14vmax;
	top: -10vmax;
	background: rgba(112, 167, 116, 0.6);
}

body::after {
	right: -16vmax;
	bottom: -15vmax;
	background: rgba(115, 145, 116, 0.52);
	animation-delay: 2s;
}

#starfield {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 0;
	pointer-events: none;
	display: block;
}

main {
	position: relative;
	z-index: 1;
	width: min(1100px, 94vw);
	margin: 0 auto;
	padding: 0 0 90px;
}

.hero {
	min-height: 100vh;
	display: grid;
	place-items: center;
	text-align: center;
}

.content {
	width: min(860px, 100%);
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 28px;
	backdrop-filter: blur(8px);
	box-shadow: 0 14px 42px rgba(0, 0, 0, 0.26);
	animation: contentRise 900ms cubic-bezier(.2,.8,.2,1) both;
}

h1 {
	font-family: "Merriweather", Georgia, serif;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	color: var(--accent);
	margin-bottom: 10px;
	text-shadow: 0 2px 10px rgba(88, 130, 92, 0.38);
	letter-spacing: 0.3px;
}

p,
.hero-sub {
	color: var(--muted);
	font-size: clamp(1rem, 2.2vw, 1.15rem);
	line-height: 1.6;
}

.hero-sub {
	max-width: 760px;
	margin: 0 auto;
}

.section-title {
	font-family: "Merriweather", Georgia, serif;
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	color: var(--accent);
	margin-bottom: 16px;
	text-shadow: 0 1px 8px rgba(var(--accent-rgb), 0.28);
}

.exam-section {
	margin-top: 0;
}

.exam-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.exam-card {
	background: rgba(35, 52, 41, 0.72);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 18px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: translateY(14px) scale(0.985);
	transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.exam-name {
	font-weight: 700;
	margin-bottom: 12px;
	font-size: 1.05rem;
	color: #ecf7e9;
}

.exam-card:hover {
	transform: translateY(-6px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 28px rgba(0, 0, 0, 0.28);
	border-color: rgba(182, 224, 170, 0.42);
}

.sets {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.set-link {
	text-decoration: none;
	color: var(--text);
	border: 1px solid rgba(var(--accent-rgb), 0.32);
	background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08));
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 0.92rem;
	transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.set-link:hover,
.set-link:focus-visible {
	transform: translateY(-3px) scale(1.01);
	background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.12));
	box-shadow: 0 8px 18px rgba(41, 66, 45, 0.35), 0 0 0 2px rgba(var(--accent-rgb), 0.14);
	outline: none;
}

.scroll-section {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 650ms ease, transform 650ms ease;
}

.scroll-section.visible {
	opacity: 1;
	transform: translateY(0);
}

.exam-section.visible .exam-card {
	animation: cardIn 650ms cubic-bezier(.21,.92,.28,1) forwards;
}

.exam-section.visible .exam-card:nth-child(2) {
	animation-delay: 90ms;
}

.exam-section.visible .exam-card:nth-child(3) {
	animation-delay: 180ms;
}

@keyframes driftGlow {
	0% {
		transform: translate3d(0, 0, 0) scale(1);
	}
	100% {
		transform: translate3d(10px, -14px, 0) scale(1.08);
	}
}

@keyframes contentRise {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes cardIn {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (prefers-reduced-motion: reduce) {
	body::before,
	body::after,
	.content,
	.exam-section.visible .exam-card {
		animation: none !important;
	}

	.scroll-section,
	.scroll-section.visible,
	.exam-card,
	.set-link {
		transition: none !important;
	}

	.scroll-section {
		opacity: 1;
		transform: none;
	}

	.exam-card {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 640px) {
	main {
		width: min(1100px, 92vw);
	}

	.content {
		padding: 22px;
	}
}
