/*
Theme Name: Minimal Performance Theme
Theme URI: https://example.com
Author: You
Description: A bare-minimum WordPress theme built for maximum performance. No frameworks, no bundled JS, minimal CSS.
Version: 1.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: minimal-theme
*/

/* Basic reset - kept intentionally small */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.site-content { padding: 1rem; max-width: 800px; margin: 0 auto; }
.entry-title { margin: 0 0 0.5rem; }
.entry-meta { font-size: 0.85rem; opacity: 0.7; margin-bottom: 1rem; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Site header / nav bar ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--color-background, #fff);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1000px;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
}

.site-branding {
	font-weight: 700;
	font-size: 1.15rem;
	text-decoration: none;
	color: var(--color-text, #1e1e1e);
	letter-spacing: -0.01em;
}

.primary-nav-list {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav-list a {
	position: relative;
	text-decoration: none;
	color: var(--color-text, #1e1e1e);
	font-size: 0.95rem;
	padding: 0.25rem 0;
}

.primary-nav-list a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 2px;
	background: var(--color-accent, #d54e21);
	transition: width 0.2s ease;
}

.primary-nav-list a:hover::after,
.primary-nav-list a:focus-visible::after {
	width: 100%;
}

/* Hamburger button - hidden on desktop */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	margin: -0.5rem;
}

.nav-toggle-box {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 24px;
}

.nav-toggle-line {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--color-text, #1e1e1e);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
	opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 90;
}

/* ---------- Mobile: off-canvas side menu ---------- */
@media (max-width: 780px) {
	.nav-toggle {
		display: inline-flex;
		z-index: 110;
	}

	.primary-nav {
		position: fixed;
		top: 0;
		right: 0;
		height: 100%;
		width: min(320px, 85vw);
		background: var(--color-background, #fff);
		box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
		transform: translateX(100%);
		transition: transform 0.25s ease;
		z-index: 100;
		padding: 5rem 1.5rem 2rem;
		overflow-y: auto;
	}

	.primary-nav.is-open {
		transform: translateX(0);
	}

	.primary-nav-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.25rem;
	}

	.primary-nav-list a {
		font-size: 1.05rem;
	}

	.nav-overlay.is-open {
		display: block;
	}
}

@media (min-width: 781px) {
	.nav-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.primary-nav,
	.nav-toggle-line,
	.primary-nav-list a::after {
		transition: none;
	}
}
