/**
 * Author archive page styles — Slotimo Blog
 * Mobile-first. Card grid styles are inherited from style.css (.slotimo-archive-grid).
 * Uses only CSS variables already defined in :root of style.css.
 */

/* ==========================================================================
   Author intro block
   ========================================================================== */

.slotimo-author__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--slotimo-border);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
	text-align: center;
}

/* Avatar — round, fixed size, object-fit cover */
.slotimo-author__avatar {
	display: block;
	width: 120px !important;
	height: 120px !important;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 3px solid var(--slotimo-border);
}

/* WordPress wraps avatar in <img> but sometimes in <a> — handle both */
.slotimo-author__intro a:has(> .slotimo-author__avatar) {
	display: block;
	flex-shrink: 0;
}

/* Intro text container */
.slotimo-author__intro-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

/* Author name (H1) */
.slotimo-author__name {
	font-family: 'Inter', sans-serif;
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--slotimo-dark);
	margin: 0;
	line-height: 1.2;
}

/* Role / job title */
.slotimo-author__role {
	font-size: 0.9375rem;
	color: var(--slotimo-text-muted);
	margin: 0;
	font-style: italic;
}

/* Bio — left-aligned inside center-aligned container */
.slotimo-author__bio {
	font-size: 0.9375rem;
	color: var(--slotimo-text);
	line-height: 1.65;
	text-align: left;
	margin: 0;
	max-width: 70ch;
}

.slotimo-author__bio p {
	margin: 0 0 0.75em;
}

.slotimo-author__bio p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Contacts row (email + social links)
   ========================================================================== */

.slotimo-author__contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 4px;
}

.slotimo-author__contact-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none !important;
	color: var(--slotimo-text) !important;
	background: var(--slotimo-bg-subtle);
	border: 1px solid var(--slotimo-border);
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	min-height: 44px; /* touch target */
	line-height: 1;
}

.slotimo-author__contact-link:hover {
	background: var(--slotimo-primary) !important;
	border-color: var(--slotimo-primary) !important;
	color: #fff !important;
}

.slotimo-author__contact-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* Network-specific accent colours on hover are handled by the generic hover above.
   If distinct colours are wanted later, add them here per class. */

/* ==========================================================================
   Posts section heading
   ========================================================================== */

.slotimo-author__posts-title {
	font-family: 'Inter', sans-serif;
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--slotimo-dark);
	border-bottom: 2px solid var(--slotimo-primary);
	padding-bottom: 8px;
	margin: 0 0 16px;
	line-height: 1.3;
}

/* ==========================================================================
   Desktop: side-by-side avatar + text
   ========================================================================== */

@media (min-width: 600px) {
	.slotimo-author__intro {
		flex-direction: row;
		align-items: flex-start;
		text-align: left;
	}

	.slotimo-author__intro-text {
		align-items: flex-start;
	}

	.slotimo-author__contacts {
		justify-content: flex-start;
	}
}

/* ==========================================================================
   375 px safety net: nothing overflows
   ========================================================================== */

@media (max-width: 479px) {
	.slotimo-author__intro {
		padding: 16px;
		gap: 12px;
	}

	.slotimo-author__name {
		font-size: 1.375rem;
	}

	.slotimo-author__contact-link span {
		/* On very narrow screens, hide the text labels for social links,
		   keep email visible because it carries information. */
	}

	.slotimo-author__contact-link--facebook span,
	.slotimo-author__contact-link--x span,
	.slotimo-author__contact-link--pinterest span,
	.slotimo-author__contact-link--whatsapp span {
		display: none;
	}

	.slotimo-author__contact-link {
		padding: 8px;
	}
}
