﻿/**
 * Authors вЂ” scoped front-end styles.
 *
 * Loaded by Granish Core ONLY on the author single/archive/taxonomy views
 * (see includes/authors/templates.php). All rules are namespaced under
 * `.granish-author*` / `.granish-authors-*` so they cannot leak into the rest
 * of the theme. Values use rem/relative units and the theme's inherited font so
 * the feature blends into both the current SimpleMag theme and its fork.
 *
 * @package Granish_Core
 */

/* -------------------------------------------------------------------------
 * Index: tabs + alphabet nav
 * ---------------------------------------------------------------------- */
.granish-authors-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	border-bottom: 1px solid #e2e2e2;
}

.granish-authors-tab {
	appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	margin: 0;
	padding: 10px 4px;
	font: inherit;
	font-size: 1rem;
	color: #777;
	cursor: pointer;
}

.granish-authors-tab.is-active {
	color: #111;
	border-bottom-color: #c0392b; /* Matches the SimpleMag accent red. */
	font-weight: 700;
}

.granish-authors-tab:focus {
	outline: 2px solid #c0392b;
	outline-offset: 2px;
}

/* When JS is enabled, only the active view is shown. Without JS
 * (no `.granish-js` flag), every view stays visible and readable. */
.granish-authors-index.granish-js .granish-authors-view {
	display: none;
}

.granish-authors-index.granish-js .granish-authors-view.is-active {
	display: block;
}

.granish-authors-alphabet {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0 0 28px;
	font-size: 1.05rem;
}

.granish-authors-alphabet a {
	display: inline-block;
	min-width: 1.4em;
	text-align: center;
	text-decoration: none;
	color: #c0392b;
}

.granish-authors-alphabet a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Index: letter / profession groups + author list
 * ---------------------------------------------------------------------- */
.granish-authors-letter-group,
.granish-authors-profession-group {
	margin: 0 0 32px;
	scroll-margin-top: 90px; /* Space for the sticky theme header on jump. */
}

.granish-authors-letter,
.granish-authors-profession-title {
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px solid #eee;
	font-size: 1.5rem;
	line-height: 1.2;
}

.granish-authors-profession-title a {
	text-decoration: none;
}

.granish-authors-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 4px 24px;
}

.granish-author-item {
	margin: 0;
	padding: 0;
}

.granish-author-link {
	display: block;
	padding: 6px 0;
	text-decoration: none;
	color: inherit;
}

.granish-author-link:hover .granish-author-item-name {
	text-decoration: underline;
}

.granish-author-item-name {
	display: inline;
	font-size: 1.05rem;
}

.granish-author-item-meta {
	display: inline;
	margin-left: 6px;
	color: #888; /* The old index used a gray span for the profession. */
	font-size: 0.88rem;
}

.granish-author-item-count {
	display: inline-block;
	margin-left: 6px;
	min-width: 1.4em;
	padding: 0 6px;
	border-radius: 10px;
	background: #f0f0f1;
	color: #555;
	font-size: 0.78rem;
	line-height: 1.6;
	text-align: center;
	vertical-align: middle;
}

.granish-authors-empty,
.granish-authors-term-desc {
	margin: 16px 0;
}

/* -------------------------------------------------------------------------
 * Single author вЂ” New YorkerвЂ“style redesign
 *
 * Full-bleed gray hero strip under the site header; white body with
 * publication cards (text left / image right). Secondary blocks (video,
 * books, awards, contacts) sit below publications and stay compact.
 *
 * Typography matches the site-wide Noto Sans Armenian (mu-plugin).
 * ---------------------------------------------------------------------- */
.granish-author-content {
	padding: 0 !important;
	margin: 0;
	max-width: none !important;
	width: 100%;
}

.granish-author-single {
	--author-font: 'Noto Sans Armenian', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--author-gray: #f0f0f0;
	--author-hairline: #e5e5e5;
	--author-accent: #c0392b;
	margin: 0;
	max-width: none;
	font-family: var(--author-font);
}

/* Full-bleed gray band (breaks out of theme wrappers). */
.author-hero-band {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background: var(--author-gray);
	border-bottom: 1px solid var(--author-hairline);
	padding: 48px 20px 44px;
	box-sizing: border-box;
}

.author-hero-inner {
	max-width: 880px;
	margin: 0 auto;
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.author-avatar {
	flex: 0 0 auto;
}

.author-avatar img {
	display: block;
	width: 220px;
	height: 260px;
	object-fit: cover;
	border-radius: 2px;
	background: #ddd;
}

.author-meta {
	flex: 1 1 320px;
	min-width: 0;
	padding-top: 4px;
}

.author-meta .author-name {
	font-family: var(--author-font) !important;
	font-size: 38px;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 10px;
	color: #111;
}

/* Genres вЂ” small, comma-separated, muted. */
.author-title {
	font-family: var(--author-font);
	font-size: 13px;
	letter-spacing: 0.04em;
	color: #666;
	margin: 0 0 8px;
}

.author-dates {
	font-family: var(--author-font);
	font-size: 13px;
	color: #888;
	margin: 0 0 18px;
}

.author-summary {
	font-family: var(--author-font);
	font-size: 17px;
	line-height: 1.65;
	color: #222;
	max-width: 36em;
}

.author-summary p {
	font-family: var(--author-font) !important;
	margin: 0 0 12px;
}

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

/* White body under the gray strip. */
.author-body {
	background: #fff;
	padding: 40px 20px 56px;
}

.author-body-inner {
	max-width: 880px;
	margin: 0 auto;
}

.author-section {
	margin: 0 0 48px;
}

.author-section:last-of-type {
	margin-bottom: 24px;
}

.author-section-title {
	font-family: var(--author-font) !important;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--author-hairline);
	color: #111;
}

/* -------------------------------------------------------------------------
 * Publications вЂ” New Yorker card row
 * ---------------------------------------------------------------------- */
.author-pub-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.author-pub-item {
	display: flex;
	gap: 28px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 28px 0;
	border-bottom: 1px solid var(--author-hairline);
}

.author-pub-text {
	flex: 1 1 auto;
	min-width: 0;
}

.author-pub-genre {
	font-family: var(--author-font);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--author-accent);
	margin: 0 0 8px;
}

.author-pub-title {
	font-family: var(--author-font) !important;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 10px;
	color: #111;
}

.author-pub-title a {
	color: #111;
	text-decoration: none;
}

.author-pub-title a:hover {
	color: #444;
}

.author-pub-excerpt {
	font-family: var(--author-font) !important;
	font-size: 16px;
	line-height: 1.55;
	color: #444;
	margin: 0 0 12px;
}

.author-pub-date {
	font-family: var(--author-font);
	font-size: 13px;
	color: #888;
	margin: 0;
}

.author-pub-thumb {
	flex: 0 0 200px;
	width: 200px;
	display: block;
	overflow: hidden;
	border-radius: 2px;
}

.author-pub-thumb img {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
}

/* Compact video (not full-bleed). */
.author-video-wrapper {
	position: relative;
	width: 100%;
	max-width: 420px;
	aspect-ratio: 16 / 9;
	border-radius: 4px;
	overflow: hidden;
	background: #111;
}

@supports not (aspect-ratio: 16 / 9) {
	.author-video-wrapper {
		height: 0;
		padding-bottom: 56.25%;
	}
}

.author-video-wrapper iframe,
.author-video-wrapper embed,
.author-video-wrapper object,
.author-video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Books. */
.author-books-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.author-book {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 14px 0;
	border-bottom: 1px solid var(--author-hairline);
}

.author-book-cover img {
	display: block;
	width: 64px;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.12 );
}

.author-book-title {
	font-family: var(--author-font) !important;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 4px;
	color: #111;
}

.author-book-title a {
	color: #111;
	text-decoration: none;
}

.author-book-title a:hover {
	color: #666;
}

.author-book-meta {
	font-family: var(--author-font);
	font-size: 13px;
	color: #888;
	margin: 0;
}

/* Awards. */
.author-awards-list {
	margin: 0;
	padding-left: 1.2em;
	font-family: var(--author-font);
	color: #333;
}

.author-awards-list li {
	margin: 0 0 8px;
	line-height: 1.5;
}

/* Contacts (bottom section). */
.author-contacts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	font-family: var(--author-font);
	font-size: 14px;
}

.author-contact {
	margin: 0;
}

.author-contact a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
	color: #555;
}

.author-contact a:hover {
	color: #111;
}

.author-contact a:hover .author-contact-label {
	text-decoration: underline;
}

.author-contact .dashicons {
	width: 17px;
	height: 17px;
	font-size: 17px;
	line-height: 1;
	color: #888;
}

/* Mentions (simple list). */
.author-posts-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.author-post-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--author-hairline);
}

.author-post-item a {
	font-family: var(--author-font);
	font-size: 17px;
	font-weight: 500;
	color: #111;
	text-decoration: none;
}

.author-post-item a:hover {
	color: #666;
}

.author-post-date {
	font-family: var(--author-font);
	font-size: 13px;
	color: #888;
	white-space: nowrap;
}

.author-back {
	font-family: var(--author-font);
	margin: 32px 0 0;
}

.author-back a {
	color: #555;
	text-decoration: none;
}

.author-back a:hover {
	color: #111;
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */
@media (max-width: 720px) {
	.author-hero-inner {
		flex-direction: column;
		gap: 24px;
	}

	.author-avatar img {
		width: 160px;
		height: 190px;
	}

	.author-meta .author-name {
		font-size: 28px;
	}

	.author-pub-item {
		flex-direction: column-reverse;
		gap: 16px;
	}

	.author-pub-thumb {
		flex: none;
		width: 100%;
		max-width: 100%;
	}

	.author-pub-thumb img {
		height: 180px;
	}

	.author-pub-title {
		font-size: 20px;
	}

	.granish-authors-list {
		grid-template-columns: 1fr;
	}
}
