/*
Theme Name: EtherNinja
Theme URI: https://etherninja.org
Author: Michael Walton
Author URI: https://etherninja.org
Description: Classic dark theme for etherninja.org — cyber-ninja chrome with red accents, dual featured cards, and God / Omarchy / AI &amp; Agents lanes. Public views list published posts only.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: etherninja
Tags: blog, dark, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, one-column
*/

/* -------------------------------------------------------------------------- */
/* Tokens                                                                     */
/* -------------------------------------------------------------------------- */

:root {
	--en-bg: #050505;
	--en-bg-elevated: #0a0a0c;
	--en-panel: #0e0e10;
	--en-panel-2: #141418;
	--en-border: #222228;
	--en-border-hot: #3a1518;
	--en-text: #f2f2f2;
	--en-text-dim: #d0d0d4;
	--en-muted: #8a8a92;
	--en-red: #e11d2e;
	--en-red-hot: #ff2a3a;
	--en-red-deep: #2a0a0e;
	--en-red-line: #4a151c;
	--en-focus: #ff4d5a;
	--en-radius: 12px;
	--en-radius-lg: 14px;
	--en-max: 1180px;
	--en-content: 46rem;
	--en-header-h: 88px;
	--en-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------------- */
/* Reset / base                                                               */
/* -------------------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--en-font);
	background: var(--en-bg);
	color: var(--en-text);
	line-height: 1.5;
	min-height: 100vh;
}

body.custom-background {
	background-color: var(--en-bg);
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--en-red-hot);
}

:focus-visible {
	outline: 2px solid var(--en-focus);
	outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: #fff;
}

p {
	margin: 0 0 1em;
}

/* Skip link */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	left: 12px;
	top: 12px;
	width: auto;
	z-index: 100000;
	background: #000;
	color: #fff;
	padding: 10px 16px;
	border-radius: 6px;
	text-decoration: none;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
}

.skip-link:focus {
	left: 12px;
}

/* -------------------------------------------------------------------------- */
/* Header / brand / nav / search                                              */
/* -------------------------------------------------------------------------- */

.site-header {
	max-width: var(--en-max);
	margin: 0 auto;
	padding: 18px 24px 14px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 24px;
	align-items: center;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 220px;
	color: inherit;
}

.brand:hover {
	color: inherit;
}

.brand .custom-logo-link,
.brand .custom-logo {
	display: block;
}

.brand img.custom-logo,
.brand .site-logo-img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1px solid #3a1010;
	background: #000;
	object-fit: cover;
}

.brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.site-title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
}

.site-title .tld {
	font-size: 0.78em;
	font-weight: 650;
	opacity: 0.92;
}

.site-description {
	margin: 0;
	font-size: 11px;
	color: #cfcfd4;
	font-weight: 400;
	letter-spacing: 0.01em;
}

.menu-toggle {
	display: none;
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	color: #fff;
	border-radius: 8px;
	padding: 8px 12px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.menu-toggle:hover {
	border-color: var(--en-red);
	color: #fff;
}

.main-navigation {
	display: flex;
	justify-content: center;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 2px;
}

.main-navigation a {
	color: #cfcfd4;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 10px;
	display: inline-block;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-cat > a,
.main-navigation a[aria-current="page"] {
	color: #fff;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-cat > a,
.main-navigation a[aria-current="page"] {
	box-shadow: inset 0 -3px 0 var(--en-red);
}

.header-search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #151518;
	border: 1px solid var(--en-border);
	border-radius: 999px;
	padding: 8px 14px;
	color: var(--en-muted);
	min-width: 160px;
}

.header-search svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
}

.header-search label {
	display: flex;
	flex: 1;
	margin: 0;
}

.header-search input[type="search"] {
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--en-text);
	width: 100%;
	font-size: 13px;
	font-family: inherit;
	padding: 0;
}

.header-search input[type="search"]::placeholder {
	color: #9a9aa2;
}

.header-search .search-submit {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

.site-main {
	max-width: var(--en-max);
	margin: 0 auto;
	padding: 8px 24px 48px;
}

.site-footer {
	max-width: var(--en-max);
	margin: 0 auto;
	padding: 8px 24px 40px;
	color: #666;
	font-size: 12px;
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid var(--en-border);
	padding-top: 22px;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #888;
}

.footer-brand img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #2a1010;
	object-fit: cover;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 18px;
}

.footer-widgets .widget {
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius);
	padding: 14px 16px;
}

.footer-widgets .widget-title {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--en-red-hot);
}

.footer-widgets ul {
	margin: 0;
	padding: 0 0 0 16px;
	color: var(--en-muted);
}

.footer-widgets a {
	color: var(--en-text-dim);
}

/* -------------------------------------------------------------------------- */
/* Front page: featured + lanes                                               */
/* -------------------------------------------------------------------------- */

.featured {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 10px 0 28px;
}

.feat-card {
	position: relative;
	overflow: hidden;
	border-radius: var(--en-radius-lg);
	min-height: 250px;
	border: 1px solid #2a1216;
	background:
		linear-gradient(90deg, rgba(8, 0, 0, 0.92) 0%, rgba(8, 0, 0, 0.72) 42%, rgba(8, 0, 0, 0.18) 70%, rgba(8, 0, 0, 0.06) 100%),
		var(--art) right center / auto 108% no-repeat,
		radial-gradient(circle at 80% 50%, #4a0a10 0%, #120204 55%, #050505 100%);
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	color: inherit;
}

.feat-card:hover {
	color: inherit;
	border-color: var(--en-red);
}

.feat-card .badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--en-red);
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	padding: 4px 9px;
	border-radius: 4px;
	width: fit-content;
	margin-bottom: 12px;
	text-transform: uppercase;
}

.feat-card.variant-ai .badge {
	background: transparent;
	border: 1px solid var(--en-red);
	color: var(--en-red-hot);
}

.feat-card h2 {
	margin: 0 0 6px;
	font-size: clamp(20px, 2.2vw, 28px);
	font-weight: 900;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	line-height: 1.08;
	max-width: 16ch;
	color: #fff;
}

.feat-date {
	color: #d0d0d4;
	font-size: 13px;
	margin-bottom: 10px;
}

.feat-rule {
	width: 42px;
	height: 3px;
	background: var(--en-red);
	margin-bottom: 12px;
	border-radius: 2px;
}

.feat-card p {
	margin: 0 0 14px;
	color: #d8d8dc;
	font-size: 14px;
	max-width: 36ch;
}

.cta {
	color: var(--en-red-hot);
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
}

.feat-card:hover .cta {
	color: #fff;
}

.lanes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.lane {
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius);
	padding: 16px 16px 8px;
}

.lane-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--en-border);
}

.lane-head .icon {
	width: 18px;
	height: 18px;
	display: grid;
	place-items: center;
	color: var(--en-red);
}

.lane-head .icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.lane-head h2 {
	margin: 0;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.08em;
	flex: 1;
	color: #fff;
}

.lane-head .all {
	color: var(--en-red);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.lane-head .all:hover {
	color: var(--en-red-hot);
}

.lane-item {
	padding: 12px 2px;
	border-bottom: 1px solid #1c1c22;
}

.lane-item:last-child {
	border-bottom: 0;
}

.lane-item .title {
	font-size: 14px;
	font-weight: 650;
	margin: 0 0 6px;
	line-height: 1.3;
}

.lane-item .title a:hover {
	color: var(--en-red-hot);
}

.lane-item .meta {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: var(--en-muted);
}

.en-tag {
	display: inline-block;
	background: var(--en-red-deep);
	color: var(--en-red-hot);
	border: 1px solid var(--en-red-line);
	border-radius: 4px;
	padding: 1px 7px;
	font-size: 11px;
	font-weight: 700;
}

.lane-empty {
	padding: 16px 2px 12px;
	color: var(--en-muted);
	font-size: 13px;
}

.featured-empty {
	grid-column: 1 / -1;
	border: 1px dashed var(--en-border);
	border-radius: var(--en-radius-lg);
	padding: 36px 24px;
	text-align: center;
	color: var(--en-muted);
}

/* -------------------------------------------------------------------------- */
/* Content: single / page / archive                                           */
/* -------------------------------------------------------------------------- */

.page-header {
	margin: 8px 0 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--en-border);
}

.page-header h1 {
	margin: 0 0 6px;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.page-header p,
.archive-description {
	color: var(--en-muted);
	margin: 0;
	max-width: 50ch;
}

.content-panel,
.entry-article {
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius-lg);
	padding: 28px 32px 32px;
	max-width: 820px;
}

.entry-article .entry-header {
	margin-bottom: 22px;
}

.entry-article .entry-title {
	margin: 0 0 10px;
	font-size: clamp(26px, 3vw, 38px);
	font-weight: 900;
	letter-spacing: -0.02em;
	text-transform: none;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	align-items: center;
	color: var(--en-muted);
	font-size: 13px;
}

.entry-thumb {
	margin: 0 0 22px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--en-border);
}

.entry-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-content,
.entry-summary,
.comment-content {
	color: #e4e4e8;
	font-size: 17px;
	line-height: 1.7;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content a,
.comment-content a {
	color: var(--en-red-hot);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content a:hover {
	color: #fff;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin: 1.6em 0 0.5em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}

.entry-content blockquote {
	margin: 1.4em 0;
	padding: 4px 0 4px 18px;
	border-left: 3px solid var(--en-red);
	color: #c8c8ce;
	font-style: italic;
}

.entry-content pre,
.entry-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.entry-content code {
	background: #1a1a20;
	border: 1px solid var(--en-border);
	border-radius: 4px;
	padding: 0.1em 0.35em;
	font-size: 0.9em;
}

.entry-content pre {
	background: #0a0a0e;
	border: 1px solid var(--en-border);
	border-radius: 8px;
	padding: 16px;
	overflow: auto;
}

.entry-content pre code {
	background: none;
	border: 0;
	padding: 0;
}

.entry-content figure {
	margin: 1.4em 0;
}

.entry-content figcaption {
	color: var(--en-muted);
	font-size: 13px;
	margin-top: 6px;
}

.entry-footer {
	margin-top: 28px;
	padding-top: 16px;
	border-top: 1px solid var(--en-border);
	color: var(--en-muted);
	font-size: 13px;
}

.post-navigation {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 22px 0;
	max-width: 820px;
}

.post-navigation a {
	display: block;
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: 10px;
	padding: 14px 16px;
	color: var(--en-text-dim);
}

.post-navigation .nav-subtitle {
	display: block;
	color: var(--en-red);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.post-navigation .nav-next {
	text-align: right;
}

/* Archive / index cards */

.posts-stack {
	display: grid;
	gap: 14px;
}

.post-tease {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 18px;
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius);
	padding: 14px;
	align-items: center;
}

.post-tease .thumb {
	display: block;
	height: 110px;
	border-radius: 8px;
	overflow: hidden;
	background:
		var(--art) center / cover no-repeat,
		radial-gradient(circle at 70% 50%, #4a0a10, #0a0204);
	border: 1px solid var(--en-border-hot);
}

.post-tease .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.post-tease h2 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 800;
}

.post-tease .excerpt {
	margin: 0;
	color: var(--en-muted);
	font-size: 14px;
}

.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.pagination .page-numbers,
.nav-links a,
.nav-links .current {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid var(--en-border);
	border-radius: 6px;
	background: var(--en-panel);
	color: var(--en-text-dim);
	font-size: 13px;
	font-weight: 700;
}

.pagination .current,
.nav-links .current {
	border-color: var(--en-red);
	color: #fff;
}

/* -------------------------------------------------------------------------- */
/* Comments                                                                   */
/* -------------------------------------------------------------------------- */

.comments-area {
	max-width: 820px;
	margin: 28px 0 0;
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius-lg);
	padding: 24px 28px;
}

.comments-title,
.comment-reply-title {
	margin: 0 0 16px;
	font-size: 18px;
}

.comment-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 12px 0 0 18px;
	padding: 0;
	border-left: 2px solid var(--en-border);
	padding-left: 14px;
}

.comment-body {
	padding: 12px 0;
	border-bottom: 1px solid #1c1c22;
}

.comment-meta {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--en-muted);
}

.comment-author img {
	border-radius: 50%;
}

.comment-form label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: #151518;
	border: 1px solid var(--en-border);
	border-radius: 8px;
	color: var(--en-text);
	padding: 10px 12px;
	font: inherit;
	margin-bottom: 12px;
}

.comment-form .submit,
.wp-block-button__link,
button[type="submit"] {
	background: var(--en-red);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 10px 16px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.comment-form .submit:hover,
button[type="submit"]:hover {
	background: var(--en-red-hot);
	color: #fff;
}

.no-comments,
.comment-notes {
	color: var(--en-muted);
	font-size: 14px;
}

/* -------------------------------------------------------------------------- */
/* 404 / empty / search page form                                             */
/* -------------------------------------------------------------------------- */

.empty-state {
	background: var(--en-panel);
	border: 1px solid var(--en-border);
	border-radius: var(--en-radius-lg);
	padding: 48px 28px;
	text-align: center;
	max-width: 640px;
}

.empty-state h1,
.empty-state h2 {
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.empty-state p {
	color: var(--en-muted);
}

.empty-state .search-form,
.search-page-form .search-form {
	display: flex;
	gap: 8px;
	max-width: 420px;
	margin: 18px auto 0;
	background: #151518;
	border: 1px solid var(--en-border);
	border-radius: 999px;
	padding: 6px 6px 6px 16px;
}

.empty-state .search-form input[type="search"],
.search-page-form input[type="search"] {
	flex: 1;
	border: 0;
	background: transparent;
	color: var(--en-text);
	font: inherit;
	outline: none;
}

.empty-state .search-submit,
.search-page-form .search-submit {
	position: static;
	width: auto;
	height: auto;
	clip: auto;
	overflow: visible;
	background: var(--en-red);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 8px 16px;
	font-weight: 800;
	cursor: pointer;
}

/* -------------------------------------------------------------------------- */
/* WP extras                                                                  */
/* -------------------------------------------------------------------------- */

.alignleft { float: left; margin: 0 1.2em 0.8em 0; }
.alignright { float: right; margin: 0 0 0.8em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; }
.sticky { }
.bypostauthor { }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

.says { display: none; }

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 960px) {
	.site-header {
		grid-template-columns: 1fr auto;
		gap: 12px;
	}

	.brand {
		min-width: 0;
	}

	.menu-toggle {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.main-navigation {
		grid-column: 1 / -1;
		display: none;
		justify-content: flex-start;
	}

	.main-navigation.is-open {
		display: flex;
	}

	.main-navigation ul {
		flex-direction: column;
		width: 100%;
		align-items: flex-start;
		background: var(--en-panel);
		border: 1px solid var(--en-border);
		border-radius: 10px;
		padding: 8px;
	}

	.header-search {
		grid-column: 1 / -1;
		width: 100%;
		min-width: 0;
	}

	.featured,
	.lanes {
		grid-template-columns: 1fr;
	}

	.post-tease {
		grid-template-columns: 1fr;
	}

	.post-tease .thumb {
		height: 160px;
	}

	.post-navigation {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		text-align: left;
	}

	.entry-article,
	.comments-area {
		padding: 20px 18px;
	}
}

@media (max-width: 540px) {
	.site-header,
	.site-main,
	.site-footer {
		padding-left: 16px;
		padding-right: 16px;
	}

	.site-title {
		font-size: 17px;
	}

	.site-description {
		display: none;
	}

	.feat-card {
		min-height: 220px;
		padding: 18px;
	}
}
