:root {
	--ink: #f4f8fb;
	--text: #d4e2ec;
	--muted: #99b0c2;
	--deep: #071727;
	--deep-soft: rgba(7, 23, 39, 0.82);
	--panel: rgba(8, 28, 48, 0.68);
	--panel-soft: rgba(14, 46, 74, 0.5);
	--line: rgba(201, 229, 246, 0.24);
	--line-strong: rgba(201, 229, 246, 0.42);
	--blue: #87c8ee;
	--blue-deep: #1d6b9e;
	--white: #ffffff;
	--shadow: 0 10px 34px rgba(0, 7, 18, 0.2);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	width: 100%;
	overflow-x: hidden;
}

body {
	margin: 0;
	width: 100%;
	overflow-x: hidden;
	min-height: 100vh;
	background-color: #061427;
	background-image:
		linear-gradient(180deg, rgba(3, 11, 24, 0.06), rgba(3, 11, 24, 0.58) 64%, rgba(3, 11, 24, 0.88)),
		url("../images/space-pages-background.png");
	background-position: center top, center top;
	background-repeat: no-repeat, no-repeat;
	background-size: cover, cover;
	background-attachment: scroll, scroll;
	color: var(--ink);
	font-family: "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.65;
	isolation: isolate;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(circle at 14% 18%, rgba(91, 163, 207, 0.18), transparent 30%),
		radial-gradient(circle at 72% 12%, rgba(255, 255, 255, 0.12), transparent 24%),
		radial-gradient(circle at 50% 64%, rgba(56, 130, 178, 0.16), transparent 34%),
		linear-gradient(90deg, rgba(5, 20, 34, 0.34), transparent 36%, rgba(5, 20, 34, 0.2));
	pointer-events: none;
}

body::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, 0.74) 0 1px, transparent 1.4px),
		radial-gradient(circle, rgba(135, 200, 238, 0.55) 0 1px, transparent 1.6px),
		radial-gradient(circle, rgba(255, 255, 255, 0.32) 0 1px, transparent 1.5px);
	background-position: 0 0, 34px 58px, 92px 18px;
	background-size: 180px 180px, 260px 260px, 360px 360px;
	opacity: 0.38;
	pointer-events: none;
	animation: star-drift 90s linear infinite;
}

@keyframes star-drift {
	from {
		background-position: 0 0, 34px 58px, 92px 18px;
	}

	to {
		background-position: -80px 56px, -46px 114px, 12px 74px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body::after {
		animation: none;
	}
}

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

.site-main,
.home-flow,
.flow-shell,
.latest-book,
.reader-band,
.lower-flow,
.site-footer {
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

p {
	margin: 0 0 1rem;
	color: var(--text);
}

h1,
h2,
h3 {
	margin: 0;
	color: var(--ink);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 500;
	line-height: 1.08;
}

h1 {
	font-size: clamp(2.8rem, 6.2vw, 6.1rem);
}

h2 {
	font-size: clamp(1.75rem, 3vw, 3rem);
}

h3 {
	font-size: 1.35rem;
}

input,
button {
	font: inherit;
}

.container {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 1rem;
	z-index: 40;
	padding: 0.75rem 1rem;
	background: var(--white);
	color: var(--deep);
}

.skip-link:focus {
	left: 1rem;
}

.site-header {
	width: min(1120px, calc(100% - 32px));
	margin: 28px auto 0;
	border: 1px solid var(--line);
	background: rgba(7, 23, 39, 0.7);
	box-shadow: 0 8px 24px rgba(0, 7, 18, 0.18);
	backdrop-filter: blur(8px);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 82px;
	gap: 1.25rem;
	padding: 0 28px;
}

.brand,
.footer-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
	font-weight: 700;
}

.brand-mark {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 1px solid var(--blue);
	background: rgba(255, 255, 255, 0.08);
	color: var(--blue);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 0.95rem;
}

.brand-name {
	color: var(--ink);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.3rem, 2vw, 1.9rem);
	font-weight: 500;
}

.primary-nav ul,
.site-footer ul {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a,
.site-footer a {
	display: inline-flex;
	padding: 0.35rem 0.65rem;
	color: var(--text);
	font-size: 0.92rem;
	font-weight: 600;
}

.primary-nav a:hover,
.site-footer a:hover,
.text-link:hover {
	color: var(--blue);
}

.menu-toggle {
	display: none;
	width: 42px;
	height: 42px;
	border: 1px solid var(--line-strong);
	background: transparent;
}

.menu-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	margin: 4px auto;
	background: var(--blue);
}

.home-flow {
	padding: 24px 0 30px;
}

.flow-shell {
	display: grid;
	gap: clamp(1rem, 2.4vw, 1.6rem);
	background: transparent;
}

.latest-book,
.bio-panel,
.signup-panel,
.events-panel,
.blog-panel,
.connect-panel {
	border: 1px solid var(--line);
	background: var(--panel);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(3px);
}

.latest-book {
	display: grid;
	grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.8rem);
	min-height: 430px;
	padding: clamp(2.4rem, 6vw, 5.4rem);
}

.book-cover {
	display: grid;
	place-items: center;
}

.book-cover img {
	width: min(220px, 100%);
	aspect-ratio: 2 / 3;
	border: 1px solid var(--line-strong);
	background: var(--deep);
	object-fit: cover;
	box-shadow: 0 20px 46px rgba(0, 7, 18, 0.36);
}

.book-icon {
	position: relative;
	display: block;
	width: 142px;
	height: 176px;
	border: 6px solid var(--ink);
	border-left-width: 12px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 12px 14px 0 rgba(135, 200, 238, 0.16);
}

.book-icon::before,
.book-icon::after {
	content: "";
	position: absolute;
	left: 29px;
	right: 24px;
	height: 6px;
	border-radius: 999px;
	background: var(--deep);
}

.book-icon::before {
	top: 38px;
}

.book-icon::after {
	top: 59px;
}

.book-intro {
	max-width: 680px;
}

.book-intro p {
	max-width: 620px;
	font-size: 1.08rem;
}

.kicker,
.meta {
	margin-bottom: 0.75rem;
	color: var(--blue);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.button-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	margin-top: 1.45rem;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.64rem 1.1rem;
	border: 1px solid var(--blue);
	background: var(--blue);
	color: var(--deep);
	font-weight: 800;
	cursor: pointer;
}

.button:hover {
	background: var(--white);
	border-color: var(--white);
}

.text-link {
	color: var(--blue);
	font-weight: 800;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.reader-band {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
	gap: clamp(1rem, 2.4vw, 1.6rem);
}

.bio-panel,
.signup-panel,
.events-panel,
.blog-panel,
.connect-panel {
	padding: clamp(1.7rem, 4vw, 3rem);
}

.signup-panel,
.connect-panel {
	background: rgba(12, 40, 65, 0.7);
}

.bio-panel {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

.headshot-frame {
	display: grid;
	width: 116px;
	aspect-ratio: 1;
	place-items: center;
	border: 1px solid var(--line-strong);
	background: rgba(255, 255, 255, 0.08);
}

.headshot-frame span {
	position: relative;
	width: 66px;
	height: 66px;
	border: 2px solid var(--blue);
	border-radius: 999px 999px 18px 18px;
}

.headshot-frame span::before,
.headshot-frame span::after {
	content: "";
	position: absolute;
	top: 22px;
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: var(--blue);
}

.headshot-frame span::before {
	left: 19px;
}

.headshot-frame span::after {
	right: 19px;
}

.signup-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.65rem;
	margin-top: 1.2rem;
}

.signup-form label {
	display: grid;
	gap: 0.25rem;
}

.signup-form label:first-child,
.signup-form label:nth-child(2) {
	grid-column: 1;
}

.signup-form .button {
	grid-column: 2;
	grid-row: 2;
}

.signup-form span,
.search-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.signup-form input,
.search-form input {
	width: 100%;
	min-height: 44px;
	border: 1px solid var(--line-strong);
	background: rgba(255, 255, 255, 0.92);
	color: var(--deep);
	padding: 0.58rem 0.75rem;
}

.lower-flow {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.74fr);
	gap: clamp(1rem, 2.4vw, 1.6rem);
}

.events-panel {
	min-height: 360px;
}

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

.event-list li {
	padding: 0.95rem 0;
	border-top: 1px solid var(--line);
	color: var(--text);
}

.side-stack {
	display: grid;
	grid-template-rows: 1fr auto;
	gap: clamp(1rem, 2.4vw, 1.6rem);
}

.blog-panel h2 {
	margin-bottom: 0.5rem;
}

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1rem;
}

.social-links a {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.08);
	color: var(--ink);
	font-size: 0.82rem;
	font-weight: 800;
}

.page-hero,
.section {
	padding: 30px 0;
}

.page-hero .container,
.section > .container {
	border: 1px solid var(--line);
	background: var(--panel);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
	padding: clamp(1.7rem, 4vw, 3rem);
}

.hero-summary {
	max-width: 760px;
	margin-top: 1rem;
	font-size: 1.1rem;
}

.section-heading {
	margin-bottom: 1.3rem;
}

.book-grid,
.content-grid,
.posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.content-card,
.book-card,
.contact-panel {
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--panel);
}

.book-card h2,
.content-card h2 {
	margin-bottom: 0.65rem;
	font-size: 1.45rem;
}

.book-card-media,
.content-card-media {
	display: grid;
	min-height: 230px;
	place-items: center;
	background: rgba(255, 255, 255, 0.08);
	color: var(--blue);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2rem;
	font-weight: 700;
}

.book-card-media img,
.content-card-media img {
	width: 100%;
	height: 230px;
	object-fit: cover;
}

.book-card-body,
.content-card-body,
.contact-panel {
	padding: 1.25rem;
}

.split {
	display: grid;
	grid-template-columns: 0.82fr 1.18fr;
	gap: 2rem;
	align-items: start;
}

.narrow-content {
	max-width: 760px;
}

.narrow-content a {
	color: var(--blue);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.narrow-content h2,
.narrow-content h3 {
	margin: 2rem 0 0.8rem;
}

.featured-image {
	margin-top: 2rem;
}

.featured-image img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}

.pagination {
	grid-column: 1 / -1;
}

.site-footer {
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto 32px;
	border: 1px solid var(--line);
	background: rgba(7, 23, 39, 0.7);
	box-shadow: 0 8px 24px rgba(0, 7, 18, 0.18);
	backdrop-filter: blur(8px);
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(360px, 1fr) minmax(320px, 0.9fr) minmax(220px, 0.65fr);
	gap: 20px;
	align-items: center;
	padding: 18px 28px;
}

.footer-brand {
	display: none;
}

.site-footer ul {
	flex-wrap: wrap;
	gap: 0.35rem;
}

.footer-extra {
	min-height: 54px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.06);
	padding: 0.65rem 0.75rem;
	color: var(--text);
	font-size: 0.92rem;
}

.search-form {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.search-form label {
	width: min(240px, 100%);
}

.footer-bottom {
	padding: 0 28px 16px;
}

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

@media (max-width: 920px) {
	.menu-toggle {
		display: block;
	}

	.primary-nav {
		position: absolute;
		left: 0;
		right: 0;
		top: 82px;
		display: none;
		padding: 0.8rem 28px 1rem;
		border-top: 1px solid var(--line);
		background: rgba(7, 23, 39, 0.96);
	}

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

	.primary-nav ul {
		display: grid;
	}

	.primary-nav a {
		display: block;
		padding: 0.65rem 0;
	}

	.latest-book,
	.reader-band,
	.lower-flow,
	.split,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.book-grid,
	.content-grid,
	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.container,
	.site-header,
	.site-footer {
		width: min(100% - 20px, 1120px);
	}

	.header-inner,
	.latest-book,
	.bio-panel,
	.signup-panel,
	.events-panel,
	.blog-panel,
	.connect-panel,
	.footer-grid,
	.page-hero .container,
	.section > .container {
		padding: 20px;
	}

	.brand-name {
		max-width: 190px;
	}

	.bio-panel,
	.signup-form,
	.book-grid,
	.content-grid,
	.posts-grid {
		grid-template-columns: 1fr;
	}

	.signup-form .button,
	.signup-form label:first-child,
	.signup-form label:nth-child(2) {
		grid-column: auto;
		grid-row: auto;
	}

	.button {
		width: 100%;
	}
}
