/*
Theme Name:       Omar Abuassaf Magazine
Theme URI:        https://omarabuassaf.com
Author:           Omar Abu Assaf
Author URI:       https://omarabuassaf.com
Description:      A literary-magazine masthead theme for omarabuassaf.com — bilingual identity site for a poet + UCLA software engineer. Cream paper, ink type, copper accent, Amiri serif headings, Tajawal body, IBM Plex Mono metadata. Magazine-grade layouts for essays and poems; minimal, editorial, distinctively non-AI.
Version:          1.0.0
Requires at least: 6.0
Requires PHP:     7.4
License:          GPL-2.0-or-later
License URI:      https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:      omarabuassaf-magazine
Tags:             rtl-language-support, blog, magazine, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, editor-style
*/

/* ============================================================
   omarabuassaf-magazine — design tokens
   ============================================================ */

:root {
	--bg:        #FAF7F2;
	--bg-deep:   #F1EBE0;
	--paper:     #FFFFFF;
	--ink:       #1A1A1A;
	--ink-soft:  #2A2A2A;
	--muted:     #6B6B6B;
	--hair:      #E8DFD0;
	--rule:      #D8CFC0;
	--copper:    #B8865C;
	--copper-d:  #8E6440;
	--copper-l:  #D4A87C;

	--serif:     "Tajawal", "Helvetica Neue", Arial, sans-serif;
	--sans:      "Tajawal", "Helvetica Neue", Arial, sans-serif;
	--mono:      "Tajawal", "Helvetica Neue", Arial, sans-serif;

	--wrap-max:    1180px;
	--col-essay:   720px;
	--col-poem:    560px;
	--col-hero:    1020px;

	--ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"], :root:not([data-theme]) {
		--bg:        #14110D;
		--bg-deep:   #1C1813;
		--paper:     #1E1A14;
		--ink:       #F3EBDD;
		--ink-soft:  #DCD2C0;
		--muted:     #98897A;
		--hair:      #2A241D;
		--rule:      #3A332B;
		--copper:    #D4A87C;
		--copper-d:  #B8865C;
		--copper-l:  #E8C499;
	}
}

/* ============================================================
   Reset + base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--copper); text-decoration: none; transition: color .15s ease, background .15s ease; }
a:hover { color: var(--copper-d); }
button { font: inherit; }
hr { border: 0; height: 1px; background: var(--hair); margin: 2em 0; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 2px; }

/* Custom scrollbar (Firefox + WebKit) */
* { scrollbar-color: var(--copper) var(--bg-deep); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-deep); }
*::-webkit-scrollbar-thumb { background: var(--copper); border-radius: 6px; border: 2px solid var(--bg-deep); }
*::-webkit-scrollbar-thumb:hover { background: var(--copper-d); }

::selection { background: var(--copper); color: #FFF; }

/* Paper grain — very subtle, fixed background */
body::before {
	content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.40  0 0 0 0 0.30  0 0 0 0 0.20  0 0 0 0.045 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	opacity: 0.5;
}
body > *:not(.reading-progress) { position: relative; z-index: 1; }

/* The wrap that contains the top nav must sit above content wraps so
   the dropdown sub-menus aren't covered by later siblings (the masthead
   and section content wraps). Specificity bumped via doubled class to
   beat `body > *:not(.reading-progress) { z-index: 1 }`. */
.wrap.site-header-wrap { position: relative !important; z-index: 100 !important; }
.site-main, body > main, main#main { position: relative; z-index: 1; }

/* Container */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 2.5em; }
@media (max-width: 720px) { .wrap { padding: 0 1.25em; } }

/* Skip link */
.skip-link {
	position: absolute; top: -40px; right: 1em;
	background: var(--ink); color: var(--bg);
	padding: 0.5em 1em; border-radius: 3px; z-index: 100;
	font-family: var(--mono); font-size: 0.85rem;
}
.skip-link:focus { top: 0.5em; color: var(--bg); }

/* Reading progress bar — copper line fills as the reader scrolls */
.reading-progress {
	position: fixed; top: 0; right: 0;
	height: 3px; width: calc(var(--oa-scroll, 0) * 100%);
	background: linear-gradient(to left, var(--copper), var(--copper-d));
	z-index: 100; transition: width 80ms linear;
}

/* ============================================================
   Top navigation (header) — same on all pages
   ============================================================ */

.site-nav {
	border-bottom: 1px solid var(--hair);
	padding: 1em 0; margin: 0;
	position: relative; z-index: 4;
}
.site-nav .nav-list {
	list-style: none; padding: 0; margin: 0;
	display: flex; justify-content: center; flex-wrap: wrap;
	gap: 0.4em 1.8em; font-family: var(--sans);
}
.site-nav .menu-item { position: relative; }
.site-nav .menu-item > a {
	color: var(--ink); font-size: 0.95rem; font-weight: 500;
	padding: 0.4em 0; display: inline-block;
	border-bottom: 1px solid transparent;
	transition: color .15s ease, border-color .2s ease; white-space: nowrap;
}
.site-nav .menu-item > a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current_page_item > a {
	color: var(--copper); border-bottom-color: var(--copper);
}
.site-nav .menu-item-has-children > a::after {
	content: " ▾"; font-size: 0.7em; color: var(--copper);
	margin-right: 0.25em; display: inline-block; transition: transform .2s ease;
}
.site-nav .menu-item-has-children.is-open > a::after,
.site-nav .menu-item-has-children:hover > a::after { transform: rotate(180deg); }

/* Hover bridge ATTACHED TO THE PARENT LI — fills the dead zone directly
   below the menu item so even fast cursor moves stay within the LI tree. */
.site-nav .menu-item-has-children::after {
	content: ""; position: absolute;
	top: 100%; left: -30px; right: -30px; height: 20px;
	background: transparent; z-index: 9;
}

.site-nav .sub-menu {
	position: absolute; top: 100%; right: 50%;
	transform: translateX(50%);
	background: var(--paper); border: 1px solid var(--hair);
	min-width: 220px; padding: 0.5em 0; margin: 0;
	list-style: none; opacity: 0; visibility: hidden;
	transition: opacity .15s ease, visibility .15s;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); z-index: 10;
}
/* Secondary hover bridge on the submenu */
.site-nav .sub-menu::before {
	content: ""; position: absolute;
	top: -20px; left: -20px; right: -20px; height: 20px;
}
/* Submenu visible when JS adds .is-open OR via CSS fallback (no-JS) */
.site-nav .menu-item-has-children.is-open > .sub-menu,
.site-nav .menu-item-has-children:hover > .sub-menu,
.site-nav .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1; visibility: visible;
}
.site-nav .sub-menu .menu-item > a {
	padding: 0.55em 1.4em; font-size: 0.88rem; font-weight: 400;
	border-bottom: 0; display: block; white-space: nowrap;
}
.site-nav .sub-menu .menu-item > a:hover { background: var(--bg); color: var(--copper); }

/* Hamburger button */
.menu-toggle {
	display: none; background: transparent; border: 0; cursor: pointer;
	padding: 0.6em; width: 46px; height: 46px;
	position: absolute; top: 0.25em; right: 0.2em;
	z-index: 20;
	border-radius: 3px; transition: background .15s ease;
}
.menu-toggle:hover { background: var(--bg-deep); }
.menu-toggle .bar {
	display: block; width: 22px; height: 2px;
	background: var(--ink); margin: 5px auto;
	transition: transform .3s var(--ease), opacity .25s ease, background .2s ease;
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg); background: var(--copper);
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg); background: var(--copper);
}

@media (max-width: 860px) {
	.menu-toggle { display: block; }
	.site-nav { padding: 0.6em 0; min-height: 50px; }
	.site-nav .nav-list {
		display: none; flex-direction: column; gap: 0;
		margin: 2.4em 0 0;
		text-align: right;
	}
	.site-nav.is-open .nav-list { display: flex; animation: oa-slide-down .3s ease; }
	.site-nav .menu-item {
		position: static; padding: 0;
		border-bottom: 1px solid var(--hair);
	}
	.site-nav .menu-item:last-child { border-bottom: 0; }
	.site-nav .menu-item > a {
		padding: 0.95em 1.2em; font-size: 1.05rem;
		font-family: var(--serif); font-weight: 700;
		border-bottom: 0; display: block;
		text-align: right;
	}
	.site-nav .menu-item-has-children > a::after { display: none; }
	.site-nav .sub-menu {
		position: static; opacity: 1; visibility: visible;
		transform: none; display: block; border: 0; box-shadow: none;
		background: var(--bg-deep); padding: 0.4em 0 0.8em; min-width: 0;
	}
	.site-nav .sub-menu .menu-item { border-bottom: 0; }
	.site-nav .sub-menu .menu-item > a {
		padding: 0.55em 2.2em 0.55em 1em;
		font-size: 0.92rem;
		font-family: var(--sans); font-weight: 400;
		text-align: right;
	}
	/* Hide LI/submenu hover bridges on mobile — not needed when expanded inline */
	.site-nav .menu-item-has-children::after,
	.site-nav .sub-menu::before { display: none; }
}
@keyframes oa-slide-down {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: none; }
}

/* ============================================================
   MASTHEAD (homepage)
   ============================================================ */

.masthead { padding: 1em 0 0; position: relative; }

/* Editor's portrait medallion */
.editor-medallion {
	position: absolute; top: 5em; right: 0;
	width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
	border: 3px solid var(--copper);
	background: var(--bg-deep);
	box-shadow: 0 0 0 8px var(--bg), 0 14px 36px rgba(0, 0, 0, 0.12);
	z-index: 3;
	transition: transform .4s var(--ease);
	display: block;
}
.editor-medallion::before {
	content: ""; position: absolute; inset: -14px;
	border: 1px solid var(--hair); border-radius: 50%; pointer-events: none;
}
.editor-medallion img { width: 100%; height: 100%; object-fit: cover; display: block; }
.editor-medallion:hover { transform: scale(1.03) rotate(-1.5deg); }
.editor-medallion-caption {
	position: absolute; top: calc(5em + 168px + 1.6em); right: 24px;
	font-family: var(--mono); font-size: 0.66rem;
	color: var(--muted); letter-spacing: 0.22em; text-transform: uppercase;
	white-space: nowrap; text-align: center; width: 120px; z-index: 3;
}

@media (max-width: 1100px) {
	.editor-medallion { width: 140px; height: 140px; top: 5.5em; }
	.editor-medallion-caption { top: calc(5.5em + 140px + 1.4em); width: 100px; }
}
@media (max-width: 860px) {
	.editor-medallion {
		position: static; margin: 2em auto 0;
		width: 150px; height: 150px;
	}
	.editor-medallion-caption {
		position: static; margin: 1em auto 0; width: auto;
		display: block; text-align: center; right: auto; top: auto;
	}
}

.masthead-name { text-align: center; padding: 4.5em 0 2.5em; }
.masthead-name h1 {
	font-family: var(--serif);
	font-size: clamp(3.5rem, 9vw, 6.4rem);
	font-weight: 700; margin: 0; line-height: 1.05;
	letter-spacing: -0.015em; color: var(--ink);
}
.masthead-name .role {
	font-family: var(--serif);
	font-size: clamp(1.1rem, 2vw, 1.4rem);
	color: var(--copper); margin: 0.45em 0 0;
	font-weight: 400; font-style: italic;
}
.masthead-name .sep {
	display: block; width: 64px; height: 1px;
	background: var(--copper); margin: 1.6em auto;
}
.masthead-name .desc {
	max-width: 560px; margin: 0 auto;
	color: var(--muted); font-size: 1.02rem; line-height: 1.9;
}

.masthead-foot {
	display: flex; justify-content: space-between; align-items: baseline;
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.18em; text-transform: uppercase;
	padding: 1.2em 0 2.5em;
	border-top: 1px solid var(--hair);
}
.masthead-foot .meta { display: flex; gap: 1.4em; align-items: baseline; }
.masthead-foot .dot {
	width: 5px; height: 5px; background: var(--copper);
	border-radius: 50%; display: inline-block; align-self: center;
}
@media (max-width: 720px) {
	.masthead-foot { font-size: 0.62rem; flex-direction: column; gap: 0.7em; text-align: center; padding-bottom: 1.5em; }
	.masthead-foot .meta { justify-content: center; flex-wrap: wrap; }
	.masthead-name { padding: 2.8em 0 1.8em; }
}

/* ============================================================
   HOME SECTIONS
   ============================================================ */

.section { padding: 4em 0; border-top: 1px solid var(--hair); }
.section:first-of-type { border-top: 0; padding-top: 3em; }
.section-head {
	display: flex; align-items: baseline; gap: 1.4em;
	margin-bottom: 2.2em; flex-wrap: wrap;
}
.section-num {
	font-family: var(--mono); font-size: 0.82rem; color: var(--copper);
	letter-spacing: 0.18em; padding: 0.4em 0.85em;
	border: 1px solid var(--copper); border-radius: 2px;
	flex-shrink: 0; line-height: 1;
}
.section-title {
	font-family: var(--serif); font-size: 2.15rem; font-weight: 700;
	margin: 0; color: var(--ink); line-height: 1.2;
	letter-spacing: -0.005em;
}
.section-kicker {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.22em; text-transform: uppercase; margin-right: auto;
}
.section-more {
	font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
	color: var(--copper); white-space: nowrap;
}
.section-more:hover { color: var(--copper-d); text-decoration: underline; text-underline-offset: 3px; }

/* Essays grid */
.essays { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.8em; }
.essay { display: flex; flex-direction: column; }
.essay-meta {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.16em; text-transform: uppercase;
	margin-bottom: 0.85em; display: flex; gap: 0.8em;
	flex-wrap: wrap; align-items: baseline;
}
.essay-cat { color: var(--copper); }
.essay-title {
	font-family: var(--serif); font-size: 1.5rem;
	font-weight: 700; line-height: 1.4; margin: 0 0 0.75em;
}
.essay-title a { color: var(--ink); }
.essay-title a:hover { color: var(--copper); }
.essay-excerpt { color: var(--ink-soft); line-height: 1.85; font-size: 0.98rem; margin: 0 0 1em; }
.essay-readmore {
	font-family: var(--mono); font-size: 0.74rem;
	letter-spacing: 0.16em; text-transform: uppercase;
	color: var(--copper); margin-top: auto;
}
.essay-readmore::after { content: " ←"; }

.essay-thumb {
	display: block; margin: 0 0 1.1em;
	aspect-ratio: 16/10; background: var(--bg-deep);
	border-radius: 4px; overflow: hidden;
	border: 1px solid var(--hair); position: relative;
}
.essay-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.essay-thumb:hover img { transform: scale(1.03); }
.essay-thumb-fallback {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--bg-deep) 0%, var(--paper) 70%);
	font-family: var(--serif); font-size: 4rem; color: var(--copper);
	opacity: 0.42; font-weight: 700; line-height: 1;
}
.essay.featured .essay-title { font-size: 2.4rem; line-height: 1.2; }
.essay.featured .essay-thumb { margin: 0 0 1.3em; }
.essay.featured .essay-thumb-fallback { font-size: 7rem; }
.essay.featured .essay-excerpt { font-size: 1.08rem; }

/* Poems grid */
.poems {
	display: grid; grid-template-columns: repeat(2, 1fr);
	background: var(--paper); border: 1px solid var(--hair);
}
.poem {
	padding: 2.2em 2em;
	border-bottom: 1px solid var(--hair); border-left: 1px solid var(--hair);
	text-align: center; display: flex; flex-direction: column;
	justify-content: center; min-height: 220px;
}
.poem:nth-child(2n) { border-left: 0; }
.poem:nth-last-child(-n+2) { border-bottom: 0; }
.poem-thumb {
	display: block; width: 96px; height: 96px;
	margin: 0 auto 1.2em; background: var(--bg-deep);
	border-radius: 4px; overflow: hidden;
	border: 1px solid var(--hair); position: relative;
}
.poem-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.poem-thumb:hover img { transform: scale(1.04); }
.poem-thumb-fallback {
	position: absolute; inset: 0; display: flex;
	align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--bg-deep) 0%, var(--paper) 70%);
	font-family: var(--serif); font-size: 2.6rem; color: var(--copper);
	opacity: 0.5; font-weight: 700; line-height: 1;
}
.poem-cat {
	font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
	letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 1em;
}
.poem-title {
	font-family: var(--serif); font-size: 1.35rem;
	font-weight: 700; line-height: 1.6; margin: 0 0 0.9em;
}
.poem-title a { color: var(--ink); }
.poem-title a:hover { color: var(--copper); }
.poem-date {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.1em; margin-top: auto;
}

/* Dispatch (tech) — dark slab */
.dispatch {
	background: var(--ink); color: var(--bg);
	padding: 3.5em 3em; border-radius: 4px;
	position: relative; overflow: hidden;
}
.dispatch::before {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(ellipse at top left, rgba(184, 134, 92, 0.18) 0%, transparent 55%);
	pointer-events: none;
}
.dispatch > * { position: relative; }
.dispatch-head { margin-bottom: 2em; }
.dispatch-head .section-num { color: var(--bg); border-color: rgba(255, 255, 255, 0.35); }
.dispatch-head .section-title { color: var(--bg); }
.dispatch-head .section-kicker { color: rgba(255, 255, 255, 0.55); }
.dispatch-head .section-more { color: var(--copper); }
.dispatch-list { display: grid; gap: 0; }
.dispatch-item {
	padding: 1.5em 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	display: grid; grid-template-columns: 56px 70px 1fr 110px;
	gap: 1.6em; align-items: center;
}
.dispatch-item:last-child { border-bottom: 0; }
.dispatch-thumb {
	display: block; width: 56px; height: 56px;
	background: rgba(255, 255, 255, 0.06); border-radius: 3px;
	overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);
	position: relative;
}
.dispatch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dispatch-thumb-fallback {
	position: absolute; inset: 0; display: flex;
	align-items: center; justify-content: center;
	font-family: var(--serif); font-size: 1.6rem; color: var(--copper);
	font-weight: 700; line-height: 1;
}
.dispatch-num {
	font-family: var(--mono); font-size: 0.74rem; color: var(--copper);
	letter-spacing: 0.15em; font-variant-numeric: tabular-nums;
	align-self: center;
}
.dispatch-title {
	font-family: var(--serif); font-size: 1.32rem;
	font-weight: 400; line-height: 1.5; margin: 0;
}
.dispatch-title a { color: var(--bg); }
.dispatch-title a:hover { color: var(--copper); }
.dispatch-date {
	font-family: var(--mono); font-size: 0.7rem;
	color: rgba(255, 255, 255, 0.55); letter-spacing: 0.13em;
	text-align: left; font-variant-numeric: tabular-nums;
}

/* Index (browse-by-topic) */
.idx {
	display: grid; grid-template-columns: repeat(2, 1fr);
	border: 1px solid var(--hair); background: var(--paper);
}
.idx-item {
	padding: 1.25em 1.6em; display: flex;
	align-items: baseline; gap: 1.1em;
	border-bottom: 1px solid var(--hair); border-left: 1px solid var(--hair);
	color: var(--ink); font-family: var(--sans);
	transition: background .15s ease, padding-right .15s ease;
}
.idx-item:nth-child(2n) { border-left: 0; }
.idx-item:nth-last-child(-n+2) { border-bottom: 0; }
.idx-item:hover { background: var(--bg); color: var(--ink); padding-right: 2em; }
.idx-num {
	font-family: var(--mono); font-size: 0.74rem; color: var(--copper);
	letter-spacing: 0.1em; min-width: 36px;
}
.idx-name {
	font-family: var(--serif); font-size: 1.22rem;
	font-weight: 700; flex: 1;
}
.idx-count {
	font-family: var(--mono); font-size: 0.72rem;
	color: var(--muted); letter-spacing: 0.08em;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 920px) {
	.essays { grid-template-columns: 1fr; gap: 3em; }
	.essay.featured .essay-title { font-size: 2rem; }
	.dispatch-item { grid-template-columns: 56px 1fr; grid-template-areas: "thumb title" "thumb meta"; gap: 0.4em 1.4em; align-items: start; }
	.dispatch-thumb { grid-area: thumb; align-self: start; }
	.dispatch-title { grid-area: title; }
	.dispatch-num, .dispatch-date { grid-area: meta; display: inline; font-size: 0.66rem; padding-top: 0.4em; }
	.dispatch-num::after { content: " · "; color: rgba(255, 255, 255, 0.3); }
}
@media (max-width: 720px) {
	.section { padding: 2.8em 0; }
	.section-head { gap: 1em; }
	.section-title { font-size: 1.7rem; }
	.poems { grid-template-columns: 1fr; }
	.poem { border-left: 0 !important; }
	.idx { grid-template-columns: 1fr; }
	.idx-item { border-left: 0 !important; }
	.dispatch { padding: 2.5em 1.5em; }
}

/* ============================================================
   ARTICLE (single post)
   ============================================================ */

.article-header { max-width: 760px; margin: 0 auto; padding: 4em 0 2.5em; text-align: center; }
.article-rail {
	display: flex; justify-content: center; gap: 1.4em; flex-wrap: wrap;
	font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
	letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.4em;
}
.article-rail .dot {
	width: 4px; height: 4px; background: var(--copper);
	border-radius: 50%; display: inline-block; align-self: center;
}
.article-rail a, .article-rail .article-cat { color: var(--copper); }
.article-rail a:hover { color: var(--copper-d); }
.article-title {
	font-family: var(--serif);
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 700; line-height: 1.25; color: var(--ink);
	margin: 0 0 0.8em; letter-spacing: -0.005em;
}
.article-byline {
	display: inline-flex; align-items: center; gap: 0.8em;
	margin-top: 0.5em; font-family: var(--sans); font-size: 0.95rem; color: var(--muted);
}
.article-byline-portrait {
	width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
	border: 2px solid var(--copper); display: inline-block;
	background: var(--bg-deep);
}
.article-byline-portrait img { width: 100%; height: 100%; object-fit: cover; }
.article-byline-name { color: var(--ink); font-weight: 600; }
.article-byline-role { color: var(--muted); font-size: 0.85rem; }

.article-hero {
	max-width: var(--col-hero); margin: 2em auto 3em;
	border-radius: 6px; overflow: hidden;
	border: 1px solid var(--hair); background: var(--bg-deep);
}
.article-hero img { width: 100%; height: auto; display: block; }
.article-hero-caption {
	max-width: var(--col-hero); margin: -2em auto 3em;
	font-family: var(--mono); font-size: 0.72rem;
	color: var(--muted); letter-spacing: 0.05em;
	padding: 0 2em; text-align: center;
}

.article-body {
	max-width: var(--col-essay); margin: 0 auto; padding: 0 0 3em;
	font-size: 1.08rem; line-height: 1.95; color: var(--ink-soft);
}
.article-body p { margin: 0 0 1.4em; }
.article-body > p:first-of-type::first-letter {
	font-family: var(--serif);
	float: right; font-size: 4.2em; line-height: 0.92;
	margin: 0.05em 0 0 0.18em;
	color: var(--copper); font-weight: 700; padding-left: 0.05em;
}
.article-body h2, .article-body h3, .article-body h4 {
	font-family: var(--serif); color: var(--ink); font-weight: 700;
	margin: 2em 0 0.6em; line-height: 1.35;
}
.article-body h2 { font-size: 1.7rem; }
.article-body h3 { font-size: 1.32rem; }
.article-body h4 { font-size: 1.1rem; }
.article-body h2::before {
	content: ""; display: block; width: 36px; height: 2px;
	background: var(--copper); margin-bottom: 0.6em;
}
.article-body a { color: var(--copper); border-bottom: 1px solid var(--copper); padding-bottom: 1px; }
.article-body a:hover { background: rgba(184, 134, 92, 0.08); }
.article-body blockquote {
	font-family: var(--serif); font-size: 1.32rem; line-height: 1.95;
	margin: 2em 0; padding: 1.5em 1.8em;
	background: var(--paper);
	border-right: 3px solid var(--copper); border-left: 0;
	color: var(--ink); border-radius: 0 4px 4px 0; position: relative;
}
.article-body blockquote::before {
	content: "\201D";
	position: absolute; top: -0.05em; right: 0.4em;
	font-family: var(--serif); font-size: 4em; color: var(--copper);
	opacity: 0.25; line-height: 1;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body ul, .article-body ol { padding-right: 1.5em; margin: 0 0 1.4em; }
.article-body ul li, .article-body ol li { margin-bottom: 0.6em; }
.article-body ul li::marker { color: var(--copper); }
.article-body figure { display: block; margin: 2em auto; }
.article-body figcaption {
	font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
	letter-spacing: 0.05em; padding: 0.8em 0; text-align: center;
}
.article-body hr {
	max-width: 80px; margin: 3em auto; border: 0;
	height: 1px; background: var(--copper); opacity: 0.5;
}
.article-body code {
	font-family: var(--mono); font-size: 0.88em;
	background: var(--bg-deep); padding: 0.15em 0.4em; border-radius: 3px;
}
.article-body pre {
	font-family: var(--mono); background: var(--ink); color: var(--bg);
	padding: 1.4em 1.6em; border-radius: 6px; overflow-x: auto;
	font-size: 0.88em; line-height: 1.6; margin: 2em 0;
}
.article-body pre code { background: transparent; padding: 0; color: inherit; }
.article-body img { border-radius: 4px; margin: 2em auto; }
.article-body iframe { max-width: 100%; }

/* Poem variant — minimal, centered, Amiri throughout */
.is-poem .article-header { padding: 5em 0 2em; }
.is-poem .article-title { font-size: clamp(2.6rem, 6.5vw, 4.4rem); line-height: 1.3; }
.is-poem .article-body {
	max-width: var(--col-poem); text-align: center;
	font-family: var(--serif); font-size: 1.35rem;
	line-height: 2.3; color: var(--ink);
}
.is-poem .article-body p { margin-bottom: 1.6em; }
.is-poem .article-body > p:first-of-type::first-letter {
	float: none; font-size: inherit; color: inherit;
	margin: 0; line-height: inherit; font-family: inherit;
}
.is-poem .article-body blockquote {
	background: transparent; border: 0; padding: 0;
	font-size: 1.25rem; font-style: italic;
}
.is-poem .article-body blockquote::before { display: none; }
.is-poem .article-body h2, .is-poem .article-body h3 { text-align: center; font-size: 1.5rem; }
.is-poem .article-body h2::before { margin: 0 auto 0.6em; }
.is-poem .article-hero {
	max-width: 480px; margin: 2em auto 3em;
	border-radius: 50%; aspect-ratio: 1;
}
.is-poem .article-hero img { height: 100%; object-fit: cover; }

/* Tags + share */
.article-meta-bar {
	max-width: var(--col-essay); margin: 1em auto 3em;
	padding: 2em 0 0; border-top: 1px solid var(--hair);
	display: flex; gap: 2em; flex-wrap: wrap; align-items: flex-start;
}
.is-poem .article-meta-bar { justify-content: center; text-align: center; }
.article-tags-block { flex: 1; min-width: 260px; }
.article-tags-label, .article-share-label {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.2em; text-transform: uppercase;
	margin-bottom: 0.8em; display: block;
}
.article-tag {
	display: inline-block; padding: 0.35em 0.95em;
	margin: 0 0 0.4em 0.4em;
	background: var(--paper); color: var(--ink);
	border: 1px solid var(--hair); border-radius: 999px;
	font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
	transition: all .15s ease;
}
.article-tag:hover { background: var(--copper); color: #FFF; border-color: var(--copper); }
.article-share { display: flex; gap: 0.9em; align-items: center; flex-wrap: wrap; }
.article-share a, .article-share button {
	display: inline-flex; align-items: center; gap: 0.45em;
	padding: 0.5em 1em; border: 1px solid var(--hair);
	background: var(--paper); color: var(--ink);
	border-radius: 3px; font-family: var(--sans);
	font-size: 0.85rem; cursor: pointer; transition: all .15s ease;
	font-weight: 500;
}
.article-share a:hover, .article-share button:hover {
	background: var(--copper); color: #FFF; border-color: var(--copper);
}

/* Author bio card */
.author-card {
	max-width: var(--col-essay); margin: 0 auto 3em;
	display: grid; grid-template-columns: 96px 1fr; gap: 1.6em;
	padding: 2em; background: var(--paper);
	border: 1px solid var(--hair); border-radius: 6px; align-items: center;
}
.author-card-portrait {
	width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
	border: 2px solid var(--copper); background: var(--bg-deep);
	box-shadow: 0 0 0 5px var(--bg), 0 6px 16px rgba(0, 0, 0, 0.08);
}
.author-card-portrait img { width: 100%; height: 100%; object-fit: cover; }
.author-card-label {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.4em;
}
.author-card-name {
	font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
	color: var(--ink); margin: 0 0 0.3em;
}
.author-card-role { color: var(--copper); font-size: 0.95rem; margin-bottom: 0.5em; }
.author-card-bio { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }
@media (max-width: 540px) {
	.author-card { grid-template-columns: 1fr; text-align: center; }
	.author-card-portrait { margin: 0 auto; }
}

/* Related posts */
.related-section {
	max-width: 1100px; margin: 4em auto 3em;
	border-top: 1px solid var(--hair); padding-top: 3em;
}
.related-head {
	display: flex; align-items: baseline; gap: 1.4em;
	margin-bottom: 2em; flex-wrap: wrap;
}
.related-num {
	font-family: var(--mono); font-size: 0.8rem; color: var(--copper);
	letter-spacing: 0.18em; padding: 0.4em 0.8em;
	border: 1px solid var(--copper); border-radius: 2px;
}
.related-title {
	font-family: var(--serif); font-size: 1.7rem; font-weight: 700;
	color: var(--ink); margin: 0; line-height: 1.2;
}
.related-kicker {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.22em; text-transform: uppercase;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2em; }
.related-card { display: flex; flex-direction: column; }
.related-card-thumb {
	display: block; aspect-ratio: 16/10; background: var(--bg-deep);
	border-radius: 4px; overflow: hidden;
	border: 1px solid var(--hair); margin-bottom: 1em; position: relative;
}
.related-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.related-card-thumb:hover img { transform: scale(1.03); }
.related-card-thumb-fallback {
	position: absolute; inset: 0; display: flex;
	align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--bg-deep) 0%, var(--paper) 70%);
	font-family: var(--serif); font-size: 3rem; color: var(--copper);
	opacity: 0.45; font-weight: 700;
}
.related-card-meta {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.5em;
}
.related-card-cat { color: var(--copper); }
.related-card-title {
	font-family: var(--serif); font-size: 1.2rem;
	font-weight: 700; line-height: 1.45; margin: 0;
}
.related-card-title a { color: var(--ink); }
.related-card-title a:hover { color: var(--copper); }
@media (max-width: 860px) { .related-grid { grid-template-columns: 1fr; } }

/* Post navigation */
.post-nav {
	max-width: 1100px; margin: 0 auto 4em; padding: 2em 0;
	border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
	display: grid; grid-template-columns: 1fr 1fr; gap: 2em;
}
.post-nav a {
	display: block; padding: 0.5em 0; color: var(--ink);
	transition: color .15s ease;
}
.post-nav .nav-label {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.2em; text-transform: uppercase;
	margin-bottom: 0.4em; display: block;
}
.post-nav .nav-title {
	font-family: var(--serif); font-size: 1.08rem;
	font-weight: 700; line-height: 1.45;
}
.post-nav .nav-prev { text-align: right; padding-left: 1.5em; }
.post-nav .nav-next { text-align: left; padding-right: 1.5em; border-right: 1px solid var(--hair); }
.post-nav a:hover .nav-title { color: var(--copper); }
@media (max-width: 720px) {
	.post-nav { grid-template-columns: 1fr; gap: 1em; }
	.post-nav .nav-next { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--hair); padding-bottom: 1em; }
	.post-nav .nav-prev { padding-left: 0; padding-top: 1em; }
}

/* ============================================================
   ARCHIVE / SEARCH / GENERIC PAGE
   ============================================================ */

.page-header-strip {
	max-width: var(--col-essay); margin: 4em auto 0; text-align: center;
}
.page-header-strip .kicker {
	font-family: var(--mono); font-size: 0.72rem; color: var(--copper);
	letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.7em;
}
.page-header-strip h1 {
	font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; color: var(--ink);
}
.page-header-strip .lead {
	color: var(--muted); font-size: 1.02rem; line-height: 1.85;
	max-width: 540px; margin: 0 auto;
}
.page-header-strip .sep {
	display: block; width: 60px; height: 1px;
	background: var(--copper); margin: 1.4em auto;
}

/* Archive grid (category, tag, date, author) */
.archive-grid {
	max-width: var(--wrap-max); margin: 3em auto;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5em;
}
@media (max-width: 920px) { .archive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .archive-grid { grid-template-columns: 1fr; } }

.archive-card { display: flex; flex-direction: column; }
.archive-thumb {
	display: block; aspect-ratio: 16/10; background: var(--bg-deep);
	border-radius: 4px; overflow: hidden;
	border: 1px solid var(--hair); margin-bottom: 1em; position: relative;
}
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.archive-thumb:hover img { transform: scale(1.03); }
.archive-thumb-fallback {
	position: absolute; inset: 0; display: flex;
	align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--bg-deep) 0%, var(--paper) 70%);
	font-family: var(--serif); font-size: 3.5rem; color: var(--copper);
	opacity: 0.42; font-weight: 700;
}
.archive-meta {
	font-family: var(--mono); font-size: 0.7rem; color: var(--muted);
	letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 0.5em;
}
.archive-meta .cat { color: var(--copper); }
.archive-title {
	font-family: var(--serif); font-size: 1.3rem;
	font-weight: 700; line-height: 1.45; margin: 0 0 0.5em;
}
.archive-title a { color: var(--ink); }
.archive-title a:hover { color: var(--copper); }
.archive-excerpt { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* Pagination */
.pagination {
	max-width: var(--wrap-max); margin: 2em auto 4em;
	display: flex; justify-content: center; gap: 0.3em;
	font-family: var(--mono); font-size: 0.85rem;
}
.pagination a, .pagination .current {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 0.8em;
	border: 1px solid var(--hair); background: var(--paper);
	color: var(--ink); border-radius: 3px; text-decoration: none;
	transition: all .15s ease;
}
.pagination a:hover, .pagination .current {
	background: var(--copper); color: #FFF; border-color: var(--copper);
}

/* Page content (generic WP page) */
.page-content {
	max-width: var(--col-essay); margin: 0 auto; padding: 0 0 4em;
}
.page-content > * { font-family: var(--sans); }
.page-content h2, .page-content h3 { font-family: var(--serif); color: var(--ink); }
.page-content h2 { font-size: 1.7rem; margin: 2em 0 0.6em; }
.page-content h3 { font-size: 1.32rem; margin: 1.6em 0 0.5em; }
.page-content p { line-height: 1.9; margin: 0 0 1.4em; }
.page-content a { color: var(--copper); border-bottom: 1px solid var(--copper); }
.page-content a:hover { background: rgba(184, 134, 92, 0.08); }
.page-content blockquote {
	font-family: var(--serif); font-size: 1.25rem;
	border-right: 3px solid var(--copper); padding: 1em 1.5em;
	margin: 1.5em 0; background: var(--paper); border-radius: 0 4px 4px 0;
}

/* Search form */
.search-form {
	max-width: 540px; margin: 2em auto;
	display: flex; gap: 0; border: 1px solid var(--hair);
	border-radius: 4px; overflow: hidden;
	background: var(--paper);
}
.search-form label { flex: 1; display: block; }
.search-form .search-field {
	width: 100%; padding: 0.9em 1.2em;
	background: transparent; border: 0;
	font-family: var(--sans); font-size: 1rem; color: var(--ink);
}
.search-form .search-field:focus { outline: 0; }
.search-form .search-submit {
	padding: 0.9em 1.6em; background: var(--copper);
	color: #FFF; border: 0; cursor: pointer;
	font-family: var(--sans); font-weight: 500; font-size: 0.95rem;
}
.search-form .search-submit:hover { background: var(--copper-d); }

/* 404 page — distinctive */
.error-404 {
	max-width: 720px; margin: 5em auto 4em; text-align: center;
}
.error-404 .glyph {
	font-family: var(--serif); font-size: 9rem;
	color: var(--copper); line-height: 1; margin-bottom: 0;
	opacity: 0.85; font-weight: 700;
}
.error-404 h1 {
	font-family: var(--serif); font-size: 2.4rem;
	color: var(--ink); margin: 0.5em 0 0.4em; line-height: 1.3;
}
.error-404 .lead { color: var(--muted); font-size: 1.05rem; line-height: 1.9; margin-bottom: 2em; }
.error-404 .actions { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; }
.error-404 .actions a {
	padding: 0.8em 1.6em; border: 1px solid var(--copper);
	color: var(--copper); border-radius: 4px; font-family: var(--sans);
	font-weight: 500; transition: all .15s ease;
}
.error-404 .actions a:hover { background: var(--copper); color: #FFF; }
.error-404 .actions a.primary { background: var(--copper); color: #FFF; }
.error-404 .actions a.primary:hover { background: var(--copper-d); border-color: var(--copper-d); }

/* ============================================================
   COMMENTS
   ============================================================ */

.article-comments {
	max-width: var(--col-essay); margin: 0 auto 4em;
}
.article-comments .comments-title, .article-comments h2 {
	font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
	margin: 0 0 1.5em; color: var(--ink);
}
.article-comments .comments-title::before {
	content: ""; display: inline-block; width: 24px; height: 2px;
	background: var(--copper); margin-left: 0.6em; vertical-align: middle;
}
.article-comments .comment-list { list-style: none; padding: 0; margin: 0; }
.article-comments .comment-list .children { list-style: none; padding-right: 1.5em; }
.article-comments .comment {
	background: var(--paper); border: 1px solid var(--hair);
	border-radius: 4px; padding: 1.4em 1.6em; margin-bottom: 1em;
}
.article-comments .comment-author { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.article-comments .comment-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.2em; }
.article-comments .comment-body p { margin: 0.8em 0 0; line-height: 1.7; }
.article-comments .reply { margin-top: 0.7em; }
.article-comments .reply a {
	font-family: var(--mono); font-size: 0.72rem;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper);
}
.article-comments .comment-form input[type="text"],
.article-comments .comment-form input[type="email"],
.article-comments .comment-form input[type="url"],
.article-comments .comment-form textarea {
	width: 100%; padding: 0.7em 0.9em; border: 1px solid var(--hair);
	background: var(--paper); border-radius: 3px;
	font-family: var(--sans); font-size: 1rem; color: var(--ink); margin-bottom: 0.8em;
}
.article-comments .comment-form input:focus,
.article-comments .comment-form textarea:focus {
	outline: 2px solid var(--copper); outline-offset: 2px; border-color: var(--copper);
}
.article-comments .comment-form input[type="submit"] {
	background: var(--copper); color: #FFF; border: 1px solid var(--copper);
	padding: 0.7em 1.6em; border-radius: 4px; font-family: var(--sans);
	font-weight: 500; cursor: pointer;
}
.article-comments .comment-form input[type="submit"]:hover {
	background: var(--copper-d); border-color: var(--copper-d);
}

/* ============================================================
   COLOPHON (footer)
   ============================================================ */

.colophon {
	padding: 4.5em 0 3.5em; border-top: 1px solid var(--hair);
	text-align: center; font-family: var(--mono); font-size: 0.72rem;
	letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
	background: var(--bg);
}
.colophon .flourish {
	font-family: var(--serif); font-size: 2rem; color: var(--copper);
	margin-bottom: 1.5em; letter-spacing: 0; text-transform: none; line-height: 1;
}
.colophon-statement {
	font-family: var(--sans); font-size: 0.92rem; color: var(--muted);
	letter-spacing: 0.04em; text-transform: none; margin-bottom: 1.6em;
}
.colophon-meta { display: flex; justify-content: center; gap: 2em; flex-wrap: wrap; }
.colophon-meta a { color: var(--copper); }

/* ============================================================
   Animations
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
	.masthead-name h1, .masthead-name .role, .masthead-name .sep, .masthead-name .desc,
	.section, .colophon,
	.article-rail, .article-title, .article-byline, .article-hero, .article-body,
	.article-meta-bar, .author-card, .related-section, .post-nav,
	.archive-grid, .page-header-strip, .error-404, .pagination {
		opacity: 0; transform: translateY(8px);
		animation: oa-rise .65s var(--ease) forwards;
	}
	.masthead-name h1 { animation-delay: 0.08s; }
	.masthead-name .role { animation-delay: 0.22s; }
	.masthead-name .sep { animation-delay: 0.34s; }
	.masthead-name .desc { animation-delay: 0.42s; }
	.section { animation-delay: calc(0.55s + var(--s, 0) * 0.10s); }
	.colophon { animation-delay: 1.1s; }
	.article-rail   { animation-delay: 0.05s; }
	.article-title  { animation-delay: 0.15s; }
	.article-byline { animation-delay: 0.25s; }
	.article-hero   { animation-delay: 0.35s; }
	.article-body   { animation-delay: 0.42s; }
	.article-meta-bar { animation-delay: 0.55s; }
	.author-card { animation-delay: 0.65s; }
	.related-section { animation-delay: 0.75s; }
	.post-nav { animation-delay: 0.85s; }
	.page-header-strip { animation-delay: 0.1s; }
	.archive-grid { animation-delay: 0.25s; }
	.error-404 { animation-delay: 0.1s; }
	.pagination { animation-delay: 0.5s; }
}
@keyframes oa-rise { to { opacity: 1; transform: none; } }

/* ============================================================
   Print styles — clean, ink-only, no chrome
   ============================================================ */

@media print {
	body { background: white; color: black; font-family: Georgia, "Times New Roman", serif; }
	body::before, .site-nav, .reading-progress, .article-meta-bar,
	.author-card, .related-section, .post-nav, .article-comments,
	.colophon, .editor-medallion, .editor-medallion-caption, .menu-toggle,
	.masthead-foot { display: none !important; }
	.wrap { max-width: none; padding: 0; }
	.article-body { max-width: none; font-size: 12pt; line-height: 1.7; }
	.article-body > p:first-of-type::first-letter { float: none; font-size: inherit; color: inherit; margin: 0; }
	.article-hero { max-width: none; margin: 1em 0; }
	.article-title { font-size: 24pt; }
	a { color: black; text-decoration: underline; }
}
