/* Shared base stylesheet. Each theme sets its look through the variables below (see theme.css). */

:root {
	--bg: #150a33;
	--bg-deep: #0b0420;
	--body-bg: var(--bg);
	--ink: #ffffff;
	--ink-soft: rgba(255, 255, 255, 0.8);
	--link: #ffd23c;
	--accent: #ff9a3c;
	--accent-ink: #150a33;
	--accent-2: #ff5a8c;
	--line: rgba(255, 255, 255, 0.16);
	--surface: rgba(255, 255, 255, 0.07);
	--surface-hover: rgba(255, 255, 255, 0.12);
	--footer-bg: rgba(11, 4, 32, 0.6);
	--footer-ink: #ffffff;
	--f-head: system-ui, sans-serif;
	--f-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
	--head-weight: 700;
	--head-tracking: -0.02em;
	--radius-btn: 999px;
	--radius-card: 24px;
	--gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.6;
	background: var(--body-bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.1; margin: 0 0 0.5em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0; padding: 14px 22px;
	left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 12px;
}

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.grad-text { color: var(--accent-2); }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
	border: 0; border-radius: var(--radius-btn); font: 700 16px/1 var(--f-body); cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28); }
.btn--grad { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; border: 1.5px solid currentColor; color: inherit; }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--outline-dark { border: 2px solid currentColor; }
.btn--small { min-height: 44px; padding: 0 22px; font-size: 15px; }

/* Header */
.site-header { position: relative; z-index: 30; }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.brand { font-family: var(--f-head); font-weight: 800; font-size: 20px; letter-spacing: var(--head-tracking); }
.brand img { max-height: 48px; width: auto; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a { font-weight: 600; }
.primary-nav ul a:hover { color: var(--link); }
.primary-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; background: var(--bg-deep); color: #fff; border-radius: 12px; z-index: 20; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: flex; }
.primary-nav .sub-menu a { display: block; padding: 8px 10px; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }

/* Section helpers */
.section { padding: 64px 0 80px; }
.section__title { font-size: clamp(32px, 4vw, 56px); }
.section__title--small { font-size: clamp(26px, 3vw, 38px); }
.section__lead { max-width: 640px; color: var(--ink-soft); font-size: 18px; }
.section__more { margin-top: 28px; }
.link-arrow { font-weight: 700; border-bottom: 2px solid var(--accent-2); padding-bottom: 2px; }
.link-arrow:hover { color: var(--link); }

/* Gradient placeholder scenes (used until posts have featured images) */
.grad-1 { background: linear-gradient(180deg, #27408b, #c95a7c 40%, #ff9a62 65%, #12526a); }
.grad-2 { background: radial-gradient(circle at 30% 30%, #ffd27a, transparent 40%), radial-gradient(circle at 70% 60%, #ff5a8c, transparent 45%), linear-gradient(135deg, #7a2bd1, #c2263d); }
.grad-3 { background: linear-gradient(180deg, #ffb86b, #ff5a8c 40%, #1c9aa3 72%, #0b3c5d); }
.grad-4 { background: radial-gradient(circle at 25% 60%, #ffd23c 0 8%, transparent 9%), radial-gradient(circle at 55% 40%, #ff9a3c 0 9%, transparent 10%), radial-gradient(circle at 80% 65%, #ff5a8c 0 8%, transparent 9%), linear-gradient(180deg, #0b1f33, #3a1b7a); }

/* Feed tiles */
.tile { position: relative; display: block; overflow: hidden; isolation: isolate; }
.tile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 0.6s ease; }
.tile:hover .tile__img { transform: scale(1.06); }
.tile__label { position: absolute; left: 16px; bottom: 14px; max-width: calc(100% - 32px); font-weight: 700; font-size: 14px; line-height: 1.3; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55); }

/* Journal / archive cards */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 34px; }
.card { overflow: hidden; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); transition: transform 0.25s ease, background 0.25s ease; }
.card:hover { transform: translateY(-6px); background: var(--surface-hover); }
.card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 24px; }
.card__meta { margin: 0 0 8px; font-size: 14px; color: var(--ink-soft); }
.card__cat { color: var(--link); font-weight: 700; }
.card__title { font-size: 22px; line-height: 1.2; margin-bottom: 10px; }
.card__title a:hover { color: var(--link); }
.card__excerpt { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Inner pages */
.page-head { padding: 40px 0 8px; }
.page-head__title { font-size: clamp(34px, 5vw, 64px); }
.page-head__lead { max-width: 680px; color: var(--ink-soft); font-size: 19px; }
.eyebrow { display: inline-block; margin-bottom: 8px; font-weight: 700; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--link); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; opacity: 0.6; }
.breadcrumbs a:hover { color: var(--link); text-decoration: underline; }
.empty { padding: 40px 0; color: var(--ink-soft); }
.notfound { padding-top: 72px; padding-bottom: 96px; }

.entry { padding-top: 40px; padding-bottom: 32px; }
.entry__title { font-size: clamp(32px, 4.6vw, 56px); }
.entry__meta { color: var(--ink-soft); font-size: 15px; }
.entry__meta a { color: var(--link); font-weight: 700; }
.entry__image { margin: 24px 0 32px; }
.entry__image img { width: 100%; border-radius: var(--radius-card); }
.entry__content { font-size: 19px; line-height: 1.75; }
.entry__content a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.entry__content h2 { font-size: 32px; margin-top: 1.6em; }
.entry__content h3 { font-size: 24px; margin-top: 1.4em; }
.entry__content img { border-radius: 14px; }
.entry__content blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent-2); font-size: 1.1em; }
.entry__content figure { margin: 1.6em 0; }
.entry__content figcaption, .wp-caption-text { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.entry__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 26px 30px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.entry__cta p { margin: 0; max-width: 520px; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; margin: 24px 0; }
.post-navigation a { display: block; font-weight: 700; }
.nav-sub { display: block; font-size: 13px; color: var(--ink-soft); font-weight: 500; }

.pagination { margin: 40px 0 16px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-btn); background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.searchform { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.searchform__input { flex: 1 1 240px; min-height: 52px; padding: 0 22px; border-radius: var(--radius-btn); border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: 500 16px var(--f-body); }
.searchform__input::placeholder { color: var(--ink-soft); }

.comments { margin: 40px 0; }
.comments__title { font-size: 26px; }
.comments__list { list-style: none; padding: 0; }
.comments__list .comment-body { padding: 18px 0; border-top: 1px solid var(--line); }
.comments__list .children { list-style: none; padding-left: 28px; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 600; }
.comment-form input[type='text'], .comment-form input[type='email'], .comment-form input[type='url'], .comment-form textarea { width: 100%; padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: 500 16px var(--f-body); }
.comment-form .submit { min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-ink); font: 700 16px var(--f-body); cursor: pointer; }

/* Footer */
.site-footer { margin-top: 40px; padding: 64px 0 48px; text-align: center; border-top: 1px solid var(--line); background: var(--footer-bg); color: var(--footer-ink); }
.site-footer__title { font-size: clamp(30px, 4vw, 48px); }
.social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; margin: 28px 0 0; padding: 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; list-style: none; margin: 28px 0 0; padding: 0; }
.footer-nav a:hover { color: var(--link); }
.site-footer__note { margin: 36px auto 0; max-width: 760px; font-size: 14px; opacity: 0.8; }

/* Responsive */
@media (max-width: 900px) {
	:root { --gutter: 20px; }
	.nav-toggle { display: inline-flex; }
	.primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 84px; z-index: 50; flex-direction: column; align-items: stretch; gap: 8px; padding: 20px; border-radius: 20px; background: var(--bg-deep); color: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
	.primary-nav.is-open { display: flex; }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav a { display: block; padding: 12px 8px; }
	.primary-nav .btn { text-align: center; }
	.primary-nav .sub-menu { display: flex; position: static; padding: 0 0 0 16px; background: none; }
	.cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.section { padding: 44px 0 56px; }
}
@media (max-width: 600px) {
	body { font-size: 16px; }
	.cards3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
	.entry__content { font-size: 17px; }
	.post-navigation .nav-links { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
