/*
Theme Name: Caldera
Theme URI: https://www.riffleandrunangling.com
Author: Eli Massey
Author URI: https://www.riffleandrunangling.com
Description: A layered, fluid design in cool glass tones and grounded neutrals, lifted by a single warm accent.
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------- Tokens ---------- */
:root {
	--bg: #eef3f2;
	--fg: #1e2b29;
	--muted: #63716d;
	--border: #d5dfdc;
	--radius: 10px;
	--shadow: 0 22px 44px -20px rgba(13, 58, 64, 0.38);
	--accent: #f2681c;
	--aqua: #2f93a8;
	--aqua-deep: #14606f;
	--ink: #0f2b31;
	--card: #ffffff;
	--tint: #e3f0ef;
	--media-ratio: 16 / 9;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

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

body {
	margin: 0;
	background: var(--bg);
	background-image:
		radial-gradient(1200px 480px at 85% -160px, rgba(47, 147, 168, 0.14), transparent 70%),
		radial-gradient(900px 420px at -10% 240px, rgba(20, 96, 111, 0.08), transparent 70%);
	background-repeat: no-repeat;
	color: var(--fg);
	font-family: var(--font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.16;
	color: var(--ink);
	margin: 0 0 0.6em;
}

p {
	margin: 0 0 1.1em;
}

a {
	color: var(--aqua-deep);
	text-decoration: underline;
	text-underline-offset: 3px;
}

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

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

figure {
	margin: 0;
}

ul,
ol {
	margin: 0 0 1.1em;
	padding-left: 1.3em;
}

blockquote {
	margin: 1.6em 0;
	padding: 1em 1.4em;
	border-left: 3px solid var(--aqua);
	background: var(--tint);
	border-radius: 4px 12px 12px 4px;
	color: var(--fg);
}

code,
pre {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.92em;
	background: var(--tint);
	border-radius: 4px;
}

pre {
	padding: 1em 1.2em;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.4em 0;
	font-size: 0.95em;
}

th,
td {
	padding: 0.6em 0.8em;
	border: 1px solid var(--border);
	text-align: left;
}

th {
	background: var(--tint);
	font-weight: 700;
}

hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 2em 0;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.7em 0.95em;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	color: var(--fg);
	font: inherit;
}

input:focus,
textarea:focus,
select:focus {
	outline: 2px solid rgba(242, 104, 28, 0.35);
	outline-offset: 1px;
	border-color: var(--accent);
}

/* ---------- Utilities ---------- */
.wrap {
	width: min(1120px, 92%);
	margin-inline: auto;
}

.u-flex { display: flex; }
.u-grid { display: grid; }
.ai-c { align-items: center; }
.ai-s { align-items: flex-start; }
.u-wrap { flex-wrap: wrap; }
.u-gap-s { gap: 0.6rem; }
.u-gap { gap: 1rem; }
.u-gap-l { gap: 2rem; }

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

/* ---------- Header (frosted glass) ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(240, 247, 246, 0.78);
	-webkit-backdrop-filter: blur(14px) saturate(1.35);
	backdrop-filter: blur(14px) saturate(1.35);
	border-bottom: 1px solid var(--border);
}

.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, rgba(47, 147, 168, 0.14), rgba(242, 104, 28, 0.05) 55%, rgba(20, 96, 111, 0.12));
	pointer-events: none;
}

body.admin-bar .site-header {
	top: 32px;
}

.header-inner {
	position: relative;
	min-height: 70px;
}

.site-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

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

.custom-logo {
	display: block;
	max-height: 44px;
	width: auto;
}

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

.menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.15rem;
}

.menu-item {
	position: relative;
}

.menu-item > a {
	display: block;
	position: relative;
	padding: 0.72rem 0.85rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--fg);
	text-decoration: none;
	border-radius: 6px;
}

.menu-item > a::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	right: 0.85rem;
	bottom: 0.35rem;
	height: 2px;
	background: var(--accent);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.22s ease;
}

.menu-item > a:hover::after,
.menu-item:focus-within > a::after {
	transform: scaleX(1);
}

.sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 70;
	min-width: 250px;
	list-style: none;
	margin: 0;
	padding: 0.5rem;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px 12px 12px 3px;
	box-shadow: var(--shadow);
	display: none;
}

.menu-item:hover > .sub-menu,
.menu-item:focus-within > .sub-menu {
	display: block;
}

.sub-menu a {
	padding: 0.55rem 0.75rem;
	border-radius: 8px;
	font-weight: 500;
}

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

.sub-menu a:hover {
	background: var(--tint);
}

.sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.submenu-toggle {
	display: none;
}

.header-actions {
	flex-shrink: 0;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.65);
	border-radius: 50%;
	cursor: pointer;
	color: var(--fg);
	transition: border-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.icon-btn svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.menu-toggle {
	display: none;
}

/* Layered water band under the bar */
.wave-band {
	position: relative;
	height: 26px;
}

.wave-band svg {
	display: block;
	width: 100%;
	height: 100%;
}

.wave-1 { fill: rgba(47, 147, 168, 0.16); }
.wave-2 { fill: rgba(20, 96, 111, 0.14); }
.wave-3 { fill: var(--bg); }
.wave-4 {
	fill: none;
	stroke: rgba(242, 104, 28, 0.55);
	stroke-width: 2.5;
}

/* ---------- Search overlay ---------- */
.search-panel {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(150deg, rgba(15, 43, 49, 0.96), rgba(20, 96, 111, 0.94));
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

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

.search-panel-inner {
	position: relative;
	width: min(680px, 90%);
}

.search-close {
	position: absolute;
	top: -70px;
	right: 0;
	background: transparent;
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

.search-panel .search-field {
	font-size: 1.25rem;
	padding: 1rem 1.3rem;
	border-radius: 999px;
	border: 0;
	box-shadow: var(--shadow);
}

.search-panel .search-submit {
	padding: 1rem 1.8rem;
}

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

.search-label {
	flex: 1;
	display: block;
}

.search-submit {
	flex-shrink: 0;
	background: var(--accent);
	color: #fff;
	border: 0;
	padding: 0.72em 1.5em;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	box-shadow: 0 12px 24px -12px rgba(242, 104, 28, 0.8);
	transition: background 0.2s ease;
}

.search-submit:hover {
	background: #d9550d;
}

/* ---------- Layout skeleton ---------- */
.site-content {
	min-height: 40vh;
}

.layout {
	align-items: flex-start;
	padding: 2.6rem 0 3.6rem;
}

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

.has-sidebar .site-sidebar {
	flex: 0 0 300px;
}

.layout-narrow {
	width: min(760px, 92%);
	margin-inline: auto;
	padding: 2.6rem 0 3.6rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
	margin: 0 0 1.5rem;
	font-size: 0.85rem;
}

.trail {
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.45rem;
}

.crumb {
	color: var(--muted);
}

.crumb a {
	color: var(--aqua-deep);
	text-decoration: none;
}

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

.crumb + .crumb::before {
	content: "/";
	margin-right: 0.45rem;
	color: var(--border);
}

/* ---------- Hero (image/text split) ---------- */
.hero {
	position: relative;
	grid-template-columns: 1.05fr 1fr;
	gap: clamp(1.4rem, 3vw, 2.6rem);
	align-items: center;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 22px 22px 22px 6px;
	box-shadow: var(--shadow);
	padding: clamp(1.2rem, 3vw, 2.4rem);
	margin-bottom: 2.6rem;
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(120deg, rgba(47, 147, 168, 0.1), transparent 45%, rgba(242, 104, 28, 0.05));
	pointer-events: none;
}

.hero-media,
.hero-text {
	position: relative;
}

.hero-thumb {
	display: block;
}

.hero img.featured-img {
	display: block;
	width: 100%;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
	border-radius: 14px 56px 14px 56px;
}

.kicker {
	margin: 0 0 0.4rem;
}

.kicker a {
	color: var(--aqua-deep);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.76rem;
	text-decoration: none;
}

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

.hero-title {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	margin: 0.2rem 0 0.9rem;
}

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

.hero-title a:hover {
	color: var(--aqua-deep);
}

.hero-excerpt {
	color: var(--muted);
	margin-bottom: 0.9rem;
}

.btn {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	padding: 0.72em 1.7em;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 12px 24px -12px rgba(242, 104, 28, 0.8);
	text-decoration: none;
	cursor: pointer;
	font-size: 0.95rem;
	transition: background 0.2s ease;
}

.btn:hover {
	background: #d9550d;
	color: #fff;
}

.meta {
	color: var(--muted);
	font-size: 0.87rem;
	margin: 0 0 0.9rem;
}

/* ---------- Post rows ---------- */
.post-list {
	display: grid;
	gap: 1.4rem;
}

.post-row {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 16px 16px 16px 4px;
	box-shadow: 0 14px 30px -18px rgba(13, 58, 64, 0.3);
	padding: 1.1rem;
	align-items: center;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-row:hover {
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.row-thumb {
	flex: 0 0 200px;
	display: block;
}

.row-thumb img.featured-img {
	display: block;
	width: 100%;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
	border-radius: 10px 10px 10px 3px;
}

.row-text {
	min-width: 0;
}

.row-title {
	font-size: 1.32rem;
	margin: 0 0 0.3rem;
}

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

.row-title a:hover {
	color: var(--aqua-deep);
}

.row-excerpt p {
	margin: 0.5rem 0 0;
	color: var(--muted);
	font-size: 0.96rem;
}

.page-head,
.archive-head {
	margin-bottom: 1.9rem;
}

.page-title,
.archive-title {
	font-size: clamp(1.65rem, 5vw, 2.1rem);
	margin: 0 0 0.4rem;
}

.archive-desc {
	color: var(--muted);
}

.archive-desc p {
	margin: 0.3rem 0;
}

/* ---------- Pagination ---------- */
.pagination,
.navigation {
	margin-top: 2.4rem;
}

.page-numbers {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	margin: 0.15rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--card);
	color: var(--fg);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
}

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

.page-numbers:hover:not(.current) {
	border-color: var(--accent);
	color: var(--accent);
}

.page-numbers.dots {
	border: 0;
	background: transparent;
	color: var(--muted);
}

/* ---------- Single post ---------- */
.post-title {
	font-size: clamp(2rem, 4.5vw, 3rem);
	margin: 0 0 0.8rem;
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.7rem;
	margin-bottom: 0;
}

.post-meta a {
	color: var(--muted);
}

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

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

.post-cats {
	display: inline-flex;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.post-cats a {
	display: inline-block;
	background: var(--tint);
	color: var(--aqua-deep);
	padding: 0.16rem 0.6rem;
	border-radius: 3px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
}

.post-cats a:hover {
	background: var(--aqua-deep);
	color: #fff;
}

.post-media {
	margin: 1.7rem 0 0;
}

.post-media img.featured-img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
	border-radius: 18px 18px 18px 5px;
	box-shadow: var(--shadow);
}

.post-body {
	margin-top: 1.9rem;
	font-size: 1.06rem;
	line-height: 1.8;
}

.post-body h2 {
	font-size: 1.55rem;
	margin-top: 2.2rem;
	padding-left: 0.85rem;
	border-left: 3px solid var(--aqua);
}

.post-body h3 {
	font-size: 1.25rem;
	margin-top: 1.8rem;
}

.post-body img {
	border-radius: var(--radius);
}

.alignleft {
	float: left;
	margin: 0.4rem 1.4rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.4rem 0 1rem 1.4rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	margin-inline: 0;
}

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

.wp-caption-text {
	font-size: 0.85rem;
	color: var(--muted);
	text-align: center;
	margin-top: 0.4rem;
}

.page-links {
	margin-top: 1.6rem;
	font-weight: 600;
}

.page-links a {
	margin: 0 0.25rem;
}

/* ---------- Tags ---------- */
.tag-list {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
}

.tag-list a {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--border);
	border-radius: 3px;
	background: var(--card);
	color: var(--muted);
	font-size: 0.84rem;
	text-decoration: none;
}

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

/* ---------- Author bio ---------- */
.author-bio {
	margin-top: 2.2rem;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px 14px 14px 4px;
	box-shadow: 0 12px 26px -18px rgba(13, 58, 64, 0.3);
	padding: 1.4rem;
}

.author-avatar {
	flex-shrink: 0;
}

.author-avatar img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
}

.author-name {
	font-size: 1.12rem;
	margin: 0 0 0.35rem;
}

.author-name a {
	color: var(--ink);
	text-decoration: none;
}

.author-name a:hover {
	color: var(--aqua-deep);
}

.author-desc {
	margin: 0;
	color: var(--muted);
	font-size: 0.95rem;
}

/* ---------- Related posts ---------- */
.related-posts {
	margin-top: 2.6rem;
}

.related-title {
	font-size: 1.5rem;
}

.related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.related-item {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px 12px 12px 3px;
	box-shadow: 0 12px 24px -16px rgba(13, 58, 64, 0.28);
	padding: 0.7rem;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.related-thumb {
	display: block;
	margin-bottom: 0.55rem;
}

.related-thumb img.featured-img {
	display: block;
	width: 100%;
	aspect-ratio: var(--media-ratio);
	object-fit: cover;
	border-radius: 8px 8px 8px 2px;
}

.related-link {
	display: block;
	text-decoration: none;
}

.related-name {
	display: block;
	font-weight: 700;
	color: var(--fg);
	line-height: 1.35;
}

.related-link:hover .related-name {
	color: var(--aqua-deep);
}

.related-item .meta {
	margin: 0.4rem 0 0;
	font-size: 0.8rem;
}

/* ---------- Article note ---------- */
.article-note {
	margin-top: 2.4rem;
	background: var(--tint);
	border-left: 3px solid var(--accent);
	border-radius: 4px 12px 12px 4px;
	padding: 1rem 1.3rem;
	font-size: 0.95rem;
}

.article-note p:last-child {
	margin-bottom: 0;
}

/* ---------- Comments ---------- */
.comments-area {
	margin-top: 2.8rem;
}

.comments-title {
	font-size: 1.5rem;
}

.comment-list {
	list-style: none;
	margin: 1.4rem 0;
	padding: 0;
	display: grid;
	gap: 1.1rem;
}

.comment-list .children {
	list-style: none;
	margin: 1.1rem 0 0;
	padding-left: 1.4rem;
	display: grid;
	gap: 1.1rem;
}

.comment-body {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px 12px 12px 3px;
	box-shadow: 0 10px 22px -16px rgba(13, 58, 64, 0.25);
	padding: 1.1rem 1.2rem;
}

.comment-avatar {
	flex-shrink: 0;
}

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

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

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.7rem;
	font-size: 0.85rem;
	color: var(--muted);
	margin-bottom: 0.4rem;
}

.comment-author {
	color: var(--fg);
	font-size: 0.95rem;
}

.comment-date {
	color: var(--muted);
	text-decoration: none;
}

.edit-link a {
	font-size: 0.82rem;
}

.comment-content p {
	margin: 0.5rem 0;
}

.comment-awaiting {
	color: var(--accent);
	font-size: 0.86rem;
	font-style: italic;
}

.comment-reply {
	margin-top: 0.5rem;
}

.comment-reply a {
	display: inline-block;
	padding: 0.22rem 0.8rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
}

.comment-reply a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.comment-respond {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px 14px 14px 4px;
	box-shadow: 0 12px 26px -18px rgba(13, 58, 64, 0.3);
	padding: 1.5rem;
	margin-top: 1.6rem;
}

.comment-reply-title {
	font-size: 1.3rem;
}

.comment-reply-title small {
	font-size: 0.8rem;
	font-weight: 600;
	margin-left: 0.6rem;
}

.comment-form p {
	margin-bottom: 1rem;
}

.comment-form label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.35rem;
}

.comment-form-cookies-consent {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	font-size: 0.88rem;
}

.comment-form-cookies-consent input {
	width: auto;
}

.comment-notes,
.logged-in-as {
	font-size: 0.88rem;
	color: var(--muted);
}

.form-submit {
	margin-bottom: 0;
}

.comment-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.9rem;
}

/* ---------- Sidebar ---------- */
.site-sidebar {
	display: grid;
	gap: 1.4rem;
	align-content: start;
}

.side-block {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius) var(--radius) var(--radius) 3px;
	box-shadow: 0 12px 26px -18px rgba(13, 58, 64, 0.28);
	padding: 1.2rem 1.3rem;
	font-size: 0.93rem;
}

.side-title {
	position: relative;
	font-size: 1.05rem;
	margin: 0 0 0.85rem;
	padding-bottom: 0.55rem;
	border-bottom: 2px solid var(--tint);
}

.side-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 42px;
	height: 2px;
	background: var(--accent);
}

.side-block ul {
	margin: 0;
	padding-left: 1.15rem;
}

.side-block ul ul {
	margin-top: 0.3rem;
}

.side-block li {
	margin-bottom: 0.35rem;
}

.side-block a {
	color: var(--fg);
	text-decoration: none;
}

.side-block a:hover {
	color: var(--aqua-deep);
}

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

/* ---------- Footer ---------- */
.footer-wave {
	height: 56px;
	margin-bottom: -1px;
}

.footer-wave svg {
	display: block;
	width: 100%;
	height: 100%;
}

.fwave-1 { fill: rgba(47, 147, 168, 0.22); }
.fwave-2 { fill: rgba(20, 96, 111, 0.5); }
.fwave-3 { fill: var(--ink); }
.fwave-4 {
	fill: none;
	stroke: rgba(242, 104, 28, 0.6);
	stroke-width: 2.5;
}

.site-footer {
	background: linear-gradient(170deg, var(--ink), var(--aqua-deep) 140%);
	color: #b9d4d3;
}

.footer-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 2rem;
	padding: 2.8rem 0 2.2rem;
}

.footer-group-title {
	position: relative;
	margin: 0 0 0.9rem;
	padding-bottom: 0.55rem;
	font-weight: 800;
	font-size: 1rem;
	letter-spacing: 0.01em;
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-group-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 34px;
	height: 2px;
	background: var(--accent);
}

.footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.footer-links a {
	color: #b9d4d3;
	text-decoration: none;
	font-size: 0.93rem;
}

.footer-links a:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.footer-base {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	justify-content: space-between;
	align-items: baseline;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	padding: 1.2rem 0 1.7rem;
	font-size: 0.85rem;
	color: #9dbdbc;
}

.footer-base p {
	margin: 0;
}

.footer-note {
	font-style: italic;
}

/* ---------- 404 / empty ---------- */
.not-found-panel {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 18px 18px 18px 5px;
	box-shadow: var(--shadow);
	padding: clamp(1.6rem, 4vw, 3rem);
	text-align: center;
}

.not-found-panel .search-form {
	max-width: 460px;
	margin: 1.4rem auto 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 1020px) {
	.hero {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 960px) {
	.menu-toggle {
		display: inline-flex;
	}

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

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

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

	.menu {
		flex-direction: column;
		gap: 0;
	}

	.menu-item {
		border-bottom: 1px solid var(--border);
	}

	.menu-item > a {
		padding: 0.9rem 0.2rem;
	}

	.menu-item > a::after {
		display: none;
	}

	.menu-item:hover > .sub-menu,
	.menu-item:focus-within > .sub-menu {
		display: none;
	}

	.sub-menu,
	.sub-menu .sub-menu {
		position: static;
		background: transparent;
		border: 0;
		box-shadow: none;
		padding: 0 0 0.7rem 1rem;
		border-radius: 0;
	}

	.menu-item.is-open > .sub-menu {
		display: block;
	}

	.submenu-toggle {
		display: inline-flex;
		position: absolute;
		right: 0;
		top: 0.3rem;
		width: 40px;
		height: 40px;
		padding: 0;
		background: transparent;
		border: 0;
		cursor: pointer;
		align-items: center;
		justify-content: center;
	}

	.submenu-toggle::before {
		content: "";
		width: 9px;
		height: 9px;
		border-right: 2px solid var(--muted);
		border-bottom: 2px solid var(--muted);
		transform: rotate(45deg) translateY(-2px);
		transition: transform 0.2s ease;
	}

	.menu-item.is-open > .submenu-toggle::before {
		transform: rotate(225deg) translateY(-2px);
	}
}

@media (max-width: 860px) {
	.layout {
		flex-direction: column;
	}

	.has-sidebar .site-sidebar {
		flex: 1 1 auto;
		width: 100%;
	}
}

@media (max-width: 620px) {
	.post-row {
		flex-direction: column;
		align-items: stretch;
	}

	.row-thumb {
		flex: none;
		width: 100%;
	}

	.author-bio {
		flex-direction: column;
	}
}
