/*
Theme Name: SWB
Description: A clean theme with a sticky header, right-side navigation, and footer.
Author: Sam Waters <sam@samwaters.com>
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swb
*/

@font-face {
	font-family: "VGA";
	src:
			url(assets/VGA.woff) format('woff');
	font-weight: normal;
	font-style: normal;
}
/* --- Animations -- */
@keyframes blink {
	0% {
		opacity: 0;
	}
	49% {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 1;
	}
}

/* --- GLOBAL STYLES --- */
*, *::before, *::after {
	box-sizing: border-box;
	font-family: VGA, sans-serif;
	margin: 0;
	padding: 0;
}

html, body { height: 100%; }

.full-width {
	width: 100%;
}

body {
	color: #c8c3bc;
	background: #1b1e1f;
}

a { color: #00ff00; text-decoration: none; }
a:hover { text-decoration: underline; }

ol,ul {
	padding-left: 16px;
}

img { max-width: 100%; height: auto; display: block; }

/* --- LAYOUT --- */
.site-layout {
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}
.site-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
}
.site-header {
	background: #1a1a1a;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	color: #fff;
	display: flex;
	height: 80px;
	justify-content: center;
}
.content-wrapper {
	display: flex;
	flex: 1;
	justify-content: center;
	overflow-y: scroll;
	padding: 2rem;
}

.site-footer {
	background: #1a1a1a;
	color: #888;
	display: flex;
	justify-content: center;
}

/* --- HEADER --- */
.header-inner {
	align-items: center;
	display: flex;
	gap: 1rem;
	height: 100%;
	justify-content: space-between;
	width: 1400px;
}
@media (max-width: 1400px) {
	.header-inner {
		padding: 0 2rem;
		width: 100%;
	}
}

.site-branding a.site-branding-link {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.02em;
	white-space: nowrap;
}
.site-branding a.site-branding-link::before {
	color: #00ff00;
	content: "$";
	margin-right: 10px;
}
.site-branding a.site-branding-link::after {
	animation-name: "blink";
	animation-duration: 1s;
	animation-iteration-count: infinite;
	animation-timing-function: linear;
	content: "_";
}

.site-branding a:hover { opacity: 0.85; text-decoration: none; }

/* Primary nav */
.primary-nav .nav-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.125rem;
}

.primary-nav .nav-menu li a {
	display: block;
	padding: 0.45rem 0.875rem;
	color: #ccc;
	font-size: 0.875rem;
	border-radius: 4px;
	transition: background 0.15s, color 0.15s;
}

.primary-nav .nav-menu li a:hover,
.primary-nav .nav-menu li.current-menu-item > a,
.primary-nav .nav-menu li.current-menu-ancestor > a {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	text-decoration: none;
}

/* Dropdown */
.primary-nav .nav-menu li { position: relative; }

.primary-nav .nav-menu ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #2a2a2a;
	min-width: 180px;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	list-style: none;
	padding: 0.375rem 0;
	z-index: 100;
}

.primary-nav .nav-menu li:hover > ul { display: block; }

.primary-nav .nav-menu ul li a {
	border-radius: 0;
	padding: 0.5rem 1rem;
}

/* --- CONTENT --- */
.content-inner {
	display: flex;
	gap: 2.5rem;
	width: 1400px;
}
@media (max-width: 900px) {
	.content-inner {
		flex-direction: column;
		width: 100%;
	}
}

.content-area {
	background: #181a1b;
	border-radius: 6px;
	padding: 2rem;
	min-width: 0;
	flex: 1;
}

/* Post list */
.entry {
	padding-bottom: 2rem;
	margin-bottom: 2rem;
	border-bottom: 1px solid #888;
}

.entry:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.entry-header {
	align-items: center;
	display: flex;
}

.entry-title {
	color: #fff;
	flex: 1;
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.4rem;
}

.entry-title a { color: #ffffff; }
.entry-title a:hover { color: #00ff00; text-decoration: none; }

.entry-meta {
	font-size: 0.8rem;
	color: #888;
}

.entry-meta a { color: #888; }
.entry-meta a:hover { color: #00ff00; }

.entry-content { color: #c8c3bc; }
.entry-content > * + * { margin-top: 1rem; }

.entry-content h2 { font-size: 1.3rem; margin-top: 1.5rem; }
.entry-content h3 { font-size: 1.1rem; margin-top: 1.25rem; }

/* --- BLOCKS AND ITEMS --- */

.comment-form textarea, .comment-form input {
	background-color: #888;
	color: #00ff00;
	outline: none;
}

.comment-form input[type="submit"] {
	padding: 5px 10px;
}

.comment-form .required {
	color: red;
}

.comment-form .form-submit {
	margin-top: 10px;
}

code {
	background-color: black;
	border: 1px solid #888;
	color: white;
	padding: 10px;
}

/* Single post */
.single .entry-title { font-size: 1.875rem; }
.page .entry-title { font-size: 1.875rem; }

/* Pagination */
.pagination,
.post-navigation {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #888;
}

.pagination .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.875rem;
	color: #444;
}
.pagination .page-numbers.current {
	background: #00ff00;
	border-color: #00ff00;
	color: #fff;
}
.pagination .page-numbers:hover:not(.current) {
	border-color: #00ff00;
	color: #00ff00;
	text-decoration: none;
}

.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }
.post-navigation .nav-previous,
.post-navigation .nav-next { font-size: 0.875rem; }

/* 404 */
.error-404 .page-header { margin-bottom: 1.5rem; }
.error-404 .page-title { font-size: 2rem; }

/* --- SIDEBAR --- */
.sidebar-right {
	min-width: 0;
}

.sidebar-section {
	background: #181a1b;
	border-radius: 10px;
	padding: 1.25rem;
	margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
	margin-bottom: 0;
}

.wp-block-search input {
	background-color: #888;
	color: #00ff00;
	outline: none;
}

.sidebar-heading {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #999;
	margin-bottom: 0.75rem;
}

/* Sidebar nav menu */
.sidebar-menu {
	list-style: none;
}

.sidebar-menu li a {
	display: block;
	padding: 0.375rem 0.625rem;
	color: #444;
	font-size: 0.875rem;
	border-left: 2px solid transparent;
	border-radius: 0 3px 3px 0;
	transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sidebar-menu li a:hover {
	border-left-color: #0073aa;
	color: #0073aa;
	background: #f0f7ff;
	text-decoration: none;
}

.sidebar-menu li.current-menu-item > a,
.sidebar-menu li.current-menu-ancestor > a {
	border-left-color: #0073aa;
	color: #0073aa;
	font-weight: 600;
	background: #f0f7ff;
}

/* Nested items */
.sidebar-menu ul {
	list-style: none;
	margin: 0.25rem 0 0.25rem 0.875rem;
}

.sidebar-menu ul li a {
	font-size: 0.8rem;
	padding: 0.25rem 0.5rem;
}

h2.wp-block-heading {
	color: #ffffff;
}

/* Widgets */
.widget { /* inherits .sidebar-section styles when wrapped */ }
.widget-title { /* same as .sidebar-heading */ font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #999; margin-bottom: 0.75rem; }
.widget ul { list-style: none; }
.widget ul li a { display: block; padding: 0.3rem 0; font-size: 0.875rem; color: #c8c3bc; border-bottom: 1px solid #888; }
.widget ul li a:hover { color: #00ff00; text-decoration: none; }
.widget ul li:last-child a { border-bottom: none; }

/* --- FOOTER --- */
.footer-inner {
	align-items: center;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem 0;
	width: 1400px;
}
@media (max-width: 1400px) {
	.footer-inner {
		padding: 1.25rem 2rem;
		width: 100%;
	}
}

.footer-menu {
	list-style: none;
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.footer-menu li a {
	color: #888;
	font-size: 0.8rem;
	transition: color 0.15s;
}

.footer-menu li a:hover { color: #fff; text-decoration: none; }

.footer-copy { font-size: 0.8rem; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
	.sidebar-section {
		margin-bottom: 0;
	}
}

@media (max-width: 640px) {
	.primary-nav .nav-menu { gap: 0; }
	.footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 450px) {
	.site-branding a.site-branding-link {
		font-size: 18px;
	}
}
