/* ==========================================================================
   SoftCaptions Editorial — main.css
   Design language: minimal editorial, warm paper background, one serif
   display face + one clean sans, a single confident accent color, generous
   whitespace, thin rules instead of heavy shadows.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root{
	/* Dark is the theme's default identity. */
	--sce-paper: #14120E;
	--sce-paper-raised: #1D1A14;
	--sce-ink: #F5F0E8;
	--sce-ink-soft: #B9AF9F;
	--sce-line: #322D22;
	--sce-line-strong: #45402F;
	--sce-accent: #F0812F;
	--sce-accent-2: #57A17C;
	--sce-accent-contrast: #14120E;

	--sce-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--sce-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--sce-container: 1160px;
	--sce-radius-sm: 8px;
	--sce-radius-md: 14px;
	--sce-radius-lg: 22px;

	--sce-shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
	--sce-shadow-md: 0 14px 32px rgba(0,0,0,0.5);
	--sce-glow: 0 0 0 rgba(240,129,47,0);

	--sce-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--sce-speed-fast: 160ms;
	--sce-speed-base: 320ms;
	--sce-speed-slow: 560ms;

	--sce-header-h: 76px;
}

/* Optional light mode, reachable only via the header toggle. */
html[data-theme="light"]{
	--sce-paper: #FAF7F2;
	--sce-paper-raised: #FFFFFF;
	--sce-ink: #1B1815;
	--sce-ink-soft: #55504A;
	--sce-line: #E7E1D8;
	--sce-line-strong: #D8D0C3;
	--sce-accent: #C6521E;
	--sce-accent-2: #2F5D46;
	--sce-accent-contrast: #FFF8F1;
	--sce-shadow-sm: 0 1px 2px rgba(27,24,21,0.06);
	--sce-shadow-md: 0 8px 24px rgba(27,24,21,0.08);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
	margin: 0;
	background: var(--sce-paper);
	color: var(--sce-ink);
	font-family: var(--sce-font-body);
	font-size: 16.5px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	transition: background var(--sce-speed-base) var(--sce-ease), color var(--sce-speed-base) var(--sce-ease);
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ padding: 0; margin: 0; list-style: none; }
button{ font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
h1, h2, h3, h4{
	font-family: var(--sce-font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}
p{ margin: 0 0 1.1em; }

.container{ max-width: var(--sce-container); margin: 0 auto; padding: 0 24px; }
.section{ padding: 56px 0; }

.screen-reader-text{
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}
.skip-link{
	position: fixed; top: -100px; left: 16px; z-index: 9999;
	background: var(--sce-ink); color: var(--sce-paper);
	padding: 12px 18px; border-radius: var(--sce-radius-sm);
	transition: top var(--sce-speed-fast) var(--sce-ease);
}
.skip-link:focus{ top: 16px; width: auto; height: auto; clip: auto; overflow: visible; }

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

/* ---------- 3. Buttons & badges ---------- */
.btn{
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 700; font-size: 0.95rem;
	padding: 13px 24px; border-radius: 999px;
	transition: transform var(--sce-speed-fast) var(--sce-ease), background var(--sce-speed-fast) var(--sce-ease), box-shadow var(--sce-speed-fast) var(--sce-ease);
}
.btn span{ transition: transform var(--sce-speed-fast) var(--sce-ease); }
.btn:hover span{ transform: translateX(3px); }
.btn--primary{ background: var(--sce-ink); color: var(--sce-paper); }
html[data-theme="dark"] .btn--primary{ background: var(--sce-accent); color: var(--sce-accent-contrast); }
.btn--primary:hover{ transform: translateY(-2px); box-shadow: var(--sce-shadow-md); }
.btn--outline{ border: 1.5px solid var(--sce-ink); }
.btn--outline:hover{ background: var(--sce-ink); color: var(--sce-paper); }

.badge{
	display: inline-flex; align-items: center;
	font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
	background: var(--sce-accent); color: var(--sce-accent-contrast);
	padding: 6px 12px; border-radius: 999px;
	transition: transform var(--sce-speed-fast) var(--sce-ease);
}
.badge--floating{ position: absolute; top: 14px; left: 14px; z-index: 2; }

.icon-btn{
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%;
	color: var(--sce-ink);
	transition: background var(--sce-speed-fast) var(--sce-ease), transform var(--sce-speed-fast) var(--sce-ease);
}
.icon-btn:hover{ background: var(--sce-line); transform: translateY(-1px); }

/* ---------- 4. Header ---------- */
.reading-progress{
	position: fixed; top: 0; left: 0; height: 3px; width: 0%;
	background: var(--sce-accent); z-index: 1001;
	transition: width 80ms linear;
}
.site-header{
	position: sticky; top: 0; z-index: 900;
	background: color-mix(in srgb, var(--sce-paper) 88%, transparent);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--sce-line);
	animation: sce-header-in var(--sce-speed-slow) var(--sce-ease) both;
}
@keyframes sce-header-in{ from{ transform: translateY(-100%); } to{ transform: translateY(0); } }
.site-header.is-condensed{ box-shadow: var(--sce-shadow-sm); }

.site-header__inner{
	display: flex; align-items: center; gap: 24px;
	height: var(--sce-header-h);
}
.site-branding{ margin-right: auto; }
.site-title{ font-family: var(--sce-font-display); font-size: 1.5rem; font-weight: 700; }
.site-logo img{ max-height: 44px; width: auto; transition: transform var(--sce-speed-fast) var(--sce-ease); }
.site-logo:hover img{ transform: scale(1.03) rotate(-1deg); }

.primary-navigation{ display: none; }
.primary-menu{ display: flex; align-items: center; gap: 28px; }
.primary-menu > li{ position: relative; }
.primary-menu a{
	font-weight: 600; font-size: 0.95rem; padding: 8px 2px;
	position: relative;
}
.primary-menu a::after{
	content: ''; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px;
	background: var(--sce-accent);
	transition: right var(--sce-speed-base) var(--sce-ease);
}
.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after{ right: 0; }
.sce-caret{
	display: inline-block; width: 7px; height: 7px; margin-left: 6px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}
.primary-menu .sub-menu{
	position: absolute; top: 100%; left: 0; min-width: 220px;
	background: var(--sce-paper-raised); border: 1px solid var(--sce-line);
	border-radius: var(--sce-radius-md); box-shadow: var(--sce-shadow-md);
	padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: all var(--sce-speed-fast) var(--sce-ease);
}
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu{ opacity: 1; visibility: visible; transform: translateY(0); }
.primary-menu .sub-menu a{ display: block; padding: 8px 12px; border-radius: var(--sce-radius-sm); }
.primary-menu .sub-menu a:hover{ background: var(--sce-paper); }
.primary-menu .sub-menu a::after{ display: none; }

.site-header__actions{ display: flex; align-items: center; gap: 4px; }
.theme-toggle .icon-moon{ display: none; }
html[data-theme="light"] .theme-toggle .icon-sun{ display: none; }
html[data-theme="light"] .theme-toggle .icon-moon{ display: block; }

.menu-toggle{ display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle__bar{ width: 20px; height: 2px; background: currentColor; transition: all var(--sce-speed-fast) var(--sce-ease); border-radius: 2px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2){ opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

.search-panel{
	border-top: 1px solid var(--sce-line);
	background: var(--sce-ink);
	max-height: 0; overflow: hidden;
	transition: max-height var(--sce-speed-base) var(--sce-ease);
}
.search-panel:not([hidden]){ max-height: 120px; }
.search-panel .container{ display: flex; align-items: center; gap: 12px; padding-top: 18px; padding-bottom: 18px; }
.search-panel .search-form{ flex: 1; }
.search-panel .search-form__field{ background: transparent; color: #fff; border-bottom-color: rgba(255,255,255,0.3); }
.search-panel .search-form__field::placeholder{ color: rgba(255,255,255,0.55); }
.search-panel .icon-btn{ color: #fff; }
.search-close{ font-size: 1.6rem; line-height: 1; }

.mobile-menu{
	position: fixed; inset: var(--sce-header-h) 0 0 0; z-index: 890;
	background: var(--sce-paper); overflow-y: auto;
	padding: 24px; transform: translateY(-8px); opacity: 0;
	transition: all var(--sce-speed-base) var(--sce-ease);
}
.mobile-menu:not([hidden]){ transform: translateY(0); opacity: 1; }
.mobile-menu__list li{ border-bottom: 1px solid var(--sce-line); }
.mobile-menu__list a{ display: block; padding: 16px 4px; font-family: var(--sce-font-display); font-size: 1.3rem; }
.mobile-menu__list .sub-menu{ padding-left: 16px; }
.mobile-menu__list .sub-menu a{ font-size: 1.05rem; padding: 12px 4px; opacity: 0.8; }
.mobile-menu__socials{ display: flex; gap: 10px; margin-top: 24px; }

.ad-region{ display: flex; justify-content: center; padding: 16px 0; }
.ad-slot{ max-width: 100%; }

/* ---------- 5. Hero ---------- */
.hero{ position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero__inner{ max-width: 720px; position: relative; z-index: 1; }
.hero__eyebrow{
	font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
	font-size: 0.78rem; color: var(--sce-accent); margin-bottom: 18px;
}
.hero__heading{ font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero__sub{ font-size: 1.1rem; color: var(--sce-ink-soft); max-width: 54ch; margin-bottom: 28px; }
.hero__grid-decoration{
	position: absolute; top: -10%; right: -8%; width: 460px; height: 460px;
	background:
		radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--sce-accent) 20%, transparent), transparent 60%),
		radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--sce-accent-2) 18%, transparent), transparent 60%);
	border-radius: 50%;
	filter: blur(4px);
	pointer-events: none;
}

/* ---------- 6. Section headings ---------- */
.section-heading{ margin-bottom: 32px; }
.section-heading h2{ font-size: clamp(1.5rem, 3vw, 2rem); }
.section-heading p{ color: var(--sce-ink-soft); max-width: 60ch; }

/* ---------- 7. Category band ---------- */
.category-grid{
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.category-card{
	position: relative; display: flex; flex-direction: column; gap: 10px;
	padding: 24px 20px; border-radius: var(--sce-radius-md);
	border: 1px solid var(--sce-line); background: var(--sce-paper-raised);
	transition: transform 140ms ease-out, border-color var(--sce-speed-base) var(--sce-ease), box-shadow var(--sce-speed-base) var(--sce-ease);
	will-change: transform;
}
.category-card:hover{ transform: translateY(-4px); border-color: var(--sce-accent); box-shadow: var(--sce-shadow-md); }
.category-card__index{ font-family: var(--sce-font-display); color: var(--sce-line-strong); font-size: 1.4rem; }
.category-card__name{ font-family: var(--sce-font-display); font-size: 1.15rem; font-weight: 600; }
.category-card__count{ font-size: 0.82rem; color: var(--sce-ink-soft); }
.category-card__arrow{
	position: absolute; top: 22px; right: 20px; opacity: 0;
	transform: translateX(-4px);
	transition: all var(--sce-speed-fast) var(--sce-ease);
}
.category-card:hover .category-card__arrow{ opacity: 1; transform: translateX(0); }

/* ---------- 8. Post grid & cards ---------- */
.post-grid{ display: grid; gap: 28px; }
.post-grid--3{ grid-template-columns: repeat(3, 1fr); }
.post-grid--4{ grid-template-columns: repeat(4, 1fr); }

.post-card{
	position: relative; display: flex; flex-direction: column;
	border-radius: var(--sce-radius-md); overflow: hidden;
	background: var(--sce-paper-raised); border: 1px solid var(--sce-line);
	transition: transform 140ms ease-out, box-shadow var(--sce-speed-base) var(--sce-ease), border-color var(--sce-speed-base) var(--sce-ease);
	will-change: transform;
}
.post-card:hover{ transform: translateY(-5px); box-shadow: var(--sce-shadow-md); border-color: var(--sce-line-strong); }
.post-card__media{ position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sce-line); }
.post-card__img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--sce-speed-slow) var(--sce-ease); }
.post-card:hover .post-card__img{ transform: scale(1.06); }
.post-card__img--placeholder{ display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--sce-line), var(--sce-line-strong)); }
.post-card__body{ padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__title{ font-size: 1.08rem; line-height: 1.35; }
.post-card__title a{ transition: color var(--sce-speed-fast) var(--sce-ease); }
.post-card:hover .post-card__title a{ color: var(--sce-accent); }
.post-card__excerpt{ font-size: 0.9rem; color: var(--sce-ink-soft); margin: 0; flex: 1; }
.post-card__meta{ font-size: 0.78rem; color: var(--sce-ink-soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-card__link-overlay{ position: absolute; inset: 0; z-index: 1; }
.post-card__body a{ position: relative; z-index: 2; }
.entry-meta__dot{ opacity: 0.5; }

/* ---------- 9. Featured post ---------- */
.featured-post__inner{
	display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
	background: var(--sce-paper-raised); border: 1px solid var(--sce-line);
	border-radius: var(--sce-radius-lg); overflow: hidden;
}
.featured-post__media{ display: block; aspect-ratio: 16/11; overflow: hidden; }
.featured-post__media img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--sce-speed-slow) var(--sce-ease); }
.featured-post__inner:hover .featured-post__media img{ transform: scale(1.04); }
.featured-post__body{ padding: 16px 40px 16px 0; }
.featured-post__title{ font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 14px 0 12px; }
.featured-post__title a:hover{ color: var(--sce-accent); }
.featured-post__excerpt{ color: var(--sce-ink-soft); }
.featured-post .entry-meta{ margin-bottom: 20px; }

/* ---------- 10. Breadcrumbs ---------- */
.breadcrumbs{ margin-bottom: 20px; font-size: 0.85rem; color: var(--sce-ink-soft); }
.breadcrumbs__list{ display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs__item a:hover{ color: var(--sce-accent); }
.breadcrumbs__sep{ margin-left: 6px; opacity: 0.5; }

/* ---------- 11. Single article ---------- */
.single-article__cover{ max-height: 480px; overflow: hidden; }
.single-article__cover img{ width: 100%; height: 100%; object-fit: cover; animation: sce-reveal-scale var(--sce-speed-slow) var(--sce-ease) both; }
@keyframes sce-reveal-scale{ from{ opacity: 0; transform: scale(1.04); } to{ opacity: 1; transform: scale(1); } }

.single-article__head{ max-width: 800px; padding-top: 32px; }
.single-article__title{ font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 14px 0 16px; }
.entry-meta{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.86rem; color: var(--sce-ink-soft); }
.entry-meta__avatar{ border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.entry-meta__author a:hover{ color: var(--sce-accent); }

.single-article__layout{ display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding-top: 32px; align-items: start; }
.single-article__toc-rail{ position: relative; }
.toc-sticky{ position: sticky; top: calc(var(--sce-header-h) + 20px); }
.single-article__content-col{ max-width: 760px; }

.toc{ border: 1px solid var(--sce-line); border-radius: var(--sce-radius-md); padding: 16px 18px; background: var(--sce-paper-raised); }
.toc__toggle{ display: flex; width: 100%; align-items: center; justify-content: space-between; font-weight: 700; font-size: 0.9rem; }
.toc__chevron{ width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--sce-speed-fast) var(--sce-ease); }
.toc__toggle[aria-expanded="false"] .toc__chevron{ transform: rotate(-45deg); }
.toc__list{ margin-top: 12px; display: flex; flex-direction: column; gap: 9px; max-height: 60vh; overflow-y: auto; }
.toc__toggle[aria-expanded="false"] + .toc__list{ display: none; }
.toc__item a{ font-size: 0.86rem; color: var(--sce-ink-soft); display: block; padding: 3px 0 3px 10px; border-left: 2px solid transparent; transition: all var(--sce-speed-fast) var(--sce-ease); }
.toc__item a:hover{ color: var(--sce-ink); }
.toc__item.is-active a{ color: var(--sce-accent); border-left-color: var(--sce-accent); font-weight: 600; }
.toc__item--sub a{ padding-left: 20px; font-size: 0.8rem; }

.entry-content{ font-size: 1.05rem; }
.entry-content p{ margin-bottom: 1.3em; }
.entry-content h2{
	font-size: 1.55rem; margin-top: 2.2em; padding-top: 0.2em;
	scroll-margin-top: calc(var(--sce-header-h) + 16px);
}
.entry-content h3{ font-size: 1.2rem; margin-top: 1.8em; scroll-margin-top: calc(var(--sce-header-h) + 16px); }
.entry-content ul, .entry-content ol{ margin: 0 0 1.3em; padding-left: 1.3em; list-style: disc; }
.entry-content ol{ list-style: decimal; }
.entry-content li{ margin-bottom: 0.5em; }
.entry-content blockquote{
	margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--sce-accent);
	font-family: var(--sce-font-display); font-size: 1.2rem; font-style: italic; color: var(--sce-ink-soft);
}
.entry-content img{ border-radius: var(--sce-radius-md); margin: 0.4em 0; }
.entry-content figure{ margin: 1.6em 0; }
.entry-content figcaption{ font-size: 0.82rem; color: var(--sce-ink-soft); text-align: center; margin-top: 8px; }
.entry-content a{ color: var(--sce-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.entry-content a:hover{ color: var(--sce-accent-2); }
.entry-content hr{ border: 0; border-top: 1px solid var(--sce-line); margin: 2.4em 0; }

.ad-region--in-article{ display: flex; justify-content: center; margin: 2em 0; padding: 12px 0; border-top: 1px dashed var(--sce-line); border-bottom: 1px dashed var(--sce-line); }
.ad-region--before-related{ display: flex; justify-content: center; margin: 20px 0; }

.share-row{ display: flex; align-items: center; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--sce-line); }
.share-row__label{ font-size: 0.85rem; font-weight: 700; margin-right: 4px; }
.share-btn{ border: 1px solid var(--sce-line); font-size: 0.8rem; font-weight: 800; }
.share-btn:hover{ background: var(--sce-accent); color: var(--sce-accent-contrast); border-color: var(--sce-accent); }

.author-card{ display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px; border-radius: var(--sce-radius-md); background: var(--sce-paper-raised); border: 1px solid var(--sce-line); }
.author-card__avatar{ border-radius: 50%; }
.author-card__label{ display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sce-ink-soft); margin-bottom: 2px; }
.author-card__name{ font-family: var(--sce-font-display); font-size: 1.1rem; font-weight: 600; }
.author-card__name:hover{ color: var(--sce-accent); }
.author-card__bio{ margin: 6px 0 0; color: var(--sce-ink-soft); font-size: 0.92rem; }

.post-nav{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--sce-line); }
.post-nav__link{ display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--sce-radius-md); border: 1px solid var(--sce-line); transition: all var(--sce-speed-fast) var(--sce-ease); }
.post-nav__link:hover{ border-color: var(--sce-accent); transform: translateY(-2px); }
.post-nav__link--next{ text-align: right; align-items: flex-end; }
.post-nav__dir{ font-size: 0.75rem; font-weight: 800; color: var(--sce-accent); text-transform: uppercase; letter-spacing: 0.05em; }
.post-nav__title{ font-family: var(--sce-font-display); font-weight: 600; }

/* ---------- 12. Static pages ---------- */
.static-page__head{ padding-top: 32px; max-width: 800px; }
.static-page__title{ font-size: clamp(1.8rem, 4vw, 2.5rem); }
.entry-content--page{ max-width: 800px; margin: 0 auto; padding: 24px 0 60px; }

/* ---------- 13. Archive hero (category.php) ---------- */
.archive-hero{ padding: 56px 0 32px; border-bottom: 1px solid var(--sce-line); background: var(--sce-paper-raised); }
.archive-hero__title{ font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 12px; }
.archive-hero__desc{ color: var(--sce-ink-soft); max-width: 65ch; }
.archive-hero__count{ font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sce-accent); font-weight: 800; margin-top: 12px; }

/* ---------- 14. Pagination ---------- */
.pagination, .navigation.pagination{ display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination .page-numbers, ul.page-numbers{ display: flex; gap: 8px; list-style: none; padding: 0; }
.page-numbers{
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 8px; border-radius: 999px;
	border: 1px solid var(--sce-line); font-weight: 700; font-size: 0.9rem;
	transition: all var(--sce-speed-fast) var(--sce-ease);
}
.page-numbers.current{ background: var(--sce-ink); color: var(--sce-paper); border-color: var(--sce-ink); }
.page-numbers:hover:not(.current){ border-color: var(--sce-accent); color: var(--sce-accent); }

/* ---------- 15. Empty states & 404 ---------- */
.empty-state{ text-align: center; padding: 40px 0; max-width: 520px; margin: 0 auto; }
.empty-state svg{ color: var(--sce-line-strong); margin-bottom: 16px; }
.empty-state .search-form{ margin: 20px auto; max-width: 380px; }
.empty-state__suggestions{ margin-top: 56px; text-align: left; }

.error-404__hero{ text-align: center; max-width: 560px; margin: 0 auto 56px; padding: 40px 0; }
.error-404__code{ font-family: var(--sce-font-display); font-size: 5rem; color: var(--sce-line-strong); display: block; line-height: 1; }
.error-404__hero .search-form{ margin: 24px auto; max-width: 380px; }
.error-404__hero .btn{ margin-top: 16px; }

/* ---------- 16. Search form ---------- */
.search-form{ display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--sce-line-strong); padding-bottom: 4px; }
.search-form__field{ flex: 1; border: 0; background: transparent; padding: 10px 4px; font-size: 1rem; color: inherit; }
.search-form__field:focus{ outline: none; }
.search-form__submit{ color: var(--sce-ink-soft); }
.search-form__submit:hover{ color: var(--sce-accent); }

/* ---------- 17. (Comments removed — theme ships without comment UI) ---------- */

/* ---------- 18. Footer ---------- */
.site-footer{ background: var(--sce-ink); color: var(--sce-paper); margin-top: 64px; padding: 56px 0 0; }
.site-footer a{ transition: color var(--sce-speed-fast) var(--sce-ease); }
.site-footer__grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col--brand .site-title{ color: var(--sce-paper); }
.footer-blurb{ color: rgba(250,247,242,0.65); font-size: 0.92rem; max-width: 34ch; margin-top: 14px; }
.widget-title{ font-family: var(--sce-font-display); font-size: 1.05rem; margin-bottom: 16px; color: var(--sce-paper); }
.footer-links{ display: flex; flex-direction: column; gap: 11px; }
.footer-links a{ color: rgba(250,247,242,0.75); font-size: 0.92rem; }
.footer-links a:hover{ color: var(--sce-accent); padding-left: 3px; }

.social-row{ display: flex; gap: 10px; margin-top: 20px; }
.social-icon{
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(250,247,242,0.25);
	display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800;
	transition: all var(--sce-speed-fast) var(--sce-ease);
}
.social-icon:hover{ background: var(--sce-accent); border-color: var(--sce-accent); transform: translateY(-3px) rotate(-4deg); }

.site-footer__bottom{
	display: flex; align-items: center; justify-content: center;
	padding: 20px 24px; border-top: 1px solid rgba(250,247,242,0.12);
	font-size: 0.82rem; color: rgba(250,247,242,0.6);
}

/* ---------- 19. Scroll-reveal & stagger ---------- */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity var(--sce-speed-slow) var(--sce-ease), transform var(--sce-speed-slow) var(--sce-ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
.category-grid .reveal{ transition-delay: calc(var(--stagger, 0) * 60ms); }
.post-grid .post-card{ opacity: 0; transform: translateY(18px); transition: opacity var(--sce-speed-slow) var(--sce-ease), transform var(--sce-speed-slow) var(--sce-ease); }
.post-grid .post-card.is-visible{ opacity: 1; transform: translateY(0); }
.post-grid .post-card:nth-child(1){ transition-delay: 0ms; }
.post-grid .post-card:nth-child(2){ transition-delay: 70ms; }
.post-grid .post-card:nth-child(3){ transition-delay: 140ms; }
.post-grid .post-card:nth-child(4){ transition-delay: 210ms; }
.post-grid .post-card:nth-child(5){ transition-delay: 280ms; }
.post-grid .post-card:nth-child(6){ transition-delay: 350ms; }

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
	html{ scroll-behavior: auto; }
	*, *::before, *::after{
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
	.reveal, .post-card{ opacity: 1 !important; transform: none !important; }
}

/* ---------- 22. Floating scroll-to-top button ---------- */
.scroll-top-fab{
	position: fixed; right: 22px; bottom: 22px; z-index: 800;
	width: 48px; height: 48px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--sce-accent); color: var(--sce-accent-contrast);
	box-shadow: var(--sce-shadow-md);
	opacity: 0; visibility: hidden; pointer-events: none;
	transform: translateY(16px) scale(0.85);
	transition: opacity var(--sce-speed-base) var(--sce-ease), transform var(--sce-speed-base) var(--sce-ease), visibility var(--sce-speed-base);
}
.scroll-top-fab.is-visible{
	opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1);
	animation: sce-fab-pop var(--sce-speed-base) var(--sce-ease);
}
.scroll-top-fab:hover{ transform: translateY(-4px) scale(1.06); }
@keyframes sce-fab-pop{ 0%{ transform: translateY(16px) scale(0.7); } 60%{ transform: translateY(-6px) scale(1.08); } 100%{ transform: translateY(0) scale(1); } }

/* ---------- 23. Button ripple ---------- */
.btn, .icon-btn{ position: relative; overflow: hidden; }
.sce-ripple{
	position: absolute; width: 10px; height: 10px; border-radius: 50%;
	background: currentColor; opacity: 0.35;
	transform: translate(-50%, -50%) scale(0);
	pointer-events: none;
	animation: sce-ripple-out 550ms var(--sce-ease) forwards;
}
@keyframes sce-ripple-out{ to{ transform: translate(-50%, -50%) scale(18); opacity: 0; } }

/* ---------- 24. Page load fade-in (pure CSS, no JS dependency so content
   is never hidden if a script fails to load) ---------- */
body{ animation: sce-page-fade-in 480ms var(--sce-ease) both; }
@keyframes sce-page-fade-in{ from{ opacity: 0; } to{ opacity: 1; } }

/* ---------- 25. Hero staggered entrance ---------- */
.hero__eyebrow.reveal{ transition-delay: 0ms; }
.hero__heading.reveal{ transition-delay: 90ms; }
.hero__sub.reveal{ transition-delay: 180ms; }
.hero .btn.reveal{ transition-delay: 270ms; }

/* CTA pulse glow, subtle and only on the hero button */
.hero .btn--primary{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--sce-accent) 45%, transparent); animation: sce-pulse-glow 2.6s ease-out 1.2s 2; }
@keyframes sce-pulse-glow{
	0%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--sce-accent) 45%, transparent); }
	70%{ box-shadow: 0 0 0 14px color-mix(in srgb, var(--sce-accent) 0%, transparent); }
	100%{ box-shadow: 0 0 0 0 color-mix(in srgb, var(--sce-accent) 0%, transparent); }
}

/* ---------- 26. Footer link underline sweep ---------- */
.footer-links a{ position: relative; padding-left: 0; display: inline-block; }
.footer-links a::after{
	content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
	background: var(--sce-accent); transition: right var(--sce-speed-base) var(--sce-ease);
}
.footer-links a:hover{ padding-left: 0; }
.footer-links a:hover::after{ right: 0; }

/* ---------- 27. Mobile menu item stagger ---------- */
.mobile-menu__list > li{
	opacity: 0; transform: translateX(-12px);
	transition: opacity var(--sce-speed-base) var(--sce-ease), transform var(--sce-speed-base) var(--sce-ease);
}
.mobile-menu:not([hidden]) .mobile-menu__list > li{ opacity: 1; transform: translateX(0); }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(1){ transition-delay: 40ms; }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(2){ transition-delay: 90ms; }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(3){ transition-delay: 140ms; }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(4){ transition-delay: 190ms; }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(5){ transition-delay: 240ms; }
.mobile-menu:not([hidden]) .mobile-menu__list > li:nth-child(6){ transition-delay: 290ms; }

/* ---------- 28. Search panel scale-in ---------- */
.search-panel{ transform-origin: top center; }
.search-panel:not([hidden]){ animation: sce-panel-in var(--sce-speed-base) var(--sce-ease); }
@keyframes sce-panel-in{ from{ opacity: 0; transform: scaleY(0.92); } to{ opacity: 1; transform: scaleY(1); } }

/* ---------- 29. Badge float ---------- */
.featured-post .badge{ animation: sce-float 3.2s ease-in-out infinite; }
@keyframes sce-float{ 0%, 100%{ transform: translateY(0); } 50%{ transform: translateY(-4px); } }

@media (min-width: 900px){
	.primary-navigation{ display: block; }
	.menu-toggle{ display: none; }
}
@media (max-width: 1100px){
	.category-grid{ grid-template-columns: repeat(3, 1fr); }
	.post-grid--4{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px){
	.site-footer__grid{ grid-template-columns: 1fr 1fr; }
	.single-article__layout{ grid-template-columns: 1fr; }
	.single-article__toc-rail{ order: 2; }
	.toc-sticky{ position: static; }
	.single-article__content-col{ order: 1; max-width: none; }
	.featured-post__inner{ grid-template-columns: 1fr; }
	.featured-post__body{ padding: 0 24px 28px; }
	.featured-post__media{ aspect-ratio: 16/9; }
}
@media (max-width: 760px){
	.post-grid--3, .post-grid--4{ grid-template-columns: repeat(2, 1fr); }
	.category-grid{ grid-template-columns: repeat(2, 1fr); }
	.hero{ padding: 48px 0 40px; }
	.post-nav{ grid-template-columns: 1fr; }
	.post-nav__link--next{ text-align: left; align-items: flex-start; }
}
@media (max-width: 560px){
	.post-grid--3, .post-grid--4, .category-grid{ grid-template-columns: 1fr; }
	.site-footer__grid{ grid-template-columns: 1fr; }
	.site-footer__bottom{ flex-direction: column; gap: 12px; text-align: center; }
	.section{ padding: 40px 0; }
	body{ font-size: 16px; }
}
