/* ==========================================================================
   Meghna — base stylesheet
   Loaded on every page. Kept small on purpose: this is the entire CSS budget
   for blog and archive templates.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
	--ink: #0e1222;
	--ink-2: #161c31;
	--paper: #ffffff;
	--paper-2: #f7f8fc;
	--text: #171b2c;
	--muted: #5c6379;
	--line: #e7e9f2;

	--brand: #ef5a24;
	--brand-deep: #c1400f;
	--gold: #ffc24a;
	--magenta: #ff3d81;

	--wrap: 1120px;
	--wrap-narrow: 720px;
	--gap: clamp(1.25rem, 3vw, 2rem);

	--r-sm: 8px;
	--r-md: 14px;
	--r-lg: 22px;
	--r-full: 999px;

	--shadow-sm: 0 1px 2px rgba(14, 18, 34, .05), 0 2px 8px rgba(14, 18, 34, .04);
	--shadow-md: 0 4px 12px rgba(14, 18, 34, .06), 0 18px 40px rgba(14, 18, 34, .07);

	--font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-read: "Iowan Old Style", "Charter", Georgia, Cambria, "Times New Roman", serif;

	--ease: cubic-bezier(.22, .68, .3, 1);
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	line-height: 1.16;
	letter-spacing: -.02em;
	font-weight: 700;
}

p, ul, ol, figure, blockquote, pre, table { margin: 0 0 1.2em; }

a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--brand); }

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

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

/* --- Layout ------------------------------------------------------------- */
.wrap {
	width: min(100% - 2.5rem, var(--wrap));
	margin-inline: auto;
}
.wrap--narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); }

.site-main { display: block; min-height: 50vh; }

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

.skip-link {
	position: absolute;
	top: -100px; left: 1rem;
	z-index: 100;
	padding: .7rem 1.1rem;
	background: var(--ink);
	color: #fff;
	border-radius: var(--r-sm);
	text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --- Header ------------------------------------------------------------- */
.site-head {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--line);
}
.site-head__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 68px;
}

.brand__link {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
	color: var(--text);
}
.brand__mark {
	width: 30px; height: 30px;
	border-radius: 50%;
	flex: none;
	background: radial-gradient(circle at 34% 30%, var(--gold), var(--brand) 46%, var(--magenta) 92%);
	box-shadow: 0 0 0 3px rgba(239, 90, 36, .13), 0 0 16px rgba(239, 90, 36, .45);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 700; letter-spacing: -.02em; }
.brand__role { font-size: .74rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.custom-logo-link img { max-height: 44px; width: auto; }

/* --- Nav ---------------------------------------------------------------- */
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav__list {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	list-style: none;
	margin: 0; padding: 0;
}
.nav__list a {
	color: var(--text);
	text-decoration: none;
	font-size: .94rem;
	font-weight: 500;
	position: relative;
	padding-block: .35rem;
}
.nav__list a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--brand), var(--magenta));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .28s var(--ease);
}
.nav__list a:hover::after,
.nav__list .current-menu-item > a::after,
.nav__list .current_page_item > a::after { transform: scaleX(1); }
.nav__list .sub-menu { display: none; }

.nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.nav {
		position: fixed;
		inset: 68px 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: .25rem;
		padding: 1rem 1.25rem 1.5rem;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-md);
		transform: translateY(-12px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
	}
	.nav.is-open { transform: none; opacity: 1; visibility: visible; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__list li { border-bottom: 1px solid var(--line); }
	.nav__list a { display: block; padding: .85rem .2rem; font-size: 1.02rem; }
	.nav__list a::after { display: none; }
	.nav__cta { margin-top: 1rem; justify-content: center; }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1.35rem;
	border: 1px solid transparent;
	border-radius: var(--r-full);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.btn--sm { padding: .58rem 1rem; font-size: .86rem; }

.btn--primary {
	background: linear-gradient(135deg, var(--brand), #ff8a3d 55%, var(--magenta));
	color: #fff;
	box-shadow: 0 6px 18px rgba(239, 90, 36, .3);
}
.btn--primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(239, 90, 36, .38);
}
.btn--primary .icon { transition: transform .25s var(--ease); }
.btn--primary:hover .icon { transform: translateX(3px); }

.btn--ghost {
	background: transparent;
	border-color: var(--line);
	color: var(--text);
}
.btn--ghost:hover {
	color: var(--text);
	border-color: var(--brand);
	background: rgba(239, 90, 36, .06);
	transform: translateY(-2px);
}

.nav__cta { background: var(--ink); color: #fff; }
.nav__cta:hover { color: #fff; background: var(--brand-deep); transform: translateY(-1px); }

/* --- Page headers ------------------------------------------------------- */
.page-head {
	padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
	max-width: 44rem;
}
.page-head__title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .35em; }
.page-head__lede { color: var(--muted); font-size: 1.08rem; margin: 0; }
.page-head__lede p:last-child { margin-bottom: 0; }
.page-head__search { margin-top: 1.5rem; }

.eyebrow {
	display: inline-block;
	margin: 0 0 .9rem;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--brand-deep);
}

/* --- Post lists --------------------------------------------------------- */
.posts { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
.posts--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.posts--list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); padding-bottom: 1rem; }

.pcard {
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.pcard:hover {
	transform: translateY(-4px);
	border-color: rgba(239, 90, 36, .35);
	box-shadow: var(--shadow-md);
}
.pcard__media { display: block; aspect-ratio: 3 / 2; background: var(--paper-2); overflow: hidden; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.04); }

.pcard__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.pcard__title { font-size: 1.2rem; margin: 0; letter-spacing: -.015em; }
.pcard__title a { color: var(--text); text-decoration: none; }
.pcard__title a:hover { color: var(--brand-deep); }
.pcard__excerpt { margin: 0; color: var(--muted); font-size: .95rem; }

.entry__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .45rem;
	font-size: .8rem;
	color: var(--muted);
	letter-spacing: .01em;
}
.entry__sep { opacity: .5; }
.entry__cat { color: var(--brand-deep); text-decoration: none; font-weight: 600; }
.entry__cat:hover { text-decoration: underline; }

/* --- Single entry ------------------------------------------------------- */
.entry { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.entry__head { padding: clamp(2.25rem, 5vw, 3.75rem) 0 1.5rem; }
.entry__title { font-size: clamp(2rem, 4.6vw, 3.05rem); margin-bottom: .45em; }

.crumbs {
	display: flex;
	gap: .45rem;
	font-size: .82rem;
	color: var(--muted);
	margin-bottom: 1.1rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-deep); }

.entry__media { margin: 0 auto 2.5rem; }
/* Capped so a tall or portrait-shaped featured image can't push the article
   text off the first screen. */
.entry__media img {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: var(--r-lg);
}
.entry__media figcaption { margin-top: .6rem; font-size: .84rem; color: var(--muted); text-align: center; }

.entry__content {
	font-family: var(--font-read);
	font-size: 1.115rem;
	line-height: 1.75;
	color: #23283c;
}
.entry__content h2 {
	font-family: var(--font-ui);
	font-size: 1.6rem;
	margin-top: 2.2em;
	margin-bottom: .55em;
	scroll-margin-top: 90px;
}
.entry__content h3 {
	font-family: var(--font-ui);
	font-size: 1.25rem;
	margin-top: 1.9em;
	margin-bottom: .5em;
	scroll-margin-top: 90px;
}
.entry__content ul, .entry__content ol { padding-left: 1.3em; }
.entry__content li { margin-bottom: .45em; }
.entry__content img { border-radius: var(--r-md); margin-inline: auto; }
.entry__content figure.aligncenter { text-align: center; }
.entry__content .is-style-rounded img { border-radius: 50%; }
.entry__content .wp-block-image { margin-bottom: 1.8em; }
.entry__content .wp-block-image figcaption { font-size: .86rem; color: var(--muted); text-align: center; }
.entry__content blockquote {
	margin: 2em 0;
	padding: .2em 0 .2em 1.4em;
	border-left: 3px solid var(--brand);
	font-size: 1.18rem;
	font-style: italic;
	color: var(--ink-2);
}
.entry__content blockquote p:last-child { margin-bottom: 0; }
.entry__content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88em;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: 5px;
	padding: .12em .38em;
}
.entry__content pre {
	background: var(--ink);
	color: #e8ebf5;
	padding: 1.1rem 1.25rem;
	border-radius: var(--r-md);
	overflow-x: auto;
	font-size: .9rem;
	line-height: 1.6;
}
.entry__content pre code { background: none; border: 0; padding: 0; color: inherit; }
.entry__content table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: .95rem; }
.entry__content th, .entry__content td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry__content th { background: var(--paper-2); font-weight: 600; }
.entry__content .alignwide { width: min(100vw - 2.5rem, 1000px); margin-inline: calc(50% - min(50vw - 1.25rem, 500px)); }
.entry__content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.entry__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }
.entry__tags a {
	display: inline-block;
	padding: .32rem .8rem;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--r-full);
	font-size: .82rem;
	color: var(--muted);
	text-decoration: none;
}
.entry__tags a:hover { border-color: var(--brand); color: var(--brand-deep); }

.entry__foot { margin-top: 3rem; }
.byline {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1.5rem;
	background: var(--paper-2);
	border-radius: var(--r-lg);
	border: 1px solid var(--line);
}
.byline__avatar { border-radius: 50%; flex: none; }
.byline__name { margin: 0 0 .2rem; font-weight: 700; }
.byline__bio { margin: 0; font-size: .92rem; color: var(--muted); }

.post-nav { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.post-nav__link {
	display: block;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	text-decoration: none;
	transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.post-nav__link:hover { border-color: var(--brand); transform: translateY(-2px); }
.post-nav__link--next { text-align: right; }
.post-nav__label { display: block; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.post-nav__title { display: block; font-weight: 600; color: var(--text); line-height: 1.4; }

/* --- Pagination --------------------------------------------------------- */
.pagination { margin: 3rem 0 1rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px; height: 42px;
	padding: 0 .8rem;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	text-decoration: none;
	color: var(--text);
	font-size: .92rem;
	font-weight: 500;
}
.page-numbers:hover { border-color: var(--brand); color: var(--brand-deep); }
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-numbers.dots { border-color: transparent; }

/* --- Search form -------------------------------------------------------- */
.searchform {
	display: flex;
	gap: .5rem;
	max-width: 26rem;
}
.searchform__input {
	flex: 1;
	padding: .72rem 1rem;
	border: 1px solid var(--line);
	border-radius: var(--r-full);
	background: var(--paper-2);
	outline-offset: 2px;
}
.searchform__input:focus { background: var(--paper); border-color: var(--brand); }
.searchform__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	flex: none;
	border: 0;
	border-radius: 50%;
	background: var(--ink);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s var(--ease);
}
.searchform__submit:hover { background: var(--brand-deep); }

/* --- Comments ----------------------------------------------------------- */
.comments { margin: 3.5rem 0; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.comments__title { font-size: 1.35rem; }
.comments__list, .comments__list .children { list-style: none; margin: 0; padding: 0; }
.comments__list .children { padding-left: clamp(1rem, 4vw, 2.5rem); }
.comments__list li { margin-bottom: 1.5rem; }
.comments__list .comment-body { padding: 1.2rem 1.35rem; border: 1px solid var(--line); border-radius: var(--r-md); }
.comments__list .comment-meta { display: flex; align-items: center; gap: .6rem; font-size: .84rem; margin-bottom: .6rem; }
.comments__list .avatar { border-radius: 50%; }
.comments__list .comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-form { display: grid; gap: .9rem; margin-top: 2rem; }
.comment-form label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .3rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: .7rem .9rem;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--paper-2);
}
.comment-form textarea { min-height: 9rem; resize: vertical; }
.comment-form .form-submit { margin: 0; }

/* --- Empty states ------------------------------------------------------- */
.noresults { padding: 2rem 0 4rem; }
.noresults__title { font-size: 1.4rem; }
.noresults__body { color: var(--muted); }
.notfound { padding: clamp(3rem, 8vw, 6rem) 0; }
.notfound__back { margin-top: 1.75rem; }

/* --- Footer ------------------------------------------------------------- */
.site-foot {
	margin-top: clamp(3rem, 8vw, 6rem);
	padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
	background: var(--ink);
	color: #b9c0d4;
}
.site-foot a { color: #e6e9f4; }
.site-foot__top {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.site-foot__name { margin: 0; font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.site-foot__role { margin: .15rem 0 0; font-size: .9rem; }
.site-foot__social { display: flex; gap: .6rem; }
.site-foot__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px; height: 42px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 50%;
	transition: background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.site-foot__social a:hover {
	background: rgba(239, 90, 36, .18);
	border-color: var(--brand);
	transform: translateY(-2px);
}
.site-foot__widgets { padding: 2rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.widget__title { font-size: .95rem; color: #fff; }
.site-foot__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	padding-top: 1.75rem;
	font-size: .86rem;
}
.site-foot__copy { margin: 0; }
.site-foot__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }
.site-foot__nav a { text-decoration: none; }
.site-foot__nav a:hover { color: var(--gold); }

/* --- Scroll reveal ------------------------------------------------------ */
/* Gated on .js so content is never hidden when scripts fail to run. */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js [data-reveal] { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}
