/*
Theme Name: Artivist Media Console
Theme URI: https://artivist.media
Author: X Vasquez / San Diego Artivist
Author URI: https://artivist.media
Description: Console-aesthetic WordPress theme for Artivist.Media — Independent San Diego Media. Dark mode, monospace typography, zine-inspired editorial layout. Sibling theme to Radio Axiom Console.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: artivist-media
Tags: dark, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ═══════════════════════════════════════════════════
   ARTIVIST.MEDIA CONSOLE THEME
   Independent San Diego Media
   
   Color System:
   --am-black:      #0a0a0a   (background)
   --am-dark:       #111111   (card/elevated surfaces)
   --am-border:     #1e1e1e   (borders, dividers)
   --am-muted:      #555555   (muted text, timestamps)
   --am-body:       #d4d4d4   (body text)
   --am-bright:     #f0f0f0   (headings, emphasis)
   --am-red:        #cc0000   (brand primary, captions, meta)
   --am-red-dim:    #8b0000   (hover state, muted red)
   --am-yellow:     #e6c619   (links)
   --am-yellow-dim: #b89e14   (link hover)
   --am-cyan:       #00b4d8   (accent, tags, code)
   --am-green:      #2d6a4f   (success states)
   ═══════════════════════════════════════════════════ */

:root {
	--am-black: #0a0a0a;
	--am-dark: #111111;
	--am-border: #1e1e1e;
	--am-muted: #555555;
	--am-body: #d4d4d4;
	--am-bright: #f0f0f0;
	--am-red: #cc0000;
	--am-red-dim: #8b0000;
	--am-yellow: #e6c619;
	--am-yellow-dim: #b89e14;
	--am-cyan: #00b4d8;
	--am-green: #2d6a4f;
	--am-font-mono: 'Courier New', Courier, 'Liberation Mono', monospace;
	--am-font-display: 'Courier New', Courier, monospace;
	--am-max-width: 960px;
	--am-gutter: 1.5rem;
}

/* ── RESET ────────────────────────────────────── */

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

/* ── BASE ─────────────────────────────────────── */

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	color-scheme: dark;
}

body {
	background-color: var(--am-black);
	color: var(--am-body);
	font-family: var(--am-font-mono);
	font-size: 0.9375rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* CRT scanline overlay */
body::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 2px,
		rgba(0, 0, 0, 0.03) 2px,
		rgba(0, 0, 0, 0.03) 4px
	);
}

/* ── TYPOGRAPHY ───────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--am-font-display);
	color: var(--am-bright);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* Zine-style heading prefix */
.entry-title::before,
.page-title::before {
	content: '▌';
	color: var(--am-red);
	margin-right: 0.5em;
}

p {
	margin-bottom: 1.25em;
}

a {
	color: var(--am-yellow);
	text-decoration: none;
	transition: color 0.15s ease;
}

a:hover,
a:focus {
	color: var(--am-yellow-dim);
	text-decoration: underline;
}

blockquote {
	border-left: 3px solid var(--am-red);
	padding: 0.75em 1.25em;
	margin: 1.5em 0;
	background: var(--am-dark);
	color: var(--am-body);
	font-style: italic;
}

blockquote::before {
	content: '» ';
	color: var(--am-red);
	font-style: normal;
	font-weight: 700;
}

code, pre {
	font-family: var(--am-font-mono);
	background: var(--am-dark);
	border: 1px solid var(--am-border);
}

code {
	padding: 0.15em 0.4em;
	font-size: 0.875em;
	color: var(--am-cyan);
}

pre {
	padding: 1em;
	overflow-x: auto;
	margin: 1.5em 0;
}

pre code {
	border: none;
	padding: 0;
	background: none;
}

hr {
	border: none;
	border-top: 1px solid var(--am-border);
	margin: 2em 0;
}

/* ── LAYOUT ───────────────────────────────────── */

.site-wrapper {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 var(--am-gutter);
}

/* ── HEADER ───────────────────────────────────── */

.site-header {
	border-bottom: 1px solid var(--am-border);
	padding: 1.5rem 0;
}

.header-inner {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 var(--am-gutter);
}

/* Top bar: social links */
.header-social {
	display: flex;
	gap: 1.25rem;
	margin-bottom: 1rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.header-social a {
	color: var(--am-muted);
	transition: color 0.15s ease;
}

.header-social a:hover {
	color: var(--am-yellow);
	text-decoration: none;
}

/* Site branding */
.site-branding {
	margin-bottom: 1rem;
}

.site-title {
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin: 0;
	line-height: 1;
}

.site-title a {
	color: var(--am-bright);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--am-red);
}

/* Red block before title — zine masthead style */
.site-title::before {
	content: '■ ';
	color: var(--am-red);
}

.site-description {
	color: var(--am-muted);
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-top: 0.25rem;
}

/* ── NAVIGATION ──────────────────────────────── */

.main-navigation {
	border-top: 1px solid var(--am-border);
	padding-top: 0.75rem;
}

.nav-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.nav-menu li {
	position: relative;
}

.nav-menu a {
	display: block;
	padding: 0.4rem 0.75rem;
	color: var(--am-body);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 400;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	color: var(--am-red);
	border-color: var(--am-border);
	background: var(--am-dark);
	text-decoration: none;
}

/* Dropdown */
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--am-dark);
	border: 1px solid var(--am-border);
	min-width: 220px;
	z-index: 100;
	list-style: none;
}

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

.nav-menu .sub-menu a {
	font-size: 0.7rem;
	padding: 0.35rem 0.75rem;
}

.nav-menu .sub-menu a::before {
	content: '└ ';
	color: var(--am-muted);
}

/* Mobile nav toggle */
.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--am-border);
	color: var(--am-body);
	font-family: var(--am-font-mono);
	font-size: 0.8rem;
	padding: 0.5rem 1rem;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	width: 100%;
	text-align: left;
}

.menu-toggle::before {
	content: '≡ ';
	color: var(--am-red);
}

.menu-toggle:hover {
	background: var(--am-dark);
	border-color: var(--am-red);
}

/* ── CONTENT AREA ─────────────────────────────── */

.site-content {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 2rem var(--am-gutter);
}

.content-area {
	min-height: 60vh;
}

/* ── POST / PAGE ENTRIES ──────────────────────── */

article.post,
article.page {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--am-border);
}

article.post:last-child,
article.page:last-child {
	border-bottom: none;
}

.entry-header {
	margin-bottom: 1.25rem;
}

.entry-title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.entry-title a {
	color: var(--am-bright);
}

.entry-title a:hover {
	color: var(--am-red);
	text-decoration: none;
}

/* Entry meta: date, author, categories */
.entry-meta {
	font-size: 0.75rem;
	color: var(--am-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.entry-meta a {
	color: var(--am-red);
}

.entry-meta .sep {
	margin: 0 0.5em;
	color: var(--am-border);
}

.entry-meta .posted-on::before {
	content: '⏱ ';
}

.entry-meta .byline::before {
	content: '✎ ';
}

/* Featured image */
.post-thumbnail {
	margin-bottom: 1.5rem;
	line-height: 0;
}

.post-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--am-border);
}

/* Entry content */
.entry-content {
	line-height: 1.75;
}

.entry-content h2::before,
.entry-content h3::before {
	content: '// ';
	color: var(--am-red);
	font-weight: 400;
}

.entry-content img {
	max-width: 100%;
	height: auto;
	border: 1px solid var(--am-border);
}

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

.entry-content figcaption {
	color: var(--am-red);
	font-size: 0.75rem;
	margin-top: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.entry-content figcaption::before {
	content: '— ';
}

/* Lists in content */
.entry-content ul,
.entry-content ol {
	margin: 1em 0 1em 1.5em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content ul > li::marker {
	color: var(--am-red);
}

/* Tables */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.875rem;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--am-border);
	padding: 0.5em 0.75em;
	text-align: left;
}

.entry-content th {
	background: var(--am-dark);
	color: var(--am-red);
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
}

/* Entry footer: tags, categories */
.entry-footer {
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--am-border);
	font-size: 0.75rem;
	color: var(--am-muted);
}

.entry-footer .cat-links::before {
	content: '[filed: ';
}

.entry-footer .cat-links::after {
	content: ']';
}

.entry-footer .tags-links::before {
	content: ' [tagged: ';
}

.entry-footer .tags-links::after {
	content: ']';
}

.entry-footer a {
	color: var(--am-cyan);
}

/* ── PAGE TEMPLATES ──────────────────────────── */

/* Full width template — no max-width constraint on content */
.page-template-full-width .entry-content {
	max-width: none;
}

/* Embed template — for interactive tools, zero padding */
.page-template-embed .site-content {
	padding: 0;
}

.page-template-embed .entry-content {
	max-width: none;
}

.page-template-embed .entry-header {
	max-width: var(--am-max-width);
	margin: 0 auto 1rem;
	padding: 1rem var(--am-gutter) 0;
}

/* ── SECTION LANDING PAGES ───────────────────── */

.section-intro {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--am-border);
}

.section-intro .section-label {
	display: inline-block;
	background: var(--am-red);
	color: var(--am-bright);
	padding: 0.15em 0.5em;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.75rem;
}

.section-intro p {
	color: var(--am-muted);
	font-size: 0.875rem;
}

/* Card grid for section landing pages */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.card {
	background: var(--am-dark);
	border: 1px solid var(--am-border);
	padding: 1.25rem;
	transition: border-color 0.15s ease;
}

.card:hover {
	border-color: var(--am-red);
}

.card-label {
	display: inline-block;
	color: var(--am-red);
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 0.5rem;
}

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

.card h3::before {
	content: none;
}

.card h3 a {
	color: var(--am-bright);
}

.card h3 a:hover {
	color: var(--am-yellow);
}

.card p {
	color: var(--am-muted);
	font-size: 0.8rem;
	line-height: 1.5;
	margin-bottom: 0;
}

.card-thumbnail {
	margin: -1.25rem -1.25rem 1rem;
	line-height: 0;
}

.card-thumbnail img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

/* ── EMBEDS & MEDIA ──────────────────────────── */

.wp-block-embed__wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}

.wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 1px solid var(--am-border);
}

.wp-block-image img {
	border: 1px solid var(--am-border);
}

.wp-block-gallery figcaption {
	color: var(--am-red);
	background: rgba(10, 10, 10, 0.85);
	font-family: var(--am-font-mono);
	font-size: 0.7rem;
	text-transform: uppercase;
}

/* ── SIDEBAR / WIDGETS ────────────────────────── */

.widget {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--am-border);
}

.widget-title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--am-red);
	margin-bottom: 0.75rem;
}

.widget-title::before {
	content: '# ';
}

.widget ul {
	list-style: none;
}

.widget ul li {
	padding: 0.3rem 0;
	border-bottom: 1px solid var(--am-border);
	font-size: 0.8rem;
}

.widget ul li:last-child {
	border-bottom: none;
}

.widget ul li::before {
	content: '> ';
	color: var(--am-muted);
}

.widget ul li a {
	color: var(--am-body);
}

.widget ul li a:hover {
	color: var(--am-yellow);
}

/* ── FOOTER ───────────────────────────────────── */

.site-footer {
	border-top: 1px solid var(--am-border);
	padding: 1.5rem 0;
	margin-top: 2rem;
}

.footer-inner {
	max-width: var(--am-max-width);
	margin: 0 auto;
	padding: 0 var(--am-gutter);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.footer-brand {
	font-size: 0.8rem;
	color: var(--am-muted);
}

.footer-brand a {
	color: var(--am-red);
}

.footer-brand .cursor-blink {
	animation: blink 1s step-end infinite;
	color: var(--am-red);
}

@keyframes blink {
	50% { opacity: 0; }
}

.footer-nav {
	list-style: none;
	display: flex;
	gap: 1rem;
}

.footer-nav a {
	color: var(--am-muted);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.footer-nav a:hover {
	color: var(--am-yellow);
}

/* ── COMMENTS ─────────────────────────────────── */

.comments-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--am-border);
}

.comments-title {
	font-size: 1rem;
	margin-bottom: 1.5rem;
}

.comment-list {
	list-style: none;
}

.comment-list .comment {
	padding: 1rem 0;
	border-bottom: 1px solid var(--am-border);
}

.comment-author {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--am-bright);
}

.comment-metadata {
	font-size: 0.7rem;
	color: var(--am-muted);
}

.comment-content {
	margin-top: 0.5rem;
	font-size: 0.875rem;
}

.comment-respond .comment-reply-title {
	font-size: 1rem;
}

.comment-form input,
.comment-form textarea {
	background: var(--am-dark);
	border: 1px solid var(--am-border);
	color: var(--am-body);
	font-family: var(--am-font-mono);
	padding: 0.5rem;
	width: 100%;
	font-size: 0.875rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--am-red);
	outline: none;
}

.comment-form .submit {
	background: var(--am-red);
	color: var(--am-bright);
	border: none;
	padding: 0.5rem 1.5rem;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	width: auto;
}

.comment-form .submit:hover {
	background: var(--am-red-dim);
}

/* ── SEARCH ───────────────────────────────────── */

.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form .search-field {
	background: var(--am-dark);
	border: 1px solid var(--am-border);
	color: var(--am-body);
	font-family: var(--am-font-mono);
	padding: 0.5rem;
	flex: 1;
	font-size: 0.875rem;
}

.search-form .search-field:focus {
	border-color: var(--am-red);
	outline: none;
}

.search-form .search-submit {
	background: var(--am-red);
	color: var(--am-bright);
	border: none;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-family: var(--am-font-mono);
	text-transform: uppercase;
	font-size: 0.75rem;
}

/* ── PAGINATION ───────────────────────────────── */

.pagination,
.post-navigation {
	margin: 2rem 0;
	padding: 1rem 0;
	border-top: 1px solid var(--am-border);
}

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

.pagination .page-numbers {
	display: inline-block;
	padding: 0.3rem 0.6rem;
	border: 1px solid var(--am-border);
	color: var(--am-body);
	font-size: 0.8rem;
}

.pagination .page-numbers.current {
	background: var(--am-red);
	border-color: var(--am-red);
	color: var(--am-bright);
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
}

.post-navigation a {
	font-size: 0.8rem;
}

.post-navigation .nav-previous a::before {
	content: '← ';
}

.post-navigation .nav-next a::after {
	content: ' →';
}

/* ── 404 ──────────────────────────────────────── */

.error-404 {
	text-align: center;
	padding: 4rem 0;
}

.error-404 .error-code {
	font-size: 4rem;
	color: var(--am-red);
	font-weight: 700;
	line-height: 1;
	margin-bottom: 0.5rem;
}

.error-404 p {
	color: var(--am-muted);
}

/* ── RESPONSIVE ──────────────────────────────── */

@media (max-width: 768px) {
	h1 { font-size: 1.5rem; }
	h2 { font-size: 1.25rem; }
	
	.site-title {
		font-size: 1.25rem;
	}
	
	.menu-toggle {
		display: block;
	}
	
	.nav-menu {
		display: none;
		flex-direction: column;
	}
	
	.nav-menu.toggled {
		display: flex;
	}
	
	.nav-menu .sub-menu {
		position: static;
		border: none;
		border-left: 2px solid var(--am-red);
		margin-left: 0.75rem;
	}
	
	.nav-menu .sub-menu a::before {
		content: '  ';
	}
	
	.header-social {
		flex-wrap: wrap;
		gap: 0.75rem;
	}
	
	.footer-inner {
		flex-direction: column;
		text-align: center;
	}
	
	.footer-nav {
		justify-content: center;
	}
	
	.card-grid {
		grid-template-columns: 1fr;
	}
	
	.entry-title {
		font-size: 1.25rem;
	}
}

@media (max-width: 480px) {
	:root {
		--am-gutter: 1rem;
	}
	
	.site-title {
		font-size: 1.1rem;
	}
	
	.nav-menu a {
		padding: 0.5rem;
	}
}

/* ── PRINT ────────────────────────────────────── */

@media print {
	body {
		background: #fff;
		color: #000;
	}
	body::after {
		display: none;
	}
	a {
		color: #000;
		text-decoration: underline;
	}
	.site-header,
	.site-footer,
	.main-navigation,
	.comments-area {
		display: none;
	}
}

/* ── ACCESSIBILITY ────────────────────────────── */

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--am-dark);
	color: var(--am-bright);
	clip: auto !important;
	display: block;
	height: auto;
	left: 5px;
	padding: 1rem;
	top: 5px;
	width: auto;
	z-index: 100000;
}

:focus-visible {
	outline: 2px solid var(--am-yellow);
	outline-offset: 2px;
}
