/* =========================
   Theme Variables
========================= */
:root {
	/* Backgrounds */
	--bg-main: #fff8e7;
	--bg-gradient-top: #fffdf5;
	--bg-gradient-bottom: #ffe4a3;
	--bg-panel: rgba(255, 170, 0, 0.08);
	--bg-panel-hover: rgba(255, 140, 0, 0.14);

	/* Text */
	--text-main: #2b1d0e;
	--text-muted: #5f4a2f;

	/* Accents */
	--accent-yellow: #ffd54a;
	--accent-orange: #ff8c42;
	--accent-brown: #7a4b1f;

	/* UI */
	--border-soft: rgba(122, 75, 31, 0.15);
	--shadow-soft: 5px 5px 0 rgba(122, 75, 31, 0.12);
	--radius: 0px; /* pixel-style sharp edges */
}

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

html {
	scroll-behavior: smooth;
}

/* =========================
   Pixel Style Base
========================= */

body {
	font-family: "Courier New", monospace;
	image-rendering: pixelated;
	background:
		linear-gradient(
			to bottom,
			var(--bg-gradient-top),
			var(--bg-gradient-bottom)
		),
		var(--bg-main);
	color: var(--text-main);
	line-height: 1.7;
	font-size: 16px;
}

/* =========================
   Glow Effects
========================= */

.glow-yellow {
	color: var(--accent-yellow);
	text-shadow: 2px 2px 0 rgba(255, 140, 0, 0.25);
}

.glow-orange {
	color: var(--accent-orange);
	text-shadow: 2px 2px 0 rgba(255, 140, 0, 0.3);
}

/* =========================
   Typography
========================= */

h1,
h2,
h3 {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	line-height: 1.4;
}

h1 {
	font-size: clamp(1.8rem, 4vw, 2.2rem);
	margin-bottom: 1rem;
}

h2 {
	font-size: 1.2rem;
	color: var(--accent-orange);
	margin-bottom: 0.75rem;
}

h3 {
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

p {
	color: var(--text-muted);
	max-width: 72ch;
	margin-bottom: 1rem;
	font-size: 1rem;
}

a {
	color: var(--accent-brown);
	text-decoration: none;
	font-weight: bold;
}

a:hover {
	color: var(--accent-orange);
}

/* =========================
   Navbar
========================= */

.navbar {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;

	padding: 1rem 1.25rem;
	border-bottom: 4px solid var(--accent-orange);

	background: linear-gradient(180deg, #ffb347, #ffcc70);

	box-shadow: var(--shadow-soft);
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	image-rendering: pixelated;
}

.site-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #2b1d0e;
	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.35);
	display: block;
}

.subtitle {
	font-size: 0.95rem;
	color: #5f4a2f;
	margin-top: 0.25rem;
}

.nav-links {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.nav-links a {
	font-size: 1rem;
	font-weight: 700;
}

/* =========================
   Layout
========================= */

.container {
	max-width: 960px;
	margin: 0 auto;
	padding: 2rem 1.25rem;
}

.article {
	max-width: 820px;
}

/* =========================
   Cards
========================= */

.cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	margin-top: 2rem;
}

.card {
	display: block;
	padding: 1.4rem;

	background: #fff3cc;
	border: 3px solid var(--accent-orange);
	border-radius: var(--radius);

	box-shadow: var(--shadow-soft);
	transition: all 0.2s ease;

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

.card:hover {
	transform: translateY(-2px);
	background: #ffe8b0;
	border-color: var(--accent-brown);
}

.card h2 {
	margin-top: 0;
	font-size: 1.05rem;
}

.card p {
	font-size: 0.95rem;
}

.card .meta {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: var(--accent-brown);
	font-weight: 600;
}

/* =========================
   Panels
========================= */

.panel {
	background: #fff5d9;
	border: 3px solid var(--accent-yellow);
	padding: 1.4rem;
	margin: 2rem 0;
	box-shadow: var(--shadow-soft);
}

/* =========================
   Code Blocks
========================= */

pre {
	background: #3a240f;
	color: #fff4d6;
	border: 3px solid var(--accent-orange);
	padding: 1rem;
	margin: 1.5rem 0;
	overflow-x: auto;
	width: 100%;
	box-shadow: var(--shadow-soft);
	font-family: "Courier New", monospace;
	border-radius: 0;
}

pre code {
	font-size: 0.9rem;
	line-height: 1.5;
	white-space: pre;
}

p code,
li code {
	background: rgba(255, 140, 0, 0.12);
	padding: 0.2rem 0.4rem;
	border: 1px solid var(--accent-orange);
	font-size: 0.85rem;
	color: var(--accent-brown);
}

/* =========================
   Pagination
========================= */

.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 2.5rem 0;
	padding: 1rem 0;
}

.page-button {
	font-family: "Courier New", monospace;
	background: #fff8de;
	color: #7a4b1f;
	border: 3px solid #ff8c42;
	padding: 0.55rem 0.9rem;
	font-size: 0.95rem;
	font-weight: 700;
	border-radius: 0;
	cursor: pointer;
	min-width: 44px;
	text-align: center;
	box-shadow: 4px 4px 0 rgba(122, 75, 31, 0.12);
	transition: all 0.15s ease;
	image-rendering: pixelated;
}

.page-button:hover {
	background: #ffd54a;
	transform: translateY(-2px);
}

.page-button.active {
	background: #ff8c42;
	color: #fff8de;
	border-color: #7a4b1f;
}

.page-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* =========================
   Footer
========================= */

footer {
	text-align: center;
	padding: 2rem 1rem;
	font-size: 0.95rem;
	color: var(--accent-brown);
	border-top: 3px solid var(--accent-orange);
	margin-top: 3rem;
}

/* =========================
   Desktop
========================= */

@media (min-width: 768px) {
	.cards {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	}
}

/* =========================
   Mobile
========================= */

@media (max-width: 768px) {
	.navbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.logo {
		width: 48px;
		height: 48px;
	}

	.site-title {
		font-size: 1.1rem;
	}

	.subtitle {
		font-size: 0.85rem;
	}

	.nav-links a {
		font-size: 0.95rem;
	}

	h1 {
		font-size: 1.6rem;
	}

	h2 {
		font-size: 1.05rem;
	}

	.container {
		padding: 1rem;
	}

	pre {
		font-size: 0.8rem;
	}

	.pagination {
		gap: 0.5rem;
	}

	.page-button {
		font-size: 0.85rem;
		padding: 0.45rem 0.75rem;
		min-width: 40px;
	}

	.image-gallery {
		flex-direction: column;
		align-items: center;
	}
}