/* ==========================================================================
   Ringan — main.css
   One file, no web fonts, no frameworks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
	--bg: #fbf9f5;
	--bg-alt: #f3efe6;
	--surface: #ffffff;
	--ink: #191b1f;
	--ink-2: #4d525b;
	--ink-3: #7f858e;
	--line: #e6e1d6;
	--line-strong: #d5cdbd;
	--accent: #b1462c;
	--accent-ink: #ffffff;
	--accent-soft: rgba(177, 70, 44, 0.09);
	--accent-line: rgba(177, 70, 44, 0.32);
	--header-bg: rgba(251, 249, 245, 0.86);
	--pre-bg: #16191d;
	--pre-ink: #e7eaee;
	--shadow: 0 1px 2px rgba(25, 27, 31, 0.04), 0 14px 30px -18px rgba(25, 27, 31, 0.35);

	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	--container: 1200px;
	--sidebar: 300px;
	--radius: 14px;
	--radius-sm: 10px;
	--gap: clamp(1.15rem, 2.6vw, 1.9rem);
}

html[data-theme="dark"] {
	--bg: #0e1012;
	--bg-alt: #15181b;
	--surface: #171a1e;
	--ink: #eef0f2;
	--ink-2: #aeb5bd;
	--ink-3: #7f878f;
	--line: #252a2f;
	--line-strong: #363d44;
	--accent: #e58163;
	--accent-ink: #14171a;
	--accent-soft: rgba(229, 129, 99, 0.14);
	--accent-line: rgba(229, 129, 99, 0.38);
	--header-bg: rgba(14, 16, 18, 0.84);
	--pre-bg: #101315;
	--pre-ink: #e7eaee;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 32px -20px rgba(0, 0, 0, 0.9);
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme="light"]) {
		--bg: #0e1012;
		--bg-alt: #15181b;
		--surface: #171a1e;
		--ink: #eef0f2;
		--ink-2: #aeb5bd;
		--ink-3: #7f878f;
		--line: #252a2f;
		--line-strong: #363d44;
		--accent: #e58163;
		--accent-ink: #14171a;
		--accent-soft: rgba(229, 129, 99, 0.14);
		--accent-line: rgba(229, 129, 99, 0.38);
		--header-bg: rgba(14, 16, 18, 0.84);
		--pre-bg: #101315;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 32px -20px rgba(0, 0, 0, 0.9);
	}
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.site-main {
	flex: 1 0 auto;
	padding: clamp(2rem, 4.5vw, 3.25rem) 0 clamp(3rem, 6vw, 4.5rem);
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

p {
	margin: 0 0 1.25em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1.16;
	letter-spacing: -0.015em;
	margin: 0 0 0.5em;
	color: var(--ink);
}

ul,
ol {
	margin: 0 0 1.25em;
}

button {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

::selection {
	background: var(--accent);
	color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.container {
	width: min(100% - 2.5rem, var(--container));
	margin-inline: auto;
}

.container--narrow {
	width: min(100% - 2.5rem, 780px);
	margin-inline: auto;
}

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -100px;
	z-index: 200;
	padding: 0.7rem 1.1rem;
	background: var(--ink);
	color: var(--bg);
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
	font-size: 0.9rem;
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 0;
}

.icon {
	flex: 0 0 auto;
	vertical-align: middle;
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 90;
	background: var(--header-bg);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	min-height: 68px;
}

.site-branding {
	flex: 0 0 auto;
	min-width: 0;
}

.site-branding img {
	max-height: 40px;
	width: auto;
}

.site-title {
	margin: 0;
	font-size: 1.32rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.site-description {
	margin: 0.18rem 0 0;
	font-size: 0.76rem;
	letter-spacing: 0.04em;
	color: var(--ink-3);
	line-height: 1.2;
}

.site-nav {
	margin-left: auto;
}

.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.92rem;
}

.site-nav .menu li {
	position: relative;
}

.site-nav .menu a {
	display: inline-block;
	padding: 0.35rem 0;
	color: var(--ink-2);
	font-weight: 500;
	transition: color 0.18s ease;
}

.site-nav .menu a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 1.5px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.22s ease;
}

.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current-menu-ancestor > a {
	color: var(--ink);
}

.site-nav .menu a:hover::after,
.site-nav .menu .current-menu-item > a::after {
	transform: scaleX(1);
}

.site-nav .sub-menu {
	position: absolute;
	top: calc(100% + 0.55rem);
	left: -0.9rem;
	min-width: 200px;
	list-style: none;
	margin: 0;
	padding: 0.45rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	display: none;
	z-index: 20;
}

.site-nav .menu li:hover > .sub-menu,
.site-nav .menu li:focus-within > .sub-menu {
	display: block;
}

.site-nav .sub-menu a {
	display: block;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
}

.site-nav .sub-menu a::after {
	display: none;
}

.site-nav .sub-menu a:hover {
	background: var(--bg-alt);
}

.header-tools {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin-left: 0.25rem;
}

.icon-btn {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
	background: var(--bg-alt);
	color: var(--ink);
}

.theme-toggle .icon--sun {
	display: none;
}

html[data-theme="dark"] .theme-toggle .icon--moon {
	display: none;
}

html[data-theme="dark"] .theme-toggle .icon--sun {
	display: block;
}

.menu-toggle,
.menu-toggle__close {
	display: none;
}

.header-search {
	border-top: 1px solid var(--line);
	padding: 0.9rem 0;
	background: var(--bg);
}

.header-search[hidden] {
	display: none;
}

.search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.search-field {
	width: 100%;
	padding: 0.72rem 3rem 0.72rem 1rem;
	font: inherit;
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-field::placeholder {
	color: var(--ink-3);
}

.search-field:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-submit {
	position: absolute;
	right: 5px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ink-3);
	cursor: pointer;
	transition: color 0.18s ease, background 0.18s ease;
}

.search-submit:hover {
	color: var(--accent);
	background: var(--accent-soft);
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 3.25rem);
}

@media (min-width: 1040px) {
	.layout {
		grid-template-columns: minmax(0, 1fr) var(--sidebar);
	}

	.layout--single {
		grid-template-columns: minmax(0, 1fr) 280px;
	}
}

.layout-primary {
	min-width: 0;
}

/* --------------------------------------------------------------------------
   6. Page header
   -------------------------------------------------------------------------- */
.page-head {
	margin-bottom: 2.4rem;
	padding-bottom: 1.6rem;
	border-bottom: 1px solid var(--line);
}

.eyebrow {
	display: inline-block;
	margin-bottom: 0.85rem;
	font-size: 0.71rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--accent);
}

.page-title {
	font-size: clamp(1.95rem, 4vw, 2.85rem);
	letter-spacing: -0.025em;
	margin: 0 0 0.45rem;
}

.page-subtitle {
	margin: 0;
	font-size: 1.02rem;
	color: var(--ink-2);
	max-width: 62ch;
}

.page-head__search {
	margin-top: 1.35rem;
	max-width: 460px;
}

/* --------------------------------------------------------------------------
   7. Post grid & cards
   -------------------------------------------------------------------------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
	gap: var(--gap);
}

.post-grid--three {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
}

.card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
	transform: translateY(-2px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow);
}

.card__media {
	display: block;
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bg-alt);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.card:hover .card__media img {
	transform: scale(1.045);
}

.card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 22% 20%, var(--accent-soft), transparent 60%),
		linear-gradient(135deg, var(--bg-alt), var(--line));
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	flex: 1;
	padding: 1.2rem 1.35rem 1.35rem;
}

.card__title {
	font-size: 1.26rem;
	line-height: 1.26;
	margin: 0;
}

.card__title a {
	background-image: linear-gradient(var(--accent), var(--accent));
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size 0.25s ease;
}

.card__title a:hover {
	background-size: 100% 1px;
}

.card__excerpt {
	color: var(--ink-2);
	font-size: 0.94rem;
	line-height: 1.62;
}

.card__excerpt p {
	margin: 0;
}

.card__body > .meta {
	margin-top: auto;
	padding-top: 0.85rem;
	border-top: 1px solid var(--line);
}

.card--featured {
	grid-column: 1 / -1;
}

.card--featured .card__body {
	gap: 0.8rem;
	padding: clamp(1.4rem, 3vw, 2.4rem);
	justify-content: center;
}

.card--featured .card__title {
	font-size: clamp(1.55rem, 3vw, 2.15rem);
	line-height: 1.18;
}

.card--featured .card__excerpt {
	font-size: 1rem;
	line-height: 1.65;
}

@media (min-width: 780px) {
	.card--featured {
		display: grid;
		grid-template-columns: 1.08fr 1fr;
	}

	.card--featured .card__media {
		aspect-ratio: auto;
		height: 100%;
		min-height: 300px;
	}
}

.card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin-top: 0.35rem;
}

.card__footer .meta {
	border: 0;
	padding: 0;
	margin: 0;
}

.read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--accent);
}

.read-more .icon {
	transition: transform 0.2s ease;
}

.read-more:hover .icon {
	transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   8. Meta
   -------------------------------------------------------------------------- */
.meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.79rem;
	color: var(--ink-3);
	line-height: 1.4;
}

.meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: inherit;
}

a.meta-item:hover {
	color: var(--accent);
}

.meta-sep {
	color: var(--line-strong);
}

/* --------------------------------------------------------------------------
   9. Single entry
   -------------------------------------------------------------------------- */
.entry-header {
	margin-bottom: 1.9rem;
}

.entry-title {
	font-size: clamp(2.05rem, 4.6vw, 3.3rem);
	line-height: 1.08;
	letter-spacing: -0.028em;
	margin: 0.55rem 0 0.75rem;
	text-wrap: balance;
}

.entry-lede {
	font-family: var(--serif);
	font-size: clamp(1.08rem, 1.9vw, 1.28rem);
	line-height: 1.58;
	color: var(--ink-2);
	margin: 0 0 1.15rem;
	max-width: 60ch;
}

.entry-media {
	margin: 2rem 0 2.6rem;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--bg-alt);
}

.entry-media img {
	width: 100%;
}

.entry-media figcaption {
	padding: 0.7rem 1rem 0.85rem;
	margin: 0;
	font-size: 0.8rem;
	color: var(--ink-3);
	background: var(--bg-alt);
}

.entry-content {
	font-size: 1.07rem;
	line-height: 1.8;
	max-width: 72ch;
}

/* Vertical rhythm: one rule for every direct child, so no reset can cancel it. */
.entry-content > * {
	margin-top: 0;
	margin-bottom: 1.35em;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2 {
	font-size: clamp(1.5rem, 2.6vw, 1.9rem);
	margin-top: 2.1em;
	margin-bottom: 0.55em;
	scroll-margin-top: 90px;
}

.entry-content h3 {
	font-size: clamp(1.25rem, 2vw, 1.42rem);
	margin-top: 1.8em;
	margin-bottom: 0.5em;
	scroll-margin-top: 90px;
}

.entry-content h4 {
	font-size: 1.12rem;
	margin-top: 1.6em;
	margin-bottom: 0.45em;
}

.entry-content h2 + *,
.entry-content h3 + *,
.entry-content h4 + * {
	margin-top: 0.6em;
}

.entry-content a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: var(--accent-line);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-color 0.18s ease;
}

.entry-content a:hover {
	text-decoration-color: var(--accent);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.35em;
}

.entry-content li + li {
	margin-top: 0.42em;
}

.entry-content li > ul,
.entry-content li > ol {
	margin-top: 0.42em;
}

.entry-content blockquote {
	margin: 2em 0;
	padding: 0.15em 0 0.15em 1.35em;
	border-left: 2px solid var(--accent);
	font-family: var(--serif);
	font-size: 1.16em;
	font-style: italic;
	line-height: 1.6;
	color: var(--ink-2);
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.75em 0;
}

.entry-content code,
.entry-content kbd {
	font-family: var(--mono);
	font-size: 0.87em;
	background: var(--bg-alt);
	padding: 0.15em 0.4em;
	border-radius: 5px;
}

.entry-content pre {
	background: var(--pre-bg);
	color: var(--pre-ink);
	padding: 1.15rem 1.3rem;
	border-radius: var(--radius-sm);
	overflow-x: auto;
	font-size: 0.86rem;
	line-height: 1.62;
	-webkit-overflow-scrolling: touch;
}

.entry-content pre code {
	background: transparent;
	padding: 0;
	font-size: inherit;
	color: inherit;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

.entry-content th,
.entry-content td {
	padding: 0.62rem 0.8rem;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.entry-content th {
	font-family: var(--sans);
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ink-3);
}

.entry-content figure {
	margin: 1.9em 0;
}

.entry-content figcaption,
.wp-caption-text,
.wp-element-caption {
	font-size: 0.82rem;
	color: var(--ink-3);
	text-align: left;
	margin-top: 0.55em;
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content .alignwide {
	max-width: 1000px;
	width: 1000px;
	margin-left: calc((min(100%, 1000px) - 100%) / -2);
}

.entry-content .alignfull {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.entry-content .aligncenter {
	margin-inline: auto;
}

.entry-content .alignleft {
	float: left;
	margin: 0.3em 1.4em 1em 0;
	max-width: 50%;
}

.entry-content .alignright {
	float: right;
	margin: 0.3em 0 1em 1.4em;
	max-width: 50%;
}

.entry-content .wp-block-button__link {
	display: inline-block;
	padding: 0.7rem 1.3rem;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
}

.entry-content .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--line);
}

.entry-footer {
	margin-top: 2.4rem;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--line);
}

.tags__label {
	font-size: 0.71rem;
	text-transform: uppercase;
	letter-spacing: 0.13em;
	font-weight: 600;
	color: var(--ink-3);
	margin-right: 0.25rem;
}

.tags a {
	display: inline-block;
	padding: 0.28rem 0.7rem;
	font-size: 0.79rem;
	color: var(--ink-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tags a:hover {
	color: var(--accent);
	border-color: var(--accent-line);
	background: var(--accent-soft);
}

.breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.45rem;
	font-size: 0.79rem;
	color: var(--ink-3);
}

.breadcrumb a {
	display: inline-flex;
	align-items: center;
	color: var(--ink-3);
	transition: color 0.18s ease;
}

.breadcrumb a:hover {
	color: var(--accent);
}

.breadcrumb__sep {
	color: var(--line-strong);
}

.reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	z-index: 120;
	pointer-events: none;
}

.reading-progress span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--accent);
	transition: width 0.12s linear;
}

.post-nav {
	display: grid;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 2.2rem;
	border-top: 1px solid var(--line);
}

@media (min-width: 620px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
	}
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.15rem 1.3rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-nav__link:hover {
	border-color: var(--accent-line);
	transform: translateY(-1px);
}

.post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.post-nav__title {
	font-family: var(--serif);
	font-size: 1.05rem;
	line-height: 1.3;
}

.post-nav__link--next {
	text-align: right;
	align-items: flex-end;
}

.post-nav__link--next .post-nav__label {
	flex-direction: row-reverse;
}

.related {
	margin-top: 3.5rem;
	padding-top: 2.4rem;
	border-top: 1px solid var(--line);
}

.section-title {
	font-family: var(--sans);
	font-size: 0.73rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 1.4rem;
}

/* --------------------------------------------------------------------------
   10. Sidebar & widgets
   -------------------------------------------------------------------------- */
.sidebar {
	display: flex;
	flex-direction: column;
	gap: 2.1rem;
	min-width: 0;
}

@media (min-width: 1040px) {
	.sidebar {
		position: sticky;
		top: 92px;
		align-self: start;
	}
}

.widget-title,
.footer-widgets .widget-title {
	font-family: var(--sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 0.9rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--line);
}

.widget {
	font-size: 0.93rem;
	color: var(--ink-2);
}

.widget p {
	margin: 0 0 0.9em;
}

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

.widget li {
	padding: 0.42rem 0;
	border-bottom: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	gap: 0.9rem;
	align-items: baseline;
}

.widget li:last-child {
	border-bottom: 0;
}

.widget li a {
	color: var(--ink-2);
	transition: color 0.18s ease;
}

.widget li a:hover {
	color: var(--accent);
}

.widget .count {
	font-size: 0.76rem;
	color: var(--ink-3);
}

.link-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.68rem;
	font-size: 0.93rem;
}

.link-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	color: var(--ink-2);
}

.link-list a {
	color: var(--ink-2);
	transition: color 0.18s ease;
}

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

.link-list time {
	font-size: 0.76rem;
	color: var(--ink-3);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. Pagination
   -------------------------------------------------------------------------- */
.pagination {
	margin-top: 3rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	justify-content: center;
	font-size: 0.9rem;
}

.nav-links .page-numbers {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 0.55rem;
	color: var(--ink-2);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.nav-links .page-numbers:hover {
	color: var(--accent);
	border-color: var(--accent-line);
}

.nav-links .current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--bg);
}

.nav-links .dots {
	border-color: transparent;
	background: transparent;
}

/* --------------------------------------------------------------------------
   12. Comments
   -------------------------------------------------------------------------- */
.comments-area {
	margin-top: 3.5rem;
	padding-top: 2.4rem;
	border-top: 1px solid var(--line);
}

.comments-title,
.comment-reply-title {
	font-size: 1.5rem;
	letter-spacing: -0.02em;
	margin-bottom: 1.6rem;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	margin: 1.25rem 0 0 0;
	padding-left: 1.1rem;
	border-left: 1px solid var(--line);
}

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

.comment-inner {
	display: flex;
	gap: 0.9rem;
}

.comment-avatar img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

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

.comment-header {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 0.35rem;
}

.comment-author {
	font-style: normal;
	font-weight: 600;
	font-size: 0.94rem;
}

.comment-time {
	font-size: 0.76rem;
	color: var(--ink-3);
}

.comment-text {
	font-size: 0.95rem;
	color: var(--ink-2);
}

.comment-text p:last-child {
	margin-bottom: 0;
}

.comment-footer {
	display: flex;
	gap: 1rem;
	margin-top: 0.4rem;
	font-size: 0.79rem;
}

.comment-footer a {
	color: var(--accent);
}

.comment-awaiting {
	font-size: 0.85rem;
	color: var(--ink-3);
}

.no-comments {
	font-size: 0.92rem;
	color: var(--ink-3);
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2rem;
}

.comment-form p {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.comment-form label {
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.11em;
	color: var(--ink-3);
}

.comment-form .comment-form-cookies-consent {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.55rem;
}

.comment-form .comment-form-cookies-consent label {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--ink-2);
}

.comment-form .comment-form-cookies-consent input {
	width: auto;
	margin-top: 0.3rem;
}

.comment-form .submit {
	align-self: flex-start;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.68rem 0.85rem;
	font: inherit;
	font-size: 0.95rem;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
	resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.button,
button[type="submit"]:not(.search-submit),
input[type="submit"] {
	display: inline-block;
	padding: 0.7rem 1.4rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--accent-ink);
	background: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 999px;
	cursor: pointer;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.button:hover,
button[type="submit"]:not(.search-submit):hover,
input[type="submit"]:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
	flex: 0 0 auto;
	margin-top: auto;
	padding: clamp(2.5rem, 5vw, 3.6rem) 0 1.85rem;
	background: var(--bg-alt);
	border-top: 1px solid var(--line);
	font-size: 0.9rem;
	color: var(--ink-2);
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 2rem;
	padding-bottom: 2.4rem;
	border-bottom: 1px solid var(--line);
}

.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.6rem;
	font-size: 0.83rem;
	color: var(--ink-3);
}

.footer-note {
	margin: 0;
}

.footer-note a {
	color: var(--ink-2);
}

.footer-note a:hover {
	color: var(--accent);
}

.footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.83rem;
}

.footer-menu a {
	color: var(--ink-3);
}

.footer-menu a:hover {
	color: var(--accent);
}

.to-top {
	position: fixed;
	right: 1.1rem;
	bottom: 1.1rem;
	z-index: 80;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	padding: 0;
	color: var(--bg);
	background: var(--ink);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
	box-shadow: var(--shadow);
}

.to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.to-top:hover {
	background: var(--accent);
	color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   14. Empty states & 404
   -------------------------------------------------------------------------- */
.no-results,
.error-404 {
	padding: clamp(1.5rem, 4vw, 3rem) 0;
}

.no-results__search,
.error-404__search {
	max-width: 430px;
	margin: 1.75rem 0;
}

.error-404 {
	text-align: center;
}

.error-404__code {
	font-family: var(--serif);
	font-size: clamp(4rem, 13vw, 7.5rem);
	font-weight: 600;
	line-height: 0.9;
	letter-spacing: -0.04em;
	color: var(--accent);
	opacity: 0.16;
	margin: 0 0 0.5rem;
}

.error-404 .page-subtitle {
	margin-inline: auto;
}

.error-404__search {
	margin-inline: auto;
}

.error-404__recent {
	text-align: left;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   15. WordPress essentials
   -------------------------------------------------------------------------- */
.sticky .card__title::before {
	content: "\2605";
	margin-right: 0.35rem;
	color: var(--accent);
	font-size: 0.85em;
}

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

.wp-caption img {
	border-radius: var(--radius-sm);
}

.wp-block-image {
	margin: 0;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 0.6rem;
}

.gallery-item {
	margin: 0;
}

.gallery-item img {
	border-radius: 8px;
}

.alignwide,
.alignfull {
	clear: both;
}

.page-links {
	display: flex;
	gap: 0.4rem;
	align-items: center;
	margin-top: 1.5rem;
	font-size: 0.9rem;
}

.page-links a,
.page-links > span:not(.page-links-title) {
	display: inline-grid;
	place-items: center;
	min-width: 32px;
	height: 32px;
	padding: 0 0.4rem;
	border: 1px solid var(--line);
	border-radius: 8px;
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.menu-toggle {
		display: grid;
	}

	.menu-toggle[aria-expanded="true"] .menu-toggle__open {
		display: none;
	}

	.menu-toggle[aria-expanded="true"] .menu-toggle__close {
		display: block;
	}

	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin: 0;
		padding: 0.4rem 1.25rem 1.1rem;
		background: var(--surface);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
		display: none;
		max-height: calc(100vh - 68px);
		overflow-y: auto;
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		font-size: 0.98rem;
	}

	.site-nav .menu li {
		border-bottom: 1px solid var(--line);
	}

	.site-nav .menu li:last-child {
		border-bottom: 0;
	}

	.site-nav .menu a {
		display: block;
		padding: 0.85rem 0;
	}

	.site-nav .menu a::after {
		display: none;
	}

	.site-nav .sub-menu {
		position: static;
		display: block;
		box-shadow: none;
		border: 0;
		padding: 0 0 0.5rem 0.9rem;
		background: transparent;
	}

	.site-nav .sub-menu a {
		padding: 0.45rem 0;
		font-size: 0.9rem;
	}

	.header-tools {
		margin-left: auto;
	}
}

@media (max-width: 600px) {
	body {
		font-size: 1rem;
	}

	.container,
	.container--narrow {
		width: min(100% - 1.9rem, var(--container));
	}

	.site-description {
		display: none;
	}

	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		margin: 1.4rem 0;
		max-width: 100%;
	}

	.entry-content .alignwide {
		width: 100%;
		margin-left: 0;
	}

	.card--featured .card__media {
		aspect-ratio: 16 / 11;
	}
}

/* --------------------------------------------------------------------------
   17. Accessibility & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.card:hover {
		transform: none;
	}
}

@media print {
	.site-header,
	.site-footer,
	.sidebar,
	.to-top,
	.reading-progress,
	.comments-area,
	.post-nav,
	.related {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11pt;
	}

	.entry-content a::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #555;
	}
}
