/**
 * Single post / insight layout.
 *

/* -------------------------------------------------------------------------- */
/*  Hero - single-post variant                                                */
/* -------------------------------------------------------------------------- */

.page-hero--post h1 {
	font-size: var(--wp--preset--font-size--gargantuan);
	line-height: var(--wp--custom--line-height--tiny);
	max-width: 30ch;
}

.page-hero--post .post-hero-nav {
	margin-bottom: var(--wp--preset--spacing--medium);
}

.page-hero--post .post-hero-nav .back {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: var(--wp--preset--font-size--min);
	font-weight: 500;
	padding: 6px 10px 6px 5px;
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--ink);
	text-decoration: none;
	border-radius: var(--wp--custom--border--radius--medium);
	transition: all 0.25s ease;
}

.page-hero--post .post-hero-nav .back:hover {
	background: var(--wp--preset--color--ink);
	color: white;
}

.page-hero--post .post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: var(--wp--preset--font-size--tiny);
	color: var(--wp--preset--color--ink);
	margin-top: var(--wp--preset--spacing--medium);
	margin-bottom: var(--wp--preset--spacing--medium);
}

.page-hero--post .post-meta-author {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--i-ink);
	font-weight: 500;
}

.page-hero--post .post-meta-author a {
	color: inherit;
	text-decoration: none;
}

.page-hero--post .post-meta-author a:hover {
	color: var(--i-pink);
}

.page-hero--post .post-meta-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.page-hero--post .post-meta-sep {
	color: var(--i-line);
}

/* Share row */

.btn-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 16px;
	border: 1.5px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--border--radius--pill);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-pill:hover,
.btn-pill:focus-visible {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	transform: translateY(-1px);
}

.btn-pill svg {
	flex: 0 0 auto;
}

.page-hero--post .post-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--tiny);
}

/* Icon-only share pills (no visible label) collapse to a 40px circle. */
.page-hero--post .post-share-btn:not(:has(.post-share-label)) {
	width: 40px;
	height: 40px;
	padding: 0;
}

.page-hero--post .post-share-btn.is-copied {
	border-color: var(--wp--preset--color--quinary);
	color: var(--wp--preset--color--quinary);
}

/* -------------------------------------------------------------------------- */
/*  Featured image                                                            */
/* -------------------------------------------------------------------------- */

.single-post .post-featured {
}

.single-post .post-featured .wrap {
	max-width: var(--wp--custom--layout--wide);
	margin-top: calc(var(--wp--preset--spacing--x-large) * -1);
}

.single-post .post-featured-figure {
	position: relative;
	aspect-ratio: 21 / 9;
	border-radius: var(--wp--custom--border--radius--medium);
	overflow: hidden;
	margin: 0;
	background: var(--wp--preset--color--grey);
}

.single-post .post-featured-img,
.single-post .post-featured-figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* -------------------------------------------------------------------------- */
/*  Body + sidebar                                                            */
/* -------------------------------------------------------------------------- */

.single-post .post-body {
	padding-block: var(--wp--preset--spacing--x-large);
	background: var(--wp--preset--color--white);
}

.single-post .post-body-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--x-large);
	max-width: var(--wp--custom--layout--small-content);
	margin-inline: auto;
}

.single-post .post-body-grid--has-sidebar {
	grid-template-columns: minmax(0, 1fr) var(--wp--custom--layout--sidebar);
	max-width: var(--wp--custom--layout--content);
}

.single-post .post-body-content {
	min-width: 0;
	font-size: var(--wp--preset--font-size--normal);
	line-height: var(--wp--custom--line-height--loose);
	color: var(--wp--preset--color--ink);
}

.single-post .post-body-content > *:first-child {margin-top:0;}

.single-post .post-body-content a:not(.wp-element-button):not(.wp-block-button a) {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

.single-post a:hover {text-decoration:none;}

.single-post .post-body-content blockquote.wp-block-quote {
	margin-inline: 0;
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
	border-left: 4px solid var(--wp--preset--color--primary);
	background: var(--wp--preset--color--senary-50);
	border-radius: 0 var(--wp--custom--border--radius--small) var(--wp--custom--border--radius--small) 0;
	font-style: italic;
}

.single-post .post-tags {
	margin-top: var(--wp--preset--spacing--large);
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--tiny);
}

.single-post .post-tag {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: var(--wp--custom--border--radius--pill);
	background: var(--wp--preset--color--senary-50);
	color: var(--wp--preset--color--charcoal);
	font-size: var(--wp--preset--font-size--min);
	text-decoration: none;
	transition: all 0.2s ease;
}

.single-post .post-tag:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Sidebar rail */

.single-post .post-sidebar {
	min-width: 0;
}

.single-post .post-sidebar-inner {
	position: sticky;
	top: calc(var(--site-header-h) + var(--wp--preset--spacing--small));
}

.single-post .post-sidebar-inner .block-area > :first-child {
	margin-top: 0;
}

.single-post .post-sidebar-inner .block-area > :last-child {
	margin-bottom: 0;
}

.single-post .post-sidebar-inner .wp-block-latest-posts li {
	position: relative;
	padding: 3px 0 0 23px;
}

.single-post .post-sidebar-inner .wp-block-latest-posts li::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 5px;
	border: 2px solid color-mix(in srgb, var(--wp--preset--color--senary) 25%, transparent);
	width: 22px;
	height: 22px;
	border-radius: 50%;
}

.single-post .post-sidebar-inner .wp-block-latest-posts li::after {
	content: "";
	position: absolute;
	left: -2px;
	top: 13px;
	background: var(--wp--preset--color--senary);
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

/* -------------------------------------------------------------------------- */
/*  Author card                                                               */
/* -------------------------------------------------------------------------- */

.single-post .post-author-card {
	padding-block: 0 var(--wp--preset--spacing--x-large);
	background: var(--wp--preset--color--white);
}

.single-post .post-author-inner {
	position: relative;
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: var(--wp--preset--spacing--medium);
	align-items: center;
	padding: var(--wp--preset--spacing--large);
	border-radius: var(--wp--custom--border--radius--medium);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	overflow: hidden;
	isolation: isolate;
}

.single-post .post-author-inner::before,
.single-post .post-author-inner::after {
	content: "";
	position: absolute;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
	z-index: -1;
}

.single-post .post-author-inner::before {
	top: -160px;
	right: -120px;
	background: var(--wp--preset--color--primary);
	opacity: 0.3;
}

.single-post .post-author-inner::after {
	bottom: -180px;
	left: -100px;
	background: var(--wp--preset--color--quaternary);
	opacity: 0.18;
}

.single-post .post-author-avatar img {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 3px solid var(--wp--custom--color--ink-line);
}

.single-post .post-author-body .eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: var(--wp--preset--font-size--min);
	letter-spacing: 0.25px;
	text-transform: uppercase;
	color: var(--wp--preset--color--quaternary);
	margin-bottom: 12px;
}

/* Radar-ping pulse dot â€” matches .page-hero .eyebrow .bar and the eyebrow block
   (blocks/eyebrow/style.css): a small filled dot plus an expanding, fading ring
   (::after, a scaled clone via background-color:inherit). */
.single-post .post-author-body .eyebrow .bar {
	position: relative;
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--quaternary);
}

.single-post .post-author-body .eyebrow .bar::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 50%;
	background-color: inherit;
	transform-origin: center;
	pointer-events: none;
	animation: eyebrow-sonar 1.8s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.single-post .post-author-body .eyebrow .bar::after {
		animation: none;
		transform: scale(2);
		opacity: 0.18;
	}
}

.single-post .post-author-name {
	font-size: var(--wp--preset--font-size--big);
	margin: 0 0 var(--wp--preset--spacing--tiny);
	color: var(--wp--preset--color--white);
}

.single-post .post-author-bio {
	font-size: var(--wp--preset--font-size--normal);
	line-height: var(--wp--custom--line-height--normal);
	color: var(--wp--custom--color--ink-text-soft);
	margin: 0 0 var(--wp--preset--spacing--small);
	max-width: 60ch;
}

.single-post .post-author-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wp--preset--color--quaternary);
	text-decoration: none;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--tiny);
}

.single-post .post-author-link:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/*  Related posts                                                             */
/* -------------------------------------------------------------------------- */

.single-post .post-related {
	padding-block: var(--wp--preset--spacing--x-large);
	background: var(--wp--preset--color--senary-50);
}

.single-post .post-related-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: var(--wp--preset--font-size--min);
	letter-spacing: 0.25px;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
	margin-bottom: 12px;
}

.single-post .post-related-eyebrow .bar {
	width: 32px;
	height: 3px;
	background: var(--wp--preset--color--primary);
	border-radius: 2px;
}

.single-post .post-related-heading {
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--snug);
	margin: 0 0 var(--wp--preset--spacing--medium);
	color: var(--wp--preset--color--ink);
}

/* Related-posts grid uses the shared .card / .card.type-post anatomy from
   main.css - this file only owns the container layout. */
.single-post .post-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--medium);
}

.single-post .post-related-grid .card-badge {
	position: absolute;
	top: 12px;
	left: 12px;
}

/* -------------------------------------------------------------------------- */
/*  Entry footer (after-post block area)                                      */
/* -------------------------------------------------------------------------- */

.single-post > .entry-footer:empty {
	display: none;
}

.single-post > .entry-footer .block-area-after-post {
	padding-block: var(--wp--preset--spacing--x-large);
}

/* -------------------------------------------------------------------------- */
/*  Responsive                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.single-post .post-body-grid--has-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}

	.single-post .post-sidebar-inner {
		position: static;
	}

	.single-post .post-related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.single-post .post-author-inner {
		grid-template-columns: minmax(0, 1fr);
		text-align: left;
	}

	.single-post .post-author-avatar img {
		width: 96px;
		height: 96px;
	}

	.single-post .post-related-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.page-hero--post h1 {
		max-width: none;
	}
}

/* ---------- Author modal ---------- */

.author-modal {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: grid;
	place-items: center;
	padding: 24px;
}

.author-modal[hidden] {
	display: none;
}

.author-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 11, 34, 0.55);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.author-modal-panel {
	position: relative;
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: var(--wp--preset--spacing--medium);
	align-items: center;
	width: 100%;
	max-width: 680px;
	max-height: calc(100vh - 48px);
	/* y scrolls long bios; x hidden â€” the ::before glow overhangs the right
	 * edge and would otherwise force a horizontal scrollbar. */
	overflow-x: hidden;
	overflow-y: auto;
	padding: var(--wp--preset--spacing--large);
	border-radius: var(--wp--custom--border--radius--medium);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	isolation: isolate;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.author-modal-panel::before {
	content: "";
	position: absolute;
	top: -160px;
	right: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	filter: blur(80px);
	background: var(--wp--preset--color--primary);
	opacity: 0.3;
	pointer-events: none;
	z-index: -1;
}

.author-modal.is-open .author-modal-overlay {
	opacity: 1;
}

.author-modal.is-open .author-modal-panel {
	opacity: 1;
	transform: none;
}

.author-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--white);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.author-modal-close:hover,
.author-modal-close:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.4);
}

.author-modal-avatar img {
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 3px solid var(--wp--custom--color--ink-line);
}

.author-modal-body .eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: var(--wp--preset--font-size--min);
	letter-spacing: 0.25px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.author-modal-body .eyebrow .bar {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--wp--preset--color--quaternary);
}

.author-modal-name {
	margin: 8px 0 0;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--white);
}

.author-modal-bio {
	margin-top: 10px;
	font-size: var(--wp--preset--font-size--tiny);
	line-height: var(--wp--custom--line-height--medium);
	color: rgba(255, 255, 255, 0.8);
}

.author-modal-bio p {
	margin: 0 0 0.75em;
}

.author-modal-bio p:last-child {
	margin-bottom: 0;
}

.author-modal-bio a {
	color: var(--wp--preset--color--white);
}

.author-modal-links {
	margin-top: 16px;
}

.author-modal-linkedin {
	color: var(--wp--preset--color--white);
	border-color: rgba(255, 255, 255, 0.3);
}

.author-modal-linkedin:hover,
.author-modal-linkedin:focus-visible {
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}

/* Scroll lock while the modal is open (author-modal.js toggles this on <html>). */
.author-modal-open,
.author-modal-open body {
	overflow: hidden;
}

@media (max-width: 640px) {
	.author-modal-panel {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.author-modal-avatar img {
		width: 120px;
		height: 120px;
	}
}
