/**
 * Single article — base layout (content + sidebar). Article content styling is
 * handled separately later.
 */

.article-layout {
	display: grid;
	gap: 30px;
}

/* ---------- Meta row ---------- */

.article__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.article__byline {
	display: flex;
	align-items: center;
	min-width: 0;
}

.article__byline-link {
	display: flex;
	align-items: center;
	min-width: 0;
	color: inherit;
}

.article__byline-link:hover .article__author,
.article__byline-link:focus-visible .article__author {
	color: var(--color-pink);
}

.article__avatar {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	margin-right: 20px;
	border-radius: 50%;
	object-fit: cover;
}

.article__author {
	font-size: 17px;
	font-weight: var(--font-weight-medium);
	line-height: 1;
}

.article__author::after {
	content: "•";
	margin: 0 8px;
	font-weight: var(--font-weight-regular);
}

.article__date {
	font-size: 17px;
	font-weight: 300;
	line-height: 1;
}

.article__section {
	flex-shrink: 0;
	font-size: 16px;
	font-weight: var(--font-weight-regular);
	line-height: 1;
	text-align: right;
	color: inherit;
}

/* ---------- Title + image ---------- */

.article__title {
	margin: 0 0 30px;
	font-size: 35px;
	font-weight: var(--font-weight-bold);
	line-height: 1;
}

.article__image {
	margin: 0 0 20px;
}

.article__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-md);
}

/* ---------- Article content ---------- */
/* Content typography lives in components/entry-content.css (shared with pages). */

/* ---------- Article tags ---------- */

.article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 25px;
}

.article-tag {
	display: inline-flex;
	align-items: center;
	min-height: 25px;
	padding: 0 17px;
	border-radius: var(--radius-pill);
	background: #ededed;
	color: var(--color-gray-text);
	font-size: 12.5px;
	font-weight: var(--font-weight-medium);
	line-height: 1;
	transition:
		background-color var(--transition-hover),
		color var(--transition-hover);
}

.article-tag:hover,
.article-tag:focus-visible {
	background: #505050;
	color: var(--color-white);
}

/* ---------- Author block ---------- */

.article-author {
	margin-top: 60px;
	padding-bottom: 20px;
	border-bottom: 3px solid var(--color-pink);
}

.article-author__head {
	display: flex;
	align-items: center;
}

.article-author__avatar-link {
	flex-shrink: 0;
	margin-right: 20px;
	transition: opacity var(--transition-hover);
}

.article-author__avatar-link:hover,
.article-author__avatar-link:focus-visible {
	opacity: 0.85;
}

.article-author__avatar {
	display: block;
	width: 75px;
	height: 75px;
	border-radius: 50%;
	object-fit: cover;
}

.article-author__line {
	font-size: 18px;
	font-weight: 300;
	line-height: 1;
}

.article-author__name {
	font-weight: var(--font-weight-bold);
	color: inherit;
	transition: color var(--transition-hover);
}

.article-author__name:hover,
.article-author__name:focus-visible {
	color: var(--color-pink);
}

.article-author__company {
	margin-top: 6px;
	font-size: 16px;
	line-height: 1.2;
}

.article-author__bio {
	margin-top: 10px;
	font-size: 16px;
	font-weight: var(--font-weight-regular);
	line-height: 1.4;
}

/* ---------- Sidebar ---------- */

/* Nudge the sidebar down so the news block lines up with the article meta/category. */
.article-sidebar {
	align-self: stretch;
	padding-top: 15px;
}

.sidebar-news {
	margin-bottom: 75px;
}

.sidebar-news__list {
	display: flex;
	flex-direction: column;
}

.sidebar-news__item {
	margin-bottom: 20px;
	border-bottom: 2px solid var(--color-black);
	transition: border-color var(--transition-hover);
}

.sidebar-news__item:last-child {
	margin-bottom: 0;
}

.sidebar-news__item:hover,
.sidebar-news__item:focus-within {
	border-bottom-color: var(--color-pink);
}

.sidebar-news__link {
	display: block;
	color: inherit;
}

.sidebar-news__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	font-size: 16px;
	font-weight: var(--font-weight-semibold);
	line-height: 1.2;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	transition: color var(--transition-hover);
}

.sidebar-news__link:hover .sidebar-news__title,
.sidebar-news__link:focus-visible .sidebar-news__title {
	color: var(--color-pink);
}

.sidebar-news__date {
	display: block;
	margin: 10px 0;
	font-size: 13px;
	font-weight: var(--font-weight-regular);
	line-height: 1;
	color: var(--color-gray-text);
}

/* ---------- Layout ---------- */

@media (min-width: 768px) {
	.article-layout {
		grid-template-columns: minmax(0, 900fr) minmax(0, 300fr);
		gap: 30px;
		align-items: start;
	}
}

@media (min-width: 1200px) {
	.article-layout {
		gap: 60px;
	}
}

@media (max-width: 767px) {
	.article-sidebar {
		display: none;
	}

	.article__avatar,
	.article__author {
		display: none;
	}

	.article__meta {
		margin-bottom: 15px;
	}

	.article__section {
		order: -1;
		font-size: 12px;
		line-height: 1.2;
	}

	.article__date {
		font-size: 12px;
		font-weight: var(--font-weight-regular);
		line-height: 1.2;
	}

	.article__title {
		margin-bottom: 20px;
		font-size: 20px;
	}

	.article-tags {
		gap: 10px;
		margin-top: 20px;
	}

	.article-tag {
		min-height: 20px;
	}

	.article-author {
		margin-top: 40px;
	}

	.article-author__company {
		font-size: 14px;
	}

	.article-author__bio {
		margin-top: 20px;
	}
}
