/* ── Reset ── */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ── Variables ── */
:root {
	--bg:           #0f1117;
	--bg-alt:       #161b22;
	--border:       #30363d;
	--text:         #c9d1d9;
	--text-bold:    #e6edf3;
	--text-muted:   #8b949e;
	--accent:       #6E93AB;
	--accent-hover: #5a7d96;
	--green:        #3fb950;
	--sidebar-w:    22em;
	--radius:       8px;
	--ease:         0.2s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	line-height: 1.75;
	background: var(--bg);
	color: var(--text);
}

body.is-preload * {
	transition-duration: 0s !important;
	animation-duration:  0s !important;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	color: var(--text-bold);
	letter-spacing: 0.02em;
	line-height: 1.25;
}

h2 { font-size: 2em;   margin-bottom: 0.3em; }
h3 { font-size: 1.65em; margin-bottom: 0.3em; }
h4 { font-size: 1.2em;  margin-bottom: 0.3em; }

p { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }

a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--ease);
}
a:hover { color: var(--text-bold); }

ul { list-style: none; }

/* ── Sidebar ── */
#header {
	position: fixed;
	top: 0; left: 0;
	width: var(--sidebar-w);
	height: 100vh;
	background: var(--bg-alt);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	padding: 2.5em 1.75em;
	overflow-y: auto;
	z-index: 1000;
}

#header > header {
	text-align: center;
	margin-bottom: 2em;
}

#logo a {
	display: block;
	margin-bottom: 0.75em;
}

.site-logo {
	width: 100%;
	max-width: 160px;
	height: auto;
	display: block;
	margin: 0 auto;
}

#header > header p {
	color: var(--text-muted);
	font-size: 0.85em;
}

/* Nav */
#nav { flex: 1; }

#nav ul { border-top: 1px solid var(--border); }

#nav ul li a {
	display: block;
	padding: 0.7em 0.75em;
	color: var(--text);
	border-bottom: 1px solid var(--border);
	border-left: 3px solid transparent;
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 0.95em;
	letter-spacing: 0.02em;
	transition: color var(--ease), background var(--ease), border-left-color var(--ease);
}

#nav ul li a:hover {
	color: #fff;
	background: rgba(110, 147, 171, 0.1);
}

#nav ul li a.active {
	color: #fff;
	border-left-color: var(--accent);
	background: rgba(110, 147, 171, 0.15);
}

/* Social links */
#header > footer {
	margin-top: 2em;
}

.social-links {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	padding: 0;
}

.social-links li { display: block; }

.social-links a {
	color: var(--text-muted);
	font-size: 0.9em;
	transition: color var(--ease);
}

.social-links a:hover { color: #fff; }

/* ── Main content ── */
#wrapper { margin-left: var(--sidebar-w); }

#main { background: var(--bg); }

section { padding: 4em 0; }

section:nth-child(even) { background: var(--bg-alt); }

.container {
	max-width: 46em;
	margin: 0 auto;
	padding: 0 2em;
}

/* Section headers */
.major {
	margin-bottom: 2em;
	padding-bottom: 1.25em;
	border-bottom: 2px solid var(--accent);
}

.major p {
	color: var(--text-muted);
	font-size: 0.9em;
	margin: 0.25em 0 0;
}

/* Banner */
.banner {
	width: 100%;
	height: 280px;
	background: var(--accent);
}

/* ── Skills ── */
.skills-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}

.skill-tag {
	background: rgba(110, 147, 171, 0.12);
	border: 1px solid var(--accent);
	color: var(--accent);
	padding: 0.35em 0.9em;
	border-radius: 20px;
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 0.9em;
	letter-spacing: 0.03em;
}

/* ── Game sections ── */
.game-icon {
	width: 100%;
	max-width: 180px;
	border-radius: var(--radius);
	margin-bottom: 1.25em;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

/* Stats bar */
.game-stats {
	display: flex;
	gap: 1.5em;
	margin-bottom: 1.5em;
	flex-wrap: wrap;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 0.45em;
	font-size: 0.9em;
	color: var(--text-muted);
}

.stat-item strong {
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 1.1em;
	color: var(--text-bold);
}

.live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 0 6px var(--green);
	flex-shrink: 0;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.35; }
}

/* Game description */
.game-desc {
	color: var(--text-muted);
	font-size: 0.95em;
	margin-bottom: 1.5em;
}

/* Systems Built */
.systems-built {
	margin: 1.5em 0;
	padding: 1.25em 1.5em;
	background: var(--bg-alt);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius);
}

section:nth-child(even) .systems-built {
	background: var(--bg);
}

.systems-built h4 {
	color: var(--accent);
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 0.75em;
}

.systems-built ul li {
	color: var(--text);
	padding: 0.3em 0 0.3em 1.25em;
	position: relative;
	font-size: 0.95em;
}

.systems-built ul li::before {
	content: '▸';
	position: absolute;
	left: 0;
	color: var(--accent);
}

/* Video embed */
.video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: var(--radius);
	margin-bottom: 2em;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border: 0;
}

/* Screenshots */
.screenshots-label {
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
	margin-bottom: 0.75em;
}

.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75em;
	margin-bottom: 2em;
}

.thumb {
	display: block;
	overflow: hidden;
	border-radius: var(--radius);
}

.thumb img {
	width: 100%;
	display: block;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.thumb:hover img {
	transform: scale(1.06);
	opacity: 0.8;
}

/* Buttons */
.actions { margin-top: 1.5em; }

.button {
	display: inline-block;
	padding: 0.65em 1.6em;
	border-radius: var(--radius);
	font-family: 'Fredoka', sans-serif;
	font-weight: 700;
	font-size: 0.95em;
	letter-spacing: 0.04em;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background var(--ease), border-color var(--ease), color var(--ease);
	text-decoration: none;
}

.button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.button.primary:hover {
	background: var(--accent-hover);
	border-color: var(--accent-hover);
	color: #fff;
}

/* ── Footer ── */
#footer {
	background: var(--bg-alt);
	border-top: 1px solid var(--border);
	padding: 2em 0;
	text-align: center;
}

#footer .copyright {
	display: flex;
	justify-content: center;
	gap: 1.25em;
	flex-wrap: wrap;
	padding: 0;
}

#footer .copyright li {
	color: var(--text-muted);
	font-size: 0.85em;
}

/* ── Fade-in on scroll ── */
.fade-in {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Responsive ── */
@media screen and (max-width: 980px) {
	:root { --sidebar-w: 18em; }
}

@media screen and (max-width: 736px) {
	#header {
		position: relative;
		width: 100%;
		height: auto;
		border-right: none;
		border-bottom: 1px solid var(--border);
		padding: 1.5em;
	}

	#wrapper { margin-left: 0; }

	.screenshot-grid { grid-template-columns: repeat(2, 1fr); }

	h2 { font-size: 1.6em; }
	h3 { font-size: 1.35em; }
}

@media screen and (max-width: 480px) {
	.screenshot-grid { grid-template-columns: 1fr; }
}
