/*
	Biffin Boy's devblog styles (index.html latest posts + blog.html).
	Works on top of main.css (template look) and dark.css; dark-mode tweaks are at the bottom.
*/

/* Friendly placeholder text (no posts, or JavaScript off) */
.blog-empty {
	color: #a1aaa5;
	font-style: italic;
	margin: 0;
}

/* Tag filter buttons (blog.html) */
ul.blog-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	list-style: none;
	padding: 0;
	margin: 0 0 1em 0;
}

ul.blog-tags li {
	padding: 0;
}

.button.small {
	font-size: 0.95em;
	padding: 0.6em 1.2em;
}

.blog-count {
	display: inline-block;
	min-width: 1.6em;
	margin-left: 0.35em;
	padding: 0.15em 0.4em;
	border-radius: 1em;
	background: rgba(0, 0, 0, 0.12);
	font-size: 0.85em;
	line-height: 1.2;
}

.blog-filter-status {
	min-height: 1.5em;
	margin: 0 0 1.5em 0;
	color: #a1aaa5;
	font-size: 0.9em;
}

/* Posts */
.blog-post {
	scroll-margin-top: 80px;           /* keep the title clear of the fixed nav when jumping to #slug */
	border-radius: 8px;
	transition: box-shadow 0.4s ease-in-out;
}

.blog-post[hidden],
ul.divided > li[hidden] {
	display: none !important;
}

#blog-list .blog-post + .blog-post {
	border-top: solid 2px #e7eae8;
	padding-top: 3em;
	margin-top: 3em;
}

#blog-list .box.post h3 {
	font-size: 2.25em;
}

#blog-list .box.post header {
	margin-bottom: 1.5em;
}

.blog-post h3 a {
	text-decoration: none;
}

.blog-post.is-target {
	box-shadow: -12px 0 0 0 #b1ddab;   /* green marker next to the post you jumped to */
}

.blog-body h3 {
	font-size: 1.6em;
	margin: 1.5em 0 0.5em 0;
}

.blog-body h4 {
	font-size: 1.3em;
	margin: 1.5em 0 0.5em 0;
}

.blog-body h5 {
	font-size: 1.1em;
	margin: 1.25em 0 0.5em 0;
}

.blog-body ul,
.blog-body ol {
	margin-bottom: 2em;
}

.blog-body ul li,
.blog-body ol li {
	margin-bottom: 0.4em;
}

.blog-body > :last-child {
	margin-bottom: 0;
}

.blog-body code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 0.9em;
}

.blog-post .image.featured {
	margin-bottom: 2em;
}

/* Slightly tighter paragraphs inside posts than the template default */
.blog-body p {
	margin-bottom: 1.25em;
}

/* Sidebar lists: tidy line height for multi-line titles */
#blog-recent .post-summary h3,
#blog-index .post-summary h3 {
	line-height: 1.25em;
}

#blog-recent .post-summary h3 a,
#blog-index .post-summary h3 a {
	text-decoration: none;
}

#blog-recent ul.divided {
	margin-bottom: 2em;
}

#blog-recent .blog-empty {
	padding: 0;
}

@media screen and (max-width: 736px) {
	#blog-list .box.post h3 {
		font-size: 1.6em;
	}

	.blog-post.is-target {
		box-shadow: -8px 0 0 0 #b1ddab;
	}
}

/* ---------- Dark mode ---------- */
html[data-theme="dark"] .blog-empty,
html[data-theme="dark"] .blog-filter-status {
	color: #a3aba6;
}

html[data-theme="dark"] #blog-list .blog-post + .blog-post {
	border-top-color: #34393c;
}

html[data-theme="dark"] .blog-count {
	background: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .blog-post.is-target {
	box-shadow: -12px 0 0 0 #3d6b37;
}

html[data-theme="dark"] .blog-body code {
	background: rgba(255, 255, 255, 0.08);
}
