:root {
	--bg: #06090f;
	--bg-soft: #0d1220;
	--panel: rgba(12, 18, 30, 0.92);
	--line: rgba(110, 255, 88, 0.16);
	--accent: #78ff46;
	--accent-soft: #d8ff70;
	--ink: #e9eef7;
	--muted: #95a3bb;
	--radius: 26px;
	--shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
	--max: 1320px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at top left, rgba(120, 255, 70, 0.12), transparent 22%),
		radial-gradient(circle at 85% 12%, rgba(64, 174, 255, 0.14), transparent 20%),
		linear-gradient(180deg, #04060b 0%, #0b0f18 48%, #05070c 100%);
	color: var(--ink);
	font-family: "Space Grotesk", sans-serif;
	line-height: 1.65;
	overflow-x: hidden;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.75rem;
	font-family: "Cinzel", serif;
	line-height: 1.08;
	color: #fff;
}

p {
	margin: 0 0 1rem;
}

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

.container {
	width: 100%;
	max-width: var(--max);
	padding-inline: 1rem;
	margin: 0 auto;
}

.site-content,
.site-main,
.frontpage-main {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.site-content {
	padding: 2rem 0 4rem;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background: rgba(5, 7, 12, 0.84);
	backdrop-filter: blur(16px);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 0;
}

.brand-lockup,
.header-topline,
.header-meta,
.footer-bottom,
.hero-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.brand-lockup,
.header-controls {
	min-width: 0;
}

.header-controls {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.85rem;
}

.header-topline,
.header-meta {
	width: 100%;
	justify-content: flex-end;
}

.brand-orb,
.brand-mark img,
.brand-mark .custom-logo {
	width: 64px;
	height: 64px;
	border-radius: 50%;
}

.brand-orb {
	display: inline-block;
	background:
		radial-gradient(circle at 35% 30%, #f5ffd8, transparent 22%),
		linear-gradient(150deg, var(--accent), #219cff);
	box-shadow: 0 0 30px rgba(120, 255, 70, 0.22);
}

.brand-kicker,
.social-label,
.section-tag {
	font-size: 0.78rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
}

.brand-title {
	font-size: clamp(1.1rem, 2vw, 1.55rem);
	font-weight: 800;
	color: #fff;
}

.primary-nav .menu,
.footer-nav .menu,
.social-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a,
.footer-nav a,
.social-menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.72rem 1rem;
	border-radius: 999px;
	color: var(--ink);
	background: rgba(255, 255, 255, 0.04);
}

.social-menu a {
	padding: 0.65rem 0.9rem;
}

.primary-nav a:hover,
.footer-nav a:hover,
.social-menu a:hover {
	color: var(--accent);
	background: rgba(120, 255, 70, 0.1);
}

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
}

.menu-toggle span:not(.screen-reader-text) {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
}

.header-search {
	flex: 0 1 24rem;
	min-width: 16rem;
}

.search-form {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.6rem;
}

.search-form label {
	flex: 1 1 auto;
}

.search-field,
textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"] {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
}

button,
input[type="submit"],
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.15rem;
	border: 0;
	border-radius: 999px;
	font-weight: 700;
	cursor: pointer;
}

.search-submit,
.button-primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-soft));
	color: #091008;
}

.button-secondary {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(120, 255, 70, 0.16);
	color: var(--ink);
}

.cauldron-panel,
.widget,
.comments-area {
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
		linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(10, 14, 22, 0.94));
	box-shadow: var(--shadow);
	overflow: hidden;
}

.home-hero,
.spotlight-grid,
.featured-grid,
.post-grid,
.hub-grid,
.footer-grid,
.hub-shell,
.archive-card-grid {
	display: grid;
	gap: 1rem;
}

.home-hero {
	grid-template-columns: 1.2fr 0.8fr;
}

.spotlight-grid {
	grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
	align-items: start;
}

.featured-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.hub-grid,
.footer-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-shell {
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	align-items: start;
}

.archive-card-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-hero-main,
.entry-card,
.page-header,
.section-panel,
.hub-card,
.footer-intro,
.footer-widgets,
.widget,
.comments-area {
	padding: clamp(1.35rem, 2vw, 2rem);
}

.home-hero-side {
	display: grid;
	gap: 1rem;
}

.hero-stat-grid,
.spotlight-side,
.spotlight-main,
.home-focus-grid {
	display: grid;
	gap: 1rem;
}

.hero-note,
.frontpage-spotlight-card,
.stream-card {
	padding: clamp(1.2rem, 1.8vw, 1.7rem);
}

.hub-main,
.hub-sidebar,
.stack-list {
	display: grid;
	gap: 1rem;
}

.doc-shell {
	align-items: start;
}

.home-focus-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-column-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nested-panel {
	padding: 1.2rem 1.35rem;
}

.home-hero-main h1 {
	font-size: clamp(2.4rem, 5vw, 5rem);
	max-width: 9ch;
}

.hero-text {
	max-width: 52rem;
	font-size: clamp(1rem, 1.45vw, 1.16rem);
	color: #d7dfea;
}

.hero-note {
	display: grid;
	gap: 1rem;
}

.hero-list,
.story-list {
	display: grid;
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hero-list li {
	position: relative;
	padding-left: 1.1rem;
	color: #dce4f0;
}

.hero-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75rem;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--accent);
}

.hero-side-note {
	margin-bottom: 0;
	color: var(--muted);
}

.post-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}

.post-media {
	aspect-ratio: 16 / 10;
	border-radius: 22px;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(120, 255, 70, 0.08), rgba(33, 156, 255, 0.12));
}

.post-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 1.1rem;
	min-width: 0;
}

.frontpage-spotlight-card .post-copy {
	padding-top: 1.3rem;
}

.spotlight-title {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	line-height: 1.12;
}

.spotlight-excerpt {
	font-size: 1.04rem;
	color: #dce4f0;
	max-width: 52rem;
}

.spotlight-side {
	align-content: start;
}

.story-list-item {
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.story-list-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.story-list-date {
	margin-bottom: 0.45rem;
	font-size: 0.84rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.story-list-item h3 {
	font-size: 1.02rem;
	line-height: 1.3;
}

.story-list-item p {
	margin-bottom: 0;
	color: #d3dceb;
	font-size: 0.95rem;
}

.frontpage-stream-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.stream-card {
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
		linear-gradient(180deg, rgba(15, 19, 28, 0.96), rgba(10, 14, 22, 0.94));
}

.stream-card .post-copy {
	padding-top: 0;
}

.post-title,
.entry-content,
.post-copy p,
.hero-text,
.page-intro {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.card-subtitle {
	margin: -0.15rem 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.meta-chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.meta-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.7rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.05);
	color: var(--muted);
	font-size: 0.82rem;
}

.page-header h1 {
	margin-bottom: 0.5rem;
}

.page-intro,
.archive-description {
	max-width: 68rem;
	color: #d6ddeb;
}

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

.entry-header {
	display: grid;
	gap: 0.75rem;
}

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

.doc-stat-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-sidebar .widget:empty {
	display: none;
}

.doc-nav-card {
	padding: 1.35rem;
}

.doc-toc-list {
	display: grid;
	gap: 0.55rem;
	padding-left: 1.2rem;
	margin: 0;
}

.doc-toc-list li {
	color: var(--muted);
}

.doc-toc-list li.is-current {
	color: var(--accent);
	font-weight: 700;
}

.doc-toc-list a {
	color: inherit;
}

.doc-module-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.doc-pager {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.doc-pager-link {
	display: grid;
	gap: 0.45rem;
	padding: 1rem 1.15rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
}

.doc-pager-link.is-next {
	text-align: right;
}

.doc-pager-link:hover {
	border-color: rgba(120, 255, 70, 0.18);
	background: rgba(120, 255, 70, 0.08);
}

.nav-links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.nav-links a,
.nav-links .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	padding: 0.7rem 0.9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ink);
}

.nav-links .current {
	background: rgba(120, 255, 70, 0.14);
	color: var(--accent);
}

.entry-meta,
.site-info {
	color: var(--muted);
	font-size: 0.92rem;
}

.entry-thumbnail {
	margin: 1.5rem 0;
	border-radius: 22px;
	overflow: hidden;
}

.comment-list {
	display: grid;
	gap: 1rem;
	padding-left: 1.2rem;
}

.site-footer {
	padding: 0 0 2rem;
}

@media (max-width: 1180px) {
	.featured-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.home-hero,
	.spotlight-grid,
	.footer-grid,
	.hub-shell {
		grid-template-columns: 1fr;
	}

	.archive-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 920px) {
	.post-grid,
	.hub-grid,
	.featured-grid,
	.doc-stat-grid,
	.compact-grid,
	.two-column-grid,
	.home-focus-grid,
	.frontpage-stream-grid,
	.archive-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

	.header-inner {
		flex-wrap: wrap;
	}

	.header-controls,
	.header-topline,
	.header-meta {
		width: 100%;
		align-items: stretch;
	}

	.header-topline {
		flex-direction: column;
	}

	.header-meta,
	.social-menu {
		justify-content: flex-start;
	}

	.header-search {
		min-width: 0;
	}

	.search-form {
		flex-wrap: wrap;
	}

	.primary-nav {
		position: absolute;
		top: calc(100% + 0.5rem);
		right: 1rem;
		left: 1rem;
		padding: 1rem;
		border: 1px solid rgba(120, 255, 70, 0.14);
		border-radius: 22px;
		background: rgba(8, 12, 20, 0.97);
		box-shadow: var(--shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
	}

	.primary-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

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

	.post-grid,
	.hub-grid,
	.featured-grid,
	.doc-stat-grid,
	.compact-grid,
	.two-column-grid,
	.home-focus-grid,
	.frontpage-stream-grid,
		.archive-card-grid {
		grid-template-columns: 1fr;
	}

	.doc-pager {
		grid-template-columns: 1fr;
	}

	.doc-pager-link.is-next {
		text-align: left;
	}
}
