/*
Theme Name: Idle Command
Author: Bob Cristello
Description: Private, single-author theme for the Idle Command WordPress site. Plain-text editor, one stylesheet, no build step. Started as a duplicate of wpbob.com's theme.
Version: 0.1.9
Requires at least: 6.8
Requires PHP: 8.2
Text Domain: idlecommand
*/

/* ---------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------- */

:root {
	--idlecommand-ink: #ffffff;
	--idlecommand-ink-soft: #d5d7db;
	--idlecommand-muted: #9aa0ab;
	--idlecommand-paper: #000000;
	--idlecommand-panel: #161616;
	--idlecommand-rule: #2c2c2c;
	--idlecommand-accent: #5b8dff;
	--idlecommand-accent-ink: #8fb4ff;
	--idlecommand-severity-critical: #b3261e;
	--idlecommand-severity-high: #b3541e;
	--idlecommand-severity-medium: #8a6d00;
	--idlecommand-severity-low: #1e7a3e;

	--idlecommand-font-body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--idlecommand-font-mono: ui-monospace, "SF Mono", Consolas, monospace;

	--idlecommand-step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
	--idlecommand-step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
	--idlecommand-step-2: clamp(1.75rem, 1.55rem + 1vw, 2.25rem);
	--idlecommand-step-3: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);

	--idlecommand-space-1: 0.25rem;
	--idlecommand-space-2: 0.5rem;
	--idlecommand-space-3: 0.75rem;
	--idlecommand-space-4: 1.25rem;
	--idlecommand-space-5: 2rem;

	--idlecommand-radius: 6px;
	--idlecommand-max-width: 1300px;
}

/* ---------------------------------------------------------------
   1b. Fonts — placeholder, not active
   --------------------------------------------------------------- */

/*
 * No font files were specified, so none were downloaded or fetched
 * from a CDN (this theme doesn't link Google Fonts or any other
 * external font host — see inc/head.php / inc/assets.php, nothing
 * in this theme makes an off-site request). The system-font stack in
 * --idlecommand-font-body / --idlecommand-font-mono above is what's actually
 * live right now.
 *
 * To add a real typeface: put .woff2 files in assets/fonts/,
 * uncomment an @font-face block like the one below with the real
 * filename, and reference the family name from --idlecommand-font-body.
 *
 * @font-face {
 *   font-family: "YourFont";
 *   src: url("assets/fonts/yourfont-regular.woff2") format("woff2");
 *   font-weight: 400;
 *   font-style: normal;
 *   font-display: swap;
 * }
 */

/* ---------------------------------------------------------------
   2. Reset + base
   --------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--idlecommand-paper);
	color: var(--idlecommand-ink);
	font-family: var(--idlecommand-font-body);
	font-size: var(--idlecommand-step-0);
	line-height: 1.6;
}

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

a {
	color: var(--idlecommand-accent);
}

a:hover {
	color: var(--idlecommand-accent-ink);
}

h1, h2, h3 {
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 var(--idlecommand-space-2);
}

p {
	margin: 0 0 var(--idlecommand-space-2);
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
}

/* Respect reduced-motion: no transitions/animations beyond what's
   already inherently instant. This theme ships no JS-driven motion,
   so this mainly guards the hover-color transitions below. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Visible focus outline everywhere, keyboard-only (no outline on
   mouse click, via :focus-visible). */
a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 3px solid var(--idlecommand-accent);
	outline-offset: 2px;
}

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

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--idlecommand-space-2);
	background: var(--idlecommand-ink);
	color: var(--idlecommand-paper);
	padding: var(--idlecommand-space-1) var(--idlecommand-space-2);
	border-radius: var(--idlecommand-radius);
	z-index: 100;
	transition: top 0.15s ease;
}

.skip-link:focus {
	top: var(--idlecommand-space-2);
}

/* ---------------------------------------------------------------
   3. Layout
   --------------------------------------------------------------- */

.wrap {
	max-width: var(--idlecommand-max-width);
	margin: 0 auto;
	padding: 0 var(--idlecommand-space-2);
}

.site-main {
	max-width: var(--idlecommand-max-width);
	margin: 0 auto;
	padding: 0 var(--idlecommand-space-2);
}

.site-main > section,
.site-main > article {
	padding: var(--idlecommand-space-4) 0;
	border-bottom: 1px solid var(--idlecommand-rule);
}

.site-main > *:last-child {
	border-bottom: none;
}

.section-label {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--idlecommand-muted);
	margin-bottom: var(--idlecommand-space-3);
}

/* ---------------------------------------------------------------
   4. Header
   --------------------------------------------------------------- */

.site-header {
	border-bottom: 1px solid var(--idlecommand-rule);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: var(--idlecommand-space-2);
	padding-bottom: var(--idlecommand-space-2);
	flex-wrap: wrap;
	gap: var(--idlecommand-space-2);
}

.site-brand {
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.01em;
	color: var(--idlecommand-ink);
	text-decoration: none;
}

.site-nav ul {
	display: flex;
	gap: var(--idlecommand-space-3);
}

.site-nav a {
	color: var(--idlecommand-ink-soft);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
}

.site-nav a:hover {
	color: var(--idlecommand-accent);
}

/* ---------------------------------------------------------------
   5. Hero / featured post
   --------------------------------------------------------------- */

.hero-post {
	display: grid;
	gap: var(--idlecommand-space-3);
}

.hero-media img {
	border-radius: var(--idlecommand-radius);
}

.post-kicker {
	color: var(--idlecommand-accent);
	font-weight: 700;
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: var(--idlecommand-space-1);
}

.hero-copy h1 {
	font-size: var(--idlecommand-step-3);
}

.hero-copy h1 a {
	color: var(--idlecommand-ink);
	text-decoration: none;
}

.hero-copy h1 a:hover {
	color: var(--idlecommand-accent);
}

.post-excerpt {
	color: var(--idlecommand-ink-soft);
	font-size: var(--idlecommand-step-1);
	max-width: 60ch;
}

.post-meta {
	font-size: 0.8125rem;
	color: var(--idlecommand-muted);
	font-weight: 600;
}

.post-meta-sep {
	margin: 0 0.4em;
}

/* ---------------------------------------------------------------
   6. Secondary posts
   --------------------------------------------------------------- */

.secondary-posts {
	display: grid;
	gap: var(--idlecommand-space-4);
	grid-template-columns: repeat(2, 1fr);
}

.secondary-post h2 {
	font-size: var(--idlecommand-step-1);
}

.secondary-post h2 a {
	color: var(--idlecommand-ink);
	text-decoration: none;
}

.secondary-post h2 a:hover {
	color: var(--idlecommand-accent);
}

.secondary-post .post-excerpt {
	font-size: var(--idlecommand-step-0);
}

/* ---------------------------------------------------------------
   7. Topic grid
   --------------------------------------------------------------- */

.topic-grid ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: var(--idlecommand-space-2);
}

.topic-grid a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--idlecommand-space-2);
	background: var(--idlecommand-panel);
	border-radius: var(--idlecommand-radius);
	color: var(--idlecommand-ink);
	text-decoration: none;
	font-weight: 600;
}

.topic-grid a:hover {
	color: var(--idlecommand-accent);
}

.topic-count {
	color: var(--idlecommand-muted);
	font-size: 0.8125rem;
	font-weight: 600;
}

/* ---------------------------------------------------------------
   8. Security watch
   --------------------------------------------------------------- */

.security-watch ul {
	display: grid;
	gap: var(--idlecommand-space-2);
}

.advisory-item {
	display: flex;
	align-items: center;
	gap: var(--idlecommand-space-2);
	padding: var(--idlecommand-space-2);
	background: var(--idlecommand-panel);
	border-radius: var(--idlecommand-radius);
}

.advisory-item a {
	color: var(--idlecommand-ink);
	text-decoration: none;
	font-weight: 600;
}

.advisory-item a:hover {
	color: var(--idlecommand-accent);
}

.advisory-severity {
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	color: #fff;
	flex-shrink: 0;
}

.advisory-severity-critical { background: var(--idlecommand-severity-critical); }
.advisory-severity-high     { background: var(--idlecommand-severity-high); }
.advisory-severity-medium   { background: var(--idlecommand-severity-medium); }
.advisory-severity-low      { background: var(--idlecommand-severity-low); }

.advisory-meta {
	display: flex;
	gap: var(--idlecommand-space-4);
	margin: var(--idlecommand-space-2) 0 0;
}

.advisory-meta div {
	display: flex;
	flex-direction: column;
}

.advisory-meta dt {
	font-size: 0.75rem;
	color: var(--idlecommand-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
}

.advisory-meta dd {
	margin: 0;
	font-family: var(--idlecommand-font-mono);
	font-size: 0.9375rem;
}

/* ---------------------------------------------------------------
   9. Recent list (shared: homepage + archive.php + search.php)
   --------------------------------------------------------------- */

.recent-list-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: var(--idlecommand-space-2);
	padding: var(--idlecommand-space-2) 0;
	border-bottom: 1px solid var(--idlecommand-rule);
	flex-wrap: wrap;
}

.recent-list-item:last-child {
	border-bottom: none;
}

.recent-list-title {
	color: var(--idlecommand-ink);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--idlecommand-step-0);
}

.recent-list-title:hover {
	color: var(--idlecommand-accent);
}

.recent-list-meta {
	color: var(--idlecommand-muted);
	font-size: 0.8125rem;
	white-space: nowrap;
}

/* ---------------------------------------------------------------
   10. Subscribe block
   --------------------------------------------------------------- */

.subscribe {
	text-align: center;
}

.subscribe-link {
	display: inline-block;
	margin-top: var(--idlecommand-space-2);
	padding: 0.7em 1.4em;
	background: var(--idlecommand-ink);
	color: var(--idlecommand-paper);
	border-radius: 999px;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9375rem;
	transition: background-color 0.15s ease;
}

.subscribe-link:hover {
	background: var(--idlecommand-accent);
	color: #ffffff;
}

/* ---------------------------------------------------------------
   11. Footer
   --------------------------------------------------------------- */

.site-footer {
	border-top: 1px solid var(--idlecommand-rule);
	margin-top: var(--idlecommand-space-4);
}

.site-footer .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--idlecommand-space-3) var(--idlecommand-space-2);
	color: var(--idlecommand-muted);
	font-size: 0.8125rem;
}

.site-footer a {
	color: var(--idlecommand-muted);
}

.site-footer a:hover {
	color: var(--idlecommand-accent);
}

/* ---------------------------------------------------------------
   12. Single post / page
   --------------------------------------------------------------- */

.single-post-header,
.archive-header {
	padding-top: var(--idlecommand-space-4);
	margin-bottom: var(--idlecommand-space-3);
}

.single-post-header h1,
.archive-header h1 {
	font-size: var(--idlecommand-step-3);
}

.single-post-media {
	margin-bottom: var(--idlecommand-space-3);
}

.single-post-media img {
	border-radius: var(--idlecommand-radius);
}

/* The content area itself is deliberately unstyled beyond basic
   readability defaults — see inc/content.php: this is raw HTML the
   author wrote by hand, so global element styles (below) are as far
   as the theme goes. No prose/typography plugin, no @tailwind
   typography — whatever the author put in the post is what renders. */
.post-content {
	font-size: var(--idlecommand-step-0);
	max-width: 68ch;
}

.post-content :is(h2, h3, h4) {
	margin-top: var(--idlecommand-space-4);
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content pre,
.post-content blockquote {
	margin-bottom: var(--idlecommand-space-2);
}

.post-content pre {
	background: var(--idlecommand-panel);
	padding: var(--idlecommand-space-2);
	border-radius: var(--idlecommand-radius);
	overflow-x: auto;
	font-family: var(--idlecommand-font-mono);
	font-size: 0.875rem;
}

.post-content blockquote {
	border-left: 3px solid var(--idlecommand-accent);
	padding-left: var(--idlecommand-space-2);
	color: var(--idlecommand-ink-soft);
}

.post-content img {
	border-radius: var(--idlecommand-radius);
}

.post-pagination {
	display: flex;
	justify-content: space-between;
	gap: var(--idlecommand-space-2);
	padding: var(--idlecommand-space-3) 0;
	border-top: 1px solid var(--idlecommand-rule);
	flex-wrap: wrap;
}

.post-pagination a {
	color: var(--idlecommand-ink);
	text-decoration: none;
	font-weight: 600;
}

.post-pagination a:hover {
	color: var(--idlecommand-accent);
}

/* ---------------------------------------------------------------
   13. Search form
   --------------------------------------------------------------- */

.search-form {
	display: flex;
	gap: var(--idlecommand-space-1);
	margin-top: var(--idlecommand-space-2);
	max-width: 420px;
}

.search-form input[type="search"] {
	flex: 1;
	padding: 0.6em 0.8em;
	background: var(--idlecommand-panel);
	color: var(--idlecommand-ink);
	border: 1px solid var(--idlecommand-rule);
	border-radius: var(--idlecommand-radius);
	font-size: 1rem;
}

.search-form button {
	padding: 0.6em 1.2em;
	border: none;
	border-radius: var(--idlecommand-radius);
	background: var(--idlecommand-ink);
	color: var(--idlecommand-paper);
	font-weight: 700;
	cursor: pointer;
}

.search-form button:hover {
	background: var(--idlecommand-accent);
	color: #ffffff;
}

/* ---------------------------------------------------------------
   14. Responsive
   --------------------------------------------------------------- */

@media (min-width: 720px) {
	.hero-post {
		grid-template-columns: 1.1fr 0.9fr;
		align-items: center;
	}
}

@media (max-width: 719px) {
	.secondary-posts {
		grid-template-columns: 1fr;
	}
}
