/*
Theme Name: Penman Blue
Theme URI: https://penmanblue.com
Author: Penman Blue
Description: A custom "Cosmic Night" theme for sci-fi humour author Penman Blue: free and members-only stories, a mailing list that unlocks stories, the upcoming novel with its characters, and every text editable in Appearance > Customize > Penman Blue.
Version: 1.4.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: penmanblue
*/

:root {
	--bg: #070B1F;
	--bg2: #0E1433;
	--card: rgba(255, 255, 255, .045);
	--card-hover: rgba(255, 255, 255, .075);
	--text: #EAF0FF;
	--muted: #9AA6CF;
	--blue: #3D8BFF;
	--purple: #A66BFF;
	--line: rgba(234, 240, 255, .10);
	--line2: rgba(234, 240, 255, .18);
	--grad: linear-gradient(90deg, #3D8BFF, #A66BFF);
	--fh: 'Space Grotesk', system-ui, sans-serif;
	--fb: 'Inter', system-ui, sans-serif;
	--fr: 'Literata', Georgia, 'Times New Roman', serif;
	--radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--fb);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background:
		radial-gradient(900px 500px at 80% -10%, rgba(166, 107, 255, .25), transparent 60%),
		radial-gradient(700px 500px at 0% 40%, rgba(61, 139, 255, .16), transparent 60%),
		var(--bg);
	background-attachment: fixed;
	min-height: 100vh;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #9CC3FF; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--fh); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: rgba(166, 107, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto; z-index: 100; background: #fff; color: var(--bg); padding: 10px 16px; border-radius: 8px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; position: relative; }
.wrap.narrow { max-width: 760px; }

/* Stars */
.sky {
	position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .9;
	background-image:
		radial-gradient(1.5px 1.5px at 10% 20%, #fff9 50%, transparent 51%),
		radial-gradient(1px 1px at 25% 65%, #fff7 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 45% 35%, #fff9 50%, transparent 51%),
		radial-gradient(1px 1px at 65% 80%, #fff7 50%, transparent 51%),
		radial-gradient(2px 2px at 85% 25%, #A66BFFcc 50%, transparent 51%),
		radial-gradient(1px 1px at 92% 60%, #fff8 50%, transparent 51%),
		radial-gradient(1px 1px at 55% 10%, #fff6 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 33% 90%, #9CC3FFaa 50%, transparent 51%);
	background-size: 420px 300px;
	animation: twinkle 9s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .55; } }
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 22px; border: 0; border-radius: 12px; cursor: pointer;
	font: 700 15px/1.2 var(--fb); text-decoration: none; color: #fff;
	background: var(--grad); box-shadow: 0 8px 24px rgba(61, 139, 255, .25);
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(166, 107, 255, .35); filter: brightness(1.08); }
.btn.ghost { background: transparent; border: 1px solid var(--line2); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* Header */
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 78px; }
.logo {
	font-family: var(--fh); font-size: 26px; font-weight: 700; letter-spacing: .5px; text-decoration: none; text-transform: uppercase;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo:hover { color: transparent; }
.logo b { font-weight: 700; }
.logo img { max-height: 48px; width: auto; }
.logo-sm { font-size: 20px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.site-nav ul a { color: var(--text); opacity: .85; text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav ul a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_parent > a { opacity: 1; color: #fff; }
.site-nav .current-menu-item > a, .site-nav .current_page_parent > a { text-decoration: underline; text-decoration-color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; padding: 0 11px; }
.nav-toggle i { display: block; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: .2s; }
.nav-open .nav-toggle i:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle i:nth-child(3) { opacity: 0; }
.nav-open .nav-toggle i:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 64px 0 90px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--purple); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; margin-bottom: 20px; }
.hero h1 em, .page-head h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; margin-bottom: 28px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.art { position: relative; height: 340px; }
.art svg { position: absolute; }
.rocket { width: 250px; right: 30px; top: 0; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(61, 139, 255, .25)); }
.planet { width: 230px; left: 0; bottom: 0; }
.flame { transform-origin: 60px 96px; animation: flame .35s ease-in-out infinite alternate; }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes flame { to { transform: scaleY(1.25); } }

/* Sections */
.section { padding: 64px 0; }
.section.pt0 { padding-top: 10px; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); }
.sub { color: var(--muted); font-size: 17px; margin-bottom: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.more-link { font-weight: 700; text-decoration: none; margin-bottom: 30px; }
.mt { margin-top: 22px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
	padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(166, 107, 255, .45); background: var(--card-hover); }
.card h3 { font-size: 21px; line-height: 1.22; margin: 2px 0 0; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card p { color: var(--muted); font-size: 15px; flex: 1; margin: 0; }
.meta { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 13px; color: var(--muted); padding-top: 6px; }
.card .read { color: #9CC3FF; font-weight: 700; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; letter-spacing: .4px; text-transform: uppercase; }
.badge.free { background: rgba(61, 139, 255, .18); color: #9CC3FF; }
.badge.members { background: rgba(166, 107, 255, .18); color: #D2B7FF; }

/* Novel */
.novel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.cover-wrap { display: flex; justify-content: center; }
.cover {
	aspect-ratio: 2 / 3; width: 100%; max-width: 300px; border-radius: 12px; padding: 24px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
	background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(160deg, var(--blue), var(--purple));
	color: #fff; font-family: var(--fh); font-size: 26px; line-height: 1.15;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35), inset 6px 0 0 rgba(0, 0, 0, .15);
	transform: rotate(-3deg);
}
.cover small { font: 600 14px var(--fb); opacity: .85; letter-spacing: 2px; text-transform: uppercase; }
.cover-img {
	max-width: 300px; border-radius: 10px;
	border: 1px solid rgba(166, 107, 255, .45);
	box-shadow: 0 0 0 4px rgba(166, 107, 255, .08), 0 0 45px rgba(79, 139, 255, .35), 0 0 110px rgba(166, 107, 255, .3), 0 24px 60px rgba(0, 0, 0, .55);
	transform: rotate(-2deg); transition: transform .35s ease, box-shadow .35s ease;
}
.cover-img:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 0 0 4px rgba(166, 107, 255, .12), 0 0 55px rgba(79, 139, 255, .45), 0 0 130px rgba(166, 107, 255, .38), 0 28px 70px rgba(0, 0, 0, .6); }
@media (prefers-reduced-motion: reduce) { .cover-img, .cover-img:hover { transition: none; } }
.chars { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.char { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border-radius: 999px; border: 1px solid var(--line2); font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, .03); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--fh); font-style: normal; color: #fff; flex: none; }
.a0 { background: linear-gradient(135deg, #3D8BFF, #6F7BFF); }
.a1 { background: linear-gradient(135deg, #A66BFF, #D26BFF); }
.a2 { background: linear-gradient(135deg, #22C3A6, #3D8BFF); }
.a3 { background: linear-gradient(135deg, #FF9F43, #FF6B8B); }
.char-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.char-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.char-card .avatar { width: 52px; height: 52px; font-size: 22px; }
.char-card h3 { font-size: 19px; margin: 2px 0 4px; }
.char-card p { color: var(--muted); margin: 0; }

/* Join band */
.band {
	border-radius: 22px; padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center;
	background: linear-gradient(90deg, rgba(61, 139, 255, .16), rgba(166, 107, 255, .18)); border: 1px solid var(--line2);
}
.band h2 { margin-bottom: 6px; }
.band p { color: #C9D3F2; margin: 0; }
.signup-row { display: flex; gap: 10px; }
.signup input[type=email], .contact-form input, .contact-form textarea {
	flex: 1; min-width: 0; width: 100%; padding: 14px 16px; border-radius: 12px; font: 15px var(--fb); color: var(--text);
	background: rgba(7, 11, 31, .55); border: 1px solid var(--line2);
}
.signup input::placeholder { color: #7F8AB3; }
.signup input:focus, .contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(166, 107, 255, .25); }
.signup .fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.form-ok { padding: 14px 18px; border-radius: 12px; background: rgba(34, 195, 166, .14); border: 1px solid rgba(34, 195, 166, .4); color: #B8F5E8; font-weight: 600; }
.form-err { margin: 10px 0 0; color: #FFB3C1; font-size: 14px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Page heads */
.page-head { padding: 56px 0 26px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 54px); }
.page-head .sub { margin: 0; }
.page-intro { padding-top: 0; color: var(--muted); }

/* Story */
.story-head { padding: 40px 0 10px; }
.back { display: block; width: fit-content; margin-bottom: 22px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--muted); }
.story-head h1 { font-size: clamp(34px, 5vw, 56px); margin: 14px 0 14px; }
.story-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.story-meta span + span::before { content: "\00B7"; margin-right: 18px; opacity: .6; }
.story-image { margin: 26px auto 0; }
.story-image img { border-radius: var(--radius); }
.story-body, .page-body { font-family: var(--fr); font-size: 20px; line-height: 1.75; color: #DDE5FB; padding-top: 26px; padding-bottom: 20px; }
.story-body p, .page-body p { margin: 0 0 1.15em; }
.story-body > .teaser > p:first-child::first-letter, .story-body > p:first-of-type::first-letter {
	float: left; font: 700 3.6em/.82 var(--fh); padding: 6px 10px 0 0;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.story-body em, .page-body em { color: #fff; }
.story-body blockquote, .page-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--purple); color: #fff; font-style: italic; }
.page-body h2, .page-body h3 { font-family: var(--fh); margin-top: 1.4em; }
.page-body ul, .page-body ol { padding-left: 1.2em; }
.page-body .wp-block-image img, .page-body img { border-radius: 14px; }
.the-end { text-align: center; color: var(--purple); letter-spacing: 12px; margin: 34px 0 0 !important; }
.story-foot { padding-bottom: 20px; }
.tags { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; text-decoration: none; color: var(--muted); }
.tags a:hover { color: #fff; border-color: var(--purple); }
.share { font-size: 14px; color: var(--muted); }
.share a { margin-left: 10px; font-weight: 700; }

/* Gate */
.story-body.is-locked { padding-bottom: 0; }
.teaser { position: relative; }
.gate { position: relative; margin-top: -120px; padding-top: 120px; font-family: var(--fb); font-size: 16px; line-height: 1.6; }
.gate-fade { position: absolute; left: 0; right: 0; top: 0; height: 140px; background: linear-gradient(180deg, rgba(7, 11, 31, 0), var(--bg) 85%); pointer-events: none; }
.gate-box {
	position: relative; text-align: center; padding: 36px 32px; border-radius: 22px; margin-bottom: 30px;
	background: linear-gradient(160deg, rgba(61, 139, 255, .16), rgba(166, 107, 255, .2)); border: 1px solid var(--line2);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.gate-box h2 { font-size: clamp(24px, 3vw, 32px); margin: 14px 0 8px; color: #fff; }
.gate-box > p { color: #C9D3F2; max-width: 520px; margin: 0 auto 22px; }
.gate .signup { max-width: 480px; margin: 0 auto; }

/* Contact */
.contact-form { font-family: var(--fb); font-size: 16px; margin-top: 10px; }
.contact-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.contact-form textarea { resize: vertical; }

/* Pagination */
.pager { margin-top: 36px; }
.pager .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pager .page-numbers { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2); text-decoration: none; color: var(--text); }
.pager .page-numbers.current { background: var(--grad); border-color: transparent; }

/* Footer */
.site-footer { padding: 44px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-top: 30px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px 30px; align-items: start; }
.foot-brand p { margin: 8px 0 0; }
.foot-nav ul, .social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.foot-nav a, .social a { color: var(--text); text-decoration: none; opacity: .8; }
.foot-nav a:hover, .social a:hover { opacity: 1; }
.social { grid-column: 1 / -1; justify-content: flex-start; }
.copy { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; opacity: .8; }

/* Gutenberg basics */
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.wp-block-button__link { background: var(--grad); border-radius: 12px; font-family: var(--fb); font-weight: 700; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line2); margin: 2em 0; }
.wp-caption-text, figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; font-family: var(--fb); }

/* Responsive */
@media (max-width: 980px) {
	.grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: absolute; top: 72px; left: 16px; right: 16px; display: none; flex-direction: column; align-items: stretch; gap: 14px;
		padding: 20px; border-radius: 16px; background: rgba(14, 20, 51, .97); border: 1px solid var(--line2); box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
	}
	.nav-open .site-nav { display: flex; }
	.site-nav ul { flex-direction: column; gap: 4px; }
	.site-nav ul a { display: block; padding: 10px 6px; font-size: 17px; }
	.hero { padding: 30px 0 50px; }
	.hero .wrap, .novel, .band { grid-template-columns: 1fr; }
	.art { height: 200px; order: -1; }
	.rocket { width: 150px; right: 10px; }
	.planet { width: 150px; left: 10px; }
	.grid { grid-template-columns: 1fr; }
	.band { padding: 28px 22px; }
	.signup-row { flex-direction: column; }
	.cover { max-width: 230px; }
	.section { padding: 46px 0; }
	.site-footer .wrap { grid-template-columns: 1fr; }
	.foot-nav ul { justify-content: flex-start; }
	.story-body, .page-body { font-size: 18px; line-height: 1.72; }
	.gate-box { padding: 28px 20px; }
}
@media (max-width: 480px) {
	.wrap { padding: 0 16px; }
	.logo { font-size: 22px; }
	.hero h1 { font-size: 36px; }
	.lead { font-size: 17px; }
	.cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}

/* End-of-story signup */
.end-join { margin-top: 10px; margin-bottom: 20px; }
.end-box {
	display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; padding: 28px;
	border-radius: 20px; background: linear-gradient(90deg, rgba(61, 139, 255, .14), rgba(166, 107, 255, .18)); border: 1px solid var(--line2);
}
.end-box h2 { font-size: 24px; margin: 0 0 6px; }
.end-box p { color: #C9D3F2; margin: 0; font-size: 15px; }
.end-box .signup .fine { display: none; }

/* Pop-up (non-blocking slide-in) */
.pb-pop {
	position: fixed; right: 24px; bottom: 24px; z-index: 50; width: min(380px, calc(100vw - 32px));
	padding: 26px 24px 18px; border-radius: 20px; text-align: center;
	background: linear-gradient(160deg, #111a44, #1c1446); border: 1px solid rgba(166, 107, 255, .45);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .04) inset;
	opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .3s ease, transform .3s ease;
}
.pb-pop.is-open { opacity: 1; transform: none; }
.pb-pop[hidden] { display: none; }
.pb-pop-icon { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.pb-pop h2 { font-size: 22px; margin: 0 0 6px; }
.pb-pop p { color: #C9D3F2; font-size: 15px; margin: 0 0 16px; }
.pb-pop .signup-row { flex-direction: column; }
.pb-pop .signup .fine { font-size: 12px; }
.pb-pop-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.pb-pop-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.pb-pop-later { margin-top: 6px; background: none; border: 0; color: var(--muted); font: 600 13px var(--fb); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pb-pop-later:hover { color: #fff; }
@media (max-width: 820px) {
	.end-box { grid-template-columns: 1fr; padding: 22px 18px; }
	.pb-pop { right: 16px; left: 16px; bottom: 16px; width: auto; }
}

/* About the author (home page) */
.author-card {
	display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; overflow: hidden;
	border-radius: 22px; border: 1px solid var(--line2); background: linear-gradient(160deg, rgba(61, 139, 255, .10), rgba(166, 107, 255, .12));
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.author-scene { margin: 0; min-height: 100%; }
.author-scene img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.author-text { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.author-text h2 { margin-bottom: 12px; }
.author-text .sub { font-family: var(--fr); font-size: 18px; line-height: 1.65; color: #C9D3F2; margin-bottom: 24px; }

/* About page portrait */
.page-body.has-portrait::after { content: ""; display: table; clear: both; }
.author-portrait { float: right; width: 280px; margin: 6px 0 18px 32px; shape-outside: margin-box; }
.author-portrait img { border-radius: 20px; border: 1px solid rgba(166, 107, 255, .45); box-shadow: 0 0 0 4px rgba(166, 107, 255, .08), 0 0 40px rgba(79, 139, 255, .22), 0 0 90px rgba(166, 107, 255, .2), 0 24px 60px rgba(0, 0, 0, .45); }

/* Books */
.book-card { align-items: stretch; }
.book-card > * { align-self: flex-start; }
.book-card-cover { align-self: stretch; display: flex; justify-content: center; margin-bottom: 8px; }
.book-card-cover .cover, .book-card-cover .cover-img { max-width: 200px; }
.book-title { font-size: clamp(34px, 4.6vw, 54px); margin: 6px 0 12px; }
.book-text { padding-top: 6px; font-size: 18px; }
.more-inline { margin: 0 0 0 18px; }

/* Characters */
.char-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(166, 107, 255, .5); }
.char-photo-lg { width: 150px; height: 150px; }
.avatar-img { padding: 0; object-fit: cover; }
.char-card h3 a { color: var(--text); text-decoration: none; }
.char-card h3 a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--purple); }
.char-role { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--purple); margin: -2px 0 6px; }
.char-quote { margin: 10px 0 0; padding-left: 14px; border-left: 3px solid var(--purple); color: #fff; font-family: var(--fr); font-style: italic; }
a.char { color: var(--text); text-decoration: none; }
a.char:hover { border-color: var(--purple); color: #fff; }
.char-hero { display: flex; gap: 28px; align-items: center; }

@media (max-width: 820px) {
	.author-card { grid-template-columns: 1fr; }
	.author-scene img { aspect-ratio: 16 / 9; height: auto; }
	.author-text { padding: 26px 22px 30px; }
	.author-portrait { float: none; width: 220px; margin: 0 auto 24px; }
	.char-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
	.char-photo-lg { width: 120px; height: 120px; }
	.more-inline { display: inline-block; margin: 14px 0 0; }
}

/* 1.3: social icons, visitor counter, transmissions */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.social { gap: 10px; }
.social a {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid rgba(166, 107, 255, .35); background: rgba(255, 255, 255, .03); opacity: .85;
	transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.social a:hover, .social a:focus-visible { opacity: 1; border-color: rgba(166, 107, 255, .8); box-shadow: 0 0 18px rgba(166, 107, 255, .35); transform: translateY(-2px); }
.social-icon { display: block; }
.visits { grid-column: 1 / -1; margin: 4px 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.visits[hidden] { display: none; }
.visits svg { color: #A66BFF; }
.visits [data-pb-visits] { color: var(--text); font-weight: 600; letter-spacing: .3px; }
.trans-card .badge { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .social a { transition: none; } .social a:hover { transform: none; } }

/* 1.4: painted home page background, portrait author card */
.hero.has-hero-img {
	position: relative; min-height: 520px; display: flex; align-items: center;
	background:
		linear-gradient(90deg, rgba(7, 11, 30, .94) 0%, rgba(7, 11, 30, .72) 32%, rgba(7, 11, 30, .12) 58%, rgba(7, 11, 30, 0) 100%),
		linear-gradient(0deg, #070B1E 0%, rgba(7, 11, 30, 0) 20%),
		linear-gradient(180deg, #070B1E 0%, rgba(7, 11, 30, 0) 14%),
		var(--hero-img) 75% 45% / cover no-repeat;
}
.hero.has-hero-img .wrap { width: 100%; grid-template-columns: minmax(0, 620px) 1fr; }
.author-card.is-portrait { grid-template-columns: 320px 1fr; }
.author-card.is-portrait .author-scene img { object-position: center top; }
@media (max-width: 820px) {
	.hero.has-hero-img {
		min-height: 0;
		background: linear-gradient(0deg, rgba(7, 11, 30, .9) 0%, rgba(7, 11, 30, .72) 55%, rgba(7, 11, 30, .45) 100%), var(--hero-img) 70% center / cover no-repeat;
	}
	.hero.has-hero-img .wrap { grid-template-columns: 1fr; }
	.author-card.is-portrait { grid-template-columns: 1fr; }
	.author-card.is-portrait .author-scene img { aspect-ratio: 4 / 5; max-height: 460px; }
}
