/* Author archives and directory — editorial layout */

@keyframes m-author-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes m-author-photo-in {
	from { opacity: 0; transform: scale(1.04); }
	to { opacity: 1; transform: scale(1); }
}

.m-archive--author {
	padding: 28px 0 88px;
	background:
		radial-gradient(1200px 420px at 8% -10%, rgba(150, 0, 32, 0.08), transparent 55%),
		radial-gradient(900px 380px at 100% 0%, rgba(3, 33, 74, 0.07), transparent 50%),
		#f3f5f7;
}

.m-archive--author .container {
	max-width: 1180px;
}

.m-archive--author .m-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 22px;
	color: #7a8190;
	font-size: 13px;
}

.m-archive--author .m-breadcrumbs a {
	color: inherit;
	text-decoration: none;
	transition: color .18s ease;
}

.m-archive--author .m-breadcrumbs a:hover {
	color: var(--brand-red);
}

.m-breadcrumbs__sep {
	opacity: .55;
}

/* ── Hero ─────────────────────────────────────────────── */

.m-author-hero {
	display: grid;
	grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
	gap: 0;
	margin: 0;
	overflow: hidden;
	border: 0;
	border-radius: 18px;
	background: #fff;
	box-shadow:
		0 1px 0 rgba(3, 33, 74, 0.04),
		0 28px 60px rgba(3, 33, 74, 0.1);
	animation: m-author-rise .55s ease both;
}

.m-author-hero__visual {
	position: relative;
	min-height: 100%;
	background:
		linear-gradient(160deg, #041a3a 0%, #03214a 48%, #4a0a1c 100%);
	isolation: isolate;
}

.m-author-hero__visual::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 42%;
	background: linear-gradient(to top, rgba(3, 17, 40, 0.55), transparent);
	pointer-events: none;
	z-index: 1;
}

.m-author-hero__photo {
	position: relative;
	height: 100%;
	min-height: 460px;
}

.m-author-hero__photo img,
.m-author-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 460px;
	object-fit: cover;
	object-position: center top;
	border-radius: 0;
	background: #0a274f;
	animation: m-author-photo-in .7s ease both;
}

.m-author-hero__mark {
	position: absolute;
	left: 18px;
	bottom: 18px;
	z-index: 2;
	padding: 7px 11px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(3, 33, 74, 0.45);
	backdrop-filter: blur(8px);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.m-author-hero__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: 42px 44px 40px;
	background:
		linear-gradient(115deg, rgba(150, 0, 32, 0.035) 0%, transparent 42%),
		#fff;
	animation: m-author-rise .6s .08s ease both;
}

.m-author-hero__role {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	margin: 0 0 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(150, 0, 32, 0.08);
	color: var(--brand-red);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.m-author-hero__role::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--brand-red);
	box-shadow: 0 0 0 4px rgba(150, 0, 32, 0.16);
}

.m-author-hero__name {
	max-width: 14ch;
	margin: 0 0 18px;
	color: var(--brand-blue);
	font-family: var(--font-ui);
	font-size: clamp(36px, 5vw, 58px);
	font-weight: 800;
	line-height: .98;
	letter-spacing: -.045em;
	overflow-wrap: anywhere;
}

.m-author-hero__bio {
	max-width: 42rem;
	margin: 0 0 22px;
	color: #445064;
	font-family: var(--font-content);
	font-size: 17px;
	line-height: 1.65;
}

.m-author-hero__bio p {
	margin: 0;
}

.m-author-hero__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.m-author-hero__topics li {
	padding: 7px 14px;
	border: 1px solid rgba(3, 33, 74, 0.12);
	border-radius: 999px;
	background: #f7f9fc;
	color: var(--brand-blue);
	font-size: 13px;
	font-weight: 650;
	letter-spacing: .01em;
	transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.m-author-hero__topics li:hover {
	border-color: rgba(150, 0, 32, 0.35);
	background: rgba(150, 0, 32, 0.06);
	color: var(--brand-red);
}

.m-author-hero__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 24px;
	padding: 0;
}

.m-author-hero__fact {
	min-width: 0;
	padding: 16px 16px 14px;
	border: 1px solid rgba(3, 33, 74, 0.08);
	border-radius: 14px;
	background: linear-gradient(180deg, #fbfcfd 0%, #f4f7fb 100%);
}

.m-author-hero__fact--count {
	border-color: rgba(150, 0, 32, 0.18);
	background:
		linear-gradient(145deg, rgba(150, 0, 32, 0.08), transparent 60%),
		linear-gradient(180deg, #fff 0%, #faf6f7 100%);
}

.m-author-hero__fact dt {
	margin-bottom: 8px;
	color: #8190a5;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.m-author-hero__fact dd {
	margin: 0;
	color: var(--brand-blue);
	font-size: 15px;
	font-weight: 750;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.m-author-hero__fact--count dd {
	color: var(--brand-red);
	font-size: clamp(28px, 3vw, 36px);
	font-weight: 800;
	letter-spacing: -.04em;
	line-height: 1;
}

/* ── Vote ─────────────────────────────────────────────── */

.m-author-vote {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	max-width: 460px;
	margin-top: 2px;
	padding: 14px;
	border: 1px solid rgba(3, 33, 74, 0.08);
	border-radius: 14px;
	background: #f7f9fc;
}

.m-author-vote__label {
	margin: 0;
	color: var(--brand-blue);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.m-author-vote__actions {
	display: inline-flex;
	flex-wrap: nowrap;
	width: 100%;
	overflow: hidden;
	border: 1px solid rgba(3, 33, 74, 0.1);
	border-radius: 12px;
	background: #fff;
}

.m-author-vote__btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--brand-blue);
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, transform .18s ease;
}

.m-author-vote__btn + .m-author-vote__btn {
	border-left: 1px solid rgba(3, 33, 74, 0.1);
}

.m-author-vote__btn:hover {
	background: rgba(150, 0, 32, 0.05);
	color: var(--brand-red);
}

.m-author-vote__btn:focus-visible {
	outline: 2px solid var(--brand-red);
	outline-offset: -2px;
	z-index: 1;
}

.m-author-vote__btn.is-busy {
	opacity: .55;
	pointer-events: none;
}

.m-author-vote__count {
	min-width: 1.5em;
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(3, 33, 74, 0.07);
	font-variant-numeric: tabular-nums;
	font-size: 12px;
	line-height: 1.4;
}

.m-author-vote__btn--like.is-active {
	background: var(--brand-red);
	color: #fff;
}

.m-author-vote__btn--dislike.is-active {
	background: var(--brand-blue);
	color: #fff;
}

.m-author-vote__btn.is-active .m-author-vote__count {
	background: rgba(255, 255, 255, 0.22);
}

/* ── Materials ────────────────────────────────────────── */

.m-author-page__materials-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin: 44px 0 22px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--brand-blue);
}

.m-author-page__title {
	margin: 0;
	color: var(--brand-blue);
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.02em;
}

.m-author-page__title span {
	margin-left: 8px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(150, 0, 32, 0.1);
	color: var(--brand-red);
	font-size: 13px;
	font-weight: 750;
	vertical-align: middle;
}

.m-author-page__all {
	color: var(--brand-red);
	font-weight: 750;
	text-decoration: none;
	white-space: nowrap;
	transition: letter-spacing .18s ease;
}

.m-author-page__all:hover {
	letter-spacing: .02em;
	text-decoration: underline;
}

.m-author-page__empty {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 28px 24px;
	border-radius: 14px;
	background: #fff;
	color: #667;
	font-size: 15px;
	box-shadow: 0 10px 30px rgba(3, 33, 74, 0.05);
}

.m-author-page__empty > span {
	color: var(--brand-red);
	font-size: 22px;
}

.m-author-page__posts {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Authors directory ────────────────────────────────── */

.m-authors-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.m-authors-list__item {
	min-width: 0;
}

.m-authors-list__card {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 20px;
	height: 100%;
	padding: 18px;
	border: 1px solid rgba(3, 33, 74, 0.08);
	border-radius: 16px;
	background: #fff;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(3, 33, 74, 0.04);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.m-authors-list__card:hover {
	transform: translateY(-3px);
	border-color: rgba(150, 0, 32, 0.25);
	box-shadow: 0 18px 40px rgba(3, 33, 74, 0.1);
}

.m-authors-list__photo-wrap {
	position: relative;
	min-width: 0;
	overflow: hidden;
	border-radius: 12px;
	background: linear-gradient(160deg, #03214a, #4a0a1c);
}

.m-authors-list__photo,
.m-authors-list__photo-wrap img {
	display: block;
	width: 112px;
	height: 140px;
	border-radius: 12px;
	object-fit: cover;
	transition: transform .35s ease;
}

.m-authors-list__card:hover .m-authors-list__photo,
.m-authors-list__card:hover .m-authors-list__photo-wrap img {
	transform: scale(1.04);
}

.m-authors-list__name {
	display: block;
	margin: 0 0 4px;
	color: var(--brand-blue);
	font-size: 21px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.02em;
}

.m-authors-list__card:hover .m-authors-list__name {
	color: var(--brand-red);
}

.m-authors-list__role {
	color: var(--brand-red);
	font-size: 12px;
	font-weight: 750;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.m-authors-list__bio {
	display: block;
	margin: 10px 0;
	color: #66748a;
	font-size: 14px;
	line-height: 1.45;
}

.m-authors-list__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
	font-size: 13px;
}

.m-authors-list__meta-label {
	display: block;
	margin-bottom: 3px;
	color: #8a93a3;
	font-size: 10px;
	font-weight: 750;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.qn-page__inner:has(.m-authors-list) {
	max-width: var(--container-width);
}

.article__content ul.m-authors-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.article__content .m-authors-list > li,
.article__content .m-authors-list > li + li {
	display: block;
	margin: 0;
	padding: 0;
}

.article__content .m-authors-list > li::before {
	display: none;
	content: none;
}

.article__content .m-authors-list a.m-authors-list__card {
	color: inherit;
	text-decoration: none;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 980px) {
	.m-author-hero {
		grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
	}

	.m-author-hero__body {
		padding: 28px 26px 26px;
	}

	.m-author-hero__photo,
	.m-author-hero__photo img,
	.m-author-hero__img {
		min-height: 400px;
	}
}

@media (max-width: 850px) {
	.m-authors-list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.m-archive--author {
		padding: 18px 0 56px;
	}

	.m-author-hero {
		grid-template-columns: 1fr;
		border-radius: 14px;
	}

	.m-author-hero__photo,
	.m-author-hero__photo img,
	.m-author-hero__img {
		min-height: 320px;
		max-height: 420px;
	}

	.m-author-hero__body {
		padding: 24px 20px 22px;
	}

	.m-author-hero__name {
		font-size: clamp(32px, 10vw, 42px);
	}

	.m-author-hero__bio {
		font-size: 16px;
	}

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

	.m-author-hero__fact--count {
		grid-column: 1 / -1;
	}

	.m-author-vote {
		max-width: none;
		width: 100%;
	}

	.m-author-vote__text {
		display: none;
	}

	.m-author-page__materials-head {
		margin-top: 34px;
		align-items: center;
	}

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

	.m-authors-list__card {
		grid-template-columns: 84px minmax(0, 1fr);
		padding: 14px;
		gap: 14px;
	}

	.m-authors-list__photo,
	.m-authors-list__photo-wrap img {
		width: 84px;
		height: 105px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.m-author-hero,
	.m-author-hero__body,
	.m-author-hero__photo img,
	.m-author-hero__img,
	.m-authors-list__card,
	.m-authors-list__photo,
	.m-authors-list__photo-wrap img {
		animation: none !important;
		transition: none !important;
	}
}
