:root {
	--primary: #0f766e;
	--secondary: #1f2937;
	--accent: #f59e0b;
	--background: #f8fafc;
	--surface: #ffffff;
	--border: #e5e7eb;
	--text: #111827;
	--muted: #6b7280;
	--link: #0f766e;
	--button: #0f766e;
	--header-background: #ffffff;
	--header-border: #e5e7eb;
	--header-title: #111827;
	--header-title-hover: #0f766e;
	--header-tagline: #6b7280;
	--header-nav: #111827;
	--header-nav-hover: #0f766e;
	--header-nav-bg: #f8fafc;
	--header-title-size: 20px;
	--header-title-weight: 800;
	--header-tagline-size: 14px;
	--header-nav-size: 16px;
	--header-nav-weight: 500;
	--header-height: 76px;
	--footer-background: #111827;
	--radius: 6px;
	--container: 1180px;
	--sidebar: 320px;
	--font-size: 17px;
	--line-height: 1.75;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--background);
	color: var(--text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: var(--font-size);
	line-height: var(--line-height);
	text-rendering: optimizeLegibility;
}

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

a {
	color: var(--link);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

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

button,
input,
textarea,
select {
	font: inherit;
}

button,
.button,
.search-submit,
.read-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0.55rem 0.9rem;
	border: 1px solid var(--button);
	border-radius: var(--radius);
	background: var(--button);
	color: #fff;
	cursor: pointer;
	text-decoration: none;
}

button:hover,
.button:hover,
.search-submit:hover,
.read-more:hover {
	background: var(--secondary);
	border-color: var(--secondary);
	color: #fff;
}

input,
textarea,
select {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.7rem 0.8rem;
	background: var(--surface);
	color: var(--text);
}

:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--accent), transparent 25%);
	outline-offset: 3px;
}

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.container {
	width: min(100% - 2rem, var(--container));
	margin-inline: auto;
}

.narrow {
	width: min(100% - 2rem, 760px);
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.site-header {
	background: var(--header-background);
	border-bottom: 1px solid var(--header-border);
	z-index: 20;
}

.has-sticky-header .site-header {
	position: sticky;
	top: 0;
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: var(--header-height);
}

.site-branding {
	min-width: 180px;
	margin-right: auto;
}

.site-title {
	color: var(--header-title);
	font-size: var(--header-title-size);
	font-weight: var(--header-title-weight);
	text-decoration: none;
}

.site-title:hover {
	color: var(--header-title-hover);
}

.site-description {
	margin: 0.1rem 0 0;
	color: var(--header-tagline);
	font-size: var(--header-tagline-size);
	line-height: 1.35;
}

.custom-logo-link img {
	max-height: 56px;
	width: auto;
}

.main-navigation ul {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation a {
	display: block;
	padding: 0.55rem 0.7rem;
	color: var(--header-nav);
	font-size: var(--header-nav-size);
	font-weight: var(--header-nav-weight);
	text-decoration: none;
	border-radius: var(--radius);
}

.main-navigation a:hover {
	background: var(--header-nav-bg);
	color: var(--header-nav-hover);
}

.menu-toggle {
	display: none;
	width: 42px;
	min-height: 42px;
	padding: 0;
	background: transparent;
	border-color: var(--header-border);
	color: var(--header-nav);
	gap: 4px;
	flex-direction: column;
}

.menu-toggle:hover {
	background: var(--header-nav-bg);
	border-color: var(--header-border);
	color: var(--header-nav-hover);
}

.menu-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	border-radius: 999px;
	background: currentColor;
}

.header-actions {
	display: flex;
	gap: 0.4rem;
}

.icon-button {
	width: 42px;
	padding: 0;
	background: transparent;
	color: var(--header-nav);
	border-color: var(--header-border);
}

.icon-button:hover {
	background: var(--header-nav-bg);
	border-color: var(--header-border);
	color: var(--header-nav-hover);
}

.icon-button svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

.site-search {
	padding: 1rem 0;
	border-top: 1px solid var(--border);
}

.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form label {
	flex: 1;
}

.breadcrumb {
	width: min(100% - 2rem, var(--container));
	margin: 1rem auto 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.breadcrumb a,
.breadcrumb span {
	margin-right: 0.45rem;
}

.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sidebar);
	gap: 2rem;
	padding: 2rem 0 3rem;
}

.no-sidebar .content-layout {
	grid-template-columns: minmax(0, 1fr);
}

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

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

.post-list {
	display: grid;
	gap: 1rem;
}

.post-list .post-card {
	display: grid;
	grid-template-columns: minmax(180px, 32%) minmax(0, 1fr);
	align-items: stretch;
}

.post-card {
	overflow: hidden;
}

.post-card-body,
.single-article,
.author-box,
.comments-area,
.no-results,
.not-found {
	padding: 1.4rem;
}

.post-thumbnail {
	display: block;
	background: var(--background);
	aspect-ratio: 12 / 7;
	overflow: hidden;
}

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

.post-thumbnail-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--background);
	color: var(--header-nav);
	font-size: 2rem;
	font-weight: 800;
}

.cat-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.65rem;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0;
}

.cat-links a,
.tag-links a {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.15rem 0.45rem;
	text-decoration: none;
}

.entry-title {
	margin: 0 0 0.65rem;
	line-height: 1.2;
}

.post-card .entry-title {
	font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}

.entry-title a {
	color: var(--text);
	text-decoration: none;
}

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

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
	margin-bottom: 0.8rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.post-card p,
.archive-description,
.author-box p {
	color: var(--muted);
}

.archive-header,
.featured-posts,
.latest-posts {
	margin-bottom: 1.5rem;
}

.archive-header h1,
.featured-posts h1,
.latest-posts h2 {
	margin-top: 0;
}

.single-article {
	margin-bottom: 1.5rem;
}

.single-article .entry-title {
	font-size: clamp(2rem, 4vw, 3rem);
}

.single-featured {
	margin: 1.25rem -1.4rem 1.4rem;
}

.single-featured figcaption {
	padding: 0.5rem 1.4rem 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.entry-content {
	overflow-wrap: break-word;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.8em;
	line-height: 1.25;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
	margin-bottom: 1.1em;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--border);
	padding: 0.6rem;
}

.toc {
	padding: 1rem;
	margin-bottom: 1.4rem;
}

.toc h2 {
	margin: 0 0 0.4rem;
	font-size: 1rem;
}

.toc ol {
	margin: 0;
	padding-left: 1.25rem;
}

.entry-footer {
	display: grid;
	gap: 1rem;
	margin-top: 1.5rem;
}

.tag-links,
.share-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.share-links a {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.35rem 0.6rem;
	text-decoration: none;
}

.author-box,
.author-card {
	display: flex;
	gap: 1rem;
	align-items: center;
	margin-bottom: 1.5rem;
}

.avatar {
	border-radius: 999px;
}

.related-posts {
	margin: 2rem 0;
}

.site-sidebar {
	display: grid;
	align-content: start;
	gap: 1rem;
}

.widget {
	padding: 1.1rem;
}

.widget-title {
	margin: 0 0 0.8rem;
	font-size: 1.05rem;
}

.widget ul {
	margin: 0;
	padding-left: 1.1rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: space-between;
	margin-top: 1.5rem;
}

.page-numbers,
.post-navigation a {
	display: inline-flex;
	padding: 0.45rem 0.75rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.comments-area {
	margin-top: 1.5rem;
}

.comment-list {
	padding-left: 1.2rem;
}

.comment-body {
	margin-bottom: 1rem;
}

.site-footer {
	background: var(--footer-background);
	color: #e5e7eb;
	padding: 2rem 0;
}

.site-footer a {
	color: #fff;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.5rem;
	margin-top: 1.5rem;
	border-top: 1px solid rgb(255 255 255 / 0.15);
}

.footer-bottom ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	width: 44px;
	padding: 0;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.back-to-top.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.dark-mode {
	--background: #0f172a;
	--surface: #111827;
	--border: #334155;
	--text: #f8fafc;
	--muted: #cbd5e1;
	--header-background: #111827;
	--footer-background: #020617;
}

@media (max-width: 1024px) {
	.content-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.site-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.header-inner {
		flex-wrap: wrap;
		min-height: 64px;
		padding: 0.45rem 0;
		row-gap: 0.45rem;
	}

	.site-branding,
	.header-actions {
		display: flex;
		align-items: center;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.main-navigation {
		order: 3;
		width: 100%;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding-top: 0.75rem;
	}

	.main-navigation ul.is-open {
		display: flex;
	}

	.post-grid,
	.post-list .post-card,
	.site-sidebar,
	.footer-widgets {
		grid-template-columns: 1fr;
	}

	.search-form,
	.footer-bottom {
		flex-direction: column;
		align-items: stretch;
	}

	.single-article .entry-title {
		font-size: 2rem;
	}
}

@media (max-width: 480px) {
	.container,
	.breadcrumb,
	.narrow {
		width: min(100% - 1rem, var(--container));
	}

	.content-layout {
		padding-top: 1rem;
		gap: 1rem;
	}

	.post-card-body,
	.single-article,
	.author-box,
	.comments-area,
	.no-results,
	.not-found,
	.widget {
		padding: 1rem;
	}

	.author-box,
	.author-card {
		align-items: flex-start;
	}
}

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