/**
 * Revista main stylesheet.
 *
 * Color tokens are defined for light mode, then swapped for dark mode either
 * by the reader's choice ([data-theme="dark"]) or, when they have not chosen,
 * by their device setting (prefers-color-scheme).
 *
 * Contents
 *  1. Tokens
 *  2. Base
 *  3. Layout & header
 *  4. Light/dark toggle
 *  5. Navigation & search
 *  6. Hero
 *  7. Cards, badges & grid
 *  8. Page headers, breadcrumbs, pagination
 *  9. Single posts & content
 * 10. Comments & forms
 * 11. Footer
 * 12. Utilities & motion
 */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
	--rv-bg: #f6f5ff;
	--rv-bg-glow-1: rgba(124, 92, 255, 0.18);
	--rv-bg-glow-2: rgba(20, 184, 212, 0.16);
	--rv-dot: rgba(99, 70, 230, 0.11);
	--rv-top-glow-1: rgba(34, 211, 238, 0.30);
	--rv-top-glow-2: rgba(255, 95, 168, 0.24);
	--rv-top-glow-3: rgba(124, 92, 255, 0.22);
	--rv-top-circuit-opacity: 0.5;
	--rv-divider-opacity: 0.7;
	--rv-surface: #ffffff;
	--rv-surface-2: #f1eeff;
	--rv-text: #1d1b3a;
	--rv-muted: #5c5880;
	--rv-border: #e3defb;
	--rv-link: #5b3df5;
	--rv-link-hover: #d1306f;
	--rv-accent: #6a4bff;
	--rv-accent-text: #ffffff;
	--rv-accent-2: #14b8d4;
	--rv-pink: #ff5fa8;
	--rv-sun: #ffc23d;
	--rv-lime: #7ddc4f;
	--rv-gradient: linear-gradient(135deg, #7c5cff 0%, #14b8d4 100%);
	--rv-gradient-candy: linear-gradient(135deg, #ff5fa8 0%, #7c5cff 100%);
	--rv-shadow-sm: 0 2px 6px -2px rgba(48, 30, 140, 0.12);
	--rv-shadow: 0 14px 34px -16px rgba(64, 40, 190, 0.32);
	--rv-shadow-lg: 0 24px 60px -24px rgba(64, 40, 190, 0.45);
	--rv-header-bg: rgba(255, 255, 255, 0.78);
	--rv-code-bg: #1d1b3a;
	--rv-code-text: #f1eeff;

	--rv-radius-sm: 12px;
	--rv-radius: 20px;
	--rv-radius-lg: 28px;
	--rv-radius-pill: 999px;

	--rv-gutter: clamp(16px, 3vw, 32px);
	--rv-wide: 1240px;
	--rv-content: 760px;
	--rv-ease: cubic-bezier(0.34, 1.56, 0.64, 1);

	color-scheme: light;
}

:root[data-theme="dark"] {
	--rv-bg: #100e22;
	--rv-bg-glow-1: rgba(124, 92, 255, 0.24);
	--rv-bg-glow-2: rgba(20, 184, 212, 0.14);
	--rv-dot: rgba(169, 150, 255, 0.10);
	--rv-top-glow-1: rgba(34, 211, 238, 0.26);
	--rv-top-glow-2: rgba(255, 95, 168, 0.22);
	--rv-top-glow-3: rgba(124, 92, 255, 0.34);
	--rv-top-circuit-opacity: 0.8;
	--rv-divider-opacity: 0.95;
	--rv-surface: #1b1934;
	--rv-surface-2: #252248;
	--rv-text: #eeecff;
	--rv-muted: #b0abd6;
	--rv-border: #322e5c;
	--rv-link: #b4a5ff;
	--rv-link-hover: #ff8cc2;
	--rv-accent: #8b72ff;
	--rv-accent-text: #ffffff;
	--rv-shadow-sm: 0 2px 6px -2px rgba(0, 0, 0, 0.5);
	--rv-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.7);
	--rv-shadow-lg: 0 26px 60px -24px rgba(0, 0, 0, 0.8);
	--rv-header-bg: rgba(27, 25, 52, 0.78);
	--rv-code-bg: #0b0a18;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--rv-bg: #100e22;
		--rv-bg-glow-1: rgba(124, 92, 255, 0.24);
		--rv-bg-glow-2: rgba(20, 184, 212, 0.14);
		--rv-dot: rgba(169, 150, 255, 0.10);
		--rv-top-glow-1: rgba(34, 211, 238, 0.26);
		--rv-top-glow-2: rgba(255, 95, 168, 0.22);
		--rv-top-glow-3: rgba(124, 92, 255, 0.34);
		--rv-top-circuit-opacity: 0.8;
		--rv-divider-opacity: 0.95;
	--rv-divider-opacity: 0.95;
		--rv-surface: #1b1934;
		--rv-surface-2: #252248;
		--rv-text: #eeecff;
		--rv-muted: #b0abd6;
		--rv-border: #322e5c;
		--rv-link: #b4a5ff;
		--rv-link-hover: #ff8cc2;
		--rv-accent: #8b72ff;
		--rv-accent-text: #ffffff;
		--rv-shadow-sm: 0 2px 6px -2px rgba(0, 0, 0, 0.5);
		--rv-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.7);
		--rv-shadow-lg: 0 26px 60px -24px rgba(0, 0, 0, 0.8);
		--rv-header-bg: rgba(27, 25, 52, 0.78);
		--rv-code-bg: #0b0a18;
		color-scheme: dark;
	}
}

/* 2. Base ------------------------------------------------------------------ */

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 110px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--rv-bg);
	background-image:
		radial-gradient(var(--rv-dot) 1.4px, transparent 1.6px);
	background-size: 22px 22px;
	color: var(--rv-text);
	font-family: var(--wp--preset--font-family--body, "Nunito", system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* Soft aurora glows behind everything. */
body::before {
	content: "";
	position: fixed;
	inset: -20vmax -10vmax auto auto;
	width: 60vmax;
	height: 60vmax;
	background:
		radial-gradient(closest-side, var(--rv-bg-glow-1), transparent),
		radial-gradient(closest-side at 10% 90%, var(--rv-bg-glow-2), transparent);
	pointer-events: none;
	z-index: -1;
}

body::after {
	content: "";
	position: fixed;
	inset: auto auto -25vmax -15vmax;
	width: 55vmax;
	height: 55vmax;
	background: radial-gradient(closest-side, var(--rv-bg-glow-2), transparent);
	pointer-events: none;
	z-index: -1;
}

/* Vivid gradient circuitry behind the top of every page. */
.rv-top-art {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 640px;
	pointer-events: none;
	z-index: -1;
	background:
		radial-gradient(50% 60% at 12% 0%, var(--rv-top-glow-1), transparent 70%),
		radial-gradient(45% 60% at 88% 4%, var(--rv-top-glow-2), transparent 70%),
		radial-gradient(40% 45% at 50% 0%, var(--rv-top-glow-3), transparent 75%);
	-webkit-mask-image: linear-gradient(180deg, #000 45%, transparent);
	mask-image: linear-gradient(180deg, #000 45%, transparent);
}

.rv-top-art::after {
	content: "";
	position: absolute;
	inset: 0;
	background: url("../images/circuit-top.svg") center top / max(1440px, 100%) auto no-repeat;
	opacity: var(--rv-top-circuit-opacity);
}

/* Narrow screens: shrink the artwork so its busy edges stay on screen. */
@media (max-width: 782px) {
	.rv-top-art {
		height: 520px;
	}

	.rv-top-art::after {
		background-size: 820px auto;
		background-position: 32% top;
	}
}

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

a {
	color: var(--rv-link);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
	transition: color 0.2s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--wp--preset--font-family--display, "Space Grotesk", sans-serif);
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--rv-text);
	margin: 0 0 0.5em;
}

::selection {
	background: var(--rv-pink);
	color: #fff;
}

mark {
	background: linear-gradient(transparent 55%, rgba(255, 194, 61, 0.55) 55%);
	color: inherit;
	padding: 0 0.1em;
	border-radius: 4px;
}

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

.rv-icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
	vertical-align: -0.25em;
}

/* 3. Layout & header ------------------------------------------------------- */

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1;
	width: 100%;
	max-width: calc(var(--rv-wide) + var(--rv-gutter) * 2);
	margin: 0 auto;
	padding: clamp(20px, 4vw, 40px) var(--rv-gutter) clamp(48px, 7vw, 88px);
}

.site-header {
	position: sticky;
	top: 12px;
	z-index: 50;
	margin: 12px var(--rv-gutter) 0;
}

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

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 12px;
	}
}

.site-header__inner {
	max-width: var(--rv-wide);
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 12px 20px;
	flex-wrap: wrap;
	padding: 10px 12px 10px 18px;
	background: var(--rv-header-bg);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
}

.site-branding {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin-right: auto;
}

.site-title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 700;
	font-size: 1.45rem;
	line-height: 1.1;
	color: var(--rv-text);
	text-decoration: none;
	letter-spacing: -0.02em;
}

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

.site-title__chip {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 14px;
	background: var(--rv-gradient);
	color: #fff;
	box-shadow: 0 8px 18px -8px rgba(124, 92, 255, 0.8);
	transition: transform 0.4s var(--rv-ease);
}

.site-title:hover .site-title__chip {
	transform: rotate(-10deg) scale(1.06);
}

.site-title__chip .rv-icon {
	width: 24px;
	height: 24px;
}

.site-description {
	margin: 2px 0 0 50px;
	font-size: 0.8rem;
	color: var(--rv-muted);
	line-height: 1.3;
}

.custom-logo-link img {
	display: block;
	max-height: 56px;
	width: auto;
	border-radius: var(--rv-radius-sm);
}

.custom-logo-link + .site-description {
	margin-left: 0;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	order: 3;
}

.rv-icon-btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface);
	color: var(--rv-text);
	cursor: pointer;
	transition: transform 0.25s var(--rv-ease), background-color 0.2s ease, color 0.2s ease;
}

.rv-icon-btn:hover {
	transform: translateY(-2px);
	color: var(--rv-accent);
}

/* Toggles that need JavaScript stay hidden until it has run. */
html:not(.js) .rv-search-toggle,
html:not(.js) .rv-mode-toggle,
html:not(.js) .rv-menu-toggle {
	display: none;
}

/* 4. Light/dark toggle ----------------------------------------------------- */

.rv-mode-toggle {
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	border-radius: var(--rv-radius-pill);
}

.rv-mode-toggle__track {
	position: relative;
	display: block;
	width: 64px;
	height: 36px;
	border-radius: var(--rv-radius-pill);
	background: linear-gradient(135deg, #ffe08a, #ffc23d);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12);
	transition: background 0.4s ease;
}

.rv-mode-toggle__thumb {
	position: absolute;
	top: 4px;
	left: 4px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
	color: #e69b00;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
	transition: transform 0.45s var(--rv-ease), color 0.3s ease, background-color 0.3s ease;
}

.rv-mode-toggle__thumb .rv-icon {
	position: absolute;
	width: 18px;
	height: 18px;
	transition: opacity 0.25s ease, transform 0.45s var(--rv-ease);
}

.rv-mode-toggle .rv-icon--moon {
	opacity: 0;
	transform: rotate(-90deg) scale(0.5);
}

.rv-mode-toggle[aria-pressed="true"] .rv-mode-toggle__track {
	background: linear-gradient(135deg, #2b2066, #4b36c7);
}

.rv-mode-toggle[aria-pressed="true"] .rv-mode-toggle__thumb {
	transform: translateX(28px);
	background: #1b1934;
	color: #c9bcff;
}

.rv-mode-toggle[aria-pressed="true"] .rv-icon--sun {
	opacity: 0;
	transform: rotate(90deg) scale(0.5);
}

.rv-mode-toggle[aria-pressed="true"] .rv-icon--moon {
	opacity: 1;
	transform: none;
}

/* 5. Navigation & search --------------------------------------------------- */

.main-navigation {
	order: 2;
}

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

.main-navigation > ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.main-navigation a {
	display: block;
	padding: 8px 16px;
	border-radius: var(--rv-radius-pill);
	color: var(--rv-text);
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
	background: var(--rv-surface-2);
	color: var(--rv-link);
}

.main-navigation li {
	position: relative;
}

.main-navigation .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 220px;
	padding: 8px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius);
	box-shadow: var(--rv-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.25s var(--rv-ease), visibility 0.2s;
	z-index: 5;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.main-navigation .sub-menu a {
	border-radius: var(--rv-radius-sm);
}

.rv-menu-toggle .rv-icon--close,
.rv-menu-toggle[aria-expanded="true"] .rv-icon--menu {
	display: none;
}

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

@media (min-width: 900px) {
	.rv-menu-toggle {
		display: none !important;
	}
}

@media (max-width: 899px) {
	.js .main-navigation {
		display: none;
		order: 4;
		width: 100%;
	}

	.js .main-navigation.is-open {
		display: block;
		animation: rv-pop 0.3s var(--rv-ease);
	}

	.main-navigation > ul {
		flex-direction: column;
		padding: 6px 0 4px;
	}

	.main-navigation .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding: 0 0 0 16px;
		background: transparent;
	}
}

.rv-search-panel {
	max-width: 680px;
	margin: 10px auto 0;
}

.js .rv-search-panel:not(.is-open) {
	display: none;
}

.rv-search-panel.is-open {
	animation: rv-pop 0.3s var(--rv-ease);
}

.search-form {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 6px 6px 20px;
	background: var(--rv-surface);
	border: 2px solid var(--rv-border);
	border-radius: var(--rv-radius-pill);
	box-shadow: var(--rv-shadow);
	transition: border-color 0.2s ease;
}

.search-form:focus-within {
	border-color: var(--rv-accent);
}

.search-field {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 8px 0;
	font-size: 1rem;
}

.search-field:focus {
	outline: none;
}

.search-field::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.search-submit {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: none;
	border: 0;
	border-radius: 50%;
	background: var(--rv-gradient);
	color: #fff;
	cursor: pointer;
	transition: transform 0.25s var(--rv-ease);
}

.search-submit:hover {
	transform: scale(1.08) rotate(-6deg);
}

/* 6. Hero ------------------------------------------------------------------ */

.rv-hero-wrap {
	position: relative;
	margin-bottom: clamp(28px, 4vw, 44px);
}

.rv-hero {
	position: relative;
	padding: clamp(28px, 5vw, 64px);
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: clamp(24px, 4vw, 40px) !important;
	box-shadow: var(--rv-shadow);
	overflow: hidden;
	isolation: isolate;
}

.rv-hero {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: var(--rv-hero-min-height, 0);
}

.rv-hero__cols {
	width: 100%;
	gap: clamp(16px, 4vw, 48px);
	margin: 0;
}

.rv-hero__copy > * {
	margin-top: 0;
}

/* Circuit-board traces in the corner of the hero. */
.rv-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(var(--rv-border) 1px, transparent 1px) 0 0 / 44px 44px,
		linear-gradient(90deg, var(--rv-border) 1px, transparent 1px) 0 0 / 44px 44px;
	-webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 60%);
	mask-image: radial-gradient(ellipse at 100% 0%, #000 0%, transparent 60%);
	opacity: 0.7;
	z-index: -1;
}

.rv-hero::after {
	content: "";
	position: absolute;
	width: 340px;
	height: 340px;
	right: -80px;
	bottom: -120px;
	border-radius: 50%;
	background: var(--rv-gradient);
	filter: blur(70px);
	opacity: 0.28;
	z-index: -1;
}

.rv-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 6px 14px;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface-2);
	color: var(--rv-link);
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.rv-hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rv-lime);
	box-shadow: 0 0 0 4px rgba(125, 220, 79, 0.25);
	animation: rv-blink 2s ease-in-out infinite;
}

.rv-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rv-lime);
	box-shadow: 0 0 0 4px rgba(125, 220, 79, 0.25);
	animation: rv-blink 2s ease-in-out infinite;
}

.rv-hero__title a {
	color: inherit;
	text-decoration: none;
}

.rv-hero__title {
	font-size: clamp(2.4rem, 6vw, 4.4rem) !important;
	line-height: 1.02;
	letter-spacing: -0.035em;
	margin: 0 0 16px;
	background: linear-gradient(120deg, var(--rv-text) 30%, var(--rv-accent) 65%, var(--rv-pink));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.rv-hero__text {
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	color: var(--rv-muted);
	max-width: 46ch;
	margin: 0 0 24px;
}

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

.rv-hero__art img {
	display: block;
	width: 100% !important;
	max-width: 520px;
	height: auto;
	margin-inline: auto;
	border-radius: 0 !important;
	animation: rv-float 6s ease-in-out infinite;
}

.rv-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rv-chips li {
	margin: 0;
}

.rv-chips .cat-item .children {
	display: none;
}

.rv-chip,
.rv-chips a {
	display: inline-block;
	padding: 7px 16px;
	border-radius: var(--rv-radius-pill);
	border: 1.5px solid var(--rv-border);
	background: var(--rv-bg);
	color: var(--rv-text);
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: transform 0.25s var(--rv-ease), border-color 0.2s ease, color 0.2s ease;
}

.rv-chip:hover,
.rv-chips a:hover {
	transform: translateY(-2px);
	border-color: var(--rv-accent);
	color: var(--rv-link);
}

@media (max-width: 781px) {
	.rv-hero__art {
		order: -1;
	}

	.rv-hero__art img {
		max-width: 280px;
	}
}

.rv-edit-banner {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	padding: 6px 14px;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-text);
	color: var(--rv-surface);
	font-size: 0.8rem;
	font-weight: 800;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.25s var(--rv-ease);
}

.rv-edit-banner:hover {
	opacity: 1;
	color: var(--rv-surface);
	transform: translateY(-2px);
}

/* 7. Cards, badges & grid -------------------------------------------------- */

.rv-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	margin: 0 0 22px;
}

.rv-section-title::before {
	content: "";
	width: 14px;
	height: 14px;
	flex: none;
	border-radius: 5px;
	background: var(--rv-gradient);
	box-shadow: 0 0 0 5px var(--rv-surface-2);
	transform: rotate(45deg);
}

.rv-grid {
	display: grid;
	gap: clamp(18px, 2.5vw, 28px);
}

.rv-grid--3 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.rv-card,
.rv-feature {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow-sm);
	padding: 10px;
	transition: transform 0.35s var(--rv-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

.rv-card:hover,
.rv-card:focus-within,
.rv-feature:hover {
	transform: translateY(-6px);
	box-shadow: var(--rv-shadow-lg);
	border-color: color-mix(in srgb, var(--rv-accent) 40%, var(--rv-border));
}

.entry-media {
	position: relative;
	overflow: hidden;
	border-radius: calc(var(--rv-radius-lg) - 8px);
	aspect-ratio: 16 / 10;
	background: var(--rv-surface-2);
}

.entry-media__link {
	display: block;
	height: 100%;
}

.entry-media img,
.entry-media .rv-doodle {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--rv-ease);
}

.rv-card:hover .entry-media img,
.rv-card:hover .entry-media .rv-doodle,
.rv-feature:hover .entry-media img,
.rv-feature:hover .entry-media .rv-doodle {
	transform: scale(1.05);
}

.rv-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 12px 10px;
}

.rv-card__top {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.rv-card__top:empty {
	display: none;
}

.rv-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: var(--rv-radius-pill);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.5;
	background: #ece7ff;
	color: #4a2fd6;
}

a.rv-badge:hover {
	filter: brightness(0.95);
	color: #4a2fd6;
}

.rv-badge--1 { background: #ffe1ef; color: #b0175e; }
.rv-badge--2 { background: #d7f6fb; color: #075f70; }
.rv-badge--3 { background: #e5f8dc; color: #2f6a14; }
.rv-badge--4 { background: #fff1cf; color: #805600; }
a.rv-badge--1:hover { color: #b0175e; }
a.rv-badge--2:hover { color: #075f70; }
a.rv-badge--3:hover { color: #2f6a14; }
a.rv-badge--4:hover { color: #805600; }

.rv-badge--new {
	background: var(--rv-gradient-candy);
	color: #fff;
}

.rv-badge--sticky {
	background: var(--rv-sun);
	color: #3b2a00;
}

.rv-card__title {
	font-size: 1.3rem;
	line-height: 1.25;
	margin: 0 0 8px;
}

.rv-card__title a,
.rv-feature__title a {
	color: var(--rv-text);
	text-decoration: none;
	background-image: linear-gradient(var(--rv-accent), var(--rv-accent));
	background-size: 0 3px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.35s ease, color 0.2s ease;
}

.rv-card__title a:hover,
.rv-feature__title a:hover {
	background-size: 100% 3px;
	color: var(--rv-text);
}

/* Make the whole card clickable while keeping a single link for AT. */
.rv-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 1;
}

.rv-card .rv-badge,
.rv-card .byline a {
	position: relative;
	z-index: 2;
}

.rv-card__excerpt {
	color: var(--rv-muted);
	font-size: 0.97rem;
	flex: 1;
}

.rv-card__excerpt p {
	margin: 0 0 14px;
}

.rv-card__meta {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	padding-top: 12px;
	border-top: 1.5px dashed var(--rv-border);
	font-size: 0.85rem;
	color: var(--rv-muted);
}

.byline,
.posted-on,
.reading-time {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.byline a {
	color: var(--rv-text);
	font-weight: 700;
	text-decoration: none;
}

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

.byline__avatar,
.byline img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid var(--rv-surface);
	box-shadow: 0 0 0 2px var(--rv-border);
}

/* Feature card */

.rv-feature-wrap {
	margin-bottom: clamp(32px, 5vw, 56px);
}

.rv-feature {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	align-items: center;
	gap: clamp(8px, 2vw, 24px);
	padding: 12px;
	border-radius: clamp(24px, 4vw, 36px);
}

.rv-feature .entry-media {
	aspect-ratio: 16 / 10.5;
	border-radius: clamp(18px, 3vw, 28px);
}

.rv-feature__body {
	padding: clamp(12px, 2.5vw, 28px);
}

.rv-feature__title {
	font-size: clamp(1.7rem, 3.4vw, 2.6rem);
	line-height: 1.12;
	margin: 0 0 14px;
}

.rv-feature__excerpt {
	color: var(--rv-muted);
	font-size: 1.05rem;
}

.rv-feature .rv-card__meta {
	margin-bottom: 22px;
}

.rv-feature .rv-button {
	position: relative;
	z-index: 2;
}

@media (max-width: 820px) {
	.rv-feature {
		grid-template-columns: 1fr;
	}
}

/* Buttons */

.rv-button,
.wp-block-button.is-style-revista-gradient .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-gradient);
	background-size: 160% 160%;
	color: #fff;
	font-weight: 800;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 10px 22px -10px rgba(124, 92, 255, 0.85);
	transition: transform 0.3s var(--rv-ease), box-shadow 0.3s ease, background-position 0.5s ease;
}

.rv-button:hover,
.wp-block-button.is-style-revista-gradient .wp-block-button__link:hover {
	color: #fff;
	transform: translateY(-2px);
	background-position: 100% 0;
	box-shadow: 0 14px 28px -10px rgba(124, 92, 255, 0.95);
}

.rv-button .rv-icon {
	transition: transform 0.3s var(--rv-ease);
}

.rv-button:hover .rv-icon {
	transform: translateX(4px);
}

/* 8. Page headers, breadcrumbs, pagination --------------------------------- */

.rv-page-header {
	position: relative;
	padding: clamp(24px, 4vw, 44px);
	margin-bottom: clamp(24px, 4vw, 40px);
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow-sm);
	overflow: hidden;
	isolation: isolate;
}

.rv-page-header::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: var(--rv-gradient);
	opacity: 0.16;
	filter: blur(30px);
	z-index: -1;
}

.rv-page-header__title {
	font-size: clamp(2rem, 4.5vw, 3rem);
	margin: 0;
}

.rv-page-header__desc {
	margin-top: 10px;
	color: var(--rv-muted);
	max-width: 65ch;
}

.rv-page-header__desc p {
	margin: 0;
}

.rv-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--rv-muted);
}

.rv-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.rv-breadcrumbs li + li::before {
	content: "";
	width: 6px;
	height: 6px;
	margin: 0 4px;
	border-radius: 2px;
	background: var(--rv-accent-2);
	transform: rotate(45deg);
}

.rv-breadcrumbs a {
	color: var(--rv-muted);
	text-decoration: none;
	padding: 2px 8px;
	border-radius: var(--rv-radius-pill);
}

.rv-breadcrumbs a:hover {
	background: var(--rv-surface-2);
	color: var(--rv-link);
}

.rv-breadcrumbs [aria-current] {
	padding: 2px 8px;
	color: var(--rv-text);
	max-width: 40ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pagination,
.comments-pagination {
	margin-top: clamp(32px, 5vw, 56px);
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 46px;
	height: 46px;
	padding: 0 14px;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	color: var(--rv-text);
	font-weight: 800;
	text-decoration: none;
	transition: transform 0.25s var(--rv-ease), background-color 0.2s ease;
}

.pagination a.page-numbers:hover {
	transform: translateY(-3px);
	color: var(--rv-link);
}

.pagination .page-numbers.current {
	background: var(--rv-gradient);
	border-color: transparent;
	color: #fff;
}

.pagination .page-numbers.dots {
	background: transparent;
	border: 0;
}

/* 9. Single posts & content ------------------------------------------------ */

.site-main--single {
	max-width: calc(1120px + var(--rv-gutter) * 2);
	padding-top: clamp(8px, 1.5vw, 16px);
}

.rv-single__header {
	max-width: var(--rv-content);
	margin: 0 auto clamp(24px, 4vw, 36px);
	text-align: center;
}

.rv-single__header .rv-breadcrumbs ol,
.rv-single__header .rv-card__top {
	justify-content: center;
}

.rv-single__title {
	font-size: clamp(2.1rem, 5vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	margin: 6px 0 16px;
}

.rv-single__dek {
	font-size: 1.2rem;
	color: var(--rv-muted);
	margin: 0 auto 20px;
	max-width: 58ch;
}

.rv-single__meta-row {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* With a featured image the header spans the image's width so the meta
   row can match it; everything else keeps the reading column. */
.rv-single__header--wide {
	max-width: none;
}

.rv-single__header--wide > :not(.rv-single__meta-row, .rv-single__dek) {
	max-width: var(--rv-content);
	margin-inline: auto;
}

.rv-single__meta-row.has-article-nav {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: stretch;
	gap: 12px;
}

.rv-single__meta-row.has-article-nav .rv-single__meta {
	display: flex;
	width: 100%;
}

.rv-article-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 18px;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface);
	color: var(--rv-text);
	font-size: 0.9rem;
	font-weight: 800;
	white-space: nowrap;
	text-decoration: none;
	transition: transform 0.3s var(--rv-ease), box-shadow 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

.rv-article-btn .rv-icon {
	width: 1.1em;
	height: 1.1em;
	transition: transform 0.3s var(--rv-ease);
}

a.rv-article-btn:hover {
	background: var(--rv-gradient);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 10px 22px -10px rgba(124, 92, 255, 0.85);
	transform: translateY(-2px);
}

a.rv-article-btn--prev:hover .rv-icon {
	transform: translateX(-3px);
}

a.rv-article-btn--next:hover .rv-icon {
	transform: translateX(3px);
}

.rv-article-btn.is-disabled {
	opacity: 0.4;
	cursor: default;
}

@media (max-width: 640px) {
	.rv-single__meta-row.has-article-nav {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"meta meta"
			"prev next";
	}

	.rv-single__meta-row.has-article-nav .rv-single__meta {
		grid-area: meta;
	}

	.rv-article-btn--prev {
		grid-area: prev;
	}

	.rv-article-btn--next {
		grid-area: next;
	}
}

.rv-single__meta {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px 18px;
	padding: 8px 18px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-pill);
	font-size: 0.9rem;
	color: var(--rv-muted);
}

.rv-single__media {
	margin: 0 0 clamp(28px, 5vw, 48px);
}

/* Categories: one tall vertical tag in the margin left of the post text. It
   stays in view (sticky) while the reader scrolls through the post. */
.rv-single__body {
	position: relative;
}

.rv-cat-rail {
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	left: calc(50% - var(--rv-content) / 2 - 84px);
	width: 46px;
}

.rv-cat-rail__tag {
	position: sticky;
	top: 124px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 280px;
	padding: 24px 0;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	border-radius: var(--rv-radius-pill);
	background: #ece7ff;
	color: #4a2fd6;
	box-shadow: var(--rv-shadow);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	line-height: 46px;
	text-transform: uppercase;
	white-space: nowrap;
}

.rv-cat-rail__tag a {
	color: inherit;
	text-decoration: none;
}

.rv-cat-rail__tag a:hover,
.rv-cat-rail__tag a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.rv-cat-rail__sep {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
}

/* Not enough margin beside the text: show a normal horizontal tag instead. */
@media (max-width: 1079px) {
	.rv-cat-rail {
		position: static;
		width: auto;
		max-width: var(--rv-content);
		margin: 0 auto 20px;
	}

	.rv-cat-rail__tag {
		position: static;
		display: inline-flex;
		flex-wrap: wrap;
		gap: 4px 10px;
		min-height: 0;
		padding: 4px 14px;
		writing-mode: horizontal-tb;
		transform: none;
		box-shadow: none;
		font-size: 0.75rem;
		letter-spacing: 0.04em;
		line-height: 1.5;
		white-space: normal;
	}
}

.rv-single__media img {
	display: block;
	width: 100%;
	border-radius: clamp(22px, 4vw, 36px);
	box-shadow: var(--rv-shadow-lg);
}

.rv-single__media figcaption {
	margin-top: 10px;
	text-align: center;
	font-size: 0.875rem;
	color: var(--rv-muted);
}

.entry-content {
	max-width: var(--rv-content);
	margin: 0 auto;
	font-size: 1.125rem;
	line-height: 1.8;
}

.entry-content > * {
	margin-block: 0 1.35em;
}

.entry-content > .alignwide {
	max-width: 1120px;
	margin-inline: calc((var(--rv-content) - min(1120px, 100vw - var(--rv-gutter) * 2)) / 2);
}

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

@media (max-width: 1180px) {
	.entry-content > .alignwide {
		margin-inline: 0;
	}
}

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

.entry-content a {
	font-weight: 700;
}

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

.entry-content ul:not([class]),
.entry-content ol:not([class]) {
	padding-left: 1.4em;
}

.entry-content ul:not([class]) {
	list-style: none;
}

.entry-content ul:not([class]) > li {
	position: relative;
	margin-bottom: 0.35em;
}

.entry-content ul:not([class]) > li::before {
	content: "";
	position: absolute;
	left: -1.15em;
	top: 0.68em;
	width: 9px;
	height: 9px;
	border-radius: 3px;
	background: var(--rv-gradient);
	transform: rotate(45deg);
}

.entry-content ol:not([class]) > li::marker {
	color: var(--rv-accent);
	font-weight: 800;
}

.entry-content blockquote:not([class*="wp-block-pullquote"]) {
	position: relative;
	margin-inline: 0;
	padding: 20px 24px 20px 28px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-left: 6px solid var(--rv-accent);
	border-radius: var(--rv-radius);
	font-size: 1.2rem;
	font-style: italic;
}

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

.entry-content blockquote cite {
	display: block;
	margin-top: 8px;
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 700;
	color: var(--rv-muted);
}

.wp-block-pullquote {
	border: 0;
	border-radius: var(--rv-radius-lg);
	background: var(--rv-surface-2);
	padding: 32px;
}

.entry-content :not(pre) > code {
	padding: 0.15em 0.45em;
	border-radius: 8px;
	background: var(--rv-surface-2);
	color: var(--rv-link);
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.88em;
}

.entry-content pre,
.wp-block-code {
	position: relative;
	overflow-x: auto;
	padding: 44px 24px 22px;
	background: var(--rv-code-bg);
	color: var(--rv-code-text);
	border: 0;
	border-radius: var(--rv-radius);
	font-family: var(--wp--preset--font-family--mono, monospace);
	font-size: 0.92rem;
	line-height: 1.65;
	box-shadow: var(--rv-shadow);
}

/* Little "window" dots on code blocks. */
.entry-content pre::before,
.wp-block-code::before {
	content: "";
	position: absolute;
	top: 16px;
	left: 20px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #ff5fa8;
	box-shadow: 18px 0 0 #ffc23d, 36px 0 0 #7ddc4f;
}

.entry-content pre code {
	background: none;
	color: inherit;
	padding: 0;
}

.entry-content hr,
.wp-block-separator {
	border: 0;
	height: 6px;
	max-width: 200px;
	margin: 2.5em auto;
	background: radial-gradient(circle, var(--rv-accent) 3px, transparent 3.5px) 0 0 / 18px 6px repeat-x;
	opacity: 0.6;
}

.entry-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-sm);
	overflow: hidden;
	font-size: 0.97rem;
}

.entry-content th,
.entry-content td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--rv-border);
	text-align: left;
}

.entry-content thead th {
	background: var(--rv-surface-2);
}

.entry-content tr:last-child td {
	border-bottom: 0;
}

.wp-block-image figcaption,
.wp-block-embed figcaption {
	text-align: center;
	font-size: 0.875rem;
	color: var(--rv-muted);
}

.is-style-revista-card {
	padding: clamp(20px, 4vw, 36px) !important;
	border-radius: var(--rv-radius-lg) !important;
	border: 1px solid var(--rv-border);
	box-shadow: var(--rv-shadow);
}

.is-style-revista-card:not(.has-background) {
	background: var(--rv-surface);
}

.wp-block-image.is-style-revista-glow img {
	box-shadow: 0 0 0 4px var(--rv-surface), 0 0 0 7px var(--rv-accent), 0 18px 50px -12px var(--rv-accent);
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	font-weight: 800;
}

.page-links a,
.page-links > span:not(:first-child) {
	display: inline-grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	text-decoration: none;
}

/* End-of-post divider: a transparent circuit band across the whole window
   that fades into the background, like the circuitry at the top. It sits
   below the sticky category tag, which slides over it while scrolling. */
.rv-divider {
	position: relative;
	z-index: 0;
	width: 100vw;
	max-width: 100vw;
	height: clamp(120px, 14vw, 200px);
	margin-block: clamp(20px, 3vw, 36px);
	margin-inline: calc(50% - 50vw);
	pointer-events: none;
	background:
		url("../images/divider-circuit.svg") center / auto 100% no-repeat,
		radial-gradient(30% 60% at 30% 50%, var(--rv-top-glow-1), transparent 70%),
		radial-gradient(30% 60% at 70% 50%, var(--rv-top-glow-2), transparent 70%),
		radial-gradient(22% 70% at 50% 50%, var(--rv-top-glow-3), transparent 70%);
	opacity: var(--rv-divider-opacity, 0.85);
	-webkit-mask-image: radial-gradient(ellipse 58% 50% at 50% 50%, #000 45%, transparent 100%);
	mask-image: radial-gradient(ellipse 58% 50% at 50% 50%, #000 45%, transparent 100%);
}

@media (min-width: 1601px) {
	.rv-divider {
		background-size: 100% auto, auto, auto, auto;
	}
}

.rv-single__footer {
	max-width: var(--rv-content);
	margin: 36px auto 0;
}

.rv-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0 0 32px;
}

.rv-tags a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface-2);
	color: var(--rv-link);
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: transform 0.25s var(--rv-ease);
}

.rv-tags a:hover {
	transform: translateY(-2px) rotate(-2deg);
}

.rv-author-box {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 24px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-lg);
	box-shadow: var(--rv-shadow-sm);
}

.rv-author-box img {
	flex: none;
	border-radius: 24px;
}

.rv-author-box__label {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--rv-muted);
}

.rv-author-box__name {
	font-size: 1.3rem;
	margin: 2px 0 6px;
}

.rv-author-box__name a {
	color: var(--rv-text);
	text-decoration: none;
}

.rv-author-box__bio {
	margin: 0;
	color: var(--rv-muted);
}

.post-navigation {
	max-width: var(--rv-content);
	margin: clamp(36px, 6vw, 64px) auto;
}

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

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	height: 100%;
	padding: 18px 22px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius);
	color: var(--rv-text);
	text-decoration: none;
	transition: transform 0.3s var(--rv-ease), box-shadow 0.3s ease;
}

.post-navigation a:hover {
	transform: translateY(-4px);
	box-shadow: var(--rv-shadow);
}

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

.post-navigation .nav-next .nav-label {
	justify-content: flex-end;
}

.post-navigation .nav-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--rv-link);
}

.post-navigation .nav-title {
	font-family: var(--wp--preset--font-family--display, sans-serif);
	font-weight: 700;
	line-height: 1.3;
}

@media (max-width: 600px) {
	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		grid-column: auto;
	}
}

.rv-related {
	margin: clamp(40px, 6vw, 72px) 0;
}

/* Reading progress */

.rv-progress {
	position: fixed;
	inset: 0 0 auto;
	height: 5px;
	z-index: 100;
	pointer-events: none;
}

.admin-bar .rv-progress {
	top: 32px;
}

.rv-progress__bar {
	display: block;
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, #7c5cff, #14b8d4, #ff5fa8);
	border-radius: 0 999px 999px 0;
}

/* Empty / 404 */

.rv-empty {
	max-width: 620px;
	margin: clamp(20px, 5vw, 60px) auto;
	padding: clamp(28px, 5vw, 48px);
	text-align: center;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: clamp(24px, 4vw, 40px);
	box-shadow: var(--rv-shadow);
}

.rv-empty__art img {
	display: block;
	margin: 0 auto 12px;
	animation: rv-float 5s ease-in-out infinite;
}

.rv-empty__title {
	font-size: clamp(1.6rem, 3.5vw, 2.3rem);
}

.rv-empty p {
	color: var(--rv-muted);
}

.rv-empty .search-form {
	margin: 24px 0;
	box-shadow: none;
}

/* 10. Comments & forms ----------------------------------------------------- */

.comments-area {
	max-width: var(--rv-content);
	margin: clamp(40px, 6vw, 72px) auto 0;
}

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

.comment-list .children {
	margin-left: clamp(16px, 4vw, 44px);
}

.comment-body {
	position: relative;
	margin-bottom: 16px;
	padding: 20px 22px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius) var(--rv-radius) var(--rv-radius) 6px;
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin-bottom: 8px;
	font-size: 0.9rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-metadata a {
	color: var(--rv-muted);
	text-decoration: none;
	font-size: 0.85rem;
}

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

.reply a,
.comment-reply-link {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 14px;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-surface-2);
	font-size: 0.85rem;
	font-weight: 800;
	text-decoration: none;
}

.bypostauthor > .comment-body {
	border-color: color-mix(in srgb, var(--rv-accent) 45%, var(--rv-border));
}

.comment-respond {
	margin-top: 32px;
	padding: clamp(20px, 4vw, 32px);
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-radius-lg);
}

.comment-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.comment-form-cookies-consent {
	display: flex;
	gap: 8px;
	align-items: flex-start;
}

.comment-form-cookies-consent label {
	font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
	width: 100%;
	padding: 12px 16px;
	background: var(--rv-bg);
	border: 2px solid var(--rv-border);
	border-radius: var(--rv-radius-sm);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
	border-radius: var(--rv-radius);
	min-height: 140px;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--rv-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--rv-accent) 20%, transparent);
}

input[type="checkbox"] {
	accent-color: var(--rv-accent);
	width: 18px;
	height: 18px;
	margin-top: 4px;
}

input[type="submit"],
button[type="submit"]:not(.search-submit) {
	display: inline-flex;
	padding: 12px 26px;
	border: 0;
	border-radius: var(--rv-radius-pill);
	background: var(--rv-gradient);
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

/* 11. Footer --------------------------------------------------------------- */

.site-footer {
	position: relative;
	margin: 0 var(--rv-gutter) var(--rv-gutter);
	padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px) 24px;
	background: #17142f;
	color: #d9d5f5;
	border-radius: clamp(24px, 4vw, 40px);
	overflow: hidden;
	isolation: isolate;
}

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

.site-footer a:hover {
	color: #ffb3d6;
}

.site-footer__circuit {
	position: absolute;
	inset: 0;
	background-image: url("../images/circuit.svg");
	background-size: 520px auto;
	background-repeat: repeat;
	opacity: 0.35;
	z-index: -1;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.site-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 32px;
	max-width: var(--rv-wide);
	margin: 0 auto 36px;
}

.site-footer .widget-title,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
	color: #fff;
	font-size: 1.1rem;
}

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

.site-footer .widget li {
	padding: 4px 0;
}

.site-footer .search-form {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: none;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--rv-wide);
	margin: 0 auto;
	padding-top: 20px;
	border-top: 1px dashed rgba(255, 255, 255, 0.18);
	font-size: 0.9rem;
}

.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-navigation a {
	text-decoration: none;
	font-weight: 700;
}

.site-info {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.site-info a {
	text-decoration: none;
}

.site-footer__code {
	max-width: var(--rv-wide);
	margin: 16px auto 0;
	font-size: 0.85rem;
}

.site-footer__code:empty {
	display: none;
}

.site-info__logo {
	display: block;
	width: auto;
	height: 34px;
	margin-right: 6px;
	filter: drop-shadow(0 4px 10px rgba(20, 184, 212, 0.35));
}

.site-info__rss {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.site-info .rv-icon {
	width: 1em;
	height: 1em;
	vertical-align: 0;
}

.rv-to-top {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--rv-gradient);
	color: #fff !important;
	transition: transform 0.3s var(--rv-ease);
}

.rv-to-top:hover {
	transform: translateY(-4px);
}

/* Widgets in general */

.widget {
	margin-bottom: 24px;
}

.wp-block-search__input {
	border-radius: var(--rv-radius-pill) !important;
}

.wp-block-search__button {
	border-radius: var(--rv-radius-pill) !important;
}

/* 12. Utilities & motion --------------------------------------------------- */

@keyframes rv-pop {
	from { opacity: 0; transform: translateY(-6px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

@keyframes rv-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

@keyframes rv-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

@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;
	}
}

@media print {
	.site-header,
	.site-footer,
	.rv-progress,
	.post-navigation,
	.rv-related,
	.comments-area,
	.rv-breadcrumbs,
	.rv-divider,
	.rv-top-art {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	body::before,
	body::after {
		display: none;
	}
}

@media (max-width: 600px) {
	.site-description {
		display: none;
	}

	.site-header__inner {
		flex-wrap: nowrap;
		padding: 8px 8px 8px 12px;
	}

	.js .site-header__inner:has(.main-navigation.is-open) {
		flex-wrap: wrap;
	}

	.site-title {
		font-size: 1.2rem;
		gap: 8px;
	}

	.site-title__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.site-title__chip {
		width: 36px;
		height: 36px;
		border-radius: 12px;
	}

	.site-header__actions {
		gap: 6px;
	}

	.rv-icon-btn {
		width: 40px;
		height: 40px;
	}
}
