/*
Theme Name: Minimal Unix3r
Theme URI: https://unix3r.com/
Author: Ahmad Na
Author URI: https://unix3r.com/
Email: ahmad@naamna.com
Description: Minimal readable WordPress blog theme with light/dark mode, category pills, and thumbnail-left cards.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: plainlogwp
*/

:root {
	--bg-body: #ffffff;
	--text-primary: #1a1c1e;
	--border-subtle: #e2e0db;
	--meta-color: #8f8a7c;
	--title-color: #0b2b26;
	--post-title: #1f3b36;
	--excerpt-color: #2d3e3a;
	--link-color: #3f786e;
	--link-hover: #1e4e44;
	--footer-color: #7a6e64;
	--card-border: #ece8e2;
	--toggle-bg: #e9e5de;
	--toggle-icon: #4a4a44;
	--nav-bg: transparent;
	--nav-hover: #e6e0d6;
	--category-bg: #f0ede7;
	--category-active: #3f786e;
	--category-text: #2b5349;
	--quote-bg: #f5f2ed;
	--code-bg: #f3efe9;
	--code-border: #e1dbd2;
	--card-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	--card-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.12);
}

body.dark {
	--bg-body: #121212;
	--text-primary: #e6e3dc;
	--border-subtle: #2c2c2a;
	--meta-color: #9c9286;
	--title-color: #cfe6e0;
	--post-title: #d4e9e3;
	--excerpt-color: #cbd8d4;
	--link-color: #7ab3a8;
	--link-hover: #9ed5c9;
	--footer-color: #a69b8e;
	--card-border: #2e2e2c;
	--toggle-bg: #2a2a28;
	--toggle-icon: #ddd8ce;
	--nav-hover: #2a2824;
	--category-bg: #24221f;
	--category-active: #5f9e92;
	--category-text: #c2dfd8;
	--quote-bg: #1e1e1c;
	--code-bg: #1b1b1b;
	--code-border: #313131;
	--card-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
	--card-shadow-hover: 0 20px 42px rgba(0, 0, 0, 0.35);
}

* {
	box-sizing: border-box;
	transition:
		background-color 0.22s ease,
		color 0.22s ease,
		border-color 0.22s ease,
		box-shadow 0.22s ease,
		transform 0.22s ease,
		opacity 0.22s ease;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg-body);
	color: var(--text-primary);
	font-family: 'Space Grotesk', system-ui, sans-serif;
	line-height: 1.6;
	font-size: 16px;
	opacity: 0;
}

body.page-loaded {
	animation: pageFadeIn 0.7s ease forwards;
}

@keyframes pageFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--link-color);
	text-decoration: none;
}

a:hover {
	color: var(--link-hover);
}

.site-wrap {
	max-width: 960px;
	margin: 0 auto;
	padding: 1.5rem 1.2rem;
}

.site-header {
	position: relative;
	z-index: 100;
}

.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1rem;
	position: relative;
	z-index: 200;
}

.brand-area {
	display: flex;
	align-items: baseline;
	gap: 0.85rem;
	flex-wrap: wrap;
	flex: 0 0 auto;
	min-width: 0;
}

.blog-title,
.site-title {
	font-size: 2rem;
	font-weight: 500;
	letter-spacing: -0.3px;
	margin: 0;
	color: var(--title-color);
	line-height: 1;
}

.site-title a {
	color: inherit;
	display: inline-block;
}

.site-title a:hover {
	transform: translateY(-1px);
}

.blog-sub,
.site-description,
.header-site-description,
.brand-area .site-description {
	color: var(--meta-color);
	font-size: 0.8rem;
	margin-top: 4px;
	line-height: 1.2;
	white-space: nowrap;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	position: relative;
	z-index: 300;
}

.header-tools {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	position: relative;
	z-index: 400;
}

.header-nav {
	display: flex;
	gap: 1.2rem;
	flex-wrap: wrap;
	align-items: center;
	position: relative;
	z-index: 500;
}

.header-nav ul {
	list-style: none;
	display: flex;
	gap: 0.7rem;
	padding: 0;
	margin: 0;
	flex-wrap: wrap;
}

.header-nav li {
	margin: 0;
	padding: 0;
}

.header-nav a {
	color: var(--text-primary);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 470;
	padding: 0.48rem 0.85rem;
	border-radius: 999px;
	border: 1px solid transparent;
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.header-nav a:hover {
	color: var(--link-color);
	background: var(--category-bg);
	border-color: var(--border-subtle);
	transform: translateY(-1px);
}

.header-nav .current-menu-item > a,
.header-nav .current_page_item > a,
.header-nav .current-menu-ancestor > a,
.header-nav .current-page-ancestor > a,
.header-nav .current_page_parent > a {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.mode-toggle {
	cursor: pointer;
	background: var(--toggle-bg);
	border-radius: 40px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	font-size: 0.8rem;
	font-weight: 450;
	border: 1px solid var(--border-subtle);
	color: var(--text-primary);
}

.mode-toggle:hover {
	transform: translateY(-1px);
	box-shadow: var(--card-shadow);
}

.category-bar {
	margin: 1.2rem 0 2rem 0;
	padding: 0.75rem 0;
	border-top: 1px solid var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.7rem;
	justify-content: center;
}

.cat-btn,
.cat-link,
.category-bar a {
	border: 1px solid transparent;
	font-size: 0.85rem;
	padding: 0.42rem 0.85rem;
	border-radius: 999px;
	color: #fff;
	display: inline-block;
	font-weight: 600;
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.category-bar a:hover {
	transform: translateY(-2px) scale(1.02);
	filter: brightness(1.04);
	color: #fff;
}

.category-bar a.is-active,
.category-bar .current-cat a {
	outline: 2px solid var(--text-primary);
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(63, 120, 110, 0.15);
}

.cat-link {
	background: #64748b;
}

.cat-link.cat-color-1 { background: #ef4444; }
.cat-link.cat-color-2 { background: #f97316; }
.cat-link.cat-color-3 { background: #f59e0b; }
.cat-link.cat-color-4 { background: #84cc16; }
.cat-link.cat-color-5 { background: #10b981; }
.cat-link.cat-color-6 { background: #14b8a6; }
.cat-link.cat-color-7 { background: #06b6d4; }
.cat-link.cat-color-8 { background: #3b82f6; }
.cat-link.cat-color-9 { background: #6366f1; }
.cat-link.cat-color-10 { background: #8b5cf6; }
.cat-link.cat-color-11 { background: #d946ef; }
.cat-link.cat-color-12 { background: #ec4899; }

body.dark .category-bar a.is-active,
body.dark .category-bar .current-cat a {
	outline-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
}

.has-sidebar .content-area {
	grid-template-columns: minmax(0, 1fr) 280px;
	align-items: start;
}

.main-content {
	min-width: 0;
}

.widget-area {
	border-left: 1px solid var(--border-subtle);
	padding-left: 1.25rem;
}

.widget {
	margin-bottom: 2rem;
}

.widget-title {
	font-size: 1rem;
	margin: 0 0 0.8rem;
	color: var(--post-title);
}

.widget ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget li {
	margin-bottom: 0.5rem;
}

.post-card {
	display: flex;
	gap: 1.4rem;
	border-bottom: 1px solid var(--card-border);
	padding: 1.8rem 0;
	align-items: flex-start;
	opacity: 0;
	transform: translateY(24px);
	will-change: transform, opacity;
}

.page-loaded .post-card,
.page-loaded .archive-header,
.page-loaded .author-hero,
.page-loaded .page-article,
.page-loaded .single-article,
.page-loaded .widget,
.page-loaded .plain-footer {
	animation: revealUp 0.7s ease forwards;
}

.page-loaded .post-card:nth-of-type(1) { animation-delay: 0.08s; }
.page-loaded .post-card:nth-of-type(2) { animation-delay: 0.14s; }
.page-loaded .post-card:nth-of-type(3) { animation-delay: 0.20s; }
.page-loaded .post-card:nth-of-type(4) { animation-delay: 0.26s; }
.page-loaded .post-card:nth-of-type(5) { animation-delay: 0.32s; }
.page-loaded .post-card:nth-of-type(6) { animation-delay: 0.38s; }
.page-loaded .post-card:nth-of-type(7) { animation-delay: 0.44s; }
.page-loaded .post-card:nth-of-type(8) { animation-delay: 0.50s; }

.page-loaded .archive-header { animation-delay: 0.06s; opacity: 0; transform: translateY(20px); }
.page-loaded .author-hero { animation-delay: 0.08s; opacity: 0; transform: translateY(20px); }
.page-loaded .page-article,
.page-loaded .single-article,
.page-loaded .widget,
.page-loaded .plain-footer {
	opacity: 0;
	transform: translateY(20px);
	animation-delay: 0.1s;
}

@keyframes revealUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.post-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--card-shadow);
	border-radius: 18px;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	background: rgba(127, 127, 127, 0.02);
}

.post-thumb {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.post-thumb a,
.post-thumb img {
	width: 100%;
	height: 100%;
	display: block;
}

.post-thumb a {
	display: flex;
	align-items: center;
	justify-content: center;
}

.post-thumb img {
	object-fit: cover;
	transition: transform 0.45s ease, filter 0.45s ease;
}

.post-card:hover .post-thumb img {
	transform: scale(1.08);
	filter: brightness(1.04);
}

.post-thumb.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	color: var(--link-color);
}

.no-thumb-icon {
	font-size: 2rem;
	opacity: 0.6;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.post-content {
	flex: 1;
	min-width: 0;
}

.post-title,
.entry-title {
	font-size: 1.6rem;
	font-weight: 480;
	margin: 0 0 0.3rem;
	color: var(--post-title);
	line-height: 1.3;
	word-break: break-word;
}

.post-title a,
.entry-title a {
	color: inherit;
}

.post-title a:hover,
.single-post-title:hover {
	color: var(--link-color);
}

.post-meta,
.entry-meta {
	font-size: 0.75rem;
	color: var(--meta-color);
	margin-bottom: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.post-category-badge,
.category-badge,
.post-meta .cat-links a,
.entry-meta .cat-links a {
	background: var(--category-bg);
	padding: 0.15rem 0.6rem;
	border-radius: 20px;
	font-size: 0.72rem;
	text-transform: lowercase;
	display: inline-block;
}

.post-meta .cat-links a:hover,
.entry-meta .cat-links a:hover {
	transform: translateY(-1px);
}

.post-excerpt,
.entry-summary {
	font-size: 0.95rem;
	color: var(--excerpt-color);
	margin-bottom: 0.7rem;
	line-height: 1.55;
}

.read-link {
	color: var(--link-color);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 470;
	border-bottom: 1px dotted var(--link-color);
}

.read-link:hover {
	letter-spacing: 0.01em;
}

.archive-header,
.page-header {
	margin-bottom: 2rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border-subtle);
}

.archive-title,
.page-title {
	font-size: 2rem;
	margin: 0 0 0.4rem;
	color: var(--post-title);
}

.archive-description,
.page-subtitle {
	color: var(--meta-color);
}

.single-article,
.page-article {
	padding-bottom: 2rem;
}

.post-hero {
	margin-bottom: 2rem;
}

.post-thumb-large {
	width: 120px;
	height: 120px;
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	margin-bottom: 1.25rem;
}

.post-thumb-large img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-thumb-large.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: var(--link-color);
}

.single-post-title {
	font-size: 2.6rem;
	font-weight: 520;
	letter-spacing: -0.02em;
	color: var(--post-title);
	margin: 0.5rem 0 0.75rem;
	line-height: 1.2;
	word-break: break-word;
}

.post-meta-single {
	display: flex;
	gap: 1rem 1.5rem;
	flex-wrap: wrap;
	font-size: 0.8rem;
	color: var(--meta-color);
	margin-bottom: 1.2rem;
	border-bottom: 1px solid var(--border-subtle);
	padding-bottom: 1rem;
	align-items: center;
}

.post-content-single,
.entry-content {
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--excerpt-color);
}

.entry-content p,
.post-content-single p {
	margin-bottom: 1.4rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	color: var(--post-title);
	line-height: 1.3;
	margin: 1.6rem 0 0.9rem;
}

.entry-content blockquote,
.post-content-single blockquote {
	border-left: 4px solid var(--link-color);
	background: var(--quote-bg);
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
	font-style: italic;
	border-radius: 8px;
	box-shadow: var(--card-shadow);
}

.entry-content pre,
.entry-content code,
.entry-content kbd,
.entry-content samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.entry-content pre {
	background: var(--code-bg);
	border: 1px solid var(--code-border);
	padding: 1rem;
	overflow: auto;
	border-radius: 10px;
	font-size: 0.92rem;
}

.entry-content code {
	background: var(--code-bg);
	border: 1px solid var(--code-border);
	padding: 0.12rem 0.35rem;
	border-radius: 6px;
	font-size: 0.92em;
}

.entry-content pre code {
	background: transparent;
	border: none;
	padding: 0;
}

.wp-block-image,
.entry-content figure {
	margin: 1.5rem 0;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption,
.blocks-gallery-caption {
	font-size: 0.85rem;
	color: var(--meta-color);
	margin-top: 0.4rem;
}

.post-tags {
	margin-top: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.post-tags a {
	background: var(--category-bg);
	padding: 0.3rem 0.65rem;
	border-radius: 18px;
	font-size: 0.82rem;
}

.post-tags-inline {
	margin-top: 0.85rem;
	margin-bottom: 0.9rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.post-tags-inline a {
	display: inline-block;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--meta-color);
	font-size: 0.78rem;
	line-height: 1;
	border: 1px solid var(--border-subtle);
	text-decoration: none;
}

.post-tags-inline a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-1px);
}

.post-navigation {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border-subtle);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	border: 1px solid var(--border-subtle);
	border-radius: 14px;
	padding: 1rem;
	background: var(--category-bg);
	min-height: 100%;
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
	transform: translateY(-3px);
	box-shadow: var(--card-shadow);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 0.72rem;
	color: var(--meta-color);
	text-transform: uppercase;
	margin-bottom: 0.4rem;
	letter-spacing: 0.3px;
}

.post-navigation .nav-title {
	font-size: 0.98rem;
	color: var(--post-title);
	font-weight: 500;
	line-height: 1.4;
}

.post-navigation .nav-thumb {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 0.7rem;
	border: 1px solid var(--border-subtle);
}

.post-navigation .nav-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.post-navigation .nav-previous:hover .nav-thumb img,
.post-navigation .nav-next:hover .nav-thumb img {
	transform: scale(1.08);
}

.pagination-wrap {
	margin-top: 2rem;
}

.pagination,
.nav-links.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.page-numbers,
.page-links > * {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: 0.55rem 0.8rem;
	border-radius: 10px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	font-size: 0.9rem;
}

.page-numbers:hover,
.page-links > *:hover {
	transform: translateY(-1px);
	box-shadow: var(--card-shadow);
}

.page-numbers.current,
.page-links > .current {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
}

.searchform {
	display: flex;
	gap: 0.6rem;
	flex-wrap: wrap;
	margin: 0 0 1.5rem;
}

.searchform input[type="search"],
.searchform input[type="text"],
.search-form input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
	width: 100%;
	padding: 0.8rem 0.95rem;
	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font: inherit;
}

.searchform input[type="search"]:focus,
.search-form input[type="search"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
.header-search-input:focus {
	outline: none;
	border-color: var(--link-color);
	box-shadow: 0 0 0 3px rgba(63, 120, 110, 0.12);
}

.searchform button,
.search-submit,
button,
input[type="submit"] {
	padding: 0.8rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	cursor: pointer;
	font: inherit;
}

.searchform button:hover,
.search-submit:hover,
button:hover,
input[type="submit"]:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--card-shadow);
}

.no-posts {
	text-align: center;
	padding: 3rem 1rem;
	font-style: italic;
	color: var(--meta-color);
}

.comment-respond,
.comments-area {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border-subtle);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem;
}

.comment-list li {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border-subtle);
}

.comment-meta {
	font-size: 0.82rem;
	color: var(--meta-color);
	margin-bottom: 0.7rem;
}

.comment-content {
	color: var(--excerpt-color);
}

.plain-footer {
	margin-top: 3rem;
	padding: 1.8rem 0 1rem;
	border-top: 1px solid var(--border-subtle);
	font-size: 0.8rem;
	color: var(--footer-color);
	text-align: center;
}

.screen-reader-text {
	position: absolute;
	left: -9999px;
}

.alignleft {
	float: left;
	margin-right: 1rem;
	margin-bottom: 0.5rem;
}

.alignright {
	float: right;
	margin-left: 1rem;
	margin-bottom: 0.5rem;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.clearfix::after,
.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.header-search-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.header-search-input {
	width: 180px;
	padding: 0.55rem 0.8rem;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font: inherit;
	font-size: 0.9rem;
	outline: none;
}

.header-search-button {
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

.header-search-button:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
}

.post-meta a,
.post-meta-single a {
	color: var(--meta-color);
	text-decoration: none;
	border-bottom: 1px dotted transparent;
}

.post-meta a:hover,
.post-meta-single a:hover {
	color: var(--link-color);
	border-bottom-color: var(--link-color);
}

.footer-tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin-bottom: 1.2rem;
	padding-bottom: 1.2rem;
	border-bottom: 1px solid var(--border-subtle);
}

.footer-tags a {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--meta-color);
	font-size: 0.82rem;
	text-decoration: none;
	border: 1px solid var(--border-subtle);
}

.footer-tags a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-1px);
}

.single-content-area,
.single-main-content,
.single-article {
	width: 100%;
}

.single-article {
	background: transparent;
}

.post-thumb-full-wrap {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
	border-radius: 18px;
	margin-bottom: 28px;
	background: #111;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.post-thumb-full-link {
	display: block;
	width: 100%;
	height: 100%;
}

.post-thumb-full-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1);
	transition: transform 0.5s ease, filter 0.5s ease;
	filter: brightness(0.78) contrast(1.05);
}

.post-thumb-full-wrap:hover .post-thumb-full-img {
	transform: scale(1.06);
	filter: brightness(0.88) contrast(1.12);
}

.post-thumb-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.05) 100%);
	pointer-events: none;
}

.post-thumb-full-wrap.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #111, #1c1c1c);
}

.post-thumb-full-placeholder {
	font-size: 72px;
	color: rgba(255, 255, 255, 0.18);
	z-index: 2;
}

.single-header-box {
	margin-bottom: 26px;
}

.single-post-title {
	font-size: 2.4rem;
	line-height: 1.2;
	margin: 0 0 14px;
}

.post-meta-single {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	font-size: 0.95rem;
	opacity: 0.9;
}

.post-meta-single span,
.post-meta-single a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.advanced-search-form {
	padding: 1.1rem;
	border: 1px solid var(--border-subtle);
	border-radius: 18px;
	background: var(--category-bg);
	margin-bottom: 1.7rem;
}

.advanced-search-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

.search-field-main {
	grid-column: 1 / -1;
}

.search-field-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.search-field-wrap label {
	font-size: 0.82rem;
	color: var(--meta-color);
	font-weight: 600;
}

.search-field-wrap select,
.search-field-wrap input[type="search"] {
	width: 100%;
	padding: 0.85rem 0.95rem;
	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font: inherit;
}

.search-type-wrap {
	grid-column: span 2;
}

.search-type-options {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
	padding-top: 0.2rem;
}

.search-check {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--border-subtle);
	border-radius: 999px;
	background: var(--bg-body);
	cursor: pointer;
	font-size: 0.9rem;
}

.search-check input {
	margin: 0;
}

.advanced-search-actions {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-top: 1rem;
}

.search-reset-link {
	display: inline-flex;
	align-items: center;
	padding: 0.8rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	background: transparent;
	color: var(--meta-color);
	text-decoration: none;
}

.search-reset-link:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-1px);
}

.search-result-top {
	margin-bottom: 0.55rem;
}

.result-type-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	border: 1px solid var(--border-subtle);
}

.result-type-post {
	background: rgba(63, 120, 110, 0.12);
	color: var(--link-color);
}

.result-type-page {
	background: rgba(99, 102, 241, 0.12);
	color: #6366f1;
}

.author-hero {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 1.4rem;
	align-items: start;
	padding: 1.4rem;
	border: 1px solid var(--border-subtle);
	border-radius: 22px;
	background: var(--category-bg);
	margin-bottom: 2rem;
	box-shadow: var(--card-shadow);
}

.author-avatar-wrap {
	width: 140px;
}

.author-avatar {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	display: block;
	border: 1px solid var(--border-subtle);
}

.author-kicker {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--meta-color);
	margin-bottom: 0.35rem;
}

.author-name {
	font-size: 2.2rem;
	line-height: 1.15;
	margin: 0 0 0.6rem;
	color: var(--post-title);
}

.author-meta-line {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
	font-size: 0.92rem;
	color: var(--meta-color);
	margin-bottom: 1rem;
}

.author-bio {
	font-size: 1rem;
	color: var(--excerpt-color);
	line-height: 1.7;
}

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

.author-posts-header {
	margin-top: 2.2rem;
}

.mobile-menu-toggle {
	display: none;
	width: 46px;
	height: 46px;
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	background: var(--category-bg);
	padding: 0;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
}

.mobile-menu-toggle:hover {
	transform: translateY(-1px);
	box-shadow: var(--card-shadow);
}

.mobile-menu-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--text-primary);
	border-radius: 999px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
	opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border-subtle);
}

.footer-widget {
	text-align: left;
}

.footer-widget .widget-title {
	margin-bottom: 0.6rem;
	font-size: 0.95rem;
}

/* Header dropdown */
.header-nav .primary-menu,
.header-nav .primary-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.header-nav .primary-menu {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
}

.header-nav .primary-menu > li {
	position: relative;
	margin: 0;
}

.header-nav .primary-menu > li > a {
	position: relative;
	z-index: 2;
}

.header-nav .menu-item-has-children {
	position: relative;
}

.header-nav .menu-item-has-children > a {
	padding-right: 2.5rem;
}

.header-nav .submenu-toggle {
	position: absolute;
	right: 0.55rem;
	top: 50%;
	transform: translateY(-50%);
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 999px;
	color: var(--text-primary);
	z-index: 3;
}

.header-nav .submenu-toggle:hover {
	background: rgba(0, 0, 0, 0.06);
}

body.dark .header-nav .submenu-toggle:hover {
	background: rgba(255, 255, 255, 0.08);
}

.header-nav .submenu-toggle span {
	display: block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -3px;
	transition: transform 0.2s ease, margin 0.2s ease;
}

.header-nav .menu-item-has-children.submenu-open > .submenu-toggle span {
	transform: rotate(225deg);
	margin-top: 2px;
}

.header-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	display: none;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 220px;
	padding: 0.5rem;
	margin: 2px 0 0;
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
	z-index: 9999;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
}

body.dark .header-nav .sub-menu {
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.header-nav .menu-item-has-children::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	height: 12px;
}

.header-nav .menu-item-has-children.submenu-open > .sub-menu {
	display: flex;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.header-nav .sub-menu li {
	width: 100%;
	margin: 0;
}

.header-nav .sub-menu a {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0.8rem 0.95rem;
	border-radius: 12px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--text-primary);
	font-size: 0.92rem;
	line-height: 1.2;
}

.header-nav .sub-menu a:hover,
.header-nav .sub-menu .current-menu-item > a,
.header-nav .sub-menu .current_page_item > a {
	background: var(--category-bg);
	color: var(--link-color);
	border-color: var(--border-subtle);
}

@media (min-width: 761px) {
	.header-nav .menu-item-has-children:hover > .sub-menu,
	.header-nav .menu-item-has-children:focus-within > .sub-menu {
		display: flex;
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}
}

@media (max-width: 900px) {
	.advanced-search-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.search-type-wrap {
		grid-column: 1 / -1;
	}
}

@media (max-width: 860px) {
	.has-sidebar .content-area {
		grid-template-columns: 1fr;
	}

	.widget-area {
		border-left: none;
		padding-left: 0;
		border-top: 1px solid var(--border-subtle);
		padding-top: 1.5rem;
	}
}

@media (max-width: 760px) {
	.top-bar {
		align-items: flex-start;
	}

	.brand-area {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.35rem;
	}

	.header-site-description,
	.brand-area .site-description {
		white-space: normal;
	}

	.header-actions {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.9rem;
	}

	.mobile-menu-toggle {
		display: inline-flex;
		align-self: flex-end;
	}

	.header-tools {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0.9rem;
		padding-top: 0.25rem;
		opacity: 0;
		transform: translateY(-10px);
	}

	.header-tools.is-open {
		display: flex;
		opacity: 1;
		transform: translateY(0);
	}

	.header-nav,
	.header-nav ul {
		width: 100%;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0.55rem;
	}

	.header-nav .primary-menu > li,
	.header-nav li {
		width: 100%;
	}

	.header-nav a {
		width: 100%;
		justify-content: center;
		padding: 0.85rem 1rem;
		border-radius: 14px;
	}

	.header-nav .menu-item-has-children {
		width: 100%;
	}

	.header-nav .menu-item-has-children > a {
		width: 100%;
		padding-right: 3rem;
	}

	.header-nav .submenu-toggle {
		right: 0.9rem;
		top: 0.85rem;
		transform: none;
		width: 32px;
		height: 32px;
	}

	.header-nav .sub-menu {
		position: static;
		top: auto;
		left: auto;
		min-width: 100%;
		margin-top: 0.5rem;
		padding: 0.45rem;
		border-radius: 14px;
		box-shadow: none;
		background: var(--category-bg);
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		transform: none;
		pointer-events: none;
	}

	.header-nav .menu-item-has-children.submenu-open > .sub-menu {
		display: flex;
		max-height: 500px;
		opacity: 1;
		pointer-events: auto;
	}

	.header-nav .sub-menu a {
		justify-content: center;
		background: var(--bg-body);
	}

	.header-search-form {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}

	.header-search-input,
	.header-search-button,
	.mode-toggle {
		width: 100%;
	}

	.mode-toggle {
		justify-content: center;
		padding: 0.85rem 1rem;
		border-radius: 14px;
	}
}

@media (max-width: 700px) {
	.header-search-form {
		width: 100%;
	}

	.header-search-input {
		width: 100%;
		flex: 1 1 220px;
	}
}

@media (max-width: 640px) {
	.advanced-search-grid {
		grid-template-columns: 1fr;
	}

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

	.author-avatar-wrap {
		width: 100%;
	}

	.author-avatar {
		width: 110px;
		height: 110px;
	}
}

@media (max-width: 600px) {
	.site-wrap {
		padding: 1rem;
	}

	.post-card {
		flex-direction: column;
		gap: 0.8rem;
	}

	.post-thumb {
		width: 100%;
		max-width: 140px;
		height: 100px;
	}

	.blog-title,
	.site-title {
		font-size: 1.6rem;
	}

	.single-post-title {
		font-size: 1.9rem;
	}

	.post-thumb-large {
		width: 84px;
		height: 84px;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.header-nav ul {
		gap: 0.5rem;
	}
}

@media (max-width: 768px) {
	.post-thumb-full-wrap {
		height: 260px;
		border-radius: 14px;
	}

	.single-post-title {
		font-size: 1.8rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}

	body {
		opacity: 1 !important;
	}

	.post-card,
	.archive-header,
	.author-hero,
	.page-article,
	.single-article,
	.widget,
	.plain-footer {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ==============================
   🔥 Back To Top Button
============================== */

.back-to-top {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 9999;

	/* hidden by default */
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);

	transition: all 0.25s ease;
	box-shadow: var(--card-shadow);
}

.back-to-top:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-2px) scale(1.05);
	box-shadow: var(--card-shadow-hover);
}

.back-to-top.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top-icon {
	font-size: 18px;
	font-weight: bold;
	line-height: 1;
}

/* Mobile tweak */
@media (max-width: 600px) {
	.back-to-top {
		bottom: 16px;
		right: 16px;
		width: 42px;
		height: 42px;
	}
}

/* 🔥 Back To Top FIXED */
.back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;

	width: 50px;
	height: 50px;

	display: flex;
	align-items: center;
	justify-content: center;

	border-radius: 12px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);

	cursor: pointer;
	z-index: 999999;

	opacity: 0;
	visibility: hidden;

	transform: translateY(20px);
	transition: all 0.3s ease;
}

.back-to-top.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.back-to-top:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-3px) scale(1.05);
	box-shadow: var(--card-shadow-hover);
}

.back-to-top-icon {
	font-size: 20px;
	font-weight: bold;
}

/* mobile */
@media (max-width: 600px) {
	.back-to-top {
		right: 14px;
		bottom: 14px;
		width: 44px;
		height: 44px;
	}
}


/* ==============================
   🔥 ULTRA FANCY LOGO TEXT EFFECTS (Fixed - No Line Break)
============================== */

/* Main logo container - PREVENT LINE BREAK */
.site-title,
.blog-title {
    position: relative;
    display: inline-block;
    perspective: 500px;
    white-space: nowrap;
}

.site-title a,
.blog-title a {
    position: relative;
    display: inline-block;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

/* Animated gradient background with multiple colors */
.site-title a,
.blog-title a {
    background: linear-gradient(
        90deg,
        #3f786e 0%,
        #7ab3a8 20%,
        #2b5349 40%,
        #5f9e92 60%,
        #9ed5c9 80%,
        #3f786e 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    animation: gradientFlow 4s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Dark mode gradient */
body.dark .site-title a,
body.dark .blog-title a {
    background: linear-gradient(
        90deg,
        #7ab3a8 0%,
        #9ed5c9 25%,
        #5f9e92 50%,
        #cfe6e0 75%,
        #7ab3a8 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

/* 3D Hover Effect - NO LINE BREAK */
.site-title a:hover,
.blog-title a:hover {
    transform: translateZ(30px) scale(1.08);
    animation: none;
    background-position: 100% 50%;
    white-space: nowrap;
}

/* Multi-layer shadow effect */
.site-title a {
    text-shadow: 
        2px 2px 0 rgba(0, 0, 0, 0.05),
        4px 4px 0 rgba(0, 0, 0, 0.03),
        0px 0px 0 rgba(63, 120, 110, 0);
    transition: text-shadow 0.3s ease, transform 0.3s ease;
}

.site-title a:hover {
    text-shadow: 
        1px 1px 0 rgba(63, 120, 110, 0.2),
        2px 2px 0 rgba(63, 120, 110, 0.15),
        0px 0px 12px rgba(63, 120, 110, 0.5);
}

/* Glitch effect on hover */
.site-title a:hover {
    animation: glitch 0.3s infinite;
    position: relative;
}

@keyframes glitch {
    0% {
        transform: skew(0deg, 0deg) translateZ(30px) scale(1.08);
    }
    20% {
        transform: skew(2deg, 1deg) translateZ(30px) scale(1.08);
    }
    40% {
        transform: skew(-2deg, -1deg) translateZ(30px) scale(1.08);
    }
    60% {
        transform: skew(1deg, 0.5deg) translateZ(30px) scale(1.08);
    }
    80% {
        transform: skew(-1deg, -0.5deg) translateZ(30px) scale(1.08);
    }
    100% {
        transform: skew(0deg, 0deg) translateZ(30px) scale(1.08);
    }
}

/* Fancy underline with gradient and animation - KEEPS TEXT ON ONE LINE */
.site-title {
    position: relative;
}

.site-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        #3f786e, 
        #7ab3a8, 
        #9ed5c9, 
        #5f9e92, 
        #3f786e, 
        transparent
    );
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 10px rgba(63, 120, 110, 0.5);
}

.site-title:hover::after {
    width: 100%;
}

/* Second underline (top) */
.site-title::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #9ed5c9, 
        #7ab3a8, 
        #3f786e, 
        transparent
    );
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.1s;
}

.site-title:hover::before {
    width: 100%;
}

/* Sparkle effect without breaking line */
.site-title {
    overflow: visible;
}

.site-title a::before {
    content: '✨';
    position: absolute;
    left: -20px;
    top: -10px;
    opacity: 0;
    font-size: 14px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.site-title a::after {
    content: '✨';
    position: absolute;
    right: -20px;
    bottom: -10px;
    opacity: 0;
    font-size: 14px;
    transition: all 0.3s ease 0.1s;
    pointer-events: none;
}

.site-title a:hover::before {
    opacity: 1;
    left: -25px;
    top: -15px;
    transform: rotate(20deg) scale(1.2);
}

.site-title a:hover::after {
    opacity: 1;
    right: -25px;
    bottom: -15px;
    transform: rotate(-20deg) scale(1.2);
}

/* Neon pulse animation */
@keyframes neonPulse {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(63, 120, 110, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(63, 120, 110, 0.6));
    }
}

.site-title a {
    animation: neonPulse 3s ease-in-out infinite, gradientFlow 4s linear infinite;
}

.site-title a:hover {
    animation: glitch 0.3s infinite, gradientFlow 4s linear infinite;
}

/* Bounce on load - NO LINE BREAK */
@keyframes logoBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(2deg);
    }
    70% {
        transform: scale(0.95) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.page-loaded .site-title a {
    animation: logoBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, gradientFlow 4s linear infinite, neonPulse 3s ease-in-out infinite;
}

/* Wobble effect on hover */
.site-title a:hover {
    animation: wobble 0.5s ease-in-out, glitch 0.3s infinite, gradientFlow 4s linear infinite;
}

@keyframes wobble {
    0% {
        transform: translateZ(30px) scale(1.08) translateX(0px);
    }
    15% {
        transform: translateZ(30px) scale(1.08) translateX(-5px);
    }
    30% {
        transform: translateZ(30px) scale(1.08) translateX(4px);
    }
    45% {
        transform: translateZ(30px) scale(1.08) translateX(-3px);
    }
    60% {
        transform: translateZ(30px) scale(1.08) translateX(2px);
    }
    75% {
        transform: translateZ(30px) scale(1.08) translateX(-1px);
    }
    100% {
        transform: translateZ(30px) scale(1.08) translateX(0px);
    }
}

/* Background glow effect */
.site-title {
    position: relative;
}

.site-title .glow-bg {
    position: absolute;
    inset: -10px -20px;
    background: radial-gradient(ellipse at center, rgba(63, 120, 110, 0.15), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.site-title:hover .glow-bg {
    opacity: 1;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Rainbow text on active (fancy) */
.site-title a:active {
    background: linear-gradient(
        135deg,
        #ff6b6b,
        #ff9f43,
        #feca57,
        #48dbfb,
        #ff9ff3,
        #54a0ff,
        #5f27cd
    );
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: rainbowFlow 0.5s linear infinite;
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Responsive - PREVENTS LINE BREAK ON MOBILE */
@media (max-width: 600px) {
    .site-title a,
    .blog-title a {
        font-size: 1.6rem;
        white-space: nowrap;
    }
    
    .site-title::after,
    .site-title::before {
        height: 2px;
    }
    
    .site-title a::before,
    .site-title a::after {
        font-size: 10px;
    }
    
    /* Allow smaller screens to have normal wrap if needed */
    @media (max-width: 380px) {
        .site-title a,
        .blog-title a {
            white-space: normal;
            font-size: 1.4rem;
        }
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .site-title a,
    .site-title a:hover,
    .page-loaded .site-title a {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
    
    .site-title::after,
    .site-title::before {
        display: none;
    }
}

/* =========================================
   Centered header tools under the logo
   like the 2nd screenshot
========================================= */

.top-bar-centered {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	gap: 1rem;
	margin-bottom: 1rem;
}

.brand-area-centered {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.85rem;
	width: 100%;
	text-align: center;
}

.header-actions-centered {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.header-tools-centered {
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.header-nav {
	width: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.header-nav .primary-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.7rem;
	width: auto;
}

.header-search-form {
	width: auto;
	max-width: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	margin: 0;
	flex: 0 0 auto;
}

.header-search-input {
	width: 260px;
	max-width: 260px;
	flex: 0 0 260px;
}

.header-search-button {
	flex: 0 0 auto;
}

.mode-toggle {
	margin: 0;
	flex: 0 0 auto;
}

.mobile-menu-toggle {
	align-self: center;
}

.header-site-description {
	text-align: center;
	white-space: nowrap;
}

/* keep logo centered */
.brand-area-centered .site-title,
.brand-area-centered .site-description {
	margin: 0;
}

/* mobile */
@media (max-width: 760px) {
	.brand-area-centered {
		flex-direction: column;
		align-items: center;
		gap: 0.35rem;
	}

	.header-site-description {
		white-space: normal;
	}

	.header-tools-centered {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		opacity: 0;
		transform: translateY(-10px);
	}

	.header-tools-centered.is-open {
		display: flex;
		opacity: 1;
		transform: translateY(0);
	}

	.header-nav,
	.header-nav .primary-menu,
	.header-search-form {
		width: 100%;
		max-width: 100%;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
	}

	.header-search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.header-search-input,
	.header-search-button,
	.mode-toggle {
		width: 100%;
		max-width: 100%;
		flex: none;
	}
}
.header-tools-centered {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.header-nav .primary-menu {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.header-search-input {
	width: 260px;
}

/* ===== Header Layout Fix ===== */

/* Top row */
.header-row {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	width: 100%;
	margin-bottom: 10px;
}

/* Logo left */
.brand-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Center section */
.header-center {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* Tools row */
.header-tools-centered {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
	width: 100%;
}

/* Menu */
.header-nav .primary-menu {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
}

/* Search */
.header-search-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.header-search-input {
	width: 260px;
}

/* Mobile */
@media (max-width: 760px) {

	.header-center {
		align-items: stretch;
	}

	.header-tools-centered {
		display: none;
		flex-direction: column;
		width: 100%;
	}

	.header-tools-centered.is-open {
		display: flex;
	}

	.header-search-input,
	.header-search-button,
	.mode-toggle {
		width: 100%;
	}

	.header-nav .primary-menu {
		flex-direction: column;
	}
}

/* 🔥 Line ABOVE menu/search (same as below) */

.header-center {
	border-top: 1px solid var(--border-subtle);
	padding-top: 1rem;
	margin-top: 0.8rem;
}

/* optional: improve spacing balance */
.header-tools-centered {
}

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	flex-wrap: wrap;
	width: 100%;
	margin-bottom: 0;
}

.brand-left,
.brand-area.brand-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 0 0 auto;
	min-width: 0;
}

.header-center {
	flex: 1 1 auto;
	display: flex;
	justify-content: flex-end;
}

.header-top-tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.9rem;
	flex-wrap: wrap;
	width: 100%;
}

.header-nav {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 1 1 auto;
	width: auto;
}

.header-nav .primary-menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 0.7rem;
	width: auto;
}

.mode-toggle {
	flex: 0 0 auto;
	margin: 0;
	white-space: nowrap;
}

.header-search-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	width: 100%;
	margin: 1rem 0 0 0;
	padding: 1rem 0;
	border-top: 1px solid var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
}

.header-search-input {
	width: 280px;
	max-width: 100%;
	flex: 0 1 280px;
}

.header-search-button {
	flex: 0 0 auto;
}

@media (max-width: 760px) {
	.header-row {
		flex-direction: column;
		align-items: stretch;
		gap: 0.9rem;
	}

	.brand-left,
	.brand-area.brand-left {
		width: 100%;
		align-items: flex-start;
	}

	.mobile-menu-toggle {
		display: inline-flex;
		align-self: flex-end;
		margin-bottom: 0.25rem;
	}

	.header-center.header-tools.header-tools-centered {
		display: none;
		width: 100%;
		opacity: 0;
		transform: translateY(-10px);
	}

	.header-center.header-tools.header-tools-centered.is-open {
		display: flex;
		opacity: 1;
		transform: translateY(0);
	}

	.header-top-tools {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0.85rem;
	}

	.header-nav,
	.header-nav .primary-menu {
		width: 100%;
		justify-content: stretch;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
	}

	.header-nav a {
		width: 100%;
		justify-content: center;
	}

	.mode-toggle,
	.header-search-input,
	.header-search-button {
		width: 100%;
		max-width: 100%;
	}

	.header-search-form {
		flex-direction: column;
		align-items: stretch;
	}
}

/* ===== FINAL HEADER FIX ===== */

/* TOP ROW */
.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

/* LEFT SIDE */
.brand-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* RIGHT SIDE (menu + toggle) */
.header-right {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* MENU */
.header-nav .primary-menu {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
}

/* DARK MODE */
.mode-toggle {
	white-space: nowrap;
}

/* SEARCH BETWEEN LINES */
.header-search-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;

	margin-top: 1rem;
	padding: 1rem 0;

	border-top: 1px solid var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
}

.header-search-input {
	width: 280px;
	max-width: 100%;
}

@media (max-width: 760px) {
	.header-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.header-right {
		width: 100%;
		justify-content: center;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		width: 100%;
		align-items: stretch;
	}

	.header-nav a {
		width: 100%;
		justify-content: center;
	}

	.mode-toggle {
		width: 100%;
		text-align: center;
	}

	.header-search-form {
		flex-direction: column;
	}
}

/* ===== HEADER FINAL MOBILE FIX ===== */

.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.brand-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 0 0 auto;
	min-width: 0;
}

.header-right {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	flex: 1 1 auto;
	justify-content: flex-end;
	min-width: 0;
}

.header-nav {
	min-width: 0;
}

.header-nav .primary-menu {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
}

.mode-toggle {
	white-space: nowrap;
	flex: 0 0 auto;
}

.header-search-form {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	width: 100%;
	margin-top: 1rem;
	padding: 0.75rem 0;
	border-top: 1px solid var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
}

.header-search-input {
	width: 280px;
	max-width: 100%;
	height: 42px;
	padding: 0 0.9rem;
	line-height: 42px;
	border-radius: 999px;
}

.header-search-button {
	height: 42px;
	padding: 0 1rem;
	border-radius: 999px;
	line-height: 1;
}

.mobile-menu-toggle {
	display: none;
}

@media (max-width: 760px) {
	.header-row {
		align-items: flex-start;
	}

	.brand-left {
		width: calc(100% - 60px);
	}

	.mobile-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		align-self: flex-start;
		margin-left: auto;
	}

	.header-right {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.75rem;
		margin-top: 0.5rem;
	}

	.header-right.is-open {
		display: flex;
	}

	.header-nav,
	.header-nav .primary-menu {
		width: 100%;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.header-nav li {
		width: 100%;
	}

	.header-nav a {
		width: 100%;
		justify-content: center;
	}

	.mode-toggle {
		width: 100%;
		justify-content: center;
	}

	.header-search-form {
		flex-direction: row;
		align-items: center;
		gap: 0.45rem;
		padding: 0.6rem 0;
	}

	.header-search-input {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		height: 38px;
		padding: 0 0.75rem;
		line-height: 38px;
		font-size: 0.9rem;
	}

	.header-search-button {
		height: 38px;
		padding: 0 0.9rem;
		font-size: 0.85rem;
		white-space: nowrap;
	}
}

@media (max-width: 480px) {
	.header-search-form {
		flex-direction: column;
		align-items: stretch;
		gap: 0.45rem;
	}

	.header-search-input,
	.header-search-button {
		width: 100%;
		height: 36px;
	}

	.header-search-input {
		padding: 0 0.7rem;
		line-height: 36px;
	}

	.header-search-button {
		padding: 0 0.8rem;
	}
}

@media (max-width: 760px) {
	.header-row {
		align-items: flex-start;
	}

	.brand-left {
		width: calc(100% - 60px);
	}

	.mobile-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		align-self: flex-start;
		margin-left: auto;
	}

	.header-right {
		display: none;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.75rem;
		margin-top: 0.5rem;
	}

	.header-right.is-open {
		display: flex;
	}

	.header-nav,
	.header-nav .primary-menu {
		width: 100%;
	}

	.header-nav .primary-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

	.header-nav li {
		width: 100%;
		position: relative;
	}

	.header-nav a {
		width: 100%;
		justify-content: center;
	}

	.mode-toggle {
		width: 100%;
		justify-content: center;
	}

	.header-nav .sub-menu {
		position: static;
		display: none;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		min-width: 100%;
		margin-top: 0.45rem;
		padding: 0.45rem;
		border-radius: 12px;
		box-shadow: none;
		background: var(--category-bg);
	}

	.header-nav .menu-item-has-children.submenu-open > .sub-menu {
		display: flex;
		flex-direction: column;
	}

	.header-nav .submenu-toggle {
		position: absolute;
		right: 0.8rem;
		top: 0.7rem;
		transform: none;
		width: 32px;
		height: 32px;
	}

	.header-search-form {
		flex-direction: row;
		align-items: center;
		gap: 0.45rem;
		padding: 0.6rem 0;
	}

	.header-search-input {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		height: 38px;
		padding: 0 0.75rem;
		line-height: 38px;
		font-size: 0.9rem;
	}

	.header-search-button {
		height: 38px;
		padding: 0 0.9rem;
		font-size: 0.85rem;
		white-space: nowrap;
	}
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}
.grid-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--card-border);
	border-radius: 16px;
	overflow: hidden;
	background: var(--bg-body);
	padding: 0;
	transition: all 0.25s ease;
}

.grid-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--card-shadow-hover);
}
.grid-card .post-thumb {
	width: 100%;
	height: 180px;
	border-radius: 0;
}

.grid-card .post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.grid-card .post-content {
	padding: 1rem;
}
.grid-card .post-title {
	font-size: 1.1rem;
	line-height: 1.4;
}
.grid-card .post-excerpt {
	font-size: 0.9rem;
	opacity: 0.85;

	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================================
   Posts by Category section
========================================= */

.posts-by-category-section {
	margin-top: 2.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--border-subtle);
}

.posts-by-category-header {
	margin-bottom: 1.5rem;
}

.posts-by-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.category-post-block {
	border: 1px solid var(--card-border);
	border-radius: 18px;
	background: var(--bg-body);
	padding: 1rem;
	box-shadow: var(--card-shadow);
}

.category-post-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--border-subtle);
}

.category-post-block-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.category-post-block-title a {
	color: var(--post-title);
}

.category-post-block-title a:hover {
	color: var(--link-color);
}

.category-post-block-count {
	font-size: 0.8rem;
	color: var(--meta-color);
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	white-space: nowrap;
}

.category-post-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.category-mini-post {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
}

.category-mini-post + .category-mini-post {
	padding-top: 1rem;
	border-top: 1px solid var(--border-subtle);
}

.category-mini-thumb {
	width: 78px;
	height: 78px;
	flex: 0 0 78px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.category-mini-thumb a,
.category-mini-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.category-mini-thumb img {
	object-fit: cover;
}

.category-mini-thumb.no-thumb {
	font-size: 1.4rem;
	color: var(--link-color);
}

.category-mini-content {
	flex: 1;
	min-width: 0;
}

.category-mini-title {
	margin: 0 0 0.35rem;
	font-size: 0.98rem;
	line-height: 1.4;
	word-break: break-word;
}

.category-mini-title a {
	color: var(--post-title);
}

.category-mini-title a:hover {
	color: var(--link-color);
}

.category-mini-meta {
	font-size: 0.78rem;
	color: var(--meta-color);
}

.category-post-block-footer {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--border-subtle);
}

@media (max-width: 860px) {
	.posts-by-category-grid {
		grid-template-columns: 1fr;
	}
}
/* ==============================
   🔥 WIDER CONTAINER
============================== */

.site-wrap {
	max-width: 1200px; /* was 960px → now wider */
}

/* ==============================
   🔥 CONTENT + SIDEBAR FIX
============================== */

.has-sidebar .content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px; /* main + sidebar */
	gap: 2rem;
	align-items: start;
}

/* Sidebar fixed feeling */
.widget-area {
	position: sticky;
	top: 100px;
	height: fit-content;
}

/* ==============================
   🔥 FORCE 2 CATEGORIES PER ROW
============================== */

.posts-by-category-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr); /* always 2 */
	gap: 1.5rem;
}

/* ==============================
   🔥 BETTER CATEGORY CARD SIZE
============================== */

.category-post-block {
	min-height: 100%;
}

/* ==============================
   🔥 RESPONSIVE FIX
============================== */

@media (max-width: 1000px) {
	.has-sidebar .content-area {
		grid-template-columns: 1fr; /* stack */
	}

	.widget-area {
		position: static;
	}
}

@media (max-width: 600px) {
	.posts-by-category-grid {
		grid-template-columns: 1fr; /* mobile = 1 */
	}
}

/* ==============================
   HOME BOTTOM LAYOUT
============================== */

.site-wrap {
	max-width: 1200px;
}

.home-bottom-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2rem;
	align-items: start;
	margin-top: 2.5rem;
}

.home-bottom-main {
	min-width: 0;
}

.home-bottom-layout .widget-area {
	border-left: 1px solid var(--border-subtle);
	padding-left: 1.25rem;
	position: sticky;
	top: 100px;
	height: fit-content;
}

/* ==============================
   POSTS BY CATEGORY
============================== */

.posts-by-category-section {
	margin: 0;
	padding-top: 0.2rem;
}

.posts-by-category-header {
	margin-bottom: 1.5rem;
}

.posts-by-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.category-post-block {
	border: 1px solid var(--card-border);
	border-radius: 18px;
	background: var(--bg-body);
	padding: 1rem;
	box-shadow: var(--card-shadow);
	min-height: 100%;
}

.category-post-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--border-subtle);
}

.category-post-block-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.category-post-block-title a {
	color: var(--post-title);
}

.category-post-block-title a:hover {
	color: var(--link-color);
}

.category-post-block-count {
	font-size: 0.8rem;
	color: var(--meta-color);
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	white-space: nowrap;
}

.category-post-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.category-mini-post {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
}

.category-mini-post + .category-mini-post {
	padding-top: 1rem;
	border-top: 1px solid var(--border-subtle);
}

.category-mini-thumb {
	width: 78px;
	height: 78px;
	flex: 0 0 78px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.category-mini-thumb a,
.category-mini-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.category-mini-thumb img {
	object-fit: cover;
}

.category-mini-thumb.no-thumb {
	font-size: 1.4rem;
	color: var(--link-color);
}

.category-mini-content {
	flex: 1;
	min-width: 0;
}

.category-mini-title {
	margin: 0 0 0.35rem;
	font-size: 0.98rem;
	line-height: 1.4;
	word-break: break-word;
}

.category-mini-title a {
	color: var(--post-title);
}

.category-mini-title a:hover {
	color: var(--link-color);
}

.category-mini-meta {
	font-size: 0.78rem;
	color: var(--meta-color);
}

.category-post-block-footer {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--border-subtle);
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 1000px) {
	.home-bottom-layout {
		grid-template-columns: 1fr;
	}

	.home-bottom-layout .widget-area {
		position: static;
		border-left: none;
		padding-left: 0;
		border-top: 1px solid var(--border-subtle);
		padding-top: 1.5rem;
	}
}

@media (max-width: 700px) {
	.posts-by-category-grid {
		grid-template-columns: 1fr;
	}
}

/* ==============================
   Wider container
============================== */
.site-wrap {
	max-width: 1200px;
}

/* ==============================
   Popular posts slider
============================== */
.popular-posts-section {
	margin-bottom: 2.5rem;
}

.popular-posts-header {
	margin-bottom: 1.2rem;
}

.popular-posts-slider-wrap {
	position: relative;
}

.popular-posts-slider {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(280px, 360px);
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.popular-posts-slider::-webkit-scrollbar {
	height: 10px;
}

.popular-posts-slider::-webkit-scrollbar-track {
	background: var(--category-bg);
	border-radius: 999px;
}

.popular-posts-slider::-webkit-scrollbar-thumb {
	background: var(--border-subtle);
	border-radius: 999px;
}

.popular-slide-card {
	scroll-snap-align: start;
	border: 1px solid var(--card-border);
	border-radius: 18px;
	overflow: hidden;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.popular-slide-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--card-shadow-hover);
}

.popular-slide-thumb {
	width: 100%;
	height: 210px;
	overflow: hidden;
	background: var(--category-bg);
	border-bottom: 1px solid var(--border-subtle);
}

.popular-slide-thumb a,
.popular-slide-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.popular-slide-thumb img {
	object-fit: cover;
}

.popular-slide-thumb.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	color: var(--link-color);
}

.popular-slide-content {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	flex: 1;
}

.popular-slide-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	font-size: 0.78rem;
	color: var(--meta-color);
}

.popular-slide-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.4;
}

.popular-slide-title a {
	color: var(--post-title);
}

.popular-slide-title a:hover {
	color: var(--link-color);
}

.popular-slide-excerpt {
	font-size: 0.92rem;
	color: var(--excerpt-color);
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.popular-slide-cats a {
	display: inline-block;
	margin-right: 0.35rem;
	margin-bottom: 0.35rem;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	background: var(--category-bg);
	font-size: 0.76rem;
	color: var(--meta-color);
	border: 1px solid var(--border-subtle);
}

.popular-slide-cats a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
}

/* ==============================
   Home bottom layout
============================== */
.home-bottom-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2rem;
	align-items: start;
	margin-top: 2.5rem;
}

.home-bottom-main {
	min-width: 0;
}

.home-bottom-layout .widget-area {
	border-left: 1px solid var(--border-subtle);
	padding-left: 1.25rem;
	position: sticky;
	top: 100px;
	height: fit-content;
}

/* ==============================
   Posts by category
============================== */
.posts-by-category-section {
	margin: 0;
	padding-top: 0.2rem;
}

.posts-by-category-header {
	margin-bottom: 1.5rem;
}

.posts-by-category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.category-post-block {
	border: 1px solid var(--card-border);
	border-radius: 18px;
	background: var(--bg-body);
	padding: 1rem;
	box-shadow: var(--card-shadow);
	min-height: 100%;
}

.category-post-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
	padding-bottom: 0.8rem;
	border-bottom: 1px solid var(--border-subtle);
}

.category-post-block-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.category-post-block-title a {
	color: var(--post-title);
}

.category-post-block-title a:hover {
	color: var(--link-color);
}

.category-post-block-count {
	font-size: 0.8rem;
	color: var(--meta-color);
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	padding: 0.3rem 0.65rem;
	border-radius: 999px;
	white-space: nowrap;
}

.category-post-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.category-mini-post {
	display: flex;
	gap: 0.85rem;
	align-items: flex-start;
}

.category-mini-post + .category-mini-post {
	padding-top: 1rem;
	border-top: 1px solid var(--border-subtle);
}

.category-mini-thumb {
	width: 78px;
	height: 78px;
	flex: 0 0 78px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.category-mini-thumb a,
.category-mini-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.category-mini-thumb img {
	object-fit: cover;
}

.category-mini-thumb.no-thumb {
	font-size: 1.4rem;
	color: var(--link-color);
}

.category-mini-content {
	flex: 1;
	min-width: 0;
}

.category-mini-title {
	margin: 0 0 0.35rem;
	font-size: 0.98rem;
	line-height: 1.4;
	word-break: break-word;
}

.category-mini-title a {
	color: var(--post-title);
}

.category-mini-title a:hover {
	color: var(--link-color);
}

.category-mini-meta {
	font-size: 0.78rem;
	color: var(--meta-color);
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.category-post-block-footer {
	margin-top: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--border-subtle);
}

/* ==============================
   Responsive
============================== */
@media (max-width: 1000px) {
	.home-bottom-layout {
		grid-template-columns: 1fr;
	}

	.home-bottom-layout .widget-area {
		position: static;
		border-left: none;
		padding-left: 0;
		border-top: 1px solid var(--border-subtle);
		padding-top: 1.5rem;
	}
}

@media (max-width: 700px) {
	.posts-by-category-grid {
		grid-template-columns: 1fr;
	}

	.popular-posts-slider {
		grid-auto-columns: 88%;
	}
}

/* Popular slider arrows */
.popular-posts-slider-shell {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.popular-posts-slider-shell .popular-posts-slider-wrap {
	flex: 1;
	min-width: 0;
}

.popular-slider-arrow {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--card-shadow);
	font-size: 1.5rem;
	line-height: 1;
	padding: 0;
}

.popular-slider-arrow:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

.popular-slider-arrow span {
	display: inline-block;
	transform: translateY(-1px);
}

@media (max-width: 700px) {
	.popular-posts-slider-shell {
		gap: 0.5rem;
	}

	.popular-slider-arrow {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		font-size: 1.25rem;
	}
}

/* =========================================
   FULL WIDTH ANIMATED HEADER HERO
========================================= */

.full-bleed-header {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-top: -1.5rem;
	margin-bottom: 0;
	min-height: 420px;
	padding: 1.6rem 0 3.8rem;
	overflow: hidden;
	isolation: isolate;
	background: #07110f;
	box-shadow:
		inset 0 -180px 220px rgba(7, 17, 15, 0.98),
		inset 0 -60px 120px rgba(7, 17, 15, 0.75);
}

.header-vanta-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.header-vanta-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;

	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.6),
		rgba(0, 0, 0, 0.35) 40%,
		rgba(18, 18, 18, 0.9)
	);
}


.site-header.site-header-wallpaper .header-wallpaper-content {
	position: relative;
	z-index: 3;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.2rem;
}

/* stronger glass look */
.site-header.site-header-wallpaper .header-nav a,
.site-header.site-header-wallpaper .mode-toggle,
.site-header.site-header-wallpaper .header-search-input,
.site-header.site-header-wallpaper .header-search-button,
.site-header.site-header-wallpaper .mobile-menu-toggle {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	color: #fff;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.site-header.site-header-wallpaper .header-nav a:hover,
.site-header.site-header-wallpaper .mode-toggle:hover,
.site-header.site-header-wallpaper .header-search-button:hover,
.site-header.site-header-wallpaper .mobile-menu-toggle:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.24);
	color: #fff;
}

.site-header.site-header-wallpaper .header-nav .current-menu-item > a,
.site-header.site-header-wallpaper .header-nav .current_page_item > a,
.site-header.site-header-wallpaper .header-nav .current-menu-ancestor > a,
.site-header.site-header-wallpaper .header-nav .current-page-ancestor > a,
.site-header.site-header-wallpaper .header-nav .current_page_parent > a {
	background: rgba(95, 158, 146, 0.92);
	color: #fff;
	border-color: rgba(95, 158, 146, 0.95);
}

.site-header.site-header-wallpaper .site-description,
.site-header.site-header-wallpaper .header-site-description {
	color: rgba(255, 255, 255, 0.84);
}

.site-header.site-header-wallpaper .header-search-input::placeholder {
	color: rgba(255, 255, 255, 0.72);
}

.site-header.site-header-wallpaper .header-search-form {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header.site-header-wallpaper .category-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.site-header.site-header-wallpaper .submenu-toggle {
	color: #fff;
}

@media (max-width: 760px) {
	.full-bleed-header {
		margin-top: -1rem;
		min-height: 320px;
		padding: 1rem 0 1.6rem;
	}

	.site-header.site-header-wallpaper .header-wallpaper-content {
		padding: 0 1rem;
	}

	.header-vanta-fade {
		height: 100px;
	}
}

.header-vanta-fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 420px;
	z-index: 3;
	pointer-events: none;

	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.15) 20%,
		rgba(0, 0, 0, 0.35) 45%,
		rgba(0, 0, 0, 0.6) 70%,
		#121212 100%
	);
}

.full-bleed-header {
	background: #121212;
}


.full-bleed-header {
	box-shadow: inset 0 -120px 160px rgba(7, 17, 15, 0.9);
}

.site-header.site-header-wallpaper::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -120px;
	height: 220px;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(
		ellipse at center,
		rgba(7, 17, 15, 0.92) 0%,
		var(--bg-body) 72%
	);
	filter: blur(30px);
}

@media (max-width: 760px) {
	.full-bleed-header {
		min-height: 340px;
		padding-bottom: 3rem;
	}

	.header-vanta-fade {
		height: 260px;
	}

	.site-header.site-header-wallpaper::after {
		height: 160px;
		bottom: -80px;
	}
}

body.light-mode .header-vanta-overlay {
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.15),
		rgba(255, 255, 255, 0.4) 40%,
		rgba(255, 255, 255, 0.95)
	);
}

/* =========================================
   HEADER HERO - CORRECT LIGHT/DARK VERSION
========================================= */

/* LIGHT MODE = default */
.full-bleed-header {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-top: -1.5rem;
	margin-bottom: 0;
	min-height: 420px;
	padding: 1.6rem 0 3.8rem;
	overflow: hidden;
	isolation: isolate;
	background: #ffffff;
	box-shadow:
		inset 0 -120px 160px rgba(255, 255, 255, 0.92),
		inset 0 -40px 100px rgba(255, 255, 255, 0.72);
}

.header-vanta-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	filter: brightness(1.18) saturate(0.45) contrast(0.92);
}

.header-vanta-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background:
		linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.08) 0%,
			rgba(255, 255, 255, 0.35) 38%,
			rgba(255, 255, 255, 0.82) 72%,
			rgba(255, 255, 255, 0.97) 100%
		);
}

.header-vanta-fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 420px;
	z-index: 3;
	pointer-events: none;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.18) 22%,
		rgba(255, 255, 255, 0.52) 48%,
		rgba(255, 255, 255, 0.84) 72%,
		#ffffff 100%
	);
}

.site-header.site-header-wallpaper::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -120px;
	height: 220px;
	z-index: 1;
	pointer-events: none;
	background: radial-gradient(
		ellipse at center,
		rgba(255, 255, 255, 0.96) 0%,
		#ffffff 76%
	);
	filter: blur(34px);
}

.site-header.site-header-wallpaper .header-wallpaper-content {
	position: relative;
	z-index: 4;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.2rem;
}

/* LIGHT MODE controls */
.site-header.site-header-wallpaper .header-nav a,
.site-header.site-header-wallpaper .mode-toggle,
.site-header.site-header-wallpaper .header-search-input,
.site-header.site-header-wallpaper .header-search-button,
.site-header.site-header-wallpaper .mobile-menu-toggle {
	background: rgba(255, 255, 255, 0.72);
	border-color: rgba(0, 0, 0, 0.08);
	color: #1a1c1e;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.site-header.site-header-wallpaper .header-nav a:hover,
.site-header.site-header-wallpaper .mode-toggle:hover,
.site-header.site-header-wallpaper .header-search-button:hover,
.site-header.site-header-wallpaper .mobile-menu-toggle:hover {
	background: rgba(255, 255, 255, 0.95);
	color: #111;
	border-color: rgba(0, 0, 0, 0.12);
}

.site-header.site-header-wallpaper .header-nav .current-menu-item > a,
.site-header.site-header-wallpaper .header-nav .current_page_item > a,
.site-header.site-header-wallpaper .header-nav .current-menu-ancestor > a,
.site-header.site-header-wallpaper .header-nav .current-page-ancestor > a,
.site-header.site-header-wallpaper .header-nav .current_page_parent > a {
	background: rgba(95, 158, 146, 0.88);
	color: #fff;
	border-color: rgba(95, 158, 146, 0.92);
}

.site-header.site-header-wallpaper .site-description,
.site-header.site-header-wallpaper .header-site-description {
	color: rgba(26, 28, 30, 0.82);
}

.site-header.site-header-wallpaper .header-search-input::placeholder {
	color: rgba(26, 28, 30, 0.55);
}

.site-header.site-header-wallpaper .header-search-form {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header.site-header-wallpaper .category-bar {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header.site-header-wallpaper .submenu-toggle {
	color: #1a1c1e;
}

/* DARK MODE ONLY */
body.dark .full-bleed-header {
	background: #121212;
	box-shadow:
		inset 0 -120px 160px rgba(7, 17, 15, 0.90),
		inset 0 -40px 100px rgba(7, 17, 15, 0.72);
}

body.dark .header-vanta-bg {
	filter: brightness(0.82) saturate(0.75) contrast(1);
}

body.dark .header-vanta-overlay {
	background:
		linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.56) 0%,
			rgba(0, 0, 0, 0.30) 38%,
			rgba(18, 18, 18, 0.70) 72%,
			rgba(18, 18, 18, 0.94) 100%
		);
}

body.dark .header-vanta-fade {
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.15) 22%,
		rgba(0, 0, 0, 0.38) 48%,
		rgba(0, 0, 0, 0.70) 72%,
		#121212 100%
	);
}

body.dark .site-header.site-header-wallpaper::after {
	background: radial-gradient(
		ellipse at center,
		rgba(18, 18, 18, 0.94) 0%,
		#121212 76%
	);
}

body.dark .site-header.site-header-wallpaper .header-nav a,
body.dark .site-header.site-header-wallpaper .mode-toggle,
body.dark .site-header.site-header-wallpaper .header-search-input,
body.dark .site-header.site-header-wallpaper .header-search-button,
body.dark .site-header.site-header-wallpaper .mobile-menu-toggle {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	color: #fff;
}

body.dark .site-header.site-header-wallpaper .header-nav a:hover,
body.dark .site-header.site-header-wallpaper .mode-toggle:hover,
body.dark .site-header.site-header-wallpaper .header-search-button:hover,
body.dark .site-header.site-header-wallpaper .mobile-menu-toggle:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.24);
}

body.dark .site-header.site-header-wallpaper .site-description,
body.dark .site-header.site-header-wallpaper .header-site-description {
	color: rgba(255, 255, 255, 0.84);
}

body.dark .site-header.site-header-wallpaper .header-search-input::placeholder {
	color: rgba(255, 255, 255, 0.72);
}

body.dark .site-header.site-header-wallpaper .header-search-form {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.dark .site-header.site-header-wallpaper .category-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

body.dark .site-header.site-header-wallpaper .submenu-toggle {
	color: #fff;
}

@media (max-width: 760px) {
	.full-bleed-header {
		margin-top: -1rem;
		min-height: 340px;
		padding: 1rem 0 2.8rem;
	}

	.site-header.site-header-wallpaper .header-wallpaper-content {
		padding: 0 1rem;
	}

	.header-vanta-fade {
		height: 260px;
	}

	.site-header.site-header-wallpaper::after {
		height: 160px;
		bottom: -80px;
	}
}

/* final light-mode header cleanup */
.header-vanta-bg canvas {
	opacity: 1 !important;
}

body:not(.dark) .header-vanta-bg {
	filter: brightness(1.15) saturate(0.38) contrast(0.9);
}

body:not(.dark) .header-vanta-overlay {
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.10) 0%,
		rgba(255, 255, 255, 0.38) 40%,
		rgba(255, 255, 255, 0.88) 74%,
		rgba(255, 255, 255, 0.98) 100%
	);
}

body:not(.dark) .header-vanta-fade {
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.22) 25%,
		rgba(255, 255, 255, 0.56) 50%,
		rgba(255, 255, 255, 0.86) 74%,
		#ffffff 100%
	);
}

body:not(.dark) .site-header.site-header-wallpaper::after {
	background: radial-gradient(
		ellipse at center,
		rgba(255, 255, 255, 0.96) 0%,
		#ffffff 78%
	);
	filter: blur(36px);
}

/* ===== FINAL HERO FIX: light mode clean, dark mode animated ===== */

/* LIGHT MODE = clean white hero, no Vanta mess */
body:not(.dark) .full-bleed-header {
	background:
		radial-gradient(circle at 12% 12%, rgba(63, 120, 110, 0.10), transparent 18%),
		radial-gradient(circle at 88% 10%, rgba(63, 120, 110, 0.06), transparent 16%),
		linear-gradient(to bottom, #ffffff 0%, #fbfbfb 52%, #ffffff 100%);
	box-shadow:
		inset 0 -110px 150px rgba(255, 255, 255, 0.96),
		inset 0 -30px 80px rgba(255, 255, 255, 0.82);
}

body:not(.dark) .header-vanta-bg {
	background:
		radial-gradient(circle at 20% 24%, rgba(63, 120, 110, 0.08), transparent 20%),
		radial-gradient(circle at 80% 18%, rgba(63, 120, 110, 0.05), transparent 18%);
	filter: none;
	opacity: 1;
}

body:not(.dark) .header-vanta-overlay {
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.10) 0%,
		rgba(255, 255, 255, 0.35) 38%,
		rgba(255, 255, 255, 0.82) 72%,
		rgba(255, 255, 255, 0.98) 100%
	);
}

body:not(.dark) .header-vanta-fade {
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.16) 24%,
		rgba(255, 255, 255, 0.50) 50%,
		rgba(255, 255, 255, 0.84) 74%,
		#ffffff 100%
	);
}

body:not(.dark) .site-header.site-header-wallpaper::after {
	background: radial-gradient(
		ellipse at center,
		rgba(255, 255, 255, 0.96) 0%,
		#ffffff 78%
	);
	filter: blur(36px);
}

body:not(.dark) .site-header.site-header-wallpaper .header-nav a,
body:not(.dark) .site-header.site-header-wallpaper .mode-toggle,
body:not(.dark) .site-header.site-header-wallpaper .header-search-input,
body:not(.dark) .site-header.site-header-wallpaper .header-search-button,
body:not(.dark) .site-header.site-header-wallpaper .mobile-menu-toggle {
	background: rgba(255, 255, 255, 0.78);
	border-color: rgba(0, 0, 0, 0.08);
	color: #1a1c1e;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

body:not(.dark) .site-header.site-header-wallpaper .header-nav a:hover,
body:not(.dark) .site-header.site-header-wallpaper .mode-toggle:hover,
body:not(.dark) .site-header.site-header-wallpaper .header-search-button:hover,
body:not(.dark) .site-header.site-header-wallpaper .mobile-menu-toggle:hover {
	background: rgba(255, 255, 255, 0.96);
	color: #111;
	border-color: rgba(0, 0, 0, 0.12);
}

body:not(.dark) .site-header.site-header-wallpaper .site-description,
body:not(.dark) .site-header.site-header-wallpaper .header-site-description {
	color: rgba(26, 28, 30, 0.82);
}

body:not(.dark) .site-header.site-header-wallpaper .header-search-input::placeholder {
	color: rgba(26, 28, 30, 0.52);
}

body:not(.dark) .site-header.site-header-wallpaper .header-search-form {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.dark) .site-header.site-header-wallpaper .category-bar {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body:not(.dark) .site-header.site-header-wallpaper .submenu-toggle {
	color: #1a1c1e;
}

/* DARK MODE = keep animated */
body.dark .full-bleed-header {
	background: #121212;
}

body.dark .header-vanta-overlay {
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.56) 0%,
		rgba(0, 0, 0, 0.30) 38%,
		rgba(18, 18, 18, 0.70) 72%,
		rgba(18, 18, 18, 0.94) 100%
	);
}

body.dark .header-vanta-fade {
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 0%,
		rgba(0, 0, 0, 0.15) 22%,
		rgba(0, 0, 0, 0.38) 48%,
		rgba(0, 0, 0, 0.70) 72%,
		#121212 100%
	);
}

body.dark .site-header.site-header-wallpaper::after {
	background: radial-gradient(
		ellipse at center,
		rgba(18, 18, 18, 0.94) 0%,
		#121212 76%
	);
}

/* =========================================
   FIX TOP HEADER ON SCROLL
   add at very end of style.css
========================================= */

.site-header .top-bar.header-row {
	transition:
		background-color 0.22s ease,
		border-color 0.22s ease,
		box-shadow 0.22s ease,
		transform 0.22s ease,
		opacity 0.22s ease;
}

/* active fixed state */
body.header-is-stuck .site-header .top-bar.header-row {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 99999;

	width: min(calc(100vw - 2.4rem), 1200px);
	margin-bottom: 0;
	padding: 0.9rem 1rem;

	border-radius: 22px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

/* dark mode fixed bar */
body.dark.header-is-stuck .site-header .top-bar.header-row {
	background: rgba(18, 18, 18, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

/* light mode fixed bar */
body:not(.dark).header-is-stuck .site-header .top-bar.header-row {
	background: rgba(255, 255, 255, 0.82);
	border: 1px solid rgba(0, 0, 0, 0.08);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

/* prevent content jump when header becomes fixed */
body.header-is-stuck .site-header .header-wallpaper-content {
	padding-top: 88px;
}

/* keep mobile panel under fixed row */
@media (max-width: 760px) {
	body.header-is-stuck .site-header .top-bar.header-row {
		top: 8px;
		width: calc(100vw - 1rem);
		padding: 0.75rem 0.8rem;
		border-radius: 18px;
	}

	body.header-is-stuck .site-header .header-wallpaper-content {
		padding-top: 84px;
	}
}

/* =========================================
   Single post reading progress bar
========================================= */

.single-progress-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	z-index: 999999;
	background: transparent;
	pointer-events: none;
}

.single-progress-bar {
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, #3f786e 0%, #7ab3a8 100%);
	box-shadow: 0 0 12px rgba(63, 120, 110, 0.45);
	transition: width 0.08s linear;
}

body.dark .single-progress-bar {
	background: linear-gradient(90deg, #7ab3a8 0%, #9ed5c9 100%);
	box-shadow: 0 0 14px rgba(122, 179, 168, 0.5);
}

/* =========================================
   Progress bar ABOVE fixed header
========================================= */

.single-progress-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	z-index: 9999999; /* higher than header */

	background: transparent;
	pointer-events: none;
}

.single-progress-bar {
	width: 0;
	height: 100%;
	background: #3b82f6;
	box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
	transition: width 0.08s linear;
}

/* dark mode */
body.dark .single-progress-bar {
	background: #60a5fa;
	box-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
}

/* =========================================
   FIX ACTIVE MENU STATUS WITH FIXED HEADER
========================================= */

/* normal active state */
.header-nav .current-menu-item > a,
.header-nav .current_page_item > a,
.header-nav .current-menu-ancestor > a,
.header-nav .current-page-ancestor > a,
.header-nav .current_page_parent > a,
.header-nav .current_page_ancestor > a,
.header-nav .current-menu-parent > a {
	background: var(--category-active) !important;
	color: #fff !important;
	border-color: var(--category-active) !important;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03) !important;
}

/* active state when header becomes fixed */
body.header-is-stuck .header-nav .current-menu-item > a,
body.header-is-stuck .header-nav .current_page_item > a,
body.header-is-stuck .header-nav .current-menu-ancestor > a,
body.header-is-stuck .header-nav .current-page-ancestor > a,
body.header-is-stuck .header-nav .current_page_parent > a,
body.header-is-stuck .header-nav .current_page_ancestor > a,
body.header-is-stuck .header-nav .current-menu-parent > a {
	background: var(--category-active) !important;
	color: #fff !important;
	border-color: var(--category-active) !important;
	box-shadow: 0 10px 24px rgba(63, 120, 110, 0.22) !important;
}

/* submenu active item */
.header-nav .sub-menu .current-menu-item > a,
.header-nav .sub-menu .current_page_item > a,
.header-nav .sub-menu .current-menu-ancestor > a,
.header-nav .sub-menu .current_page_parent > a {
	background: var(--category-bg) !important;
	color: var(--link-color) !important;
	border-color: var(--border-subtle) !important;
}

/* mobile active state */
@media (max-width: 760px) {
	.header-nav .current-menu-item > a,
	.header-nav .current_page_item > a,
	.header-nav .current-menu-ancestor > a,
	.header-nav .current-page-ancestor > a,
	.header-nav .current_page_parent > a,
	.header-nav .current_page_ancestor > a,
	.header-nav .current-menu-parent > a {
		background: var(--category-active) !important;
		color: #fff !important;
		border-color: var(--category-active) !important;
	}
}

/* =========================================
   HOME HERO / FEATURED SECTION
========================================= */

.home-hero-section {
	margin: 0 0 2.5rem;
}

.home-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
	gap: 1.5rem;
	align-items: stretch;
}

.hero-main,
.hero-side {
	min-width: 0;
}

.hero-main-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--card-border);
	border-radius: 24px;
	overflow: hidden;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
}

.hero-main-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--card-shadow-hover);
}

.hero-main-thumb {
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
	background: var(--category-bg);
	border-bottom: 1px solid var(--border-subtle);
}

.hero-main-thumb a,
.hero-main-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-main-thumb img {
	object-fit: cover;
	transition: transform 0.5s ease, filter 0.5s ease;
}

.hero-main-card:hover .hero-main-thumb img {
	transform: scale(1.06);
	filter: brightness(1.04);
}

.hero-main-thumb.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--link-color);
	font-size: 3rem;
}

.hero-main-content {
	padding: 1.35rem 1.35rem 1.2rem;
}

.hero-main-cats,
.hero-side-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 0.8rem;
}

.hero-main-cats a,
.hero-side-cats a {
	display: inline-block;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--meta-color);
	border: 1px solid var(--border-subtle);
	font-size: 0.76rem;
	line-height: 1;
	text-decoration: none;
}

.hero-main-cats a:hover,
.hero-side-cats a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
}

.hero-main-title {
	margin: 0 0 0.75rem;
	font-size: 2rem;
	line-height: 1.2;
	color: var(--post-title);
}

.hero-main-title a {
	color: inherit;
	text-decoration: none;
}

.hero-main-title a:hover {
	color: var(--link-color);
}

.hero-main-meta {
	margin-bottom: 0.85rem;
}

.hero-main-excerpt {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--excerpt-color);
	margin-bottom: 0.95rem;
}

.hero-side {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero-side-card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 0.95rem;
	align-items: stretch;
	border: 1px solid var(--card-border);
	border-radius: 20px;
	padding: 0.85rem;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
	min-height: 124px;
}

.hero-side-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--card-shadow-hover);
}

.hero-side-thumb {
	width: 100%;
	height: 100%;
	min-height: 108px;
	border-radius: 16px;
	overflow: hidden;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero-side-thumb a,
.hero-side-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-side-thumb img {
	object-fit: cover;
	transition: transform 0.45s ease, filter 0.45s ease;
}

.hero-side-card:hover .hero-side-thumb img {
	transform: scale(1.06);
	filter: brightness(1.04);
}

.hero-side-thumb.no-thumb {
	color: var(--link-color);
	font-size: 2rem;
}

.hero-side-content {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hero-side-title {
	margin: 0 0 0.45rem;
	font-size: 1.02rem;
	line-height: 1.38;
	color: var(--post-title);
	word-break: break-word;
}

.hero-side-title a {
	color: inherit;
	text-decoration: none;
}

.hero-side-title a:hover {
	color: var(--link-color);
}

.hero-side-meta {
	margin-bottom: 0;
	font-size: 0.72rem;
}

/* animation on load */
.page-loaded .home-hero-section {
	animation: revealUp 0.65s ease forwards;
	opacity: 0;
	transform: translateY(22px);
}

/* responsive */
@media (max-width: 1000px) {
	.home-hero-grid {
		grid-template-columns: 1fr;
	}

	.hero-main-thumb {
		height: 340px;
	}
}

@media (max-width: 700px) {
	.hero-main-title {
		font-size: 1.55rem;
	}

	.hero-main-thumb {
		height: 260px;
	}

	.hero-side-card {
		grid-template-columns: 92px minmax(0, 1fr);
		padding: 0.75rem;
		border-radius: 18px;
	}

	.hero-side-thumb {
		min-height: 84px;
		border-radius: 14px;
	}

	.hero-side-title {
		font-size: 0.95rem;
	}
}

@media (max-width: 520px) {
	.home-hero-section {
		margin-bottom: 2rem;
	}

	.hero-main-card {
		border-radius: 20px;
	}

	.hero-main-thumb {
		height: 220px;
	}

	.hero-main-content {
		padding: 1rem;
	}

	.hero-side-card {
		grid-template-columns: 1fr;
	}

	.hero-side-thumb {
		width: 100%;
		height: 170px;
		min-height: 170px;
	}

	.hero-side-content {
		padding-top: 0.2rem;
	}
}

/* =========================================
   Header search icon + popup search
========================================= */

/* old header inline search removed */
.header-search-form {
	display: none !important;
}

.header-search-toggle {
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--border-subtle);
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--text-primary);
	cursor: pointer;
	padding: 0;
	flex: 0 0 auto;
	box-shadow: var(--card-shadow);
}

.header-search-toggle:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--card-shadow-hover);
}

.header-search-toggle svg {
	width: 19px;
	height: 19px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.header-search-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.2rem;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.header-search-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.header-search-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.header-search-dialog {
	position: relative;
	z-index: 2;
	width: min(680px, 100%);
	padding: 1.4rem;
	border-radius: 24px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	box-shadow: var(--card-shadow-hover);
	transform: translateY(18px) scale(0.98);
	transition: transform 0.25s ease;
}

.header-search-modal.is-open .header-search-dialog {
	transform: translateY(0) scale(1);
}

.header-search-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	cursor: pointer;
	font-size: 1.6rem;
	line-height: 1;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.header-search-close:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
}

.header-search-title {
	margin: 0 0 1rem;
	font-size: 1.4rem;
	color: var(--post-title);
}

.header-search-popup-form {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.header-search-popup-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 54px;
	padding: 0 1rem;
	border-radius: 16px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font: inherit;
	font-size: 1rem;
	width:100%;
}

.header-search-popup-input:focus {
	outline: none;
	border-color: var(--link-color);
	box-shadow: 0 0 0 3px rgba(63, 120, 110, 0.14);
}

.header-search-popup-button {
	height: 54px;
	padding: 0 1.15rem;
	border-radius: 16px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	font: inherit;
	cursor: pointer;
	white-space: nowrap;
}

.header-search-popup-button:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--card-shadow);
}

body.search-modal-open {
	overflow: hidden;
}

/* wallpaper header support */
.site-header.site-header-wallpaper .header-search-toggle {
	background: rgba(255, 255, 255, 0.72);
	border-color: rgba(0, 0, 0, 0.08);
	color: #1a1c1e;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.site-header.site-header-wallpaper .header-search-toggle:hover {
	background: rgba(255, 255, 255, 0.96);
	color: #111;
	border-color: rgba(0, 0, 0, 0.12);
}

body.dark .site-header.site-header-wallpaper .header-search-toggle {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	color: #fff;
}

body.dark .site-header.site-header-wallpaper .header-search-toggle:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.24);
}

@media (max-width: 760px) {
	.header-search-toggle {
		width: 100%;
		height: 46px;
		border-radius: 14px;
	}

	.header-search-popup-form {
		flex-direction: column;
		align-items: stretch;
	}

	.header-search-popup-input,
	.header-search-popup-button {
		width: 100%;
	}
}

/* =========================================
   Modern Footer
========================================= */

.footer-modern {
	margin-top: 4rem;
	padding: 0;
	border-top: 1px solid var(--border-subtle);
	background:
		linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.015) 0%,
			rgba(0, 0, 0, 0.03) 100%
		);
	border-radius: 28px 28px 0 0;
	overflow: hidden;
	text-align: left;
}

body.dark .footer-modern {
	background:
		linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.02) 0%,
			rgba(255, 255, 255, 0.035) 100%
		);
}

.footer-top {
	display: grid;
	grid-template-columns: 1.25fr 0.9fr 0.9fr 1fr;
	gap: 2rem;
	padding: 2.2rem 2rem 1.8rem;
}

.footer-brand-col,
.footer-links-col,
.footer-cats-col,
.footer-widgets-col {
	min-width: 0;
}

.footer-site-title {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
	line-height: 1.1;
	color: var(--post-title);
}

.footer-site-title a {
	color: inherit;
	text-decoration: none;
}

.footer-site-title a:hover {
	color: var(--link-color);
}

.footer-site-description {
	margin: 0 0 0.75rem;
	color: var(--meta-color);
	font-size: 0.95rem;
	line-height: 1.6;
}

.footer-site-text {
	margin: 0;
	color: var(--excerpt-color);
	font-size: 0.95rem;
	line-height: 1.75;
	max-width: 36ch;
}

.footer-heading {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--meta-color);
}

.footer-links-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.footer-links-list li {
	margin: 0;
	padding: 0;
}

.footer-links-list a {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--text-primary);
	text-decoration: none;
	padding: 0.15rem 0;
	border-bottom: 1px solid transparent;
	transition: all 0.2s ease;
}

.footer-links-list a:hover {
	color: var(--link-color);
	border-bottom-color: var(--link-color);
	transform: translateX(3px);
}

.footer-categories-list a small {
	color: var(--meta-color);
	font-size: 0.78rem;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	padding: 0.18rem 0.45rem;
	border-radius: 999px;
	line-height: 1;
}

.footer-empty-text {
	margin: 0;
	color: var(--meta-color);
	font-size: 0.92rem;
	line-height: 1.7;
}

.footer-widgets-col .footer-widgets {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin: 0;
	padding: 0;
	border: none;
}

.footer-widgets-col .footer-widget,
.footer-widgets-col .widget {
	margin: 0;
	padding: 1rem;
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	border-radius: 18px;
	box-shadow: var(--card-shadow);
}

.footer-widgets-col .widget-title {
	margin: 0 0 0.7rem;
	font-size: 0.95rem;
	color: var(--post-title);
}

.footer-widgets-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widgets-col li {
	margin-bottom: 0.45rem;
}

.footer-tags-wrap {
	padding: 0 2rem 1.6rem;
}

.footer-tags-title {
	margin-bottom: 0.9rem;
}

.footer-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	border: none;
	justify-content: flex-start;
}

.footer-tags a {
	display: inline-flex;
	align-items: center;
	padding: 0.48rem 0.85rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--meta-color);
	font-size: 0.82rem;
	text-decoration: none;
	border: 1px solid var(--border-subtle);
}

.footer-tags a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-1px);
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 2rem 1.25rem;
	border-top: 1px solid var(--border-subtle);
	color: var(--footer-color);
	font-size: 0.82rem;
	flex-wrap: wrap;
}

.footer-bottom-left,
.footer-bottom-right {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

@media (max-width: 1100px) {
	.footer-top {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.footer-modern {
		border-radius: 22px 22px 0 0;
	}

	.footer-top {
		grid-template-columns: 1fr;
		gap: 1.5rem;
		padding: 1.5rem 1.2rem 1.2rem;
	}

	.footer-tags-wrap {
		padding: 0 1.2rem 1.2rem;
	}

	.footer-bottom {
		padding: 0.95rem 1.2rem 1.1rem;
		flex-direction: column;
		align-items: flex-start;
	}
}
/* =========================================
   Sticky header above all content
========================================= */

.full-bleed-header,
.site-header,
.site-header.site-header-wallpaper {
	position: relative;
	z-index: 99990;
}

.site-header .top-bar.header-row {
	position: relative;
	z-index: 99991;
}

body.header-is-stuck .site-header,
body.header-is-stuck .site-header.site-header-wallpaper {
	position: sticky;
	top: 0;
	z-index: 99999;
}

body.header-is-stuck .site-header .top-bar.header-row {
	z-index: 100000;
}

/* menu dropdown above posts/cards */
.header-nav,
.header-nav .primary-menu,
.header-nav .menu-item-has-children,
.header-nav .sub-menu {
	position: relative;
	z-index: 100001;
}

/* search popup must stay highest */
.header-search-modal {
	z-index: 100010;
}
/* =========================================
   Fix space under header
========================================= */

/* remove extra bottom space from header wrapper */
.full-bleed-header {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

/* tighten header content */
.header-wallpaper-content {
	padding-bottom: 0.5rem !important;
}

/* reduce space under categories */
.category-bar {
	margin-bottom: 0.5rem !important;
	padding-bottom: 0.5rem !important;
}

/* remove extra spacing before main content */
.site-wrap {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* reduce space at top of content */
.content-area {
	margin-top: 0 !important;
	padding-top: 0.5rem !important;
}

/* optional: tighten hero section */
.hero-section,
.hero-main-card {
	margin-top: 0 !important;
}
.full-bleed-header {
	margin-bottom: -20px;
}
.content-area {
	margin-top: -40px;
	position: relative;
	z-index: 2;
}
.full-bleed-header {
	min-height: unset !important;
	padding: 1rem 0 1.25rem !important;
	margin-bottom: 0 !important;
}

.header-vanta-fade {
	height: 120px !important;
}

.site-header.site-header-wallpaper::after {
	height: 80px !important;
	bottom: -40px !important;
}

.category-bar {
	margin: 0.75rem 0 0 !important;
}
/* final safe wallpaper header spacing fix */
.full-bleed-header {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	min-height: auto !important;
	height: auto !important;
	padding: 1rem 0 1rem !important;
}

.site-header.site-header-wallpaper .header-wallpaper-content {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* =========================================
   Trending now bar
========================================= */

.trending-bar {
	margin: 1rem 0 0;
	padding: 0.85rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	border-top: 1px solid var(--border-subtle);
	border-bottom: 1px solid var(--border-subtle);
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	position: relative;
	z-index: 6;
	overflow: hidden;
}

body.dark .trending-bar {
	background: rgba(255, 255, 255, 0.04);
}

.trending-bar-label {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0.75rem;
	background: #2d2d2d;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1;
	white-space: nowrap;
}

.trending-bar-items {
	position: relative;
	flex: 1;
	min-width: 0;
	height: 1.7rem;
	overflow: hidden;
}

.trending-bar-item {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	display: block;
	color: var(--text-primary);
	font-size: 0.98rem;
	font-weight: 500;
	line-height: 1.7rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0;
	transform: translateY(18px);
	pointer-events: none;
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.trending-bar-item.is-active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.trending-bar-item:hover {
	color: var(--link-color);
}

.site-header.site-header-wallpaper .trending-bar {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark .site-header.site-header-wallpaper .trending-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.10);
	border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

body.dark .trending-bar-label {
	background: #1f1f1f;
}

@media (max-width: 760px) {
	.trending-bar {
		padding: 0.75rem 0.85rem;
		gap: 0.7rem;
	}

	.trending-bar-label {
		font-size: 0.68rem;
		padding: 0.45rem 0.6rem;
	}

	.trending-bar-items {
		height: 1.5rem;
	}

	.trending-bar-item {
		font-size: 0.88rem;
		line-height: 1.5rem;
	}
}

@media (max-width: 560px) {
	.trending-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.trending-bar-items {
		width: 100%;
	}
}
.trending-bar-label {
	background: #ba0101 !important;
	color: #fff !important;
	font-weight: 700;
	letter-spacing: 0.05em;
}
/* =========================================
   Upgraded Popular Posts slider
========================================= */

.popular-posts-section-upgraded {
	margin: 3rem 0 2.8rem;
	padding: 1.4rem 1.2rem 1.5rem;
	border: 1px solid var(--border-subtle);
	border-radius: 28px;
	background:
		linear-gradient(
			180deg,
			rgba(63, 120, 110, 0.04) 0%,
			rgba(63, 120, 110, 0.01) 100%
		);
	box-shadow: var(--card-shadow);
	overflow: hidden;
}

body.dark .popular-posts-section-upgraded {
	background:
		linear-gradient(
			180deg,
			rgba(122, 179, 168, 0.08) 0%,
			rgba(122, 179, 168, 0.02) 100%
		);
}

.popular-posts-header-upgraded {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 0 0 1.3rem;
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--border-subtle);
	border-top: none !important;
}

.popular-kicker {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--link-color);
	border: 1px solid var(--border-subtle);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.7rem;
}

.popular-posts-heading-wrap .archive-title {
	margin-bottom: 0.35rem;
}

.popular-posts-controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.popular-posts-swiper {
	overflow: visible;
}

.popular-posts-swiper .swiper-slide {
	height: auto;
}

.popular-slide-card-upgraded {
	position: relative;
	height: 100%;
	border: 1px solid var(--card-border);
	border-radius: 24px;
	overflow: hidden;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.popular-slide-card-upgraded:hover {
	transform: translateY(-8px);
	box-shadow: var(--card-shadow-hover);
	border-color: rgba(63, 120, 110, 0.28);
}

.popular-slide-card-upgraded .popular-slide-thumb {
	position: relative;
	height: 240px;
	border-bottom: none;
}

.popular-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.68) 0%,
		rgba(0, 0, 0, 0.18) 45%,
		rgba(0, 0, 0, 0.02) 100%
	);
	pointer-events: none;
	z-index: 1;
}

.popular-slide-top-meta {
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 0.95rem;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem;
}

.popular-slide-card-upgraded .popular-slide-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
}

.popular-slide-card-upgraded .popular-slide-cats a {
	margin: 0;
	padding: 0.34rem 0.7rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 0.74rem;
}

.popular-slide-card-upgraded .popular-slide-cats a:hover {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.28);
}

.popular-slide-views {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.36rem 0.7rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	font-size: 0.74rem;
	font-weight: 700;
	white-space: nowrap;
}

.popular-slide-card-upgraded .popular-slide-content {
	padding: 1.15rem 1.15rem 1.2rem;
	gap: 0.9rem;
}

.popular-slide-card-upgraded .popular-slide-meta {
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.popular-slide-card-upgraded .popular-slide-title {
	font-size: 1.25rem;
	line-height: 1.34;
	margin: 0;
}

.popular-slide-card-upgraded .popular-slide-excerpt {
	font-size: 0.95rem;
	line-height: 1.65;
	-webkit-line-clamp: 3;
}

.popular-slide-read {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	width: fit-content;
}

.popular-posts-pagination {
	margin-top: 1.2rem;
	position: static !important;
	display: flex;
	justify-content: center;
	gap: 0.45rem;
}

.popular-posts-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 !important;
	opacity: 1;
	background: rgba(63, 120, 110, 0.2);
	border: 1px solid rgba(63, 120, 110, 0.15);
}

.popular-posts-pagination .swiper-pagination-bullet-active {
	background: var(--category-active);
	border-color: var(--category-active);
	transform: scale(1.08);
}

.popular-posts-section-upgraded .popular-slider-arrow {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 16px;
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	box-shadow: var(--card-shadow);
}

.popular-posts-section-upgraded .popular-slider-arrow:hover {
	background: var(--category-active);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

.popular-posts-section-upgraded .popular-slider-arrow.swiper-button-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

@media (max-width: 900px) {
	.popular-posts-section-upgraded {
		padding: 1rem 0.9rem 1.2rem;
		border-radius: 24px;
	}

	.popular-slide-card-upgraded .popular-slide-thumb {
		height: 220px;
	}

	.popular-slide-card-upgraded .popular-slide-title {
		font-size: 1.1rem;
	}
}

@media (max-width: 640px) {
	.popular-posts-header-upgraded {
		align-items: flex-start;
	}

	.popular-posts-controls {
		width: 100%;
		justify-content: flex-end;
	}

	.popular-posts-section-upgraded .popular-slider-arrow {
		width: 42px;
		height: 42px;
		flex-basis: 42px;
		border-radius: 14px;
	}

	.popular-slide-card-upgraded .popular-slide-thumb {
		height: 210px;
	}

	.popular-slide-top-meta {
		left: 0.85rem;
		right: 0.85rem;
		bottom: 0.8rem;
	}

	.popular-slide-views {
		font-size: 0.7rem;
		padding: 0.32rem 0.62rem;
	}
}

/* =========================================
   Latest Posts - Modern Design
========================================= */

.latest-posts-section {
	margin: 2.5rem 0 2rem;
}

.latest-posts-header {
	margin-bottom: 1.4rem;
}

.latest-posts-kicker {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--category-bg);
	color: var(--link-color);
	border: 1px solid var(--border-subtle);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.6rem;
}

/* layout */
.latest-posts-list {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

/* card */
.post-card-modern {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 1.2rem;
	padding: 1.2rem;
	border: 1px solid var(--border-subtle);
	border-radius: 22px;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
	transition: all 0.28s ease;
}

.post-card-modern:hover {
	transform: translateY(-4px);
	box-shadow: var(--card-shadow-hover);
	border-color: rgba(63, 120, 110, 0.25);
}

/* thumbnail */
.post-card-modern-thumb {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	height: 150px;
}

.post-card-modern-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.post-card-modern:hover .post-card-modern-thumb img {
	transform: scale(1.05);
}

/* category badge on image */
.post-card-modern-cats {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	z-index: 2;
}

.post-card-modern-cats a {
	padding: 0.25rem 0.55rem;
	border-radius: 999px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	font-size: 0.68rem;
	border: 1px solid rgba(255,255,255,0.2);
	text-decoration: none;
}

.post-card-modern-cats a:hover {
	background: var(--category-active);
}

/* content */
.post-card-modern-content {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

/* meta */
.post-card-modern-meta {
	font-size: 0.72rem;
	color: var(--meta-color);
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* title */
.post-card-modern-title {
	font-size: 1.25rem;
	line-height: 1.35;
	margin: 0;
}

.post-card-modern-title a {
	color: var(--post-title);
	text-decoration: none;
}

.post-card-modern-title a:hover {
	color: var(--link-color);
}

/* excerpt */
.post-card-modern-excerpt {
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--excerpt-color);
}

/* tags */
.post-card-modern .post-tags {
	margin-top: 0.3rem;
}

/* footer */
.post-card-modern-footer {
	margin-top: auto;
}

/* read more */
.post-card-modern-readmore {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--link-color);
	text-decoration: none;
}

.post-card-modern-readmore:hover {
	text-decoration: underline;
	transform: translateX(3px);
}

/* =========================================
   Responsive
========================================= */

@media (max-width: 900px) {
	.post-card-modern {
		grid-template-columns: 180px 1fr;
	}
}

@media (max-width: 640px) {
	.post-card-modern {
		grid-template-columns: 1fr;
	}

	.post-card-modern-thumb {
		height: 200px;
	}

	.post-card-modern-title {
		font-size: 1.1rem;
	}
}

.footer-simple-mode .footer-top-simple {
	display: flex;
	justify-content: center;
	text-align: center;
	padding: 2rem 1.5rem 1.25rem;
}

.footer-simple-mode .footer-brand-col-simple {
	max-width: 640px;
	width: 100%;
}

.footer-simple-mode .footer-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.footer-simple-mode .footer-site-description {
	margin-bottom: 0;
}

.footer-simple-mode .footer-bottom {
	justify-content: center;
}

/* =========================================================
   NEW SINGLE POST FEATURES
========================================================= */

/* utility bar */
.single-utility-bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 1rem;
}

.reading-mode-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--card-shadow);
}

.reading-mode-toggle:hover,
.reading-mode-toggle.is-active {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

/* top boxes */
.single-top-tools {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.2rem;
	margin-bottom: 1.8rem;
}

.quick-summary-box,
.single-toc-box {
	border: 1px solid var(--border-subtle);
	border-radius: 18px;
	background: var(--category-bg);
	padding: 1.1rem 1.1rem 1rem;
	box-shadow: var(--card-shadow);
}

.quick-summary-title,
.single-toc-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--post-title);
	margin-bottom: 0.8rem;
}

.quick-summary-list {
	margin: 0;
	padding-left: 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	color: var(--excerpt-color);
}

.quick-summary-list li {
	line-height: 1.45;
}

.single-toc-list {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.single-toc-link {
	display: block;
	padding: 0.55rem 0.7rem;
	border-radius: 12px;
	color: var(--text-primary);
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	font-size: 0.9rem;
	line-height: 1.35;
	text-decoration: none;
}

.single-toc-link:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
	transform: translateY(-1px);
}

.single-toc-link.level-h3 {
	margin-left: 1rem;
	font-size: 0.84rem;
	opacity: 0.92;
}

/* entry heading anchor offset for sticky header */
.entry-content h2,
.entry-content h3 {
	scroll-margin-top: 110px;
}

/* code block wrapper */
.code-block-wrap {
	margin: 1.35rem 0;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--code-border);
	background: var(--code-bg);
	box-shadow: var(--card-shadow);
}

.code-block-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid var(--code-border);
	background: rgba(127, 127, 127, 0.08);
}

.code-block-label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--meta-color);
	font-weight: 700;
}

.copy-code-button {
	padding: 0.45rem 0.8rem;
	border-radius: 10px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
}

.copy-code-button:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
}

.entry-content .code-block-wrap pre {
	margin: 0;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* continue reading widget */
/* ===== STICKY NEXT POST WIDGET - ALWAYS VISIBLE WHILE SCROLLING ===== */
/* related posts */
.related-posts-section {
	margin-top: 2.6rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--border-subtle);
}

.related-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.2rem;
}

.related-post-card {
	border: 1px solid var(--card-border);
	border-radius: 18px;
	overflow: hidden;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-post-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--card-shadow-hover);
}

.related-post-thumb {
	width: 100%;
	height: 180px;
	background: var(--category-bg);
	overflow: hidden;
	border-bottom: 1px solid var(--border-subtle);
}

.related-post-thumb a,
.related-post-thumb img {
	display: block;
	width: 100%;
	height: 100%;
}

.related-post-thumb img {
	object-fit: cover;
}

.related-post-thumb.no-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	color: var(--link-color);
}

.related-post-content {
	padding: 1rem;
}

.related-post-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.45;
}

.related-post-title a {
	color: var(--post-title);
}

.related-post-title a:hover {
	color: var(--link-color);
}

/* search suggestions */
.header-search-suggest-wrap {
	position: relative;
	width: 100%;
}

.header-search-suggestions {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	border-radius: 16px;
	box-shadow: var(--card-shadow-hover);
	padding: 0.4rem;
	z-index: 9999;
	display: none;
	max-height: 320px;
	overflow-y: auto;
}

.header-search-suggestions.is-active {
	display: block;
}

.header-search-suggestion-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.8rem 0.9rem;
	border-radius: 12px;
	color: var(--text-primary);
	text-decoration: none;
}

.header-search-suggestion-item:hover {
	background: var(--category-bg);
	color: var(--link-color);
}

.header-search-suggestion-title {
	font-size: 0.92rem;
	line-height: 1.35;
}

.header-search-suggestion-type {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--meta-color);
	flex-shrink: 0;
}

/* reading mode */
body.reading-mode .site-header,
body.reading-mode .trending-bar,
body.reading-mode .category-bar,
body.reading-mode .plain-footer,
body.reading-mode .continue-reading-widget,
body.reading-mode .post-navigation,
body.reading-mode .related-posts-section,
body.reading-mode #comments,
body.reading-mode .single-top-tools,
body.reading-mode .single-utility-bar {
	display: none !important;
}

body.reading-mode .site-wrap {
	max-width: 860px;
	padding-top: 2rem;
}

body.reading-mode .single-content-area,
body.reading-mode .single-main-content,
body.reading-mode .single-article {
	width: 100%;
}

body.reading-mode .single-post-title {
	font-size: 2.8rem;
}

body.reading-mode .post-meta-single {
	margin-bottom: 2rem;
}

body.reading-mode .entry-content {
	font-size: 1.14rem;
	line-height: 1.9;
	color: var(--text-primary);
}

body.reading-mode .post-thumb-full-wrap {
	height: 360px;
}

/* reveal on scroll */
.reveal-on-scroll,
.related-post-card,
.hero-main-card,
.hero-side-card,
.popular-slide-card,
.category-post-block,
.post-card {
	opacity: 0;
	transform: translateY(26px);
	transition:
		opacity 0.65s ease,
		transform 0.65s ease,
		box-shadow 0.25s ease,
		background-color 0.25s ease,
		border-color 0.25s ease;
	will-change: transform, opacity;
}

.reveal-on-scroll.is-visible,
.related-post-card.is-visible,
.hero-main-card.is-visible,
.hero-side-card.is-visible,
.popular-slide-card.is-visible,
.category-post-block.is-visible,
.post-card.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* nicer hover for big cards */
.hero-main-card,
.hero-side-card,
.popular-slide-card,
.category-post-block,
.related-post-card {
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		opacity 0.65s ease,
		background-color 0.25s ease,
		border-color 0.25s ease;
}

.hero-main-card:hover,
.hero-side-card:hover,
.popular-slide-card:hover,
.category-post-block:hover,
.related-post-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--card-shadow-hover);
}

/* better single meta pills */
.post-meta-single span,
.post-meta-single .cat-links a {
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
}

.post-meta-single .cat-links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

/* progress bar */
.single-progress-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: transparent;
	z-index: 10000;
	pointer-events: none;
}

.single-progress-bar {
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, var(--link-color), var(--category-active));
	box-shadow: 0 0 12px rgba(63, 120, 110, 0.35);
	transition: width 0.08s linear;
}

/* responsive */
@media (max-width: 1000px) {
	.related-posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.single-top-tools {
		grid-template-columns: 1fr;
	}

	.continue-reading-widget {
		right: 16px;
		bottom: 74px;
		width: calc(100vw - 32px);
	}

	body.reading-mode .single-post-title {
		font-size: 2.1rem;
	}
}

@media (max-width: 640px) {
	.related-posts-grid {
		grid-template-columns: 1fr;
	}

	.quick-summary-box,
	.single-toc-box {
		padding: 0.95rem;
	}

	.code-block-topbar {
		padding: 0.65rem 0.75rem;
	}

	.single-post-title {
		font-size: 1.95rem;
	}
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
	.reveal-on-scroll,
	.related-post-card,
	.hero-main-card,
	.hero-side-card,
	.popular-slide-card,
	.category-post-block,
	.post-card,
	.continue-reading-widget,
	.single-progress-bar {
		transition: none !important;
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

.reading-mode-exit {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 10001;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.8rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--card-shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.25s ease;
}

.reading-mode-exit.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.reading-mode-exit:hover {
	background: #c62828;
	color: #fff;
	border-color: #c62828;
}

body.reading-mode .reading-mode-exit {
	display: inline-flex !important;
}

@media (max-width: 600px) {
	.reading-mode-exit {
		top: 12px;
		right: 12px;
		padding: 0.72rem 0.9rem;
		font-size: 0.8rem;
	}
}
.reading-mode-exit {
	position: fixed;
	top: 18px;
	right: 18px;
	z-index: 10001;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.8rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--border-subtle);
	background: var(--bg-body);
	color: var(--text-primary);
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--card-shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.25s ease;
}

.reading-mode-exit.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.reading-mode-exit:hover {
	background: #c62828;
	color: #fff;
	border-color: #c62828;
}

body.reading-mode .reading-mode-exit {
	display: inline-flex !important;
}

body.reading-mode .site-header,
body.reading-mode .trending-bar,
body.reading-mode .category-bar,
body.reading-mode .plain-footer,
body.reading-mode .continue-reading-widget,
body.reading-mode .post-navigation,
body.reading-mode .related-posts-section,
body.reading-mode #comments,
body.reading-mode .single-top-tools,
body.reading-mode .single-utility-bar {
	display: none !important;
}

/* ===== FINAL CONTINUE READING WIDGET ===== */

.continue-reading-widget {
	position: fixed !important;
	right: 20px !important;
	bottom: 20px !important;
	left: auto !important;
	width: 340px !important;
	max-width: calc(100vw - 32px) !important;
	z-index: 99999 !important;

	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translateY(18px) scale(0.98) !important;
	transition:
		opacity 0.25s ease,
		transform 0.25s ease,
		visibility 0.25s ease !important;
}

.continue-reading-widget.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateY(0) scale(1) !important;
}

.continue-reading-badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 0.55rem;
	padding: 0.32rem 0.65rem;
	border-radius: 999px;
	background: var(--category-active);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: var(--card-shadow);
}

.continue-reading-card {
	display: grid;
	grid-template-columns: 78px 1fr 28px;
	align-items: center;
	gap: 0.85rem;
	padding: 0.8rem;
	border-radius: 18px;
	border: 1px solid var(--border-subtle);
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
	text-decoration: none;
	color: var(--text-primary);
}

body.dark .continue-reading-card {
	background: rgba(18, 18, 18, 0.92);
	box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

.continue-reading-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--card-shadow-hover);
}

.continue-reading-thumb {
	width: 78px;
	height: 78px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.continue-reading-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.continue-reading-thumb.no-thumb {
	color: var(--link-color);
	font-size: 1.8rem;
}

.continue-reading-content {
	min-width: 0;
}

.continue-reading-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--meta-color);
	margin-bottom: 0.25rem;
	font-weight: 700;
}

.continue-reading-title {
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--post-title);
	word-break: break-word;
}

.continue-reading-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--link-color);
}

@media (max-width: 760px) {
	.continue-reading-widget {
		right: 14px !important;
		bottom: 14px !important;
		width: calc(100vw - 28px) !important;
		max-width: none !important;
	}

	.continue-reading-card {
		grid-template-columns: 64px 1fr 24px;
		gap: 0.7rem;
		padding: 0.72rem;
		border-radius: 16px;
	}

	.continue-reading-thumb {
		width: 64px;
		height: 64px;
		border-radius: 12px;
	}

	.continue-reading-title {
		font-size: 0.92rem;
	}
}

.single-progress-wrap {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 99999;
	background: transparent;
}

.single-progress-bar {
	height: 100%;
	width: 0%;
	background: #0ea5e9; /* blue */
	transition: width 0.1s linear;
}

/* ===== FINAL STICKY NEXT POST WIDGET ===== */

.continue-reading-widget {
	position: fixed !important;
	right: 20px !important;
	bottom: 20px !important;
	left: auto !important;
	top: auto !important;
	width: 340px !important;
	max-width: calc(100vw - 32px) !important;
	z-index: 999999 !important;

	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: none !important;
	transition: opacity 0.22s ease, visibility 0.22s ease !important;
}

.continue-reading-widget.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
}

.continue-reading-widget.is-scrolling-up,
.continue-reading-widget.is-scrolling-down {
	transform: none !important;
}

.continue-reading-badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 0.55rem;
	padding: 0.32rem 0.65rem;
	border-radius: 999px;
	background: var(--category-active);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.continue-reading-card {
	display: grid;
	grid-template-columns: 78px 1fr 28px;
	align-items: center;
	gap: 0.85rem;
	padding: 0.8rem;
	border-radius: 18px;
	border: 1px solid var(--border-subtle);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
	text-decoration: none;
	color: var(--text-primary);
}

body.dark .continue-reading-card {
	background: rgba(18, 18, 18, 0.94);
	box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

.continue-reading-card:hover {
	box-shadow: var(--card-shadow-hover);
}

.continue-reading-thumb {
	width: 78px;
	height: 78px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.continue-reading-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.continue-reading-thumb.no-thumb {
	color: var(--link-color);
	font-size: 1.8rem;
}

.continue-reading-content {
	min-width: 0;
}

.continue-reading-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--meta-color);
	margin-bottom: 0.25rem;
	font-weight: 700;
}

.continue-reading-title {
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--post-title);
	word-break: break-word;
}

.continue-reading-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--link-color);
}

@media (max-width: 760px) {
	.continue-reading-widget {
		right: 14px !important;
		bottom: 14px !important;
		width: calc(100vw - 28px) !important;
		max-width: none !important;
	}

	.continue-reading-card {
		grid-template-columns: 64px 1fr 24px;
		gap: 0.7rem;
		padding: 0.72rem;
		border-radius: 16px;
	}

	.continue-reading-thumb {
		width: 64px;
		height: 64px;
		border-radius: 12px;
	}

	.continue-reading-title {
		font-size: 0.92rem;
	}
}

/* ===== STICKY NEXT POST WIDGET - FIXED POSITION ===== */

.continue-reading-widget {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    top: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 32px) !important;
    z-index: 999999 !important;
    
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.3s ease !important;
    transform: translateY(20px) scale(0.98) !important;
}

.continue-reading-widget.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) scale(1) !important;
}

.continue-reading-widget.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(20px) scale(0.98) !important;
}

/* Scroll direction animations */
.continue-reading-widget.is-scrolling-down {
    transform: translateY(0) scale(1) !important;
}

.continue-reading-widget.is-scrolling-up {
    transform: translateY(-8px) scale(1.02) !important;
}

/* Hover effect */
.continue-reading-widget.is-visible:hover {
    transform: translateY(-6px) scale(1.03) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.continue-reading-widget.is-visible.is-hovering {
    transform: translateY(-6px) scale(1.03) !important;
}

/* Entrance animation */
@keyframes widgetSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile adjustments */
@media (max-width: 760px) {
    .continue-reading-widget {
        right: 16px !important;
        bottom: 16px !important;
        left: 16px !important;
        width: auto !important;
        max-width: none !important;
    }
    
    .continue-reading-card {
        grid-template-columns: 56px 1fr 24px;
        gap: 0.7rem;
        padding: 0.7rem;
    }
    
    .continue-reading-thumb {
        width: 56px;
        height: 56px;
    }
    
    .continue-reading-title {
        font-size: 0.88rem;
    }
}

/* Prevent overlap with admin bar */
.admin-bar .continue-reading-widget {
    bottom: 76px !important;
}

@media (max-width: 600px) {
    .admin-bar .continue-reading-widget {
        bottom: 66px !important;
    }
}

/* Smooth entrance for page load */
.page-loaded .continue-reading-widget.is-visible {
    animation: widgetSlideIn 0.4s ease forwards;
}

/* ===== STICKY NEXT POST WIDGET OVERRIDES ===== */

.continue-reading-widget {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    left: auto !important;
    top: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 48px) !important;
    z-index: 999999 !important;
    
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease !important;
}

.continue-reading-widget.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.continue-reading-widget:hover {
    transform: translateY(-4px) !important;
}

/* Mobile */
@media (max-width: 760px) {
    .continue-reading-widget {
        right: 16px !important;
        bottom: 16px !important;
        width: calc(100vw - 32px) !important;
        max-width: none !important;
    }
}

/* Fix any existing conflicting styles */
body .continue-reading-widget {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
}

/* ===== STICKY NEXT POST WIDGET - CLEAN VERSION ===== */

.continue-reading-widget {
    position: fixed !important;
    right: 24px !important;
    bottom: 24px !important;
    left: auto !important;
    top: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 48px) !important;
    z-index: 999999 !important;
    
    /* Always visible */
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.continue-reading-widget:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--card-shadow-hover) !important;
}

/* Badge styling */
.continue-reading-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.55rem;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: var(--category-active);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: var(--card-shadow);
}

/* Card styling */
.continue-reading-card {
    display: grid;
    grid-template-columns: 78px 1fr 28px;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem;
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
    text-decoration: none;
    color: var(--text-primary);
}

body.dark .continue-reading-card {
    background: rgba(18, 18, 18, 0.96);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

.continue-reading-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

/* Thumbnail */
.continue-reading-thumb {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--category-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.continue-reading-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.continue-reading-thumb.no-thumb {
    color: var(--link-color);
    font-size: 1.8rem;
}

/* Content */
.continue-reading-content {
    min-width: 0;
}

.continue-reading-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--meta-color);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.continue-reading-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--post-title);
    word-break: break-word;
}

.continue-reading-title:hover {
    color: var(--link-color);
}

/* Arrow */
.continue-reading-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--link-color);
}

/* Mobile */
@media (max-width: 760px) {
    .continue-reading-widget {
        right: 16px !important;
        bottom: 16px !important;
        width: calc(100vw - 32px) !important;
        max-width: none !important;
    }
    
    .continue-reading-card {
        grid-template-columns: 64px 1fr 24px;
        gap: 0.7rem;
        padding: 0.72rem;
        border-radius: 16px;
    }
    
    .continue-reading-thumb {
        width: 64px;
        height: 64px;
        border-radius: 12px;
    }
    
    .continue-reading-title {
        font-size: 0.92rem;
    }
}

/* Admin bar adjustment */
.admin-bar .continue-reading-widget {
    bottom: 76px !important;
}

@media (max-width: 600px) {
    .admin-bar .continue-reading-widget {
        bottom: 66px !important;
    }
}

/* =========================================
   Latest Posts + Left Sidebar
========================================= */

.latest-posts-with-sidebar {
	margin: 2.5rem 0 2rem;
}

.latest-posts-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.latest-posts-sidebar {
	position: sticky;
	top: 100px;
	border-right: 1px solid var(--border-subtle);
	padding-right: 1.25rem;
}

.latest-posts-sidebar .widget {
	margin-bottom: 1.25rem;
	padding: 1rem;
	border: 1px solid var(--border-subtle);
	border-radius: 18px;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
}

.latest-posts-sidebar .widget-title {
	margin-bottom: 0.8rem;
	font-size: 1rem;
	color: var(--post-title);
}

.latest-posts-main {
	min-width: 0;
}

.latest-posts-main .latest-posts-header {
	margin-top: 0;
}

@media (max-width: 1000px) {
	.latest-posts-layout {
		grid-template-columns: 1fr;
	}

	.latest-posts-sidebar {
		position: static;
		border-right: none;
		padding-right: 0;
		border-bottom: 1px solid var(--border-subtle);
		padding-bottom: 1.25rem;
		margin-bottom: 0.5rem;
	}
}

.latest-posts-with-sidebar {
	margin: 2.5rem 0 2rem;
}

.latest-posts-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.latest-posts-with-sidebar.has-home-latest-sidebar .latest-posts-layout {
	grid-template-columns: 280px minmax(0, 1fr);
}

.latest-posts-sidebar {
	position: sticky;
	top: 100px;
	border-right: 1px solid var(--border-subtle);
	padding-right: 1.25rem;
}

.latest-posts-sidebar .widget {
	margin-bottom: 1.25rem;
	padding: 1rem;
	border: 1px solid var(--border-subtle);
	border-radius: 18px;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
}

.latest-posts-main {
	min-width: 0;
}

@media (max-width: 1000px) {
	.latest-posts-with-sidebar.has-home-latest-sidebar .latest-posts-layout {
		grid-template-columns: 1fr;
	}

	.latest-posts-sidebar {
		position: static;
		border-right: none;
		padding-right: 0;
		border-bottom: 1px solid var(--border-subtle);
		padding-bottom: 1.25rem;
	}
}


/* =========================================
   Sidebar redesign
========================================= */

.sidebar-shell {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sidebar-card {
	position: relative;
	padding: 1.05rem;
	border: 1px solid var(--border-subtle);
	border-radius: 20px;
	background:
		linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
		var(--bg-body);
	box-shadow: var(--card-shadow);
	overflow: hidden;
}

body.dark .sidebar-card {
	background:
		linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
		var(--bg-body);
}

.sidebar-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(63,120,110,0.35), transparent);
}

.sidebar-card-accent {
	background:
		radial-gradient(circle at top right, rgba(63,120,110,0.14), transparent 42%),
		linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
		var(--bg-body);
}

.sidebar-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.9rem;
}

.sidebar-card-kicker {
	display: inline-flex;
	margin-bottom: 0.7rem;
	padding: 0.28rem 0.62rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	color: var(--link-color);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sidebar-card-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.25;
	color: var(--post-title);
}

.sidebar-card-text {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--excerpt-color);
}

.sidebar-mini-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
	margin-top: 1rem;
}

.sidebar-mini-stat {
	padding: 0.75rem 0.55rem;
	border-radius: 16px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	text-align: center;
}

.sidebar-mini-stat-number {
	display: block;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--post-title);
	line-height: 1;
	margin-bottom: 0.25rem;
}

.sidebar-mini-stat-label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--meta-color);
}

.sidebar-link-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.sidebar-link-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.72rem 0.85rem;
	border-radius: 14px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
}

.sidebar-link-pill:hover {
	background: var(--category-active);
	border-color: var(--category-active);
	color: #fff;
	transform: translateY(-2px);
}

.sidebar-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sidebar-tag-cloud a {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.7rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	font-size: 0.78rem;
	color: var(--meta-color);
}

.sidebar-tag-cloud a:hover {
	background: var(--category-active);
	border-color: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
}

.sidebar-post-list {
	display: flex;
	flex-direction: column;
	gap: 0.95rem;
}

.sidebar-post-item {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 0.8rem;
	align-items: start;
}

.sidebar-post-item + .sidebar-post-item {
	padding-top: 0.95rem;
	border-top: 1px solid var(--border-subtle);
}

.sidebar-post-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
}

.sidebar-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sidebar-post-title {
	margin: 0 0 0.35rem;
	font-size: 0.92rem;
	line-height: 1.45;
}

.sidebar-post-title a {
	color: var(--post-title);
}

.sidebar-post-title a:hover {
	color: var(--link-color);
}

.sidebar-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	font-size: 0.75rem;
	color: var(--meta-color);
}

.sidebar-category-list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.sidebar-category-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.72rem 0.85rem;
	border-radius: 14px;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	color: var(--text-primary);
}

.sidebar-category-item:hover {
	background: var(--bg-body);
	border-color: rgba(63,120,110,0.28);
	transform: translateY(-2px);
	box-shadow: var(--card-shadow);
}

.sidebar-category-item small {
	font-size: 0.72rem;
	padding: 0.18rem 0.46rem;
	border-radius: 999px;
	background: rgba(63,120,110,0.12);
	color: var(--link-color);
}

.sidebar-dynamic-widgets .widget {
	margin-bottom: 1rem;
	padding: 1rem;
	border: 1px solid var(--border-subtle);
	border-radius: 20px;
	background: var(--bg-body);
	box-shadow: var(--card-shadow);
}

.sidebar-dynamic-widgets .widget:last-child {
	margin-bottom: 0;
}

.latest-posts-sidebar {
	border-right: none;
	padding-right: 0;
}

.latest-posts-sidebar .sidebar-shell {
	position: sticky;
	top: 100px;
}

.latest-posts-sidebar .widget-area,
.latest-posts-sidebar.widget-area {
	border: none;
	padding: 0;
}

.latest-posts-main .archive-header.latest-posts-header {
	padding: 1.15rem 1.2rem;
	border: 1px solid var(--border-subtle);
	border-radius: 22px;
	background:
		radial-gradient(circle at top right, rgba(63,120,110,0.08), transparent 38%),
		var(--bg-body);
	box-shadow: var(--card-shadow);
}

.latest-posts-list {
	gap: 1.1rem;
}

.post-card-modern {
	border-radius: 24px;
}

.post-card-modern-content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.post-card-modern-footer {
	margin-top: 0.8rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--border-subtle);
}

.post-card-modern-readmore {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.68rem 0.95rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--post-title);
}

.post-card-modern-readmore:hover {
	background: var(--category-active);
	border-color: var(--category-active);
	color: #fff;
	transform: translateY(-1px);
}

@media (max-width: 1000px) {
	.latest-posts-sidebar .sidebar-shell {
		position: static;
	}
}

@media (max-width: 640px) {
	.sidebar-mini-stats {
		grid-template-columns: 1fr;
	}
	.sidebar-link-grid {
		grid-template-columns: 1fr;
	}
	.sidebar-post-item {
		grid-template-columns: 64px minmax(0, 1fr);
	}
	.sidebar-post-thumb {
		width: 64px;
		height: 64px;
	}
}

/* =========================================
   HOME HERO REDESIGN V2
========================================= */

.home-hero-section-v2 {
	margin: 0 0 2.8rem;
	position: relative;
}

.home-hero-topline {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.15rem;
}

.home-hero-kicker {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.75rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	color: var(--link-color);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.55rem;
}

.home-hero-heading {
	margin: 0;
	font-size: 2rem;
	line-height: 1.12;
	color: var(--post-title);
	letter-spacing: -0.03em;
}

.home-hero-topline-right {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.home-hero-mini-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.38rem;
	padding: 0.58rem 0.85rem;
	border-radius: 999px;
	background: var(--bg-body);
	border: 1px solid var(--border-subtle);
	box-shadow: var(--card-shadow);
	font-size: 0.78rem;
	color: var(--meta-color);
}

.home-hero-mini-stat strong {
	color: var(--post-title);
	font-size: 0.86rem;
}

.home-hero-grid-v2 {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.92fr);
	gap: 1.35rem;
	align-items: stretch;
}

.hero-main-card-v2 {
	border: 1px solid var(--border-subtle);
	border-radius: 30px;
	overflow: hidden;
	background:
		linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
		var(--bg-body);
	box-shadow: var(--card-shadow);
	min-height: 100%;
}

.hero-main-card-v2:hover {
	transform: translateY(-7px);
	box-shadow: var(--card-shadow-hover);
}

.hero-main-thumb-v2 {
	position: relative;
	height: 470px;
	border-bottom: 1px solid var(--border-subtle);
	background: var(--category-bg);
	overflow: hidden;
}

.hero-main-thumb-v2 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease, filter 0.6s ease;
}

.hero-main-card-v2:hover .hero-main-thumb-v2 img {
	transform: scale(1.05);
	filter: brightness(1.04);
}

.hero-main-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.22) 42%, rgba(0,0,0,0.02) 100%);
	pointer-events: none;
	z-index: 1;
}

.hero-main-floating-meta {
	position: absolute;
	left: 1.2rem;
	right: 1.2rem;
	bottom: 1.1rem;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.85rem;
	flex-wrap: wrap;
}

.hero-floating-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.42rem 0.8rem;
	border-radius: 999px;
	background: rgba(186, 1, 1, 0.92);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hero-main-cats-v2,
.hero-side-cats-v2 {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.hero-main-cats-v2 a,
.hero-side-cats-v2 a {
	display: inline-flex;
	align-items: center;
	padding: 0.34rem 0.72rem;
	border-radius: 999px;
	font-size: 0.72rem;
	line-height: 1;
	text-decoration: none;
}

.hero-main-cats-v2 a {
	background: rgba(255,255,255,0.14);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.hero-main-cats-v2 a:hover {
	background: rgba(255,255,255,0.24);
	color: #fff;
	border-color: rgba(255,255,255,0.25);
}

.hero-main-content-v2 {
	padding: 1.3rem 1.35rem 1.35rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero-main-content-inner {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.hero-main-title-v2 {
	margin: 0;
	font-size: 2.15rem;
	line-height: 1.14;
	letter-spacing: -0.03em;
	color: var(--post-title);
}

.hero-main-title-v2 a {
	color: inherit;
	text-decoration: none;
}

.hero-main-title-v2 a:hover {
	color: var(--link-color);
}

.hero-main-meta-v2 {
	margin: 0;
	gap: 0.55rem;
}

.hero-main-meta-v2 span,
.hero-main-meta-v2 a {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.hero-main-excerpt-v2 {
	font-size: 1rem;
	line-height: 1.72;
	color: var(--excerpt-color);
	max-width: 62ch;
}

.hero-main-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--border-subtle);
}

.hero-main-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.88rem 1.15rem;
	border-radius: 999px;
	background: var(--category-active);
	color: #fff;
	border: 1px solid var(--category-active);
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	box-shadow: var(--card-shadow);
}

.hero-main-button:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--card-shadow-hover);
}

.hero-side-v2 {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hero-side-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.1rem;
}

.hero-side-kicker {
	display: inline-flex;
	align-items: center;
	padding: 0.36rem 0.75rem;
	border-radius: 999px;
	background: var(--category-bg);
	border: 1px solid var(--border-subtle);
	color: var(--meta-color);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.hero-side-card-v2 {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 0.95rem;
	align-items: stretch;
	padding: 0.9rem;
	border-radius: 24px;
	border: 1px solid var(--border-subtle);
	background:
		linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
		var(--bg-body);
	box-shadow: var(--card-shadow);
	min-height: 132px;
}

.hero-side-card-v2:hover {
	transform: translateY(-4px);
	box-shadow: var(--card-shadow-hover);
}

.hero-side-thumb-v2 {
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--border-subtle);
	background: var(--category-bg);
	min-height: 112px;
	height: 100%;
}

.hero-side-thumb-v2 img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s ease, filter 0.45s ease;
}

.hero-side-card-v2:hover .hero-side-thumb-v2 img {
	transform: scale(1.05);
	filter: brightness(1.04);
}

.hero-side-content-v2 {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.hero-side-cats-v2 {
	margin-bottom: 0.55rem;
}

.hero-side-cats-v2 a {
	background: var(--category-bg);
	color: var(--meta-color);
	border: 1px solid var(--border-subtle);
}

.hero-side-cats-v2 a:hover {
	background: var(--category-active);
	color: #fff;
	border-color: var(--category-active);
}

.hero-side-title-v2 {
	margin: 0 0 0.48rem;
	font-size: 1.02rem;
	line-height: 1.42;
	color: var(--post-title);
}

.hero-side-title-v2 a {
	color: inherit;
	text-decoration: none;
}

.hero-side-title-v2 a:hover {
	color: var(--link-color);
}

.hero-side-meta-v2 {
	margin: 0 0 0.68rem;
	font-size: 0.72rem;
}

.hero-side-read {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--link-color);
	text-decoration: none;
}

.hero-side-read:hover {
	color: var(--link-hover);
	transform: translateX(2px);
}

/* dark mode polish */
body.dark .hero-main-card-v2,
body.dark .hero-side-card-v2 {
	border-color: rgba(255,255,255,0.08);
	background:
		linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
		var(--bg-body);
}

body.dark .home-hero-mini-stat,
body.dark .hero-side-kicker {
	border-color: rgba(255,255,255,0.08);
}

/* responsive */
@media (max-width: 1100px) {
	.home-hero-heading {
		font-size: 1.8rem;
	}

	.hero-main-thumb-v2 {
		height: 420px;
	}

	.hero-main-title-v2 {
		font-size: 1.9rem;
	}
}

@media (max-width: 980px) {
	.home-hero-grid-v2 {
		grid-template-columns: 1fr;
	}

	.hero-main-thumb-v2 {
		height: 380px;
	}
}

@media (max-width: 700px) {
	.home-hero-topline {
		align-items: flex-start;
	}

	.home-hero-heading {
		font-size: 1.55rem;
	}

	.hero-main-thumb-v2 {
		height: 280px;
	}

	.hero-main-floating-meta {
		left: 0.9rem;
		right: 0.9rem;
		bottom: 0.9rem;
	}

	.hero-main-title-v2 {
		font-size: 1.5rem;
	}

	.hero-side-card-v2 {
		grid-template-columns: 98px minmax(0, 1fr);
		padding: 0.75rem;
		border-radius: 20px;
	}

	.hero-side-thumb-v2 {
		min-height: 88px;
		border-radius: 14px;
	}

	.hero-side-title-v2 {
		font-size: 0.95rem;
	}
}

@media (max-width: 520px) {
	.home-hero-section-v2 {
		margin-bottom: 2rem;
	}

	.hero-main-card-v2 {
		border-radius: 22px;
	}

	.hero-main-thumb-v2 {
		height: 220px;
	}

	.hero-main-content-v2 {
		padding: 1rem;
	}

	.hero-main-bottom {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-main-button {
		justify-content: center;
		width: 100%;
	}

	.hero-side-card-v2 {
		grid-template-columns: 1fr;
	}

	.hero-side-thumb-v2 {
		width: 100%;
		height: 180px;
		min-height: 180px;
	}
}
.home-hero-topline {
	margin-bottom: 0.9rem;
}

.home-hero-topline-right,
.home-hero-heading {
	display: none !important;
}
.sidebar-random-posts .sidebar-card-title {
	color: #2563eb;
}

body.dark .sidebar-random-posts .sidebar-card-title {
	color: #93c5fd;
}
/* =========================================
   Header categories - one unified color
   Add at the VERY END of style.css
========================================= */

:root {
	--header-category-solid: #0f766e;
	--header-category-solid-hover: #115e59;
	--header-category-solid-text: #ffffff;
	--header-category-outline: rgba(255, 255, 255, 0.14);
}

body.dark {
	--header-category-solid: #14b8a6;
	--header-category-solid-hover: #0f9f91;
	--header-category-solid-text: #07110f;
	--header-category-outline: rgba(255, 255, 255, 0.16);
}

.site-header.site-header-wallpaper .category-bar a,
.site-header.site-header-wallpaper .cat-link,
.site-header.site-header-wallpaper .cat-btn {
	background: var(--header-category-solid) !important;
	color: var(--header-category-solid-text) !important;
	border: 1px solid var(--header-category-outline) !important;
	box-shadow:
		0 8px 20px rgba(0, 0, 0, 0.12),
		inset 0 -1px 0 rgba(255, 255, 255, 0.12) !important;
	font-weight: 700;
}

.site-header.site-header-wallpaper .category-bar a:hover,
.site-header.site-header-wallpaper .cat-link:hover,
.site-header.site-header-wallpaper .cat-btn:hover {
	background: var(--header-category-solid-hover) !important;
	color: #ffffff !important;
	border-color: var(--header-category-solid-hover) !important;
	filter: none !important;
	transform: translateY(-2px);
}

.site-header.site-header-wallpaper .category-bar a.is-active,
.site-header.site-header-wallpaper .category-bar .current-cat a {
	background: #ffffff !important;
	color: #111827 !important;
	border-color: #ffffff !important;
	outline: none !important;
	box-shadow:
		0 0 0 3px rgba(255, 255, 255, 0.14),
		0 10px 24px rgba(0, 0, 0, 0.16) !important;
}

body.dark .site-header.site-header-wallpaper .category-bar a.is-active,
body.dark .site-header.site-header-wallpaper .category-bar .current-cat a {
	background: #d1fae5 !important;
	color: #062b27 !important;
	border-color: #d1fae5 !important;
	box-shadow:
		0 0 0 3px rgba(20, 184, 166, 0.18),
		0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

/* kill the old per-category colors */
.site-header.site-header-wallpaper .cat-link.cat-color-1,
.site-header.site-header-wallpaper .cat-link.cat-color-2,
.site-header.site-header-wallpaper .cat-link.cat-color-3,
.site-header.site-header-wallpaper .cat-link.cat-color-4,
.site-header.site-header-wallpaper .cat-link.cat-color-5,
.site-header.site-header-wallpaper .cat-link.cat-color-6,
.site-header.site-header-wallpaper .cat-link.cat-color-7,
.site-header.site-header-wallpaper .cat-link.cat-color-8,
.site-header.site-header-wallpaper .cat-link.cat-color-9,
.site-header.site-header-wallpaper .cat-link.cat-color-10,
.site-header.site-header-wallpaper .cat-link.cat-color-11,
.site-header.site-header-wallpaper .cat-link.cat-color-12 {
	background: var(--header-category-solid) !important;
}

@media (max-width: 760px) {
	.site-header.site-header-wallpaper .category-bar {
		gap: 0.55rem;
	}

	.site-header.site-header-wallpaper .category-bar a,
	.site-header.site-header-wallpaper .cat-link,
	.site-header.site-header-wallpaper .cat-btn {
		padding: 0.55rem 0.9rem;
		font-size: 0.82rem;
	}
}
