/*
Theme Name: BlueQube Playground
Theme URI: https://www.blueqube.net/
Author: Christopher
Author URI: https://www.blueqube.net/
Description: An independent, from-scratch theme for BlueQube — Chris's personal site about vintage/high-end audio, electronics repair, retro computing, Linux/home servers and music. Modern, clean, slightly retro-technical: charcoal/deep-slate backgrounds, restrained blue accents, comfortable whitespace, minimal animation. Built standalone (no parent theme dependency) so it can be installed/activated independently of Glowing Blog / BlueQube Circuit. Supports a built-in light/dark appearance toggle, self-hosted icon font (no remote webfonts), and system font stacks for long-term low-maintenance use.
Version: 1.0.11
Requires at least: 6.0
Requires PHP: 8.0
Tested up to: 7.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blueqube-playground
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready

This theme bundles a locally self-hosted copy of Font Awesome Free (icons only,
used for the About page's interest/band lists which already use fa-solid classes
in existing content) under assets/fonts/fontawesome/ — no CDN, no remote fonts.
Font Awesome Free is licensed under the Font Awesome Free License
(https://fontawesome.com/license/free): Icons CC BY 4.0, Fonts SIL OFL 1.1, Code MIT.
*/

/* ==========================================================================
   1. Design tokens — dark (default) + light override
   ========================================================================== */
:root {
	--bq-bg: #10151c;
	--bq-bg-elevated: #161c26;
	--bq-bg-card: #1a2230;
	--bq-border: #2a3342;
	--bq-text: #d8dee6;
	--bq-text-muted: #8f9cac;
	--bq-accent: #5b9dfb;
	--bq-accent-hover: #86b8ff;
	--bq-accent-contrast: #06101c;
	--bq-code-bg: #0d1117;
	--bq-code-text: #d8dee6;
	--bq-focus: #ffcf4d;
	--bq-shadow: rgba(0, 0, 0, 0.45);
	--bq-radius: 10px;
	--bq-max-width: 1160px;

	--bq-font-body: 'Lato', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--bq-font-heading: 'Quando', Georgia, serif;
	--bq-font-display: 'Orbitron', ui-sans-serif, sans-serif;
	--bq-font-script: 'Dancing Script', cursive;
	--bq-tagline-glow: 0 0 8px rgba(91, 157, 251, 0.6), 0 0 18px rgba(91, 157, 251, 0.35);
	--bq-font-mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-bq-theme="light"] {
	--bq-tagline-glow: none;
	--bq-bg: #f5f7fa;
	--bq-bg-elevated: #ffffff;
	--bq-bg-card: #ffffff;
	--bq-border: #dde2e9;
	--bq-text: #1b232d;
	--bq-text-muted: #596270;
	--bq-accent: #2b64d6;
	--bq-accent-hover: #1a4bb0;
	--bq-accent-contrast: #ffffff;
	--bq-code-bg: #eef1f5;
	--bq-code-text: #1b232d;
	--bq-shadow: rgba(20, 30, 45, 0.12);
}

@media (prefers-color-scheme: light) {
	html:not([data-bq-theme]) {
		--bq-tagline-glow: none;
		--bq-bg: #f5f7fa;
		--bq-bg-elevated: #ffffff;
		--bq-bg-card: #ffffff;
		--bq-border: #dde2e9;
		--bq-text: #1b232d;
		--bq-text-muted: #596270;
		--bq-accent: #2b64d6;
		--bq-accent-hover: #1a4bb0;
		--bq-accent-contrast: #ffffff;
		--bq-code-bg: #eef1f5;
		--bq-code-text: #1b232d;
		--bq-shadow: rgba(20, 30, 45, 0.12);
	}
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bq-bg);
	color: var(--bq-text);
	font-family: var(--bq-font-body);
	font-size: 17px;
	line-height: 1.65;
	transition: background-color .15s ease, color .15s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bq-accent); text-decoration: none; }
a:hover { color: var(--bq-accent-hover); text-decoration: underline; }
a:visited { color: var(--bq-accent); }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; margin: 1.4em 0 .6em; font-family: var(--bq-font-heading); }
h1 { font-size: clamp(1.9rem, 1.4rem + 1.5vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.4em; }
hr { border: none; border-top: 1px solid var(--bq-border); margin: 2em 0; }
blockquote {
	margin: 1.5em 0;
	padding: .2em 1.2em;
	border-left: 3px solid var(--bq-accent);
	color: var(--bq-text-muted);
	font-style: italic;
}
table { border-collapse: collapse; width: 100%; margin: 1.5em 0; display: block; overflow-x: auto; }
table th, table td { border: 1px solid var(--bq-border); padding: .5em .75em; text-align: left; }
table th { background: var(--bq-bg-elevated); }
figure { margin: 1.5em 0; }
figcaption { color: var(--bq-text-muted); font-size: .9rem; margin-top: .5em; }

/* Visible focus indicators everywhere (keyboard accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, .skip-link:focus {
	outline: 3px solid var(--bq-focus);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--bq-accent);
	color: var(--bq-accent-contrast);
	padding: .6em 1em;
	border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. Layout
   ========================================================================== */
.bq-wrap { max-width: var(--bq-max-width); margin: 0 auto; padding: 0 1.25rem; }
.bq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.bq-layout--full { grid-template-columns: 1fr; }
@media (max-width: 860px) {
	.bq-layout { grid-template-columns: 1fr; }
}
main#primary { min-width: 0; }

/* ==========================================================================
   4. Header
   ========================================================================== */
.bq-header {
	background-color: var(--bq-bg-elevated);
	background-image: url('assets/images/circuit-pattern.svg');
	background-repeat: repeat;
	border-bottom: 1px solid var(--bq-border);
	padding: 1.1rem 0;
}
.bq-header__inner { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.bq-brand { display: flex; align-items: center; gap: .75rem; margin-right: auto; min-width: 0; }
.custom-logo-link .custom-logo { max-height: 86px; width: auto; height: auto; border-radius: 6px; }
.bq-brand-text { display: flex; flex-direction: column; min-width: 0; }
.bq-site-title { font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; margin: 0; font-family: var(--bq-font-display); }
.bq-site-title a { color: var(--bq-text); }
.bq-site-title a:hover { color: var(--bq-accent); text-decoration: none; }
.bq-tagline { color: var(--bq-accent); font-size: 1.35rem; font-weight: 700; margin: 0; font-family: var(--bq-font-script); letter-spacing: .02em; text-shadow: var(--bq-tagline-glow); }
.bq-tagline.site-tagline-rotator { display: inline-block; min-height: 1.2em; transition: opacity .4s ease; opacity: 1; }
.bq-tagline.site-tagline-rotator.is-fading { opacity: 0; }
.bq-intro {
	text-shadow: var(--bq-tagline-glow);
	font-family: var(--bq-font-display);
	font-size: .82rem;
	letter-spacing: .02em;
	line-height: 1.3;
	color: var(--bq-text);
	opacity: .55;
	margin: 0;
	max-width: 32ch;
	flex: 1 1 auto;
	text-align: right;
}
@media (max-width: 960px) {
	.bq-intro { display: none; }
}

.bq-header-controls { display: flex; align-items: center; gap: .5rem; }

.bq-theme-toggle, .bq-menu-toggle {
	background: var(--bq-bg-card);
	border: 1px solid var(--bq-border);
	color: var(--bq-text);
	border-radius: 999px;
	padding: .5rem .7rem;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
}
.bq-theme-toggle:hover, .bq-menu-toggle:hover { border-color: var(--bq-accent); color: var(--bq-accent); }

/* Primary nav */
.bq-nav-wrap { flex-basis: 100%; border-top: 1px solid var(--bq-border); margin-top: .75rem; padding-top: .6rem; }
.bq-primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.bq-primary-nav li { position: relative; }
.bq-primary-nav a {
	display: block;
	padding: .5rem .85rem;
	color: var(--bq-text);
	border-radius: 999px;
	font-weight: 600;
	font-size: .95rem;
}
.bq-primary-nav a:hover, .bq-primary-nav .current-menu-item > a {
	background: var(--bq-bg-card);
	color: var(--bq-accent);
	text-decoration: none;
}
.bq-primary-nav .sub-menu { list-style: none; margin: 0; padding: .4rem; position: absolute; left: 0; top: 100%; background: var(--bq-bg-card); border: 1px solid var(--bq-border); border-radius: 8px; min-width: 180px; display: none; z-index: 50; box-shadow: 0 8px 20px var(--bq-shadow); }
.bq-primary-nav li:hover > .sub-menu, .bq-primary-nav li:focus-within > .sub-menu { display: block; }
.bq-primary-nav .sub-menu a { white-space: nowrap; }

.bq-menu-toggle { display: none; }
@media (max-width: 700px) {
	.bq-menu-toggle { display: inline-flex; align-items: center; }
	.bq-nav-wrap { display: none; }
	.bq-nav-wrap.is-open { display: block; }
	.bq-primary-nav ul { flex-direction: column; }
	.bq-primary-nav .sub-menu { position: static; display: block; border: none; padding-left: 1rem; }
}

/* ==========================================================================
   5. Cards / post listings
   ========================================================================== */
.bq-card {
	background: var(--bq-bg-card);
	border: 1px solid var(--bq-border);
	border-radius: var(--bq-radius);
	padding: 1.4rem;
	margin-bottom: 1.5rem;
}
.bq-post-list { display: grid; gap: 1.5rem; }
.bq-post-card { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 1.25rem; }
.bq-post-card--noimg { grid-template-columns: 1fr; }
.bq-post-card__thumb { border-radius: var(--bq-radius); overflow: hidden; background: var(--bq-bg-elevated); }
.bq-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
@media (max-width: 560px) {
	.bq-post-card { grid-template-columns: 1fr; }
}
.bq-post-card__title { margin: 0 0 .4rem; font-size: 1.3rem; }
.bq-post-card__title a { color: var(--bq-text); }
.bq-post-card__title a:hover { color: var(--bq-accent); }
.bq-meta { color: var(--bq-text-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-bottom: .5rem; }
.bq-meta a { color: var(--bq-text-muted); }
.bq-meta a:hover { color: var(--bq-accent); }
.bq-category-pill {
	display: inline-block;
	background: var(--bq-bg-elevated);
	border: 1px solid var(--bq-border);
	color: var(--bq-accent);
	border-radius: 999px;
	padding: .15rem .65rem;
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none;
}
.bq-category-pill:hover { border-color: var(--bq-accent); text-decoration: none; }
.bq-excerpt { color: var(--bq-text-muted); }
.bq-readmore { font-weight: 600; font-size: .9rem; }

/* Featured section */
.bq-featured { margin-bottom: 2.5rem; }
.bq-featured__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.bq-featured__grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.bq-featured__item { background: var(--bq-bg-card); border: 1px solid var(--bq-border); border-radius: var(--bq-radius); overflow: hidden; display: flex; flex-direction: column; }
.bq-featured__item img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.bq-featured__body { padding: 1rem 1.1rem; }
.bq-featured__badge { display: inline-block; background: var(--bq-accent); color: var(--bq-accent-contrast); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: .2rem .6rem; margin-bottom: .5rem; }

/* Pagination */
.bq-pagination { margin-top: 2rem; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.bq-pagination a, .bq-pagination span {
	padding: .5rem .9rem;
	border: 1px solid var(--bq-border);
	border-radius: 8px;
	color: var(--bq-text);
}
.bq-pagination .current { background: var(--bq-accent); color: var(--bq-accent-contrast); border-color: var(--bq-accent); }
.bq-pagination a:hover { border-color: var(--bq-accent); color: var(--bq-accent); text-decoration: none; }

/* ==========================================================================
   6. Single article
   ========================================================================== */
.bq-article__header { margin-bottom: 1.5rem; }
.bq-article__title { margin-top: 0; }
.bq-article__thumb { border-radius: var(--bq-radius); overflow: hidden; margin: 1.5rem 0; }
.bq-article__thumb img { width: 100%; }
.bq-content { max-width: 72ch; }
.bq-content.bq-content--wide { max-width: none; }
.bq-content img, .bq-content figure { border-radius: 8px; }
.bq-content .wp-block-gallery { border-radius: 0; }
.bq-content h2, .bq-content h3 { border-bottom: 1px solid var(--bq-border); padding-bottom: .3em; }
.bq-content h4, .bq-content h5, .bq-content h6 { border-bottom: none; }

/* Code blocks */
.bq-content pre, .bq-content code, .bq-content kbd { font-family: var(--bq-font-mono); }
.bq-content pre {
	background: var(--bq-code-bg);
	color: var(--bq-code-text);
	border: 1px solid var(--bq-border);
	border-radius: 8px;
	padding: 1rem 1.1rem;
	overflow-x: auto;
	white-space: pre;
	position: relative;
	line-height: 1.5;
}
.bq-content :not(pre) > code {
	background: var(--bq-code-bg);
	color: var(--bq-code-text);
	border-radius: 4px;
	padding: .15em .4em;
	font-size: .92em;
}
.bq-code-copy {
	position: absolute;
	top: .5rem;
	right: .5rem;
	background: var(--bq-bg-card);
	border: 1px solid var(--bq-border);
	color: var(--bq-text-muted);
	border-radius: 6px;
	font-size: .75rem;
	padding: .25rem .55rem;
	cursor: pointer;
}
.bq-code-copy:hover { color: var(--bq-accent); border-color: var(--bq-accent); }
.bq-code-copy.is-copied { color: var(--bq-accent); }

/* Tags / related */
.bq-tags { margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.bq-related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bq-border); }
.bq-related__grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Author/byline + nav links between posts */
.bq-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.bq-post-nav a { display: block; border: 1px solid var(--bq-border); border-radius: var(--bq-radius); padding: .8rem 1rem; color: var(--bq-text); }
.bq-post-nav a:hover { border-color: var(--bq-accent); text-decoration: none; }
.bq-post-nav__dir { color: var(--bq-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; display: block; }
.bq-post-nav--next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .bq-post-nav { grid-template-columns: 1fr; } .bq-post-nav--next { grid-column: 1; text-align: left; } }

/* ==========================================================================
   7. Sidebar / widgets
   ========================================================================== */
.widget-area { position: sticky; top: 1.5rem; }
.widget { background: var(--bq-bg-card); border: 1px solid var(--bq-border); border-radius: var(--bq-radius); padding: 1.1rem; margin-bottom: 1.25rem; }
.widget-title { margin: 0 0 .75rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bq-text-muted); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .35rem 0; border-bottom: 1px dashed var(--bq-border); }
.widget li:last-child { border-bottom: none; }
.widget_search .search-form { display: flex; gap: .4rem; }
.search-form__input, .search-field {
	flex: 1;
	background: var(--bq-bg-elevated);
	border: 1px solid var(--bq-border);
	color: var(--bq-text);
	border-radius: 8px;
	padding: .5rem .7rem;
	font-family: inherit;
}
.search-submit {
	background: var(--bq-accent);
	color: var(--bq-accent-contrast);
	border: none;
	border-radius: 8px;
	padding: .5rem .8rem;
	cursor: pointer;
	font-weight: 600;
}

/* Last.fm "Last Played" widget */
.blueqube-lastfm-widget { display: flex; align-items: center; gap: .75rem; overflow: hidden; max-width: 100%; }
.blueqube-lastfm-art { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.blueqube-lastfm-link { display: flex; align-items: center; gap: .75rem; color: var(--bq-text); min-width: 0; max-width: 100%; }
.blueqube-lastfm-link:hover { text-decoration: none; }
.blueqube-lastfm-info { display: flex; flex-direction: column; min-width: 0; }
.blueqube-lastfm-track { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blueqube-lastfm-artist { color: var(--bq-text-muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blueqube-lastfm-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.blueqube-lastfm-eq span { width: 3px; background: var(--bq-accent); display: inline-block; animation: bq-eq 1s ease-in-out infinite; }
.blueqube-lastfm-eq span:nth-child(1) { height: 60%; animation-delay: 0s; }
.blueqube-lastfm-eq span:nth-child(2) { height: 100%; animation-delay: .2s; }
.blueqube-lastfm-eq span:nth-child(3) { height: 40%; animation-delay: .4s; }
@keyframes bq-eq { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .blueqube-lastfm-eq span { animation: none; } }

/* Gallery widget (media_gallery) thumbnails */
.widget_media_gallery .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.widget_media_gallery img { border-radius: 6px; }

@media (max-width: 860px) { .widget-area { position: static; max-height: none; } }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.bq-footer {
	background-color: var(--bq-bg-elevated);
	background-image: url('assets/images/circuit-pattern.svg');
	background-repeat: repeat;
	border-top: 1px solid var(--bq-border);
	margin-top: 3rem;
	padding: 2.5rem 0;
	color: var(--bq-text-muted);
}
.bq-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.bq-footer__brand { font-weight: 700; color: var(--bq-text); }
.bq-footer__brand span { color: var(--bq-text-muted); font-weight: 400; }
.bq-footer__links { display: flex; gap: 1.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.bq-footer__links a { color: var(--bq-text-muted); }
.bq-footer__links a:hover { color: var(--bq-accent); }
.bq-footer__copy { font-size: .88rem; }

/* ==========================================================================
   9. Misc: 404, archive header, breadcrumbs, project/workbench templates
   ========================================================================== */
.bq-page-header { margin-bottom: 1.5rem; }
.bq-page-header__title { margin-bottom: .25rem; }
.bq-page-header__desc { color: var(--bq-text-muted); }
.bq-404 { text-align: center; padding: 3rem 1rem; }
.bq-404__code { font-size: 4rem; font-weight: 800; color: var(--bq-accent); margin: 0; }

.bq-project-status { display: inline-block; border-radius: 999px; padding: .25rem .8rem; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border: 1px solid var(--bq-border); margin-bottom: 1rem; }
.bq-project-status--active { color: #ffc24d; border-color: #ffc24d; }
.bq-project-status--complete { color: #58d68d; border-color: #58d68d; }
.bq-project-status--paused { color: var(--bq-text-muted); }
.bq-project-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; color: var(--bq-text-muted); font-size: .9rem; }
.bq-project-posts { list-style: none; margin: 1.5rem 0; padding: 0; border-left: 2px solid var(--bq-border); }
.bq-project-posts li { position: relative; padding: .6rem 0 .6rem 1.5rem; }
.bq-project-posts li::before { content: ""; position: absolute; left: -5px; top: 1.1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--bq-accent); }

.bq-workbench-intro { color: var(--bq-text-muted); margin-bottom: 1.5rem; }
.bq-workbench .bq-content h2 { border-bottom: none; background: var(--bq-bg-card); border: 1px solid var(--bq-border); padding: .5rem .9rem; border-radius: 8px; }

/* Comments */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; margin: 0; }
.comment-body { border: 1px solid var(--bq-border); border-radius: var(--bq-radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--bq-bg-card); }
.comment-author { font-weight: 700; }
.comment-metadata { font-size: .82rem; color: var(--bq-text-muted); margin-bottom: .5rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; background: var(--bq-bg-elevated); border: 1px solid var(--bq-border); color: var(--bq-text);
	border-radius: 8px; padding: .55rem .7rem; font-family: inherit; margin-bottom: .75rem;
}
.comment-form .form-submit input { background: var(--bq-accent); color: var(--bq-accent-contrast); border: none; border-radius: 8px; padding: .6rem 1.2rem; font-weight: 700; cursor: pointer; }

.screen-reader-text { position: absolute !important; left: -9999px; }

/* WordPress core alignment helpers */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption, .wp-block-image { margin-bottom: 1rem; }
