/* ==========================================================================
   Nova Blog — Base Stylesheet (Phase 1: foundation only)
   Component styles for header, footer, archive cards, single post layout,
   and custom blocks are added in their respective build phases.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Modern CSS reset
   Deliberately minimal — resets only what causes cross-browser
   inconsistency, preserves useful UA defaults (e.g. focus rings) rather
   than a full Eric Meyer-style wipe, since we re-add accessible focus
   styles explicitly below anyway.
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

@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;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	min-height: 100vh;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   These CSS variables are the runtime bridge between the PHP Customizer
   (built in a later phase, which will print a small <style> block of
   --nova-* overrides) and this static stylesheet. Defaults below match
   theme.json so the site looks correct even before any Customizer value
   is saved.
   -------------------------------------------------------------------------- */
:root {
	--nova-color-primary: #1a56db;
	--nova-color-secondary: #0f172a;
	--nova-color-accent: #f59e0b;
	--nova-color-base: #ffffff;
	--nova-color-contrast: #0f172a;
	--nova-color-muted: #64748b;
	--nova-color-border: #e2e8f0;

	--nova-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--nova-font-heading: var(--nova-font-body);

	--nova-container-width: 1200px;
	--nova-content-width: 720px;
	--nova-border-radius: 8px;
	--nova-space-unit: 1rem;
}

/* --------------------------------------------------------------------------
   3. Base typography (fluid, per brief requirement)
   clamp() gives fluid type without JS or a library; min/preferred/max
   values are chosen to stay within WCAG line-length and never shrink
   below a legible floor on small phones.
   -------------------------------------------------------------------------- */
body {
	font-family: var(--nova-font-body);
	font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
	line-height: 1.65;
	color: var(--nova-color-contrast);
	background-color: var(--nova-color-base);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--nova-font-heading);
	font-weight: 700;
	line-height: 1.25;
	color: var(--nova-color-contrast);
}

h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.4rem + 1vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 1.2rem + 0.5vw, 1.75rem); }

a {
	color: var(--nova-color-primary);
	text-decoration-thickness: from-font;
}

a:hover {
	color: var(--nova-color-secondary);
}

/* --------------------------------------------------------------------------
   4. Accessible focus styles
   WCAG 2.2 AA requires a visible focus indicator with sufficient contrast.
   We use a 2px outline with offset (never `outline: none` without a
   replacement) so keyboard users always see where focus is.
   -------------------------------------------------------------------------- */
:focus-visible {
	outline: 2px solid var(--nova-color-accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* --------------------------------------------------------------------------
   5. Skip link
   Required for keyboard/screen-reader users to bypass repeated header
   navigation. Visually hidden until focused, per standard accessible
   skip-link pattern.
   -------------------------------------------------------------------------- */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0.5rem;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	background: var(--nova-color-contrast);
	color: var(--nova-color-base);
	border-radius: 0 0 var(--nova-border-radius) var(--nova-border-radius);
	transition: top 0.2s ease-in-out;
}

.skip-link:focus {
	top: 0;
}

/* --------------------------------------------------------------------------
   6. Screen-reader-only utility
   Standard WordPress core `.screen-reader-text` equivalent, used for
   labels that must exist in the DOM for assistive tech but not be
   visible — e.g. "Menu" label on an icon-only toggle button.
   -------------------------------------------------------------------------- */
.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;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
}

/* --------------------------------------------------------------------------
   7. Layout container
   Two widths by design: --nova-container-width for full-bleed sections
   (header/footer bars) and --nova-content-width for the actual reading
   column, matching theme.json's contentSize so block editor and frontend
   agree exactly.
   -------------------------------------------------------------------------- */
.nova-container {
	width: 100%;
	max-width: var(--nova-container-width);
	margin-inline: auto;
	padding-inline: clamp(1rem, 4vw, 2rem);
}

/* --------------------------------------------------------------------------
   8. Dark mode
   Toggled by JS setting data-theme="dark" on <html>; also applied by
   default when the Customizer's "Default to dark mode" setting is on
   (via the .nova-dark-default body class set in inc/layout.php, resolved
   to data-theme by an inline bootstrap snippet in enqueue.php to avoid a
   flash of unstyled theme).
   -------------------------------------------------------------------------- */
html[data-theme="dark"] {
	--nova-color-primary: #6f8dff;
	--nova-color-secondary: #eef0f2;
	--nova-color-accent: #ffb545;
	--nova-color-base: #0c0d11;
	--nova-color-contrast: #edeef0;
	--nova-color-muted: #8b909b;
	--nova-color-border: #272a33;
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .trending,
html[data-theme="dark"] .author-card,
html[data-theme="dark"] .cat-tile,
html[data-theme="dark"] .hero__panel,
html[data-theme="dark"] .toc-list,
html[data-theme="dark"] .author-box,
html[data-theme="dark"] .table-of-contents {
	background: #15171e;
}

/* ==========================================================================
   COMPONENT STYLES
   ========================================================================== */

/* ---------- Masthead ---------- */
.masthead {
	position: sticky;
	top: 0;
	z-index: 500;
	background: color-mix(in srgb, var(--nova-color-base) 88%, transparent);
	backdrop-filter: blur(14px) saturate(1.4);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	border-bottom: 1px solid var(--nova-color-border);
	transition: box-shadow .2s ease;
}
.masthead__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.1rem;
}
.logo {
	font-weight: 700;
	font-size: 1.4rem;
	letter-spacing: -.02em;
}
.masthead__tools { display: flex; align-items: center; gap: .6rem; }

.primary-navigation .primary-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	flex-wrap: wrap;
}
.primary-menu li { position: relative; }
.primary-menu > li > a {
	display: inline-block;
	font-size: .92rem;
	font-weight: 500;
	padding-block: .3rem;
	position: relative;
}
.primary-menu > li > a::after {
	content: "";
	position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
	background: var(--nova-color-primary);
	transition: right .25s ease;
}
.primary-menu > li:hover > a::after,
.primary-menu > li > a[aria-current="page"]::after { right: 0; }

.submenu-toggle {
	background: none; border: none; color: inherit; padding: .2rem;
	display: inline-flex; vertical-align: middle; cursor: pointer;
}
.sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--nova-color-base); border: 1px solid var(--nova-color-border);
	border-radius: var(--nova-border-radius); padding: .5rem;
	box-shadow: 0 12px 32px rgba(0,0,0,.12);
	display: none; flex-direction: column; gap: .1rem;
	z-index: 50;
}
.sub-menu[data-state="open"] { display: flex; }
.sub-menu a { display: block; padding: .55rem .7rem; border-radius: 6px; font-size: .88rem; }
.sub-menu a:hover { background: var(--nova-color-border); }

.nova-menu-toggle {
	display: none;
	flex-direction: column; gap: 4px;
	width: 38px; height: 38px; align-items: center; justify-content: center;
	background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 50%;
}
.nova-menu-toggle__bar { width: 16px; height: 1.5px; background: currentColor; }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	border: 1px solid var(--nova-color-border); background: var(--nova-color-base); color: var(--nova-color-contrast);
	transition: transform .2s ease, border-color .2s ease;
}
.icon-btn:hover { border-color: var(--nova-color-primary); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-moon { display: block; }
.icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }

.search-panel {
	max-height: 0; overflow: hidden;
	border-bottom: 1px solid transparent;
	transition: max-height .3s ease, border-color .3s ease;
}
.search-panel[data-state="open"] {
	max-height: 100px;
	border-color: var(--nova-color-border);
}
.search-panel__form { display: flex; gap: .7rem; padding-block: 1rem; }
.search-panel__input {
	flex: 1; background: var(--nova-fog, var(--nova-color-base)); border: 1px solid var(--nova-color-border);
	border-radius: 100px; padding: .7rem 1.2rem; color: var(--nova-color-contrast); outline: none;
}
.search-panel__input:focus { border-color: var(--nova-color-primary); }

/* ---------- Mobile menu ----------
   Below the 860px breakpoint, #nova-primary-menu (the same markup used
   for the desktop inline nav) becomes a full-screen overlay when its
   data-state flips to "open" — no separate mobile-only markup needed. */
@media (max-width: 860px) {
	.primary-navigation {
		display: block;
		position: fixed; inset: 0; z-index: 700;
		background: var(--nova-color-base);
		padding: 6rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
		transform: translateX(100%);
		transition: transform .35s cubic-bezier(.16,1,.3,1);
		overflow-y: auto;
	}
	.primary-navigation[data-state="open"] { transform: translateX(0); }
	.primary-navigation .primary-menu { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
	.primary-navigation .primary-menu > li { width: 100%; }
	.primary-navigation .primary-menu > li > a { font-size: 1.6rem; font-weight: 600; }
	.primary-navigation .sub-menu { position: static; box-shadow: none; margin-top: .5rem; margin-left: 1rem; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-block: 1rem; }
.breadcrumbs__list { display: flex; flex-wrap: wrap; gap: .3rem; font-family: var(--nova-font-body); font-size: .8rem; color: var(--nova-color-muted); }
.breadcrumbs__item { display: flex; align-items: center; gap: .3rem; }
.breadcrumbs__sep { color: var(--nova-color-border); }
.breadcrumbs a:hover { color: var(--nova-color-primary); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; gap: .5rem;
	font-weight: 600; font-size: .92rem;
	padding: .85rem 1.5rem; border-radius: 100px;
	border: 1.5px solid var(--nova-color-contrast);
	transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn--solid { background: var(--nova-color-contrast); color: var(--nova-color-base); }
.btn--solid:hover { transform: translateY(-2px); background: var(--nova-color-primary); border-color: var(--nova-color-primary); color: #fff; }
.btn--ghost { background: transparent; color: var(--nova-color-contrast); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--nova-color-primary); color: var(--nova-color-primary); }

/* ---------- Stamp ---------- */
.stamp {
	display: inline-flex; align-items: center; gap: .35em;
	font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
	color: var(--nova-color-primary); border: 1.5px solid var(--nova-color-primary);
	border-radius: 100px; padding: .32em .85em; background: color-mix(in srgb, var(--nova-color-primary) 10%, transparent);
}
.stamp--cobalt { color: var(--nova-color-accent); border-color: var(--nova-color-accent); background: color-mix(in srgb, var(--nova-color-accent) 12%, transparent); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; }
.hero__eyebrow { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.hero__eyebrow .line { height: 1px; flex: 1; background: var(--nova-color-border); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.03em; }
.hero .lede { margin-top: 1.5rem; font-size: 1.1rem; line-height: 1.6; color: var(--nova-color-muted); max-width: 46ch; }
.hero__actions { display: flex; gap: .9rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__panel { display: block; background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow-1, 0 8px 24px rgba(0,0,0,.06)); }
.hero__panel img { border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero__panel h3 { margin-top: 1rem; font-size: 1.25rem; line-height: 1.3; }

/* ---------- Section headings ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.section__head h1, .section__head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.see-all { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--nova-color-primary); border-bottom: 1px solid var(--nova-color-primary); padding-bottom: 2px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.75rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
	background: var(--nova-color-base); border: 1px solid var(--nova-color-border);
	border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
	transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,.12); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; display: block; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.card:hover .card__media img { transform: scale(1.06); }
.card__media .stamp { position: absolute; top: .9rem; left: .9rem; }
.card__body { padding: 1.35rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.card__body h3 { font-size: 1.15rem; line-height: 1.32; }
.card__body h3 a:hover { color: var(--nova-color-primary); }
.card__excerpt { font-size: .9rem; line-height: 1.6; color: var(--nova-color-muted); }
.card__foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--nova-color-border); }
.card__stats { display: flex; gap: 1rem; font-size: .7rem; color: var(--nova-color-muted); }
.card__stats span { display: inline-flex; align-items: center; gap: .3rem; }
.card__stats svg { width: 13px; height: 13px; }

.author-chip { display: flex; align-items: center; gap: .5rem; }
.author-chip img { width: 22px; height: 22px; border-radius: 50%; }
.author-chip span { font-weight: 500; font-size: .8rem; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem 1rem; font-size: .72rem; color: var(--nova-color-muted); }
.meta-row .dot::before { content: "·"; margin-right: 1rem; color: var(--nova-color-border); }

/* ---------- Trending ---------- */
.trending { background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.trending__item { display: flex; align-items: center; gap: 1.5rem; padding-block: 1.25rem; border-bottom: 1px solid var(--nova-color-border); }
.trending__item:last-child { border-bottom: none; padding-bottom: 0; }
.trending__item:first-child { padding-top: 0; }
.trending__num { font-family: var(--nova-font-heading); font-style: italic; font-weight: 500; font-size: 2rem; color: var(--nova-color-border); width: 2.4ch; flex: none; }
.trending__item:hover .trending__num { color: var(--nova-color-primary); }
.trending__thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex: none; }
.trending__thumb img { width: 100%; height: 100%; object-fit: cover; }
.trending__info h4 { font-size: 1rem; line-height: 1.35; font-weight: 600; }
.trending__info h4:hover { color: var(--nova-color-primary); }
.trending__info .meta-row { margin-top: .5rem; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.cat-tile {
	background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 14px;
	padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.2rem; justify-content: space-between;
	min-height: 120px; transition: transform .25s ease, border-color .25s ease;
}
.cat-tile:hover { transform: translateY(-4px); border-color: var(--nova-color-primary); }
.cat-tile .count { font-size: .7rem; color: var(--nova-color-muted); }

/* ---------- Layout / sidebar ---------- */
.layout { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.layout--full { grid-template-columns: 1fr; }
.layout--full .sidebar { display: none; }
.sidebar { position: sticky; top: 6.5rem; display: flex; flex-direction: column; gap: 2rem; }
.side-card { background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 14px; padding: 1.5rem; }
.side-card h3 { font-size: 1.02rem; margin-bottom: 1.1rem; }
.widget-title { font-size: 1.02rem; margin-bottom: 1.1rem; }
.popular-item { display: flex; gap: .9rem; padding-block: .85rem; border-bottom: 1px solid var(--nova-color-border); }
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item:first-child { padding-top: 0; }
.popular-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.popular-item h5 { font-size: .86rem; line-height: 1.35; font-weight: 600; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-cloud a { font-size: .72rem; border: 1px solid var(--nova-color-border); border-radius: 100px; padding: .4rem .8rem; transition: all .2s ease; }
.tag-cloud a:hover { background: var(--nova-color-contrast); color: var(--nova-color-base); border-color: var(--nova-color-contrast); }
.mini-newsletter form { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.mini-newsletter input { background: color-mix(in srgb, var(--nova-color-border) 30%, transparent); border: 1px solid var(--nova-color-border); border-radius: 8px; padding: .7rem .9rem; color: var(--nova-color-contrast); outline: none; }

/* ---------- Author grid/box ---------- */
.author-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.author-card { background: var(--nova-color-base); border: 1px solid var(--nova-color-border); border-radius: 14px; padding: 1.75rem 1.5rem; text-align: center; transition: transform .25s ease, box-shadow .25s ease; }
.author-card:hover { transform: translateY(-5px); }
.author-card img { width: 72px; height: 72px; border-radius: 50%; margin-inline: auto; }
.author-card h4 { margin-top: 1rem; font-size: 1.05rem; }
.author-card .role { font-size: .68rem; color: var(--nova-color-primary); text-transform: uppercase; letter-spacing: .06em; margin-top: .3rem; }
.author-card p { font-size: .82rem; color: var(--nova-color-muted); margin-top: .8rem; line-height: 1.55; }
.author-card .follow { margin-top: 1.1rem; display: inline-block; font-size: .7rem; border: 1px solid var(--nova-color-contrast); border-radius: 100px; padding: .5rem 1.1rem; text-transform: uppercase; letter-spacing: .05em; transition: all .2s ease; }
.author-card .follow:hover { background: var(--nova-color-contrast); color: var(--nova-color-base); }

.author-header { display: flex; gap: 1.5rem; align-items: center; padding-block: 2rem; flex-wrap: wrap; }
.author-header img { border-radius: 50%; }

.author-box { display: flex; gap: 1.25rem; padding: 1.75rem; border: 1px solid var(--nova-color-border); border-radius: 16px; margin-block: 2.5rem; }
.author-box__avatar img { border-radius: 50%; }
.author-box__body p { color: var(--nova-color-muted); font-size: .9rem; line-height: 1.6; margin-top: .5rem; }

/* ---------- Newsletter / CTA ---------- */
.newsletter {
	background: var(--nova-color-contrast); color: var(--nova-color-base);
	border-radius: 24px; padding: clamp(2.5rem, 6vw, 4.5rem);
	display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center;
	position: relative; overflow: hidden;
}
.newsletter h2 { color: var(--nova-color-base); font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-top: .5rem; }
.newsletter p { color: color-mix(in srgb, var(--nova-color-base) 65%, transparent); margin-top: 1rem; max-width: 44ch; line-height: 1.6; }
.newsletter-form { display: flex; gap: .7rem; position: relative; z-index: 1; flex-wrap: wrap; }
.newsletter-form input {
	flex: 1; min-width: 200px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
	border-radius: 100px; padding: .9rem 1.3rem; color: inherit; outline: none;
}
.newsletter-notice { font-size: .8rem; margin-bottom: .6rem; }
.newsletter-notice--success { color: #4ade80; }
.newsletter-notice--error { color: #f87171; }

.cta { border: 1.5px dashed var(--nova-color-border); border-radius: 24px; padding: clamp(2.5rem, 6vw, 4rem); text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); max-width: 26ch; margin-inline: auto; margin-top: .75rem; }
.cta p { margin-top: 1rem; color: var(--nova-color-muted); max-width: 42ch; margin-inline: auto; }
.cta .hero__actions { justify-content: center; margin-top: 1.75rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--nova-color-border); margin-top: 2rem; }
.footer__top { padding-block: clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer__brand p { color: var(--nova-color-muted); font-size: .88rem; line-height: 1.6; margin-top: 1rem; max-width: 32ch; }
.footer__social { display: flex; gap: .6rem; margin-top: 1.5rem; }
.footer__col h5, .site-footer h5 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--nova-color-muted); margin-bottom: 1.1rem; }
.footer__col ul { display: flex; flex-direction: column; gap: .75rem; }
.footer__col a:hover { color: var(--nova-color-primary); }
.footer__bottom { padding-block: 1.5rem; border-top: 1px solid var(--nova-color-border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .72rem; color: var(--nova-color-muted); }

/* ---------- Empty state / archive header ---------- */
.empty-state { text-align: center; padding-block: clamp(3rem, 8vw, 5rem); max-width: 44ch; margin-inline: auto; }
.empty-state h2 { margin-top: .75rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.empty-state p { margin-top: .75rem; color: var(--nova-color-muted); }
.empty-state .search-panel__form { max-width: 420px; margin: 1.5rem auto 0; }
.archive-header { padding-block: clamp(2rem, 5vw, 3rem) 1rem; }
.archive-description { color: var(--nova-color-muted); margin-top: .5rem; max-width: 60ch; }

/* ---------- Single post ---------- */
.single-post__header { padding-block: clamp(2rem, 5vw, 3rem) 1.5rem; max-width: 900px; }
.single-post__header h1 { margin-top: 1rem; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }
.single-post__header .lede { margin-top: 1rem; color: var(--nova-color-muted); font-size: 1.1rem; line-height: 1.6; }
.single-post__meta { margin-top: 1.5rem; }
.single-post__hero-image { margin-block: 2rem; }
.single-post__hero-image img { width: 100%; border-radius: 20px; aspect-ratio: 16/9; object-fit: cover; }
.single-post__hero-image figcaption { text-align: center; font-size: .8rem; color: var(--nova-color-muted); margin-top: .6rem; }
.single-post__body { padding-block: 1rem 2rem; }
.single-post__tags { margin-top: 2.5rem; }

.entry-content { font-size: 1.08rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.4em; }
.entry-content h2 { font-size: 1.6rem; margin-top: 2em; scroll-margin-top: 6rem; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.8em; scroll-margin-top: 6rem; }
.entry-content p { max-width: 72ch; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; max-width: 72ch; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content blockquote { border-left: 3px solid var(--nova-color-primary); padding-left: 1.4em; font-style: italic; color: var(--nova-color-muted); max-width: 68ch; }
.entry-content img { border-radius: 12px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content code { background: color-mix(in srgb, var(--nova-color-border) 40%, transparent); padding: .15em .4em; border-radius: 4px; font-family: var(--nova-font-mono, monospace); font-size: .9em; }
.entry-content pre { background: var(--nova-color-contrast); color: var(--nova-color-base); padding: 1.2em; border-radius: 12px; overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; }

/* ---------- Table of contents ---------- */
.table-of-contents { border: 1px solid var(--nova-color-border); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.toc-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: none; font-weight: 600; color: inherit; }
.toc-toggle svg { transition: transform .2s ease; }
.toc-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.toc-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.toc-list[hidden] { display: none; }
.toc-list__item a { font-size: .88rem; color: var(--nova-color-muted); }
.toc-list__item a:hover { color: var(--nova-color-primary); }
.toc-level-3 { padding-left: 1.2rem; }

/* ---------- Share buttons ---------- */
.share-buttons { display: flex; align-items: center; gap: .6rem; margin-block: 2rem; padding-block: 1.5rem; border-block: 1px solid var(--nova-color-border); }

/* ---------- Post navigation / pagination ---------- */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block: 2.5rem; }
.post-navigation .nav-previous, .post-navigation .nav-next { border: 1px solid var(--nova-color-border); border-radius: 12px; padding: 1.2rem; }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nova-color-muted); }
.nav-title { display: block; margin-top: .4rem; font-weight: 600; }

.pagination ul { display: flex; gap: .5rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination li a, .pagination li span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding-inline: .5rem; border-radius: 8px; border: 1px solid var(--nova-color-border); font-size: .85rem; }
.pagination li span.current { background: var(--nova-color-contrast); color: var(--nova-color-base); border-color: var(--nova-color-contrast); }
.pagination li a:hover { border-color: var(--nova-color-primary); color: var(--nova-color-primary); }

/* ---------- Comments ---------- */
.comments-area { margin-block: 3rem; max-width: 72ch; }
.comments-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.comment-list { display: flex; flex-direction: column; gap: 1.5rem; }
.comment-list .children { margin-top: 1.5rem; margin-left: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.comment-author-row { display: flex; align-items: center; gap: .8rem; }
.comment-author-row img { border-radius: 50%; }
.comment-author-name { font-weight: 600; font-size: .92rem; }
.comment-content { margin-top: .8rem; font-size: .92rem; line-height: 1.6; }
.comment-reply { margin-top: .6rem; }
.comment-reply a { font-size: .78rem; font-weight: 600; color: var(--nova-color-primary); }
.comment-respond { margin-top: 2rem; }
.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
	width: 100%; border: 1px solid var(--nova-color-border); border-radius: 10px;
	padding: .8rem 1rem; background: var(--nova-color-base); color: var(--nova-color-contrast);
	font: inherit; margin-top: .4rem;
}
.comment-form label { font-size: .82rem; font-weight: 600; }
.comment-form p { margin-top: 1.1rem; }
.comment-notes { font-size: .82rem; color: var(--nova-color-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.grid--3 { grid-template-columns: repeat(2, 1fr); }
	.cat-grid { grid-template-columns: repeat(3, 1fr); }
	.author-grid { grid-template-columns: repeat(2, 1fr); }
	.layout { grid-template-columns: 1fr; }
	.sidebar { position: static; }
	.footer__top { grid-template-columns: 1fr 1fr; }
	.hero__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.primary-navigation, .masthead .search-panel { display: none; }
	.nova-menu-toggle { display: inline-flex; }
	.newsletter { grid-template-columns: 1fr; }
	.post-navigation { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.grid--3, .grid--2 { grid-template-columns: 1fr; }
	.cat-grid { grid-template-columns: repeat(2, 1fr); }
	.author-grid { grid-template-columns: 1fr; }
	.footer__top { grid-template-columns: 1fr; }
	.author-box { flex-direction: column; }
}
