.blog-layout {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.blog-sidebar {
	flex: 0 0 220px;
	position: sticky;
	top: 10px;
}

.blog-post,
.blog-archive {
	flex: 1;
	min-width: 0;
	overflow-wrap: break-word;
}

.blog-post img,
.blog-archive img {
	max-width: 100%;
	height: auto;
}

.blog-post pre,
.blog-archive pre {
	overflow-x: auto;
	max-width: 100%;
}

.post-meta {
	color: #666;
	margin-bottom: 1.5em;
}

.dark .post-meta {
	color: #aaa;
}

.tag-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 1em;
}

.tag-pill {
	display: inline-block;
	background: #e0e0e0;
	color: #333;
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.85em;
	cursor: pointer;
}

.post-tags .tag-pill {
	cursor: default;
}

.tag-pill.active {
	background: #77cbec;
	color: #000;
}

.dark .tag-pill {
	background: #333;
	color: #fafafa;
}

.dark .tag-pill.active {
	background: #2cb4eb;
	color: #000;
}

.sidebar-post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sidebar-post-list li {
	margin-bottom: 12px;
}

.sidebar-post-list a {
	font-weight: bold;
}

.sidebar-post-date {
	font-size: 0.8em;
	color: #888;
}

.dark .sidebar-post-date {
	color: #999;
}

.archive-entry {
	margin-bottom: 2em;
	padding-bottom: 1em;
	border-bottom: 1px solid #ddd;
}

.dark .archive-entry {
	border-bottom-color: #444;
}

.archive-entry h3 {
	margin-bottom: 0.2em;
}

.archive-post-date {
	font-size: 0.85em;
	color: #888;
	margin-bottom: 0.5em;
}

.dark .archive-post-date {
	color: #999;
}

.post-teaser-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 10px;
}

.post-teaser {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}

.post-teaser-thumb {
	height: 50px;
	width: auto;
	flex-shrink: 0;
	border-radius: 4px;
}

.post-teaser-title {
	font-weight: bold;
}

.post-teaser:hover .post-teaser-title {
	text-decoration: underline;
}

.post-teaser-date {
	color: #888;
	margin-right: 10px;
	font-size: 0.9em;
}

.dark .post-teaser-date {
	color: #999;
}

.view-all-posts {
	font-size: 0.9em;
}

.blog-sidebar-toggle {
	display: none;
	width: 100%;
	margin-bottom: 10px;
	padding: 10px 14px;
	background: #e0e0e0;
	color: inherit;
	border: none;
	border-radius: 6px;
	font-size: 1em;
	font-weight: bold;
	text-align: left;
	cursor: pointer;
}

.blog-sidebar-toggle::after {
	content: ' \25be';
}

.blog-sidebar-toggle[aria-expanded="true"]::after {
	content: ' \25b4';
}

.dark .blog-sidebar-toggle {
	background: #333;
}

@media screen and (max-width: 700px) {
	.blog-layout {
		flex-direction: column;
		align-items: stretch;
	}

	.blog-sidebar {
		flex: none;
		position: static;
		width: 100%;
	}

	.blog-sidebar-toggle {
		display: block;
	}

	#blog-sidebar {
		display: none;
	}

	#blog-sidebar.open {
		display: block;
	}
}
