/* ==========================================================================
   Author Page Styles - Astra Child Theme
   ========================================================================== */

.author-page {
	--author-surface: #ffffff;
	--author-surface-tint: #f8fbff;
	--author-border: rgba(15, 23, 42, 0.08);
	--author-text: #182233;
	--author-muted: #5d687c;
	--author-accent: #1d4ed8;
	--author-accent-soft: rgba(29, 78, 216, 0.08);
	--author-shadow: 0 14px 30px rgba(15, 23, 42, 0.02);
	--border-radius: 10px;
	width: min(100%, 1080px);
	margin: 0 auto;
	padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(3rem, 6vw, 4.5rem);
	display: grid;
	gap: clamp(1rem, 2.4vw, 1.75rem);
}


@media (min-width: 922px) {
	#primary.author-page-primary {
		width: 100%;
	}
}
.author-page__section {
	background: var(--author-surface);
	border: 1px solid var(--author-border);
	border-radius: var(--border-radius);
	box-shadow: var(--author-shadow);
	overflow: hidden;
}

.author-page__hero {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	background: linear-gradient(135deg, var(--author-accent-soft), var(--author-surface-tint) 55%, var(--author-surface) 100%);
}

.author-page__hero-grid {
	display: grid;
	grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
	gap: clamp(1.25rem, 2.8vw, 2.25rem);
	align-items: center;
}

.author-page__photo {
	width: min(100%, 180px);
}

.author-page__photo img.author-page-photo,
.author-page__photo .author-page-photo {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--border-radius);
	background: #e8edf5;
	box-shadow: 0 4px 4px rgba(15, 23, 42, 0.12);
}

.author-page__info {
	min-width: 0;
}

.author-page__name {
	margin: 0;
	color: var(--author-text);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.author-page__intro {
	max-width: 58ch;
	margin: 0.85rem 0 0;
	color: var(--author-muted);
	font-size: clamp(1rem, 1.35vw, 1.1rem);
	line-height: 1.75;
}

.author-page__content {
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.author-page__content-body {
	max-width: 72ch;
	margin: 0 auto;
	color: var(--author-text);
}

.author-page__content-body > :first-child {
	margin-top: 0;
}

.author-page__content-body > :last-child {
	margin-bottom: 0;
}

.author-page__content-body :where(h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure) {
	margin-top: 0;
}

.author-page__content-body :where(h2) {
	margin: 2rem 0 0.8rem;
	padding-top: 1.35rem;
	border-top: 1px solid var(--author-border);
	font-size: clamp(1.35rem, 2.1vw, 1.8rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.author-page__content-body :where(h3) {
	margin: 1.65rem 0 0.65rem;
	font-size: clamp(1.1rem, 1.55vw, 1.35rem);
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.author-page__content-body :where(p) {
	margin: 0 0 1.05rem;
	font-size: 1.03rem;
	line-height: 1.85;
	color: var(--author-text);
}

.author-page__content-body :where(ul, ol) {
	margin: 0 0 1.15rem;
	padding-left: 1.35rem;
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--author-text);
}

.author-page__content-body :where(li + li) {
	margin-top: 0.45rem;
}

.author-page__content-body :where(blockquote) {
	margin: 1.5rem 0;
	padding: 1.05rem 1.25rem;
	border-left: 3px solid var(--author-accent);
	border-radius: 0 20px 20px 0;
	background: linear-gradient(180deg, rgba(29, 78, 216, 0.07), rgba(29, 78, 216, 0.03));
	font-style: italic;
	color: var(--author-text);
}

.author-page__content-body :where(blockquote p:last-child) {
	margin-bottom: 0;
}

.author-page__content-body :where(a) {
	color: var(--author-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.author-page__content-body :where(a:hover) {
	text-decoration-color: currentColor;
}

.author-page__content-body :where(img) {
	display: block;
	width: 100%;
	height: auto;
	margin: 1.5rem 0;
	border-radius: var(--border-radius);
}

.author-page__content-body :where(figure) {
	margin: 1.5rem 0;
}

.author-page__content-body :where(figcaption) {
	margin-top: 0.6rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--author-muted);
}

.author-page__posts {
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.author-page__posts-title {
	margin: 0 0 1.25rem;
	color: var(--author-text);
	font-size: clamp(1.35rem, 2vw, 1.8rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
}

.author-page__posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}

.author-page-post-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	background: var(--author-surface);
	border: 1px solid var(--author-border);
	border-radius: var(--border-radius);
	overflow: hidden;
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.author-page-post-card:hover,
.author-page-post-card:focus-within {
	transform: translateY(-4px);
	border-color: rgba(29, 78, 216, 0.18);
	box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

.author-page-post-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background:
		radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 45%),
		linear-gradient(135deg, rgba(29, 78, 216, 0.15), rgba(15, 23, 42, 0.1));
}

.author-page-post-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
	pointer-events: none;
}

.author-page-post-card__media-link,
.author-page-post-card__media-placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.author-page-post-card__media-link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.author-page-post-card:hover .author-page-post-card__media-link img,
.author-page-post-card:focus-within .author-page-post-card__media-link img {
	transform: scale(1.04);
}

.author-page-post-card__media-placeholder {
	background:
		radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 34%),
		linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(15, 23, 42, 0.08));
}

.author-page-post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.15rem 1.15rem 1.35rem;
}

.author-page-post-card__date {
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--author-muted);
}

.author-page-post-card__title {
	margin: 0;
	font-size: 1.08rem;
	font-weight: 650;
	line-height: 1.4;
	letter-spacing: -0.02em;
}

.author-page-post-card__title a {
	color: var(--author-text);
	text-decoration: none;
}

.author-page-post-card__title a:hover {
	color: var(--author-accent);
}

.author-page-post-card__excerpt {
	margin: 0;
	color: var(--author-muted);
	font-size: 0.95rem;
	line-height: 1.65;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	min-height: calc(1.65em * 3);
}

.author-page__empty {
	margin: 0;
	color: var(--author-muted);
	font-style: italic;
}

@media (max-width: 960px) {
	.author-page__posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.author-page {
		gap: 1rem;
	}

	.author-page__hero,
	.author-page__content,
	.author-page__posts {
		padding: 1.25rem;
	}

	.author-page__hero-grid {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.author-page__photo {
		width: min(100%, 140px);
	}

	.author-page__intro {
		margin-inline: auto;
	}

	.author-page__content-body {
		max-width: none;
	}

	.author-page__posts-grid {
		grid-template-columns: 1fr;
	}
}
