/* ==========================================================================
   Complex Bizz — main stylesheet
   Dark 3D magazine design: glassmorphism, layered depth, purple-blue
   gradients, hover lift + tilt. Colours come from CSS variables that the
   Customizer can override (see functions.php).
   ========================================================================== */

:root {
	--cb-bg: #070812;
	--cb-bg-alt: #0b0e1e;
	--cb-card: #0e1226;
	--cb-heading: #f8fafc;
	--cb-text: #d7dce8;
	--cb-muted: #94a3b8;
	--cb-primary: #8b5cf6;
	--cb-accent: #3b82f6;
	--cb-cyan: #22d3ee;
	--cb-grad-from: #8b5cf6;
	--cb-grad-to: #3b82f6;
	--cb-border: rgba(255, 255, 255, 0.08);
	--cb-border-strong: rgba(255, 255, 255, 0.14);
	--cb-radius: 20px;
	--cb-radius-sm: 14px;
	--cb-shadow-3d:
		inset 0 1px 0 rgba(255, 255, 255, 0.07),
		0 1px 2px rgba(0, 0, 0, 0.45),
		0 12px 28px -8px rgba(0, 0, 0, 0.65),
		0 28px 56px -20px rgba(0, 0, 0, 0.7);
	--cb-shadow-lift:
		inset 0 1px 0 rgba(255, 255, 255, 0.09),
		0 2px 4px rgba(0, 0, 0, 0.4),
		0 20px 44px -10px rgba(0, 0, 0, 0.7),
		0 40px 80px -24px rgba(0, 0, 0, 0.75),
		0 0 0 1px rgba(139, 92, 246, 0.25),
		0 0 44px -8px rgba(139, 92, 246, 0.45);
	--cb-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------ */
/*  Reset + base                                                       */
/* ------------------------------------------------------------------ */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		radial-gradient(900px 480px at 85% -5%, rgba(139, 92, 246, 0.16), transparent 60%),
		radial-gradient(700px 420px at -10% 12%, rgba(59, 130, 246, 0.13), transparent 60%),
		var(--cb-bg);
	background-color: var(--cb-bg);
	color: var(--cb-text);
	font-family: var(--cb-font);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	color: var(--cb-cyan);
	text-decoration: none;
}

a:hover {
	color: var(--cb-heading);
}

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

p {
	margin: 0 0 1.1em;
}

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

figure {
	margin: 0 0 1.4em;
}

blockquote {
	margin: 1.6em 0;
	padding: 1.1em 1.4em;
	border-left: 4px solid var(--cb-primary);
	background: rgba(139, 92, 246, 0.08);
	border-radius: 0 var(--cb-radius-sm) var(--cb-radius-sm) 0;
	color: var(--cb-heading);
}

code {
	background: rgba(255, 255, 255, 0.07);
	padding: 0.15em 0.45em;
	border-radius: 6px;
	font-size: 0.9em;
}

pre {
	background: #0a0d1f;
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius-sm);
	padding: 1.2em;
	overflow: auto;
}

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

th,
td {
	padding: 0.7em 0.9em;
	border-bottom: 1px solid var(--cb-border);
	text-align: left;
}

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

button {
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--cb-cyan);
	outline-offset: 3px;
	border-radius: 6px;
}

.container {
	width: 100%;
	max-width: 1220px;
	margin: 0 auto;
	padding: 0 24px;
}

.container-narrow {
	max-width: 860px;
}

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

.skip-link {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 200;
	background: var(--cb-primary);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 16px;
	color: #fff;
}

/* ------------------------------------------------------------------ */
/*  Shared pieces: glass, eyebrow, gradient text, buttons, badges      */
/* ------------------------------------------------------------------ */

.glass {
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
	border: 1px solid var(--cb-border);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: var(--cb-shadow-3d);
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cb-cyan);
	background: rgba(34, 211, 238, 0.08);
	border: 1px solid rgba(34, 211, 238, 0.25);
	padding: 7px 14px;
	border-radius: 999px;
}

.eyebrow-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cb-cyan);
	box-shadow: 0 0 10px var(--cb-cyan);
}

.grad {
	background: linear-gradient(90deg, var(--cb-grad-from), var(--cb-grad-to), var(--cb-cyan));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 0.95rem;
	padding: 12px 22px;
	border-radius: 999px;
	border: 1px solid transparent;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	color: #fff;
	box-shadow:
		0 10px 24px -8px rgba(139, 92, 246, 0.65),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow:
		0 16px 32px -8px rgba(139, 92, 246, 0.75),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-ghost {
	background: rgba(255, 255, 255, 0.05);
	color: var(--cb-heading);
	border-color: var(--cb-border-strong);
}

.btn-ghost:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
}

.btn-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

.text-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--cb-cyan);
}

.text-link:hover {
	color: var(--cb-heading);
}

.cat-badge {
	display: inline-flex;
	align-items: center;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	padding: 5px 12px;
	border-radius: 999px;
	box-shadow: 0 6px 16px -6px rgba(139, 92, 246, 0.8);
}

.cat-badge:hover {
	color: #fff;
}

.cb-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	vertical-align: -4px;
}

.post-excerpt {
	color: var(--cb-muted);
	font-size: 0.95rem;
}

.post-author-avatar,
.avatar {
	border-radius: 50%;
	object-fit: cover;
}

/* ------------------------------------------------------------------ */
/*  Top bar + header                                                   */
/* ------------------------------------------------------------------ */

.topbar {
	background: rgba(255, 255, 255, 0.03);
	border-bottom: 1px solid var(--cb-border);
	font-size: 0.82rem;
	color: var(--cb-muted);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.topbar-date,
.topbar-social {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.topbar-icon {
	width: 15px;
	height: 15px;
	flex-basis: 15px;
}

.topbar-social a {
	color: var(--cb-muted);
	display: inline-flex;
	transition: color 0.2s ease, transform 0.2s ease;
}

.topbar-social a:hover {
	color: var(--cb-cyan);
	transform: translateY(-1px);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(7, 8, 18, 0.82);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--cb-border);
	transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
	box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.8);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 28px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.site-brand {
	flex: 0 0 auto;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--cb-heading);
}

.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 14px;
	font-weight: 900;
	font-size: 1.15rem;
	letter-spacing: -0.02em;
	color: #fff;
	background: linear-gradient(145deg, var(--cb-grad-from), var(--cb-grad-to));
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.22),
		0 10px 22px -6px rgba(139, 92, 246, 0.7),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
	transform: perspective(400px) rotateX(6deg) rotateY(-8deg);
	transition: transform 0.35s ease;
}

.brand-link:hover .brand-mark {
	transform: perspective(400px) rotateX(0deg) rotateY(0deg) scale(1.05);
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.brand-name {
	font-size: 1.35rem;
	font-weight: 900;
	letter-spacing: -0.03em;
}

.brand-accent {
	background: linear-gradient(90deg, var(--cb-grad-from), var(--cb-cyan));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.brand-tag {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cb-muted);
}

.custom-logo {
	height: 48px;
	width: auto;
	border-radius: 12px;
	box-shadow:
		0 0 0 1px rgba(139, 92, 246, 0.45),
		0 10px 24px -8px rgba(139, 92, 246, 0.6);
}

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

.primary-menu {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-menu > li {
	position: relative;
}

.primary-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--cb-text);
	font-weight: 600;
	font-size: 0.95rem;
	transition: background 0.2s ease, color 0.2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
	color: var(--cb-heading);
	background: rgba(255, 255, 255, 0.07);
}

.primary-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 6px 0 0;
	padding: 10px;
	background: var(--cb-card);
	border: 1px solid var(--cb-border-strong);
	border-radius: var(--cb-radius-sm);
	box-shadow: var(--cb-shadow-3d);
}

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

.primary-menu .sub-menu a {
	padding: 9px 12px;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.main-nav + .header-actions {
	margin-left: 0;
}

.search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--cb-border-strong);
	background: rgba(255, 255, 255, 0.05);
	color: var(--cb-heading);
	transition: transform 0.2s ease, background 0.2s ease;
}

.search-toggle:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-1px);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border-strong);
	border-radius: 12px;
}

.menu-bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--cb-heading);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-actions {
	display: none;
}

.search-overlay {
	border-top: 1px solid var(--cb-border);
	background: rgba(7, 8, 18, 0.95);
	padding: 18px 0;
}

.search-overlay-inner {
	display: flex;
	align-items: center;
	gap: 14px;
}

.search-overlay .search-form {
	flex: 1;
}

.search-form {
	display: flex;
	gap: 10px;
}

.search-field {
	flex: 1;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border-strong);
	border-radius: 999px;
	padding: 12px 20px;
	color: var(--cb-heading);
	outline: none;
	min-width: 0;
}

.search-field::placeholder {
	color: var(--cb-muted);
}

.search-field:focus {
	border-color: var(--cb-primary);
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.search-submit {
	border: 0;
	border-radius: 999px;
	padding: 12px 24px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	box-shadow: 0 10px 22px -8px rgba(139, 92, 246, 0.7);
}

.search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 50%;
	border: 1px solid var(--cb-border-strong);
	background: rgba(255, 255, 255, 0.05);
	color: var(--cb-heading);
}

/* ------------------------------------------------------------------ */
/*  Hero                                                               */
/* ------------------------------------------------------------------ */

.hero {
	position: relative;
	padding: 64px 0 40px;
	overflow: hidden;
}

.hero-glow {
	position: absolute;
	inset: -140px 0 auto 0;
	height: 420px;
	background:
		radial-gradient(560px 260px at 18% 30%, rgba(139, 92, 246, 0.35), transparent 70%),
		radial-gradient(520px 260px at 82% 20%, rgba(34, 211, 238, 0.22), transparent 70%);
	filter: blur(10px);
	pointer-events: none;
}

.hero-intro {
	position: relative;
	max-width: 860px;
	margin: 0 auto 40px;
	text-align: center;
}

.hero-title {
	font-size: clamp(2.1rem, 5.2vw, 3.6rem);
	margin: 18px 0 14px;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-sub {
	color: var(--cb-muted);
	font-size: 1.08rem;
	max-width: 720px;
	margin: 0 auto;
}

.hero-grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.65fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 22px;
}

.hero-feature {
	position: relative;
	grid-row: span 2;
	min-height: 480px;
	border-radius: var(--cb-radius);
	overflow: hidden;
	border: 1px solid var(--cb-border-strong);
	box-shadow: var(--cb-shadow-3d);
	background: var(--cb-card);
}

.hero-feature-media,
.hero-side-media {
	display: block;
	position: absolute;
	inset: 0;
}

.hero-feature-media img,
.hero-side-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.hero-feature:hover .hero-feature-media img,
.hero-side:hover .hero-side-media img {
	transform: scale(1.05);
}

.hero-feature-fallback,
.hero-side-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 4rem;
	font-weight: 900;
	color: rgba(255, 255, 255, 0.35);
	background: linear-gradient(145deg, #1b1040, #0b1e4b);
}

.hero-feature-body {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 20px;
	padding: 22px 24px;
	border-radius: var(--cb-radius-sm);
}

.hero-feature-meta,
.hero-side-meta,
.mag-card-meta,
.mini-card-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.82rem;
	color: var(--cb-muted);
	margin: 0 0 10px;
}

.hero-feature-meta .cb-icon,
.mag-card-meta .cb-icon {
	width: 15px;
	height: 15px;
	flex-basis: 15px;
}

.hero-feature-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.hero-feature-title {
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	margin: 0 0 10px;
}

.hero-feature-title a,
.hero-side-title a,
.mag-card-title a,
.mini-card-title a,
.list-entry-title a {
	color: var(--cb-heading);
}

.hero-feature-title a:hover,
.hero-side-title a:hover,
.mag-card-title a:hover,
.mini-card-title a:hover,
.list-entry-title a:hover {
	color: var(--cb-cyan);
}

.hero-feature-excerpt {
	color: var(--cb-text);
	font-size: 0.95rem;
}

.hero-feature-excerpt p {
	margin: 0;
}

.hero-feature-author {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: var(--cb-muted);
	margin: 14px 0 0;
}

.hero-feature-author .avatar {
	width: 32px;
	height: 32px;
	border: 2px solid rgba(255, 255, 255, 0.35);
}

.hero-side {
	position: relative;
	min-height: 225px;
	border-radius: var(--cb-radius);
	overflow: hidden;
	border: 1px solid var(--cb-border-strong);
	box-shadow: var(--cb-shadow-3d);
	background: var(--cb-card);
}

.hero-side::after,
.hero-feature::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(4, 5, 14, 0.88) 0%, rgba(4, 5, 14, 0.25) 55%, rgba(4, 5, 14, 0.05) 100%);
	pointer-events: none;
}

.hero-feature-body {
	z-index: 2;
}

.hero-side-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 20px 22px;
}

.hero-side-title {
	font-size: 1.12rem;
	margin: 0;
}

.hero-side-meta time {
	color: rgba(255, 255, 255, 0.75);
}

/* ------------------------------------------------------------------ */
/*  Trending strip + category chips                                    */
/* ------------------------------------------------------------------ */

.trending {
	padding: 10px 0 30px;
}

.trending-inner {
	display: flex;
	align-items: center;
	gap: 20px;
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	padding: 16px 22px;
	box-shadow: var(--cb-shadow-3d);
}

.trending-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	font-weight: 800;
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fb923c;
}

.trending-list {
	display: flex;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: thin;
}

.trending-item {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex: 0 0 auto;
	max-width: 320px;
}

.trending-rank {
	font-size: 1.6rem;
	font-weight: 900;
	line-height: 1;
	background: linear-gradient(180deg, var(--cb-grad-from), var(--cb-grad-to));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.trending-item a {
	color: var(--cb-text);
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.45;
}

.trending-item a:hover {
	color: var(--cb-cyan);
}

.cat-chips {
	padding: 6px 0 34px;
}

.cat-chips-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.88rem;
	color: var(--cb-text);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--cb-border);
	box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.7);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cat-chip:hover {
	color: var(--cb-heading);
	transform: translateY(-2px);
	border-color: rgba(139, 92, 246, 0.55);
	box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.5);
}

.cat-chip-count {
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--cb-cyan);
	background: rgba(34, 211, 238, 0.12);
	padding: 2px 8px;
	border-radius: 999px;
}

/* ------------------------------------------------------------------ */
/*  Section headings                                                   */
/* ------------------------------------------------------------------ */

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 26px;
}

.section-head-center {
	justify-content: center;
	text-align: center;
}

.section-title {
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	margin: 0;
}

.section-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 12px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--cb-grad-from), var(--cb-grad-to));
	box-shadow: 0 4px 14px rgba(139, 92, 246, 0.6);
}

.section-head-center .section-title::after {
	margin-left: auto;
	margin-right: auto;
}

.section-sub {
	color: var(--cb-muted);
	margin: 10px 0 0;
}

.section-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--cb-cyan);
}

.section-link:hover {
	color: var(--cb-heading);
}

.section-cta {
	text-align: center;
	margin-top: 36px;
}

/* ------------------------------------------------------------------ */
/*  Magazine sections + cards                                          */
/* ------------------------------------------------------------------ */

.mag-section {
	padding: 44px 0;
}

.mag-section-alt {
	background: var(--cb-bg-alt);
	border-top: 1px solid var(--cb-border);
	border-bottom: 1px solid var(--cb-border);
}

.mag-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 22px;
}

.mag-grid .mag-card:first-child {
	grid-row: span 3;
}

.mag-card {
	display: flex;
	flex-direction: column;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	overflow: hidden;
	box-shadow: var(--cb-shadow-3d);
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.mag-card:hover {
	transform: translateY(-8px);
	border-color: rgba(139, 92, 246, 0.4);
	box-shadow: var(--cb-shadow-lift);
}

.mag-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(145deg, #1b1040, #0b1e4b);
}

.mag-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.mag-card:hover .mag-card-thumb img {
	transform: scale(1.06);
}

.mag-card-thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 180px;
	font-size: 3rem;
	font-weight: 900;
	color: rgba(255, 255, 255, 0.3);
}

.mag-card-shine {
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 48%, transparent 62%);
	transform: translateX(-110%);
	transition: transform 0.8s ease;
	pointer-events: none;
}

.mag-card:hover .mag-card-shine {
	transform: translateX(110%);
}

.mag-card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 22px 22px;
	flex: 1;
}

.mag-card-meta time {
	color: var(--cb-muted);
}

.mag-card-title {
	font-size: 1.22rem;
	margin: 0 0 8px;
}

.mag-card .post-excerpt {
	flex: 1;
}

.mag-card .post-excerpt p {
	margin: 0;
}

.mag-card-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.83rem;
	color: var(--cb-muted);
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--cb-border);
}

.mag-card-foot .avatar,
.mag-card-foot .post-author-avatar {
	width: 28px;
	height: 28px;
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.mag-card-reading {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.mag-card-reading .cb-icon {
	width: 14px;
	height: 14px;
	flex-basis: 14px;
}

.mini-card {
	display: flex;
	gap: 16px;
	align-items: center;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius-sm);
	padding: 14px;
	box-shadow: var(--cb-shadow-3d);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.mini-card:hover {
	transform: translateY(-4px);
	border-color: rgba(139, 92, 246, 0.4);
	box-shadow: var(--cb-shadow-lift);
}

.mini-card-thumb {
	display: block;
	width: 132px;
	flex: 0 0 132px;
	aspect-ratio: 3 / 2;
	border-radius: 10px;
	overflow: hidden;
	background: linear-gradient(145deg, #1b1040, #0b1e4b);
}

.mini-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mini-card-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-weight: 900;
	color: rgba(255, 255, 255, 0.3);
}

.mini-card-body {
	min-width: 0;
}

.mini-card-meta {
	margin: 0 0 6px;
}

.mini-card-meta time {
	font-size: 0.78rem;
}

.mini-card-title {
	font-size: 1rem;
	margin: 0;
	line-height: 1.4;
}

.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.posts-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.list-entry {
	display: flex;
	gap: 22px;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	padding: 18px;
	box-shadow: var(--cb-shadow-3d);
	margin-bottom: 22px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-entry:hover {
	transform: translateY(-4px);
	box-shadow: var(--cb-shadow-lift);
}

.list-entry-thumb {
	display: block;
	width: 260px;
	flex: 0 0 260px;
	border-radius: var(--cb-radius-sm);
	overflow: hidden;
	background: linear-gradient(145deg, #1b1040, #0b1e4b);
}

.list-entry-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.list-entry-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 160px;
	font-size: 2.4rem;
	font-weight: 900;
	color: rgba(255, 255, 255, 0.3);
}

.list-entry-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.82rem;
	color: var(--cb-muted);
	margin: 0 0 8px;
}

.list-entry-title {
	font-size: 1.35rem;
	margin: 0 0 8px;
}

.list-entry-author {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: var(--cb-muted);
	margin: 14px 0 0;
}

.list-entry-author .avatar {
	width: 28px;
	height: 28px;
}

/* ------------------------------------------------------------------ */
/*  Latest section + CTA band                                          */
/* ------------------------------------------------------------------ */

.latest-section {
	padding: 56px 0 64px;
}

.cta-band {
	padding: 0 0 72px;
}

.cta-panel {
	position: relative;
	overflow: hidden;
	text-align: center;
	padding: 56px 40px;
	border-radius: 28px;
}

.cta-glow {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(480px 220px at 15% 0%, rgba(139, 92, 246, 0.35), transparent 70%),
		radial-gradient(480px 220px at 85% 100%, rgba(34, 211, 238, 0.25), transparent 70%);
	pointer-events: none;
}

.cta-panel .eyebrow,
.cta-title,
.cta-text,
.cta-actions {
	position: relative;
}

.cta-title {
	font-size: clamp(1.6rem, 3.6vw, 2.4rem);
	margin: 18px 0 12px;
}

.cta-text {
	color: var(--cb-muted);
	max-width: 640px;
	margin: 0 auto 28px;
}

.cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: center;
	margin: 0;
}

/* ------------------------------------------------------------------ */
/*  Archive pages + sidebar layout                                     */
/* ------------------------------------------------------------------ */

.archive-page {
	padding: 56px 0 72px;
}

.archive-head {
	max-width: 820px;
	margin: 0 0 40px;
}

.archive-title {
	font-size: clamp(1.9rem, 4.4vw, 3rem);
	margin: 16px 0 10px;
}

.archive-desc {
	color: var(--cb-muted);
	font-size: 1.05rem;
	margin: 0;
}

.archive-search {
	margin-top: 22px;
	max-width: 560px;
}

.layout-with-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 40px;
	align-items: start;
}

.layout-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: sticky;
	top: 96px;
}

.widget {
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	border: 1px solid var(--cb-border);
	border-radius: var(--cb-radius);
	padding: 24px;
	box-shadow: var(--cb-shadow-3d);
}

.widget-title {
	font-size: 1.05rem;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--cb-border);
}

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

.widget li {
	padding: 8px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.widget li a {
	color: var(--cb-text);
	font-weight: 500;
}

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

.widget .search-form {
	flex-direction: column;
}

.widget .search-submit {
	width: 100%;
}

.pagination {
	margin-top: 44px;
}

.pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 12px;
	font-weight: 700;
	color: var(--cb-text);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--cb-border);
	box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.7);
	transition: transform 0.2s ease, background 0.2s ease;
}

.pagination a:hover {
	transform: translateY(-2px);
	color: var(--cb-heading);
}

.pagination .current {
	color: #fff;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	border-color: transparent;
	box-shadow: 0 10px 22px -8px rgba(139, 92, 246, 0.7);
}

.pagination .dots {
	box-shadow: none;
	border-color: transparent;
	background: transparent;
}

/* ------------------------------------------------------------------ */
/*  Single post                                                        */
/* ------------------------------------------------------------------ */

.single-article {
	padding: 52px 0 72px;
}

.single-head {
	max-width: 880px;
	margin: 0 auto 30px;
	text-align: center;
}

.single-cats {
	margin: 0 0 16px;
}

.single-title {
	font-size: clamp(1.9rem, 4.6vw, 3.1rem);
	margin: 0 0 20px;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.single-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	color: var(--cb-muted);
	font-size: 0.9rem;
	margin: 0;
}

.single-meta .avatar {
	width: 40px;
	height: 40px;
	border: 2px solid rgba(139, 92, 246, 0.55);
	box-shadow: 0 6px 16px -6px rgba(139, 92, 246, 0.6);
}

.single-author a {
	color: var(--cb-heading);
	font-weight: 700;
}

.single-date,
.single-reading {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.single-date .cb-icon,
.single-reading .cb-icon {
	width: 15px;
	height: 15px;
	flex-basis: 15px;
}

.single-media {
	max-width: 1020px;
	margin: 0 auto 40px;
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid var(--cb-border-strong);
	box-shadow: var(--cb-shadow-3d);
}

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

.single-layout {
	margin-top: 8px;
}

.entry-content {
	font-size: 1.06rem;
}

.entry-content h2 {
	font-size: 1.7rem;
	margin-top: 2em;
}

.entry-content h3 {
	font-size: 1.35rem;
	margin-top: 1.8em;
}

.entry-content img {
	border-radius: var(--cb-radius-sm);
	box-shadow: var(--cb-shadow-3d);
}

.entry-content a {
	text-decoration: underline;
	text-decoration-color: rgba(34, 211, 238, 0.5);
	text-underline-offset: 3px;
}

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

.page-links {
	margin: 2em 0;
	font-weight: 700;
}

.page-links a,
.page-links > span {
	display: inline-block;
	margin: 0 4px;
}

.single-tags {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 36px 0 0;
	color: var(--cb-muted);
}

.single-tags a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cb-text);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.single-tags a:hover {
	transform: translateY(-2px);
	border-color: rgba(139, 92, 246, 0.55);
	color: var(--cb-heading);
}

.share-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 18px 24px;
	border-radius: var(--cb-radius-sm);
	margin: 28px 0;
}

.share-label {
	font-weight: 800;
	font-size: 0.9rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cb-heading);
}

.share-buttons {
	display: flex;
	gap: 10px;
}

.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid var(--cb-border-strong);
	background: rgba(255, 255, 255, 0.05);
	color: var(--cb-heading);
	transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.share-btn:hover {
	transform: translateY(-2px);
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	border-color: transparent;
	color: #fff;
}

.share-btn .cb-icon {
	width: 18px;
	height: 18px;
	flex-basis: 18px;
}

.share-btn.copied {
	background: rgba(16, 185, 129, 0.2);
	border-color: #10b981;
	color: #34d399;
}

.author-box {
	display: flex;
	gap: 22px;
	padding: 28px;
	border-radius: var(--cb-radius);
	margin: 28px 0 40px;
}

.author-box-avatar {
	flex: 0 0 96px;
}

.author-box-avatar .avatar,
.author-avatar-img {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(139, 92, 246, 0.55);
	box-shadow: 0 12px 26px -8px rgba(139, 92, 246, 0.6);
}

.author-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	font-size: 1.8rem;
	font-weight: 900;
	color: #fff;
	background: linear-gradient(145deg, var(--cb-grad-from), var(--cb-grad-to));
}

.author-box-label {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cb-cyan);
}

.author-box-name {
	font-size: 1.3rem;
	margin: 6px 0 8px;
}

.author-box-name a {
	color: var(--cb-heading);
}

.author-box-bio {
	color: var(--cb-muted);
	margin: 0 0 12px;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 0 0 48px;
}

.post-nav-item {
	display: block;
	padding: 20px 22px;
	border-radius: var(--cb-radius-sm);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-nav-item:hover {
	transform: translateY(-3px);
	box-shadow: var(--cb-shadow-lift);
}

.post-nav-next {
	text-align: right;
}

.post-nav-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cb-cyan);
	margin-bottom: 8px;
}

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

.post-nav-title {
	color: var(--cb-heading);
	font-weight: 700;
	line-height: 1.45;
}

.related-posts {
	margin: 0 0 48px;
}

.related-posts .section-title {
	margin-bottom: 26px;
}

/* Comments */
.comments-area {
	padding: 32px;
	border-radius: var(--cb-radius);
	margin: 0 0 40px;
}

.comments-title,
.comment-reply-title {
	font-size: 1.4rem;
}

.comment-list {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 18px 0 0 28px;
	padding: 0;
}

.comment {
	padding: 20px 0;
	border-bottom: 1px solid var(--cb-border);
}

.comment:last-child {
	border-bottom: 0;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

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

.comment-metadata {
	font-size: 0.82rem;
	color: var(--cb-muted);
	margin-bottom: 10px;
}

.comment-content p {
	margin: 0 0 0.8em;
}

.comment-reply-link {
	font-weight: 700;
	font-size: 0.88rem;
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border-strong);
	border-radius: 12px;
	padding: 12px 16px;
	color: var(--cb-heading);
	outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--cb-primary);
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.comment-form .submit {
	border: 0;
	border-radius: 999px;
	padding: 12px 28px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	box-shadow: 0 10px 22px -8px rgba(139, 92, 246, 0.7);
	transition: transform 0.2s ease;
}

.comment-form .submit:hover {
	transform: translateY(-2px);
}

/* ------------------------------------------------------------------ */
/*  Pages, 404, no results                                             */
/* ------------------------------------------------------------------ */

.page-article {
	padding: 56px 0 72px;
}

.page-head {
	margin-bottom: 30px;
	text-align: center;
}

.page-title {
	font-size: clamp(1.9rem, 4.4vw, 3rem);
}

.page-media {
	border-radius: 24px;
	overflow: hidden;
	border: 1px solid var(--cb-border-strong);
	box-shadow: var(--cb-shadow-3d);
	margin-bottom: 36px;
}

.error-page {
	padding: 80px 0 96px;
}

.error-panel {
	text-align: center;
	padding: 64px 40px;
	border-radius: 28px;
}

.error-code {
	display: block;
	font-size: clamp(4.5rem, 14vw, 8rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.04em;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to), var(--cb-cyan));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: 0 20px 60px rgba(139, 92, 246, 0.35);
}

.error-title {
	font-size: clamp(1.5rem, 3.4vw, 2.2rem);
	margin: 14px 0 10px;
}

.error-text {
	color: var(--cb-muted);
	max-width: 520px;
	margin: 0 auto 26px;
}

.error-search {
	max-width: 520px;
	margin: 0 auto 28px;
}

.error-actions {
	margin: 0;
}

.no-results {
	text-align: center;
	padding: 48px 32px;
	border-radius: var(--cb-radius);
}

.no-results-title {
	font-size: 1.5rem;
}

.no-results-search {
	max-width: 520px;
	margin: 0 auto 24px;
}

/* ------------------------------------------------------------------ */
/*  Footer                                                             */
/* ------------------------------------------------------------------ */

.site-footer {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.35));
	border-top: 1px solid var(--cb-border);
	padding: 64px 0 0;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 48px;
}

.footer-brand-link {
	margin-bottom: 16px;
}

.footer-logo-img {
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
	object-fit: cover;
	border-radius: 14px;
}

.logo-3d {
	border-radius: 14px;
	box-shadow:
		0 0 0 1px rgba(139, 92, 246, 0.5),
		0 12px 26px -8px rgba(139, 92, 246, 0.65),
		inset 0 1px 0 rgba(255, 255, 255, 0.3);
	transform: perspective(400px) rotateX(6deg) rotateY(-8deg);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.footer-brand-link:hover .logo-3d {
	transform: perspective(400px) rotateX(0deg) rotateY(0deg) scale(1.05);
}

.footer-about {
	color: var(--cb-muted);
	font-size: 0.94rem;
}

.footer-social {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	color: var(--cb-heading);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border-strong);
	box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7);
	transition: transform 0.2s ease, background 0.2s ease;
}

.footer-social a:hover {
	transform: translateY(-3px);
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	border-color: transparent;
}

.footer-social .cb-icon {
	width: 18px;
	height: 18px;
	flex-basis: 18px;
}

.footer-heading {
	font-size: 1rem;
	margin: 0 0 18px;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li {
	margin-bottom: 10px;
}

.footer-menu a {
	color: var(--cb-muted);
	font-size: 0.94rem;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-menu a:hover {
	color: var(--cb-cyan);
	padding-left: 4px;
}

.footer-cat-count {
	color: var(--cb-muted);
	font-size: 0.82rem;
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	padding-bottom: 24px;
	border-top: 1px solid var(--cb-border);
}

.footer-copy {
	color: var(--cb-muted);
	font-size: 0.88rem;
	margin: 0;
}

.back-to-top {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(135deg, var(--cb-grad-from), var(--cb-grad-to));
	box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.7);
	transition: transform 0.25s ease;
}

.back-to-top:hover {
	color: #fff;
	transform: translateY(-4px);
}

/* ------------------------------------------------------------------ */
/*  3D tilt layer (JS adds --rx / --ry on .tilt-card)                  */
/* ------------------------------------------------------------------ */

.tilt-card {
	transform-style: preserve-3d;
	will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
	.tilt-card[data-tilt] {
		transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
	}

	.tilt-card[data-tilt].tilting {
		transition: transform 0.08s linear;
		transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	}
}

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */

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

	.hero-feature {
		grid-column: span 2;
		grid-row: auto;
		min-height: 420px;
	}

	.posts-grid,
	.posts-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.mag-grid {
		grid-template-columns: 1fr;
	}

	.mag-grid .mag-card:first-child {
		grid-row: auto;
	}

	.layout-with-sidebar {
		grid-template-columns: 1fr;
	}

	.layout-sidebar {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

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

	.header-cta {
		display: none;
	}

	.main-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(7, 8, 18, 0.97);
		backdrop-filter: blur(16px);
		border-bottom: 1px solid var(--cb-border-strong);
		padding: 16px 24px 24px;
		box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.8);
	}

	.main-nav.open {
		display: block;
	}

	.primary-menu {
		flex-direction: column;
		align-items: stretch;
	}

	.primary-menu .sub-menu {
		position: static;
		display: block;
		box-shadow: none;
		border: 0;
		background: transparent;
		margin: 0;
		padding: 0 0 0 16px;
	}

	.nav-mobile-actions {
		display: block;
		margin-top: 16px;
		padding-top: 16px;
		border-top: 1px solid var(--cb-border);
	}

	.hero {
		padding: 44px 0 32px;
	}

	.hero-grid {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.hero-feature {
		grid-column: auto;
		min-height: 380px;
	}

	.hero-side {
		min-height: 200px;
	}

	.trending-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.trending-list {
		width: 100%;
	}

	.post-nav {
		grid-template-columns: 1fr;
	}

	.post-nav-next {
		text-align: left;
	}

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

	.author-box {
		flex-direction: column;
		align-items: flex-start;
	}

	.list-entry {
		flex-direction: column;
	}

	.list-entry-thumb {
		width: 100%;
		flex-basis: auto;
	}
}

@media (max-width: 560px) {
	body {
		font-size: 16px;
	}

	.container {
		padding: 0 18px;
	}

	.posts-grid,
	.posts-grid-3 {
		grid-template-columns: 1fr;
	}

	.layout-sidebar {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.footer-bottom {
		flex-direction: column;
		text-align: center;
	}

	.topbar-date {
		font-size: 0.76rem;
	}

	.brand-tag {
		display: none;
	}

	.hero-feature-body {
		left: 12px;
		right: 12px;
		bottom: 12px;
		padding: 18px;
	}

	.cta-panel {
		padding: 40px 22px;
	}

	.comments-area {
		padding: 22px 18px;
	}

	.mini-card-thumb {
		width: 100px;
		flex-basis: 100px;
	}
}

/* ------------------------------------------------------------------ */
/*  Reduced motion                                                     */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.tilt-card[data-tilt].tilting {
		transform: none;
	}

	.mag-card:hover,
	.mini-card:hover,
	.list-entry:hover,
	.post-nav-item:hover,
	.btn-primary:hover,
	.btn-ghost:hover {
		transform: none;
	}
}
