/*
 * ZeeMee Author Page – front-end styles for [zmap_author_card] and [zmap_author_posts].
 * Override the custom properties in your theme to restyle.
 * All text colours meet WCAG AA (4.5:1) on their backgrounds.
 */
:root {
	--zmap-accent: #b8300f;        /* tags, links, "read more" – 6.0:1 on white */
	--zmap-accent-contrast: #fff;
	--zmap-ink: #1a1a1a;
	--zmap-muted: #595959;         /* 7.0:1 on white */
	--zmap-paper: #fff;
	--zmap-border: #e3e0dc;
	--zmap-radius: 16px;
	--zmap-gap: 24px;
	--zmap-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
	--zmap-focus: 3px solid #4a3df0;
}

/* ---------- Author card ---------- */
.zmap-card {
	display: flex;
	flex-wrap: wrap;
	gap: var(--zmap-gap);
	align-items: center;
	padding: var(--zmap-gap);
	background: var(--zmap-paper);
	border: 1px solid var(--zmap-border);
	border-radius: var(--zmap-radius);
	box-shadow: var(--zmap-shadow);
	color: var(--zmap-ink);
}
.zmap-card__avatar {
	flex: 0 0 auto;
}
.zmap-card__img {
	display: block;
	border-radius: 50%;
	width: 160px;
	height: 160px;
	max-width: 100%;
	object-fit: cover;
}
.zmap-card__body {
	flex: 1 1 280px;
	min-width: 0;
}
.zmap-card__name {
	margin: 0 0 0.35em;
	line-height: 1.15;
}
.zmap-card__bio {
	margin: 0 0 0.75em;
}
.zmap-card__bio p:last-child {
	margin-bottom: 0;
}
.zmap-card__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.25em;
	font-size: 0.9375em;
	color: var(--zmap-muted);
}
.zmap-card__meta a {
	color: var(--zmap-accent);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* ---------- Posts grid ---------- */
.zmap-posts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: clamp(20px, 3vw, 32px);
	grid-template-columns: repeat(var(--zmap-cols, 3), minmax(0, 1fr));
}
/* Default: as many 300px+ columns as fit, so cards never get squeezed. */
.zmap-posts--cols-auto {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--zmap-card-min, 300px)), 1fr));
}
.zmap-posts--cols-1 { --zmap-cols: 1; }
.zmap-posts--cols-2 { --zmap-cols: 2; }
.zmap-posts--cols-3 { --zmap-cols: 3; }
.zmap-posts--cols-4 { --zmap-cols: 4; }

@media (max-width: 900px) {
	.zmap-posts--cols-3,
	.zmap-posts--cols-4 { --zmap-cols: 2; }
}
@media (max-width: 600px) {
	.zmap-posts:not(.zmap-posts--cols-auto) { --zmap-cols: 1 !important; }
	.zmap-card__img { width: 112px; height: 112px; }
}

.zmap-post {
	margin: 0;
}
.zmap-post__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--zmap-paper);
	border: 1px solid var(--zmap-border);
	border-radius: var(--zmap-radius);
	box-shadow: var(--zmap-shadow);
	overflow: hidden;
	color: var(--zmap-ink);
	transition: transform 160ms ease, box-shadow 160ms ease;
}
.zmap-post__inner:hover,
.zmap-post__inner:focus-within {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.1);
}
@media (prefers-reduced-motion: reduce) {
	.zmap-post__inner { transition: none; }
	.zmap-post__inner:hover,
	.zmap-post__inner:focus-within { transform: none; }
}
.zmap-post__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--zmap-border);
}
.zmap-post__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.zmap-post__body {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	padding: 24px;
	flex: 1 1 auto;
}
.zmap-post__category {
	align-self: flex-start;
	display: inline-block;
	padding: 0.25em 0.75em;
	border-radius: 999px;
	background: var(--zmap-accent);
	color: var(--zmap-accent-contrast);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.zmap-post__title {
	margin: 0;
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}
/* The whole card is clickable via the title link – one link per card for keyboard/screen readers. */
.zmap-post__link {
	color: inherit;
	text-decoration: none;
}
.zmap-post__link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.zmap-post__link:hover,
.zmap-post__link:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.zmap-post__link:focus-visible {
	outline: none;
}
.zmap-post__inner:focus-within {
	outline: var(--zmap-focus);
	outline-offset: 2px;
}
.zmap-post__excerpt {
	margin: 0;
	color: var(--zmap-muted);
	font-size: 1em;
	line-height: 1.55;
}
.zmap-post__footer {
	margin-top: auto;
	padding-top: 1em;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1em;
	font-size: 0.875em;
	color: var(--zmap-muted);
}
.zmap-post__more {
	color: var(--zmap-accent);
	font-weight: 700;
	white-space: nowrap;
}
.zmap-posts-empty {
	color: var(--zmap-muted);
}

/* ---------- Author card: title, contact, social ---------- */
.zmap-card__title {
	margin: 0 0 0.6em;
	color: var(--zmap-muted);
	font-weight: 600;
}
.zmap-card__title a,
.zmap-cv__org a {
	color: var(--zmap-accent);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.zmap-card__social {
	list-style: none;
	margin: 0.75em 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}
.zmap-card__social a {
	display: inline-block;
	padding: 0.3em 0.8em;
	border: 1px solid var(--zmap-border);
	border-radius: 999px;
	color: var(--zmap-ink);
	font-size: 0.875em;
	text-decoration: none;
}
.zmap-card__social a:hover,
.zmap-card__social a:focus-visible {
	border-color: var(--zmap-accent);
	color: var(--zmap-accent);
	text-decoration: underline;
}
.zmap-card__social a:focus-visible,
.zmap-card__meta a:focus-visible,
.zmap-card__title a:focus-visible,
.zmap-cv__org a:focus-visible {
	outline: var(--zmap-focus);
	outline-offset: 2px;
}

/* ---------- CV ---------- */
.zmap-cv {
	color: var(--zmap-ink);
}
.zmap-cv__section + .zmap-cv__section {
	margin-top: calc(var(--zmap-gap) * 1.5);
}
.zmap-cv__heading {
	margin: 0 0 0.75em;
}
.zmap-cv__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid var(--zmap-border);
}
.zmap-cv__item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(7em, 10em) minmax(0, 1fr);
	gap: 0.25em var(--zmap-gap);
	margin: 0;
	padding: 0 0 var(--zmap-gap) var(--zmap-gap);
}
.zmap-cv__item::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 0.45em;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--zmap-accent);
	border: 2px solid var(--zmap-paper);
}
.zmap-cv__item:last-child {
	padding-bottom: 0;
}
.zmap-cv__period {
	grid-column: 1;
	margin: 0;
	color: var(--zmap-muted);
	font-size: 0.9375em;
	font-variant-numeric: tabular-nums;
}
.zmap-cv__content {
	grid-column: 2;
}
.zmap-cv__content p {
	margin: 0;
}
.zmap-cv__title {
	font-weight: 700;
}
.zmap-cv__org {
	color: var(--zmap-muted);
}
.zmap-cv__desc {
	margin-top: 0.35em !important;
	font-size: 0.9375em;
	line-height: 1.5;
}
.zmap-cv__desc p {
	margin: 0 0 0.6em;
}
.zmap-cv__desc p:last-child {
	margin-bottom: 0;
}
/* Clamp by height (not -webkit-line-clamp, which stops at the first forced line break). */
.zmap-cv__desc.is-clamped {
	max-height: calc(var(--zmap-cv-lines, 3) * 1.5em);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.zmap-cv__more {
	margin: 0.35em 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--zmap-accent);
	font: inherit;
	font-size: 0.9375em;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.zmap-cv__more:focus-visible {
	outline: var(--zmap-focus);
	outline-offset: 2px;
}
.zmap-cv__more::after {
	content: " \2193";
}
.zmap-cv__more[aria-expanded="true"]::after {
	content: " \2191";
}
@media (max-width: 600px) {
	.zmap-cv__item {
		grid-template-columns: minmax(0, 1fr);
	}
	.zmap-cv__period,
	.zmap-cv__content {
		grid-column: 1;
	}
}
.zmap-cv__tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}
.zmap-cv__tags li {
	padding: 0.3em 0.8em;
	border-radius: 999px;
	background: var(--zmap-border);
	color: var(--zmap-ink);
	font-size: 0.875em;
}
.zmap-cv__plain {
	margin: 0;
	padding-left: 1.25em;
}

/* ---------- Hero (default [zmap_author_card] layout) ---------- */
:root {
	--zmap-hero-bg: #f7f3ee;          /* warm off-white */
	--zmap-hero-ink: #111111;
	--zmap-hero-muted: #555555;       /* 7.4:1 on the background */
	--zmap-hero-accent: #c2360d;      /* flame, darkened to 5.4:1 on the background for text */
	--zmap-hero-accent-ink: #ffffff;  /* icon on the accent button */
	--zmap-hero-border: #e2dcd4;
	--zmap-hero-radius: 24px;
	--zmap-hero-pad: clamp(32px, 6vw, 80px);
}
.zmap-hero {
	box-sizing: border-box;
	margin: 0 0 var(--zmap-gap);
	padding: var(--zmap-hero-pad) var(--zmap-gap);
	background: var(--zmap-hero-bg);
	color: var(--zmap-hero-ink);
	border-radius: var(--zmap-hero-radius);
}
.zmap-hero--dark {
	--zmap-hero-bg: #111111;
	--zmap-hero-ink: #ffffff;
	--zmap-hero-muted: #c9c9c9;
	--zmap-hero-accent: #ff4d1c;
	--zmap-hero-accent-ink: #000000;
	--zmap-hero-border: rgba(255, 255, 255, 0.18);
}
/* Full-bleed. Block themes handle the .alignfull class through their layout rules;
   this covers classic themes. The body gets overflow-x: clip so the scrollbar-width
   overshoot never produces a horizontal scrollbar. */
.zmap-hero.zmap-hero--full {
	width: auto;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
}
.is-layout-constrained > .zmap-hero.zmap-hero--full,
.is-layout-flow > .zmap-hero.zmap-hero--full {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}
body.zmap-author-page {
	overflow-x: clip;
}
.zmap-hero__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	max-width: 1100px;
	margin: 0 auto;
}
.zmap-hero__avatar {
	align-self: start;
}
.zmap-hero__img {
	display: block;
	width: clamp(120px, 18vw, 220px);
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 28px;
	box-shadow: 0 0 0 4px var(--zmap-hero-accent);
}
.zmap-hero__body {
	min-width: 0;
}
.zmap-hero__eyebrow {
	margin: 0 0 0.6em;
	color: var(--zmap-hero-accent);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.zmap-hero__name {
	margin: 0 0 0.4em;
	color: inherit;
	font-size: clamp(2.2rem, 5vw, 4rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
}
.zmap-hero__bio {
	max-width: 60ch;
	margin: 0 0 1.5em;
	font-size: 1.125rem;
	line-height: 1.55;
	color: var(--zmap-hero-muted);
}
.zmap-hero__bio p:last-child {
	margin-bottom: 0;
}
.zmap-hero__bio a,
.zmap-hero__stats a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.zmap-hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1em 2.5em;
	margin: 0 0 1.5em;
	padding: 1.25em 0 0;
	border-top: 1px solid var(--zmap-hero-border);
}
.zmap-hero__stat {
	margin: 0;
}
.zmap-hero__stat dt {
	margin: 0 0 0.15em;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--zmap-hero-muted);
}
.zmap-hero__stat dd {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--zmap-hero-ink);
}
.zmap-hero__social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
}
/* Icon buttons: 44px targets, label for assistive tech, tooltip via title. */
.zmap-hero__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1.5px solid var(--zmap-hero-border);
	border-radius: 50%;
	background: transparent;
	color: var(--zmap-hero-ink);
	text-decoration: none;
	transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.zmap-hero__btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}
.zmap-hero__btn--primary {
	background: var(--zmap-hero-accent);
	border-color: var(--zmap-hero-accent);
	color: var(--zmap-hero-accent-ink);
}
.zmap-hero__btn:hover,
.zmap-hero__btn:focus-visible {
	background: var(--zmap-hero-ink);
	border-color: var(--zmap-hero-ink);
	color: var(--zmap-hero-bg);
	transform: translateY(-1px);
}
.zmap-hero__btn:focus-visible,
.zmap-hero__stats a:focus-visible,
.zmap-hero__bio a:focus-visible {
	outline: 3px solid var(--zmap-hero-accent);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	.zmap-hero__btn {
		transition: none;
	}
	.zmap-hero__btn:hover,
	.zmap-hero__btn:focus-visible {
		transform: none;
	}
}
@media (max-width: 700px) {
	.zmap-hero__inner {
		grid-template-columns: minmax(0, 1fr);
	}
	.zmap-hero__stats {
		gap: 1em 1.75em;
	}
}

/* The hero carries the h1, so the theme's page title goes. Covers the common
   classic and block-theme title selectors; add your theme's via CSS if needed. */
body.zmap-hide-title .entry-title,
body.zmap-hide-title .page-title,
body.zmap-hide-title .wp-block-post-title,
body.zmap-hide-title .entry-header > h1,
body.zmap-hide-title h1.title {
	display: none;
}

/* ---------- Load more ---------- */
.zmap-posts__footer {
	margin-top: var(--zmap-gap);
	text-align: center;
}
.zmap-posts__load {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	min-height: 48px;
	padding: 0 1.6em;
	border: 2px solid var(--zmap-ink);
	border-radius: 999px;
	background: transparent;
	color: var(--zmap-ink);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.zmap-posts__load:hover,
.zmap-posts__load:focus-visible {
	background: var(--zmap-ink);
	color: var(--zmap-paper);
}
.zmap-posts__load:focus-visible {
	outline: var(--zmap-focus);
	outline-offset: 3px;
}
.zmap-posts__load[hidden],
.zmap-hero [hidden],
.zmap-cv [hidden] {
	display: none !important;
}
.zmap-posts__load[disabled] {
	opacity: 0.6;
	cursor: progress;
}
