/**
 * Authors Page Styles
 */

html {
	scroll-behavior: smooth;
}

/* Remove top padding from site-inner */
.site-inner {
	padding-top: 0 !important;
}

.authors-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.authors-header {
	margin-bottom: 30px;
	text-align: left;
}

.authors-header h1 {
	font-size: 2.5em;
	margin-bottom: 10px;
}

.authors-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 20px;
}

.author-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s, box-shadow 0.2s;
	scroll-margin-top: 20px; /* Offset for fixed headers */
	display: flex;
	align-items: flex-start;
	gap: 15px;
}

.author-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.author-card:target {
	border: 2px solid #2271b1;
	box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.author-image {
	width: 150px;
	height: 150px;
	border-radius: 8px;
	object-fit: cover;
	object-position: top; /* Show top portion of image when cropped */
	margin: 0;
	display: block;
	border: 3px solid #f0f0f0;
	flex-shrink: 0;
}

/* Hide broken images and empty avatars */
.author-image[src=""],
.author-image:not([src]),
img.author-image[src*="data:image"],
.author-image[src*="mystery"],
.author-image[src*="blank"],
.author-image[src*="gravatar.com/avatar/00000000000000000000000000000000"],
.author-card:not(:has(img.author-image)) .author-card-content {
	/* Content takes full width when no image */
}

/* Hide broken image placeholder */
.author-card img.author-image[alt=""],
.author-card img.author-image[src*="1.gravatar.com/avatar/00000000000000000000000000000000"],
.author-card img.author-image[src*="0.gravatar.com/avatar/00000000000000000000000000000000"] {
	display: none !important;
}

/* Ensure content doesn't break when image is hidden */
.author-card:not(:has(img.author-image)) {
	/* Remove left margin/padding when no image */
}

.author-card:not(:has(img.author-image)) .author-card-content {
	margin-left: 0;
}

.author-card-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden; /* Prevent content from breaking out */
}

.author-name-position {
	margin-bottom: 5px;
	line-height: 1.4;
}

.author-name {
	font-size: 1.3em;
	font-weight: bold;
	color: #333;
	display: inline;
}

.author-position {
	font-size: 0.95em;
	color: #666;
	font-style: italic;
	display: inline;
	margin-left: 8px;
}

.author-details {
	font-size: 0.9em;
	color: #555;
	line-height: 1.3;
}

.author-details p {
	margin: 2px 0;
}

.author-email {
	color: #2271b1;
	text-decoration: none;
}

.author-email:hover {
	text-decoration: underline;
}

.author-website {
	color: #2271b1;
	text-decoration: none;
}

.author-website:hover {
	text-decoration: underline;
}

.author-description {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e0e0e0;
	font-size: 0.9em;
	line-height: 1.4;
	color: #444;
	width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.author-description p {
	margin: 4px 0;
}

.author-description strong {
	color: #333;
}

.author-description a {
	color: #2271b1;
	text-decoration: none;
}

.author-description a:hover {
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
	.authors-grid {
		gap: 15px;
	}
	
	.authors-header h1 {
		font-size: 2em;
	}
	
	.author-card {
		padding: 12px;
		flex-direction: column;
	}
	
	.author-image {
		width: 120px;
		height: 120px;
		margin: 0 auto 10px;
	}
}

