/*
Theme Name: Baseplate
Author: Baseplate
Description: A dark, instrument-panel theme for personal and professional sites. Monospace micro-labels, hairline rules, and a single signal color. Built for a home page, an about page and a writing archive. No page builder required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baseplate
Tags: one-column, dark, blog, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Tokens
   Change --signal to re-key the whole theme. Everything else derives from
   the ink ramp, so a single value shift restyles buttons, rules, chips,
   links, focus rings and diagram accents together.
   ========================================================================== */

:root {
	/* Ink ramp — black base, six steps to full bright */
	--ink-000: #000000;   /* page */
	--ink-050: #0a0b0d;   /* raised surface */
	--ink-100: #101216;   /* card */
	--ink-200: #191c22;   /* hairline */
	--ink-300: #262a32;   /* strong rule, borders */
	--ink-500: #767e8a;   /* dim text, captions, meta */
	--ink-700: #c6cbd3;   /* body text */
	--ink-900: #f5f6f8;   /* headings, bright text */

	/* Signal */
	--signal: #f0b429;
	--signal-dim: #8a6712;
	--signal-wash: rgba(240, 180, 41, 0.10);

	/* Semantic states — used by diagram labels and chips */
	--state-positive: #58b09c;
	--state-negative: #e0614f;
	--state-neutral: var(--ink-500);

	/* Type */
	--font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--step--1: 0.8125rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: clamp(1.375rem, 1.15rem + 1.1vw, 1.75rem);
	--step-3: clamp(1.75rem, 1.35rem + 2vw, 2.5rem);
	--step-4: clamp(2.25rem, 1.5rem + 3.6vw, 3.75rem);

	--leading-tight: 1.12;
	--leading-body: 1.72;

	/* Space — 4px base */
	--s-1: 0.25rem;
	--s-2: 0.5rem;
	--s-3: 0.75rem;
	--s-4: 1rem;
	--s-5: 1.5rem;
	--s-6: 2rem;
	--s-7: 3rem;
	--s-8: 4.5rem;
	--s-9: 7rem;

	/* Layout */
	--wrap: 1140px;
	--measure: 68ch;
	--gutter: clamp(1.25rem, 5vw, 3rem);

	--rule: 1px solid var(--ink-200);
	--rule-strong: 1px solid var(--ink-300);
	--radius: 2px;

	--ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ==========================================================================
   2. Reset
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scrollbar-color: var(--ink-300) var(--ink-000);
}

body {
	margin: 0;
	background: var(--ink-000);
	color: var(--ink-700);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: var(--leading-body);
	font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe { max-width: 100%; height: auto; display: block; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

::selection { background: var(--signal); color: var(--ink-000); }

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--s-4);
	color: var(--ink-900);
	font-weight: 600;
	line-height: var(--leading-tight);
	letter-spacing: -0.022em;
	text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -0.032em; }
h2 { font-size: var(--step-3); letter-spacing: -0.026em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); }

h6 {
	font-family: var(--font-mono);
	font-size: var(--step--1);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

p { margin: 0 0 var(--s-5); }

p:last-child,
ul:last-child,
ol:last-child { margin-bottom: 0; }

strong, b { color: var(--ink-900); font-weight: 600; }
em, i { font-style: italic; }

small { font-size: var(--step--1); color: var(--ink-500); }

abbr[title] {
	text-decoration: underline dotted var(--ink-300);
	text-underline-offset: 3px;
	cursor: help;
}

mark {
	background: var(--signal-wash);
	color: var(--ink-900);
	padding: 0.1em 0.3em;
	border-radius: var(--radius);
}

/* Lead paragraph */
.lead {
	font-size: var(--step-1);
	line-height: 1.6;
	color: var(--ink-900);
	letter-spacing: -0.011em;
}

/* Instrument label — the theme's structural device.
   Use on eyebrows, meta rows, chart captions, table headers. */
.label,
.eyebrow {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-500);
	line-height: 1.4;
}

.label--signal,
.eyebrow--signal { color: var(--signal); }

.label--positive { color: var(--state-positive); }
.label--negative { color: var(--state-negative); }

/* Stage numeral — for genuine sequences only (01 / 02 / 03) */
.numeral {
	font-family: var(--font-mono);
	font-size: var(--step--1);
	font-variant-numeric: tabular-nums;
	color: var(--signal);
	letter-spacing: 0.08em;
}

/* ==========================================================================
   4. Links
   ========================================================================== */

a {
	color: var(--ink-900);
	text-decoration: none;
	background-image: linear-gradient(var(--signal), var(--signal));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 1px;
	transition: background-size 220ms var(--ease), color 160ms var(--ease);
}

a:hover,
a:focus-visible { background-size: 100% 1px; }

/* Prose links carry a persistent hairline so they read as links in body copy */
.entry-content a:not(.button):not(.chip) {
	background-size: 100% 1px;
	background-image: linear-gradient(var(--ink-300), var(--ink-300));
	padding-bottom: 0.08em;
}

.entry-content a:not(.button):not(.chip):hover,
.entry-content a:not(.button):not(.chip):focus-visible {
	background-image: linear-gradient(var(--signal), var(--signal));
	color: var(--signal);
}

/* Arrow affordance used across the reference layout */
.link-arrow::after {
	content: " \2192";
	color: var(--signal);
	transition: transform 200ms var(--ease);
	display: inline-block;
}

.link-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   5. Layout
   ========================================================================== */

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding-block: var(--s-8) var(--s-9); }

.measure { max-width: var(--measure); }

.stack > * + * { margin-top: var(--s-5); }

.grid {
	display: grid;
	gap: var(--s-5);
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Section heading: mono index, then a hairline that bleeds to the viewport edge.
   This is the theme's signature — sections read as rows on an instrument panel. */
.section-head {
	display: flex;
	align-items: baseline;
	gap: var(--s-4);
	margin-bottom: var(--s-6);
	position: relative;
}

.section-head > h2,
.section-head > h3 { margin: 0; flex: 0 0 auto; }

.section-head::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--ink-200);
	margin-right: calc(50% - 50vw);
	transform: translateY(-0.35em);
}

/* ==========================================================================
   6. Site header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: var(--rule);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-5);
	min-height: 64px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	gap: var(--s-3);
	background-image: none;
	color: var(--ink-900);
	font-weight: 600;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.site-brand img,
.custom-logo { width: auto; max-height: 26px; }

.site-brand__tagline {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	border-left: var(--rule-strong);
	padding-left: var(--s-3);
}

/* Primary nav */
.nav-primary ul {
	display: flex;
	align-items: center;
	gap: var(--s-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-primary a {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-500);
	padding-block: var(--s-2);
}

.nav-primary a:hover,
.nav-primary a:focus-visible { color: var(--ink-900); }

.nav-primary .current-menu-item > a,
.nav-primary .current_page_item > a {
	color: var(--ink-900);
	background-image: linear-gradient(var(--signal), var(--signal));
	background-size: 100% 1px;
}

/* Sub-menus */
.nav-primary li { position: relative; }

.nav-primary .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: var(--s-2) 0;
	background: var(--ink-050);
	border: var(--rule-strong);
	border-radius: var(--radius);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 160ms;
}

.nav-primary li:hover > .sub-menu,
.nav-primary li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-primary .sub-menu a { display: block; padding: var(--s-2) var(--s-4); }

/* Mobile toggle */
.nav-toggle {
	display: none;
	align-items: center;
	gap: var(--s-2);
	background: transparent;
	border: var(--rule-strong);
	border-radius: var(--radius);
	color: var(--ink-700);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: var(--s-2) var(--s-3);
	cursor: pointer;
}

.nav-toggle:hover { color: var(--ink-900); border-color: var(--signal); }

/* ==========================================================================
   7. Entry content — long-form prose
   ========================================================================== */

.entry-header { margin-bottom: var(--s-7); }
.entry-header .entry-title { margin-bottom: var(--s-4); }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--s-3);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

.entry-meta > * + *::before {
	content: "\00B7";
	margin-right: var(--s-3);
	color: var(--ink-300);
}

.entry-content > * { max-width: var(--measure); }

.entry-content > h2 {
	margin-top: var(--s-8);
	padding-top: var(--s-5);
	border-top: var(--rule);
}

.entry-content > h3 { margin-top: var(--s-7); }
.entry-content > h4 { margin-top: var(--s-6); }

.entry-content ul,
.entry-content ol {
	margin: 0 0 var(--s-5);
	padding-left: var(--s-5);
}

.entry-content li { margin-bottom: var(--s-2); }
.entry-content li::marker { color: var(--signal-dim); }

.entry-content ul { list-style: none; padding-left: 0; }

.entry-content ul > li {
	position: relative;
	padding-left: var(--s-5);
}

.entry-content ul > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.78em;
	width: 6px;
	height: 1px;
	background: var(--signal);
}

.entry-content ul ul { margin-top: var(--s-2); margin-bottom: 0; }

/* Pull quote */
blockquote {
	margin: var(--s-7) 0;
	padding: 0 0 0 var(--s-5);
	border-left: 2px solid var(--signal);
	color: var(--ink-900);
	font-size: var(--step-1);
	line-height: 1.55;
	letter-spacing: -0.012em;
}

blockquote cite,
blockquote footer {
	display: block;
	margin-top: var(--s-4);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	font-style: normal;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

hr,
.wp-block-separator {
	border: 0;
	height: 1px;
	background: var(--ink-200);
	margin: var(--s-8) 0;
	max-width: none;
}

/* Code */
code, kbd, samp {
	font-family: var(--font-mono);
	font-size: 0.875em;
	color: var(--signal);
	background: var(--ink-100);
	border: var(--rule);
	border-radius: var(--radius);
	padding: 0.12em 0.4em;
}

pre {
	margin: var(--s-6) 0;
	padding: var(--s-5);
	background: var(--ink-050);
	border: var(--rule-strong);
	border-left: 2px solid var(--signal-dim);
	border-radius: var(--radius);
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: var(--step--1);
	line-height: 1.65;
	color: var(--ink-700);
	tab-size: 2;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
}

kbd {
	border-bottom-width: 2px;
	color: var(--ink-900);
}

/* Tables read as data readouts */
table,
.wp-block-table table {
	width: 100%;
	margin: var(--s-6) 0;
	border-collapse: collapse;
	font-size: var(--step--1);
	font-variant-numeric: tabular-nums;
}

th {
	text-align: left;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	padding: var(--s-3) var(--s-4);
	border-bottom: var(--rule-strong);
	white-space: nowrap;
}

td {
	padding: var(--s-3) var(--s-4);
	border-bottom: var(--rule);
	color: var(--ink-700);
}

tbody tr:hover td { background: var(--ink-050); }

/* Figures */
figure { margin: var(--s-7) 0; }

figcaption,
.wp-caption-text,
.wp-block-image figcaption {
	margin-top: var(--s-3);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-500);
	border-top: var(--rule);
	padding-top: var(--s-3);
}

/* ==========================================================================
   8. Components
   ========================================================================== */

/* Buttons */
.button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	background: var(--signal);
	color: var(--ink-000);
	border: 1px solid var(--signal);
	border-radius: var(--radius);
	padding: 0.7em 1.4em;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	background-image: none;
	transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: transparent;
	color: var(--signal);
}

.button--ghost,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ink-900);
	border-color: var(--ink-300);
}

.button--ghost:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--signal);
	color: var(--signal);
	background: transparent;
}

/* Card — the base surface for anything that isn't prose */
.card {
	display: flex;
	flex-direction: column;
	gap: var(--s-3);
	padding: var(--s-5);
	background: var(--ink-050);
	border: var(--rule-strong);
	border-radius: var(--radius);
	transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}

a.card { background-image: none; }

.card:hover { border-color: var(--ink-500); background: var(--ink-100); }

.card__title {
	font-size: var(--step-1);
	color: var(--ink-900);
	margin: 0;
	letter-spacing: -0.02em;
}

.card__body { color: var(--ink-500); font-size: var(--step--1); line-height: 1.65; margin: 0; }

/* Instrument card — card with a labeled header bar and a stat readout.
   Built for framework summaries, tool outputs, and priced opportunities. */
.instrument {
	position: relative;
	padding-top: var(--s-6);
}

.instrument::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: 28px;
	height: 2px;
	background: var(--signal);
}

.instrument__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-4);
	padding-bottom: var(--s-3);
	border-bottom: var(--rule);
}

.instrument__stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-5);
	font-family: var(--font-mono);
	font-size: var(--step--1);
	font-variant-numeric: tabular-nums;
	color: var(--ink-900);
}

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

.instrument__stat span:first-child {
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

/* State chips — FUNDED / REJECTED / IN REVIEW */
.chip {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	padding: 0.3em 0.7em;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: var(--font-mono);
	font-size: 0.64rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	background-image: none;
}

.chip--funded { color: var(--state-positive); }
.chip--rejected { color: var(--state-negative); }
.chip--signal { color: var(--signal); }

/* Post list — dense, dated, terminal-style index */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-list__item { border-top: var(--rule); }
.post-list__item:last-child { border-bottom: var(--rule); }

.post-list__link {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: var(--s-5);
	align-items: baseline;
	padding: var(--s-5) 0;
	background-image: none;
}

.post-list__date {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-500);
	font-variant-numeric: tabular-nums;
}

.post-list__title {
	font-size: var(--step-1);
	color: var(--ink-900);
	letter-spacing: -0.02em;
	line-height: 1.3;
	margin: 0;
}

.post-list__link:hover .post-list__title { color: var(--signal); }

/* Pagination */
.pagination {
	margin-top: var(--s-8);
	padding-top: var(--s-5);
	border-top: var(--rule);
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2);
	font-family: var(--font-mono);
	font-size: var(--step--1);
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4em;
	padding: 0.4em 0.6em;
	border: var(--rule-strong);
	border-radius: var(--radius);
	color: var(--ink-500);
	background-image: none;
}

.pagination .page-numbers:hover { color: var(--ink-900); border-color: var(--ink-500); }

.pagination .page-numbers.current {
	color: var(--ink-000);
	background: var(--signal);
	border-color: var(--signal);
}

/* Post navigation */
.post-navigation {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: var(--s-5);
	margin-top: var(--s-8);
	padding-top: var(--s-5);
	border-top: var(--rule);
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	display: block;
	background-image: none;
	color: var(--ink-900);
}

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

/* ==========================================================================
   9. Forms
   ========================================================================== */

label {
	display: block;
	margin-bottom: var(--s-2);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	padding: 0.7em 0.9em;
	background: var(--ink-050);
	color: var(--ink-900);
	border: var(--rule-strong);
	border-radius: var(--radius);
	font-size: var(--step--1);
	transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

input::placeholder,
textarea::placeholder { color: var(--ink-500); opacity: 1; }

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--signal);
	background: var(--ink-100);
}

textarea { min-height: 8rem; resize: vertical; }

.form-row + .form-row { margin-top: var(--s-4); }

.search-form { display: flex; gap: var(--s-2); }
.search-form label { flex: 1 1 auto; margin: 0; }

/* ==========================================================================
   10. Comments
   ========================================================================== */

.comments-area { margin-top: var(--s-9); padding-top: var(--s-6); border-top: var(--rule-strong); }
.comment-list { list-style: none; margin: 0 0 var(--s-7); padding: 0; }
.comment-list ol.children { list-style: none; margin: var(--s-5) 0 0; padding-left: var(--s-5); border-left: var(--rule); }

.comment-body { padding: var(--s-5) 0; border-bottom: var(--rule); }

.comment-meta {
	display: flex;
	align-items: center;
	gap: var(--s-3);
	margin-bottom: var(--s-3);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-500);
}

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

/* ==========================================================================
   11. Site footer
   ========================================================================== */

.site-footer {
	border-top: var(--rule-strong);
	padding-block: var(--s-7);
	background: var(--ink-000);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s-5);
}

.site-footer,
.site-footer a { font-size: var(--step--1); }

.site-footer .colophon {
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-500);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: var(--s-6);
	padding-bottom: var(--s-6);
	margin-bottom: var(--s-6);
	border-bottom: var(--rule);
}

.footer-widgets .widget-title,
.footer-widgets h2 {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	margin-bottom: var(--s-4);
}

.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li + li { margin-top: var(--s-2); }

.nav-social ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-5);
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ==========================================================================
   12. WordPress core classes
   ========================================================================== */

.alignleft { float: left; margin: 0.4em var(--s-5) var(--s-4) 0; }
.alignright { float: right; margin: 0.4em 0 var(--s-4) var(--s-5); }
.aligncenter { margin-inline: auto; }

.entry-content .alignwide {
	max-width: min(var(--wrap), 100%);
	margin-inline: auto;
}

.entry-content .alignfull {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.wp-caption { max-width: 100%; }

.sticky .entry-title::before {
	content: "PINNED";
	display: block;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.16em;
	color: var(--signal);
	margin-bottom: var(--s-2);
}

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

.skip-link:focus {
	position: fixed !important;
	top: var(--s-3);
	left: var(--s-3);
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	padding: var(--s-3) var(--s-4);
	background: var(--signal);
	color: var(--ink-000);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: var(--radius);
}

/* ==========================================================================
   13. Utilities
   ========================================================================== */

.u-mono { font-family: var(--font-mono); }
.u-dim { color: var(--ink-500); }
.u-bright { color: var(--ink-900); }
.u-signal { color: var(--signal); }
.u-tnum { font-variant-numeric: tabular-nums; }
.u-center { text-align: center; }
.u-flow-tight > * + * { margin-top: var(--s-3); }
.u-rule-top { border-top: var(--rule); padding-top: var(--s-5); }

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 860px) {
	:root { --step-0: 1rem; }

	.nav-toggle { display: inline-flex; }

	.nav-primary {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		background: var(--ink-050);
		border-bottom: var(--rule-strong);
		padding: var(--s-4) var(--gutter) var(--s-5);
	}

	.nav-primary.is-open { display: block; }

	.nav-primary ul { flex-direction: column; align-items: flex-start; gap: 0; }
	.nav-primary > ul > li { width: 100%; border-bottom: var(--rule); }
	.nav-primary a { display: block; padding: var(--s-4) 0; font-size: 0.8rem; }

	.nav-primary .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		background: transparent;
		padding: 0 0 var(--s-3) var(--s-4);
		min-width: 0;
	}

	.site-brand__tagline { display: none; }

	.post-list__link { grid-template-columns: 1fr; gap: var(--s-2); }

	.site-main { padding-block: var(--s-7) var(--s-8); }
}

/* ==========================================================================
   15. Accessibility & print
   ========================================================================== */

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

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media print {
	body { background: #fff; color: #000; }
	.site-header, .site-footer, .pagination, .post-navigation { display: none; }
	a { background-image: none; color: #000; }
}

/* ==========================================================================
   16. Page components — home and about
   ========================================================================== */

/* Page intro block.
   The ch measure sits on the heading itself so it scales with the display
   size rather than the body size. */
.hero__title {
	max-width: 15ch;
	margin-bottom: var(--s-5);
}

.hero__sub {
	max-width: var(--measure);
	font-size: var(--step-1);
	line-height: 1.6;
	color: var(--ink-700);
	letter-spacing: -0.011em;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-3);
	margin-top: var(--s-6);
}

/* Stat band — hairline-divided figures under the hero */
.stat-band {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
	gap: 0;
	margin-top: var(--s-8);
	border-top: var(--rule-strong);
	border-bottom: var(--rule-strong);
}

.stat {
	padding: var(--s-5) var(--s-5) var(--s-5) 0;
	border-right: var(--rule);
}

.stat:last-child { border-right: 0; }

.stat__figure {
	display: block;
	font-family: var(--font-mono);
	font-size: var(--step-2);
	font-variant-numeric: tabular-nums;
	color: var(--ink-900);
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin-bottom: var(--s-2);
}

.stat__figure em {
	font-style: normal;
	color: var(--signal);
}

.stat__caption {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
	line-height: 1.5;
}

/* Principle rows — index, title, body on a hairline grid */
.principles { border-top: var(--rule); }

.principle {
	display: grid;
	grid-template-columns: 3.5rem minmax(0, 18ch) minmax(0, 1fr);
	gap: var(--s-5);
	align-items: start;
	padding: var(--s-5) 0;
	border-bottom: var(--rule);
}

.principle__index {
	font-family: var(--font-mono);
	font-size: var(--step--1);
	font-variant-numeric: tabular-nums;
	color: var(--signal);
	letter-spacing: 0.08em;
	padding-top: 0.35em;
}

.principle__title {
	margin: 0;
	font-size: var(--step-1);
	color: var(--ink-900);
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.principle__body { margin: 0; color: var(--ink-500); }

/* Case note — a worked example with a constraint line */
.case {
	padding: var(--s-6);
	background: var(--ink-050);
	border: var(--rule-strong);
	border-left: 2px solid var(--signal);
	border-radius: var(--radius);
}

.case__constraint {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2) var(--s-5);
	padding-bottom: var(--s-4);
	margin-bottom: var(--s-5);
	border-bottom: var(--rule);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-500);
}

.case__constraint b { color: var(--ink-900); font-weight: 500; }
.case__constraint .is-cut { color: var(--signal); }

.case__moves {
	list-style: none;
	margin: var(--s-5) 0 0;
	padding: 0;
	counter-reset: move;
}

.case__moves li {
	position: relative;
	padding-left: 3rem;
	margin-bottom: var(--s-4);
	counter-increment: move;
}

.case__moves li::before {
	content: counter(move, decimal-leading-zero);
	position: absolute;
	left: 0;
	top: 0.1em;
	font-family: var(--font-mono);
	font-size: var(--step--1);
	color: var(--signal);
	font-variant-numeric: tabular-nums;
}

.case__moves b { display: block; color: var(--ink-900); font-weight: 600; }

/* Bio grid — label column beside content, used on the about page */
.bio {
	display: grid;
	grid-template-columns: minmax(0, 14ch) minmax(0, var(--measure));
	gap: var(--s-5) var(--s-6);
	align-items: start;
	padding: var(--s-6) 0;
	border-bottom: var(--rule);
}

.bio:first-of-type { border-top: var(--rule); }

.bio__label { padding-top: 0.35em; }

.bio__body > * { max-width: none; }
.bio__body > * + * { margin-top: var(--s-4); }

/* Editorial note — visible marker for copy still to be supplied */
.note {
	padding: var(--s-4) var(--s-5);
	border: 1px dashed var(--ink-300);
	border-radius: var(--radius);
	background: transparent;
	color: var(--ink-500);
	font-size: var(--step--1);
}

.note::before {
	content: "To supply";
	display: block;
	font-family: var(--font-mono);
	font-size: 0.66rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--signal);
	margin-bottom: var(--s-2);
}

@media (max-width: 860px) {
	.hero__title { max-width: none; }

	.stat { border-right: 0; border-bottom: var(--rule); padding-right: 0; }
	.stat:last-child { border-bottom: 0; }

	.principle { grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--s-3) var(--s-4); }
	.principle__body { grid-column: 2; }

	.bio { grid-template-columns: 1fr; gap: var(--s-3); }
	.bio__label { padding-top: 0; }

	.case { padding: var(--s-5); }
}

/* ==========================================================================
   17. Experience
   ========================================================================== */

.roles { border-top: var(--rule); }

.role {
	display: grid;
	grid-template-columns: minmax(0, 12ch) minmax(0, 1fr);
	gap: var(--s-5);
	padding: var(--s-6) 0;
	border-bottom: var(--rule);
}

.role__period {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-500);
	font-variant-numeric: tabular-nums;
	line-height: 1.6;
	padding-top: 0.3em;
}

.role__period b { display: block; color: var(--ink-900); font-weight: 500; }

.role__title {
	margin: 0 0 var(--s-2);
	font-size: var(--step-1);
	color: var(--ink-900);
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.role__org {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--signal);
	margin-bottom: var(--s-4);
}

.role__org span { color: var(--ink-500); }

.role__body { margin: 0 0 var(--s-4); color: var(--ink-500); }
.role__body:last-child { margin-bottom: 0; }

.role__metrics {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-3) var(--s-5);
	margin: 0;
	padding: var(--s-4) 0 0;
	list-style: none;
	border-top: var(--rule);
}

.role__metrics li {
	font-family: var(--font-mono);
	font-size: var(--step--1);
	font-variant-numeric: tabular-nums;
	color: var(--ink-500);
	line-height: 1.5;
}

.role__metrics b {
	display: block;
	color: var(--ink-900);
	font-weight: 500;
	font-size: 1.05rem;
}

/* Compact list for earlier engineering roles */
.roles--compact .role { padding: var(--s-3) 0; align-items: baseline; }

.roles--compact .role > div {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--s-2) var(--s-4);
}

.roles--compact .role__title { font-size: var(--step-0); margin: 0; }
.roles--compact .role__org { margin: 0; }
.roles--compact .role__period { padding-top: 0.1em; }

@media (max-width: 860px) {
	.role { grid-template-columns: 1fr; gap: var(--s-3); }
	.role__period { padding-top: 0; }
	.role__period b { display: inline; }
	.roles--compact .role { padding: var(--s-4) 0; }
}

/* ==========================================================================
   18. Portrait photography
   ========================================================================== */

/* About-page hero: portrait beside the intro copy on wide screens */
.about-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
	gap: var(--s-7);
	align-items: start;
}

.about-hero__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--ink-050);
	border: var(--rule-strong);
	border-radius: var(--radius);
}

.about-hero__photo::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: 28px;
	height: 2px;
	background: var(--signal);
	z-index: 1;
}

.about-hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	filter: grayscale(0.15) contrast(1.04);
}

/* Smaller inline photo used alongside a single bio row, e.g. Outside work */
.bio-photo {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--ink-050);
	border: var(--rule-strong);
	border-radius: var(--radius);
	margin-top: var(--s-4);
	max-width: 420px;
}

.bio-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(0.15) contrast(1.04);
}

.bio-photo figcaption {
	margin-top: var(--s-3);
	padding-top: var(--s-3);
	border-top: var(--rule);
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-500);
}

@media (max-width: 860px) {
	.about-hero {
		grid-template-columns: 1fr;
	}

	.about-hero__photo {
		order: -1;
		max-width: 280px;
		aspect-ratio: 1 / 1;
	}
}

/* ==========================================================================
   19. Layout-constraint guard
   WordPress can wrap block content in ".is-layout-constrained" and cap its
   width via the block editor's global layout settings. This theme's own
   .wrap/.measure classes are the only intended width controls, so strip
   any stray constraint that leaks in from elsewhere.
   ========================================================================== */

.wrap > .is-layout-constrained,
.entry-content > .is-layout-constrained {
	max-width: none;
}

/* ==========================================================================
   20. Identity block
   The name-first masthead at the top of the home page — the H1 the page
   is actually optimized around, paired with a small circular portrait.
   ========================================================================== */

.identity {
	display: flex;
	align-items: center;
	gap: var(--s-5);
	margin-bottom: var(--s-7);
}

.identity__avatar {
	flex: 0 0 auto;
	width: 150px;
	height: 150px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--ink-050);
	border: 1px solid var(--ink-300);
}

.identity__name {
	margin: 0 0 var(--s-2);
	font-size: var(--step-3);
	color: var(--ink-900);
	letter-spacing: -0.026em;
	line-height: 1.05;
}

.identity__credential {
	margin: 0;
	color: var(--ink-500);
	font-size: var(--step-0);
	line-height: 1.5;
}

@media (max-width: 640px) {
	.identity {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.identity__avatar {
		width: 104px;
		height: 104px;
	}
}
