/*
Theme Name: iPunkt Glowline
Theme URI: https://youtube.com/@iPunktYT
Author: iPunkt
Author URI: https://youtube.com/@iPunktYT
Description: A dark, glassmorphic magazine theme with an ambient background that adapts its glow to the colors of your post images. Features a hero mosaic, Featured/Popular tabs, AJAX load-more, reading time, share buttons, a light/dark toggle and a hardened, escape-everything codebase with no external requests.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
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: ipunkt-glowline
Update URI: false
Tags: blog, news, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, dark
*/

/* -------------------------------------------------- 1. Tokens & base */
:root {
	color-scheme: dark;
	--bg: #0a0c10;
	--bg-soft: #0f1218;
	--card: #12151c;
	--surface: rgba(255, 255, 255, 0.06);
	--glass: rgba(13, 16, 22, 0.55);
	--text: #f4f5f7;
	--text-soft: #c9cdd6;
	--muted: #99a0ac;
	--line: rgba(255, 255, 255, 0.1);
	--accent: #8b5cf6;
	--radius: 22px;
	--radius-sm: 14px;
	--shadow: 0 20px 55px -25px rgba(0, 0, 0, 0.65);
	--header-h: 72px;
	--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
}

[data-theme="light"] {
	color-scheme: light;
	--bg: #f4f3f1;
	--bg-soft: #ffffff;
	--card: rgba(255, 255, 255, 0.82);
	--surface: rgba(18, 21, 28, 0.05);
	--glass: rgba(255, 255, 255, 0.62);
	--text: #15171c;
	--text-soft: #3b404a;
	--muted: #6a7180;
	--line: rgba(18, 21, 28, 0.11);
	--shadow: 0 20px 55px -30px rgba(28, 32, 44, 0.35);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(740px, 100% - 40px); margin-inline: auto; }

.site-main { min-height: 60vh; padding-bottom: 72px; }

/* -------------------------------------------------- 2. Accessibility helpers */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--card); clip: auto !important; clip-path: none;
	color: var(--text); display: block; font-size: 0.9rem; font-weight: 600;
	height: auto; left: 8px; line-height: normal; padding: 14px 22px;
	text-decoration: none; top: 8px; width: auto; z-index: 100000;
	border-radius: 10px; box-shadow: var(--shadow);
}
.skip-link { position: absolute; }

/* -------------------------------------------------- 3. Ambient glow layer */
.ambient {
	position: fixed; inset: 0; z-index: -1;
	overflow: hidden; pointer-events: none;
}
@property --blob {
	syntax: '<color>';
	inherits: false;
	initial-value: transparent;
}
/*
 * Each blob is a radial gradient that fades to transparent long
 * before its own edge, so there is no visible circle outline at
 * all - just a soft pool of light. A light blur smooths the
 * falloff further; color changes animate via the registered
 * --blob property (instant on very old browsers, still fine).
 */
.ambient__blob {
	position: absolute;
	width: 80vw; height: 80vw;
	min-width: 680px; min-height: 680px;
	background: radial-gradient(closest-side, var(--blob) 0%, transparent 72%);
	filter: blur(60px);
	opacity: 0.55;
	transform: translate3d(0, 0, 0);
	transition: --blob 1.6s ease;
}
.ambient__blob--a { top: -26vw; left: -20vw; animation: ipunkt-glowline-drift-a 34s ease-in-out infinite alternate; }
.ambient__blob--b { top: -16vw; right: -24vw; animation: ipunkt-glowline-drift-b 42s ease-in-out infinite alternate; }
.ambient__blob--c { bottom: -32vw; left: 16vw; animation: ipunkt-glowline-drift-c 38s ease-in-out infinite alternate; }

@keyframes ipunkt-glowline-drift-a { to { transform: translate3d(9vw, 7vw, 0) scale(1.12); } }
@keyframes ipunkt-glowline-drift-b { to { transform: translate3d(-8vw, 10vw, 0) scale(0.92); } }
@keyframes ipunkt-glowline-drift-c { to { transform: translate3d(10vw, -7vw, 0) scale(1.08); } }

[data-theme="light"] .ambient__blob { opacity: 0.38; }

body::before {
	content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background: radial-gradient(120% 90% at 50% 0%, transparent 40%, var(--bg) 100%);
	opacity: 0.65;
}

@media (max-width: 700px) {
	.ambient__blob { width: 120vw; height: 120vw; min-width: 0; min-height: 0; filter: blur(36px); }
}

/* -------------------------------------------------- 4. Buttons, badges, icons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 20px; border-radius: 999px;
	font-size: 0.9rem; font-weight: 600; line-height: 1.2;
	border: 1px solid transparent; cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { color: #fff; filter: brightness(1.08); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line); backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }

.badge {
	display: inline-block; padding: 5px 11px; border-radius: 999px;
	font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--text); background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
.badge:hover { color: #fff; background: var(--accent); border-color: transparent; }
[data-theme="light"] .badge { background: rgba(18, 21, 28, 0.07); border-color: rgba(18, 21, 28, 0.08); }
[data-theme="light"] .badge:hover { color: #fff; }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--surface); border: 1px solid var(--line);
	cursor: pointer; color: var(--text);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* ------------------------------------------- 4b. View transitions */
@media not (prefers-reduced-motion: reduce) {
	@view-transition { navigation: auto; }
	::view-transition-old(root),
	::view-transition-new(root) { animation-duration: 0.3s; }
}

/* -------------------------------------------- 4c. Reading progress */
.progress {
	position: fixed; top: 0; left: 0; right: 0;
	height: 3px; z-index: 70;
	pointer-events: none;
}
.progress__bar {
	height: 100%;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: var(--glow, var(--accent));
	transition: transform 80ms linear;
}

/* -------------------------------------------------- 5. Header */
.site-header {
	position: sticky; top: 0; z-index: 60;
	--pill-gap: 14px;
	padding-top: var(--pill-gap);
	top: calc(-1px);
}
/* Floating glass pill, same width as the page content, same glass
   recipe as the homepage card panels. Always on, in both themes. */
.site-header > .container {
	width: min(1400px, 100% - 40px);
	padding-inline: clamp(16px, 2.5vw, 26px);
	background: rgba(12, 14, 19, 0.62);
	background: color-mix(in srgb, var(--card) 72%, transparent);
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: background-color 0.25s ease;
}
[data-theme="light"] .site-header > .container {
	background: rgba(255, 255, 255, 0.6);
	background: color-mix(in srgb, var(--card) 80%, transparent);
}
/* Denser while scrolled or holding an open menu/search, for legibility. */
.site-header.is-scrolled > .container,
.site-header.nav-open > .container,
.site-header.search-open > .container {
	background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.site-header__inner {
	display: flex; align-items: center; gap: 28px;
	height: calc(var(--header-h) - 8px);
}
.site-brand { display: flex; align-items: center; min-width: 0; }
.site-brand__title { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.01em; }
.site-brand__title:hover { color: var(--text); opacity: 0.85; }
.custom-logo { max-height: 38px; width: auto; display: block; }

.site-nav { margin-left: auto; }
.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
	display: inline-block;
	padding: 8px 15px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 0.92rem; font-weight: 500; color: var(--muted);
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	color: var(--text);
	background: var(--surface);
	border-color: var(--line);
}
.nav-menu li { position: relative; }
.nav-menu .sub-menu {
	position: absolute; top: calc(100% + 12px); left: -14px; min-width: 190px;
	display: none; flex-direction: column; gap: 2px; list-style: none; margin: 0;
	padding: 8px; border-radius: 16px;
	background: linear-gradient(var(--card), var(--card)) var(--bg);
	border: 1px solid var(--line); box-shadow: var(--shadow);
}
.nav-menu .sub-menu a { display: block; padding: 8px 12px; border-radius: 10px; }
.nav-menu .sub-menu a:hover { background: var(--surface); }
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu { display: flex; }

.site-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn .icon-moon { display: none; }
[data-theme="light"] .icon-btn .icon-moon { display: block; }
[data-theme="light"] .icon-btn .icon-sun { display: none; }

.nav-toggle { display: none; position: relative; }
.nav-toggle span {
	position: absolute; left: 11px; width: 16px; height: 2px; border-radius: 2px;
	background: currentColor; transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-open .nav-toggle span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 18px; transform: rotate(-45deg); }

.header-search { padding: 10px 0 18px; }
.header-search[hidden] { display: none; }

@media (max-width: 920px) {
	.nav-toggle { display: inline-grid; }
	.site-nav {
		position: absolute; top: calc(100% + 8px); left: 20px; right: 20px;
		display: none;
		padding: 14px; border-radius: 18px;
		background: linear-gradient(var(--card), var(--card)) var(--bg);
		border: 1px solid var(--line); box-shadow: var(--shadow);
	}
	.nav-open .site-nav { display: block; }
	.nav-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav-menu a { display: block; padding: 10px 12px; border-radius: 10px; font-size: 1rem; }
	.nav-menu a:hover { background: var(--surface); }
	.nav-menu .sub-menu { position: static; display: flex; border: 0; box-shadow: none; background: transparent; padding: 0 0 0 14px; }
	.site-cta { display: none; }
}

/* -------------------------------------------------- 6. Cards */
.card {
	position: relative; overflow: hidden; isolation: isolate;
	border-radius: var(--radius);
	background: var(--card);
	box-shadow: var(--shadow);
	min-height: 300px;
	display: flex;
}
.card__media { position: absolute; inset: 0; z-index: 0; display: block; }
.card__img, .card__media img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card:hover .card__img, .card:hover .card__media img { transform: scale(1.05); }
.card__fallback {
	position: absolute; inset: 0; display: block;
	background: linear-gradient(155deg, var(--glow, #6d6d80), #10131a 82%);
}
.card__panel {
	position: relative; z-index: 1;
	margin: 12px; margin-top: auto; width: calc(100% - 24px);
	padding: 16px 18px 15px;
	border-radius: 16px;
	background: rgba(12, 14, 19, 0.62);
	background: color-mix(in srgb, var(--glow, #14161c) 16%, rgba(12, 14, 19, 0.6));
	backdrop-filter: blur(16px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .card__panel {
	background: rgba(255, 255, 255, 0.6);
	background: color-mix(in srgb, var(--glow, #ffffff) 10%, rgba(255, 255, 255, 0.62));
	border-color: rgba(255, 255, 255, 0.55);
}
.card .badge { margin-bottom: 10px; }
.card__title {
	margin: 0 0 10px; font-size: 1.06rem; font-weight: 700; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__title a { color: var(--text); }
[data-theme="light"] .card__title a { color: #15171c; }
.card__title a:hover { opacity: 0.85; }
.card--hero .card__title { font-size: clamp(1.25rem, 2.2vw, 1.7rem); -webkit-line-clamp: 3; }

.entry-meta {
	display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 2px;
	font-size: 0.78rem; color: var(--muted);
}
.card .entry-meta { color: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .card .entry-meta { color: rgba(21, 23, 28, 0.66); }
.entry-meta a { color: inherit; font-weight: 600; }
.entry-meta a:hover { color: var(--accent); }
.entry-meta > *:not(:first-child)::before { content: "\00B7"; margin-right: 6px; opacity: 0.7; }

.sticky .badge::after { content: " \2605"; }

/* -------------------------------------------------- 7. Hero mosaic */
.hero {
	display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px;
	padding-top: 26px;
}
.hero .card--hero { min-height: clamp(320px, 34vw, 430px); }
.card--span7 { grid-column: span 7; }
.card--span5 { grid-column: span 5; }

@media (max-width: 920px) {
	.card--span7, .card--span5 { grid-column: span 12; }
	.hero .card--hero { min-height: clamp(300px, 60vw, 420px); }
}

/* -------------------------------------------------- 8. Featured / Popular tabs */
.tabs-section { margin: 64px 0 8px; }
.tabs {
	border-radius: 30px; padding: clamp(18px, 3vw, 30px);
	background: color-mix(in srgb, var(--card) 65%, transparent);
	backdrop-filter: blur(22px) saturate(140%);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}
.tabs__nav { display: inline-flex; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs__nav button {
	border: 0; background: transparent; cursor: pointer;
	padding: 8px 18px; border-radius: 999px;
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--muted);
}
.tabs__nav button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.tabs__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tabs__grid .card { min-height: clamp(280px, 26vw, 360px); border-radius: 12px; box-shadow: none; }
.tabs__grid .card:first-child { border-radius: 22px 12px 12px 22px; }
.tabs__grid .card:last-child { border-radius: 12px 22px 22px 12px; }
.tabs__grid[hidden] { display: none; }

@media (max-width: 920px) {
	.tabs__grid { grid-template-columns: 1fr; gap: 14px; }
	.tabs__grid .card, .tabs__grid .card:first-child, .tabs__grid .card:last-child { border-radius: var(--radius); min-height: 300px; }
}

/* -------------------------------------------------- 9. Post grid & load more */
.post-grid-section { margin-top: 64px; }
.post-grid {
	display: grid; gap: 22px;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.post-grid .card { min-height: clamp(320px, 30vw, 380px); }

.load-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 44px; }
.load-more[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.load-more-count { margin: 0; font-size: 0.78rem; color: var(--muted); }

/* -------------------------------------------------- 10. Page intros (archive / search / 404) */
.page-intro { padding: 56px 0 8px; text-align: center; }
.page-intro__title { margin: 0 0 10px; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
.page-intro__desc { margin: 0 auto; max-width: 560px; color: var(--muted); }
.page-intro .search-form { max-width: 460px; margin: 26px auto 0; }
.archive-grid { margin-top: 44px; }

/* -------------------------------------------------- 11. Single post hero */
.post-shell {
	margin-top: 34px;
	padding: clamp(22px, 4.5vw, 54px);
	border-radius: var(--radius);
	background: rgba(12, 14, 19, 0.62);
	background: color-mix(in srgb, var(--card) 70%, transparent);
	border: 1px solid var(--line);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	overflow: hidden;
}
[data-theme="light"] .post-shell {
	background: rgba(255, 255, 255, 0.6);
	background: color-mix(in srgb, var(--card) 80%, transparent);
}
/* The shell spans the full content width; the text inside stays in
   a comfortable reading column, centered. */
.post-shell .entry-content,
.post-shell .entry-footer,
.post-shell .comments-area,
.post-shell .entry-title,
.post-shell .page-links {
	max-width: 760px;
	margin-inline: auto;
}
/* Wide/full blocks stay inside the shell instead of breaking out. */
.post-shell .alignwide,
.post-shell .alignfull {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	transform: none;
}

.post-hero {
	position: relative; overflow: hidden; isolation: isolate;
	width: min(1060px, 100% - 40px); margin: 24px auto 44px;
	min-height: clamp(380px, 46vw, 540px);
	border-radius: 28px;
	background: linear-gradient(155deg, var(--glow, #3a3f4d), #0c0f14 85%);
	box-shadow: var(--shadow);
	display: flex;
}
.post-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.post-hero__overlay {
	position: relative; z-index: 1;
	margin-top: auto; width: 100%;
	padding: clamp(22px, 4.5vw, 48px);
	background: linear-gradient(to top, rgba(5, 7, 10, 0.85), rgba(5, 7, 10, 0.35) 65%, transparent);
	color: #f4f5f7;
}
.post-hero__title {
	margin: 14px 0 8px;
	font-size: clamp(1.7rem, 4vw, 2.8rem);
	font-weight: 800; line-height: 1.14; letter-spacing: -0.02em;
	color: #fff;
}
.post-hero__excerpt { margin: 0 0 16px; font-size: 1rem; color: rgba(255, 255, 255, 0.78); max-width: 640px; }
.post-hero__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.post-hero .entry-meta { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; }

.share { display: flex; align-items: center; gap: 8px; }
.share__btn {
	display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
	color: #fff; cursor: pointer; backdrop-filter: blur(8px);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.share__btn:hover { background: var(--accent); border-color: transparent; color: #fff; }
.share__btn svg { width: 16px; height: 16px; }
.share__status { font-size: 0.75rem; color: rgba(255, 255, 255, 0.85); min-width: 0; }

/* -------------------------------------------------- 12. Entry content */
.entry-content { font-size: 1.04rem; line-height: 1.78; color: var(--text-soft); }
.entry-content > :first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.45em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content strong { color: var(--text); }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--text); line-height: 1.3; margin: 2em 0 0.7em; letter-spacing: -0.01em; }
.entry-content h2 { font-size: 1.55rem; }
.entry-content h3 { font-size: 1.25rem; }
.entry-content h4 { font-size: 1.08rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em; padding-left: 1.35em; }
.entry-content li { margin: 0.45em 0; }
.entry-content ul li::marker { color: var(--accent); }
.entry-content ol li::marker { color: var(--muted); font-weight: 700; }
.entry-content blockquote {
	margin: 2.2em 0; padding: 0.3em 0 0.3em 1.5em;
	border-left: 3px solid var(--accent);
	font-size: 1.14em; color: var(--text); font-weight: 500;
}
.entry-content blockquote p { margin-bottom: 0.6em; }
.entry-content blockquote cite { display: block; margin-top: 0.7em; font-style: normal; font-size: 0.78em; color: var(--muted); }
.entry-content img { border-radius: 18px; }
.entry-content figure { margin: 2.2em 0; }
.entry-content figcaption, .wp-caption-text, .gallery-caption { text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 0.8em; }
.wp-caption { max-width: 100%; }
.entry-content code { background: var(--surface); border: 1px solid var(--line); padding: 0.15em 0.45em; border-radius: 6px; font-size: 0.88em; }
.entry-content pre { background: #0b0d12; border: 1px solid var(--line); border-radius: 14px; padding: 1.2em 1.4em; overflow: auto; }
[data-theme="light"] .entry-content pre { background: #1a1d24; color: #e8eaef; }
.entry-content pre code { background: none; border: 0; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 0.94em; }
.entry-content th, .entry-content td { padding: 0.7em 0.9em; text-align: left; border-bottom: 1px solid var(--line); }
.entry-content th { color: var(--text); }
.entry-content hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.entry-content details { margin: 0.9em 0; padding: 0.95em 1.2em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.entry-content summary { cursor: pointer; font-weight: 600; color: var(--text); }
.entry-content .has-drop-cap:not(:focus)::first-letter {
	float: left; font-size: 4.8em; line-height: 0.78; font-weight: 700;
	margin: 0.07em 0.14em 0 0; color: var(--text);
}

.alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignwide { width: min(1020px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: min(1200px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 2.2em 0; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.wp-block-gallery img { border-radius: 14px; }

.page-links { margin: 2em 0; color: var(--muted); }
.page-links a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 0 2px; }

/* -------------------------------------------------- 13. Entry footer: tags & author */
.entry-footer { margin-top: 44px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.tag-list a {
	padding: 6px 14px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
	background: var(--surface); border: 1px solid var(--line); color: var(--text-soft);
}
.tag-list a:hover { border-color: var(--accent); color: var(--text); }

.author-box {
	display: flex; gap: 16px; align-items: flex-start;
	padding: 22px; border-radius: 20px;
	background: color-mix(in srgb, var(--card) 70%, transparent);
	border: 1px solid var(--line); backdrop-filter: blur(14px);
}
.author-box__avatar, .author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box__name { font-weight: 700; font-size: 1rem; }
.author-box__bio { margin: 6px 0 0; font-size: 0.9rem; color: var(--muted); }

/* -------------------------------------------------- 14. Related posts */
.related { margin-top: 72px; }
.related__title, .section-title {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 20px;
}
.related .post-grid .card { min-height: clamp(280px, 24vw, 330px); }

/* -------------------------------------------------- 15. Comments */
.comments-area { margin-top: 64px; }
.comments-title { font-size: 1.15rem; margin: 0 0 22px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }

/* Each top-level comment is a glass card (same recipe as the author
   box). Replies are nested inside the same <li>, so the card grows
   to contain the whole thread automatically. */
.comment-list > li {
	margin: 0 0 16px;
	padding: 22px;
	border-radius: 20px;
	background: color-mix(in srgb, var(--card) 70%, transparent);
	border: 1px solid var(--line);
	backdrop-filter: blur(14px);
}
.comment-list .children {
	margin-top: 18px;
	padding: 18px 0 0 clamp(14px, 3vw, 34px);
	border-top: 1px solid var(--line);
}
.comment-list .children li + li { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.comment-body { padding: 0; border-bottom: 0; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.comment-metadata { font-size: 0.76rem; margin: 4px 0 10px 54px; }
.comment-metadata a { color: var(--muted); }
.comment-content { margin-left: 54px; color: var(--text-soft); font-size: 0.96rem; }
.comment-content p { margin: 0 0 0.8em; }
.reply { margin: 8px 0 0 54px; font-size: 0.8rem; }
.reply a { font-weight: 700; color: var(--accent); }
.bypostauthor > .comment-body .comment-author .fn::after { content: " \00B7 Author"; color: var(--accent); font-size: 0.75em; font-weight: 700; }
.comment-navigation { display: flex; justify-content: space-between; margin: 18px 0; font-size: 0.85rem; }
.no-comments { color: var(--muted); font-size: 0.9rem; }

.comment-respond { margin-top: 40px; }
.comment-reply-title { font-size: 1.15rem; margin: 0 0 6px; }
.comment-reply-title small { display: block; font-size: 0.75rem; margin-top: 4px; }
.comment-notes, .logged-in-as { font-size: 0.82rem; color: var(--muted); }
.comment-form { display: grid; gap: 14px; }
.comment-form label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
	width: 100%; padding: 12px 16px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
	color: var(--text); font: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus,
.search-field:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
	outline: none;
}
.comment-form .form-submit { margin: 4px 0 0; }
.comment-form input[type="submit"] {
	display: inline-flex; padding: 11px 24px; border-radius: 999px; border: 0;
	background: var(--accent); color: #fff; font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.comment-form input[type="submit"]:hover { filter: brightness(1.08); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: baseline; font-size: 0.82rem; color: var(--muted); }
.comment-form-cookies-consent label { display: inline; margin: 0; }

/* -------------------------------------------------- 16. Search form & pagination */
.search-form { display: flex; gap: 10px; }
.search-form .search-field { flex: 1; }

.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
	border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
	font-size: 0.85rem; font-weight: 600; color: var(--text-soft);
}
.pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: transparent; }
.pagination a.page-numbers:hover { border-color: var(--accent); color: var(--text); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 0.9rem; }

/* -------------------------------------------------- 17. Footer */
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
	padding: 6px 0 22px;
}
.footer-widgets__col { display: grid; gap: 18px; align-content: start; }
.footer-widgets .widget {
	font-size: 0.9rem;
	color: var(--text-soft);
	padding: 20px 22px;
	border-radius: 18px;
	background: rgba(12, 14, 19, 0.62);
	background: color-mix(in srgb, var(--card) 70%, transparent);
	border: 1px solid var(--line);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}
[data-theme="light"] .footer-widgets .widget {
	background: rgba(255, 255, 255, 0.6);
	background: color-mix(in srgb, var(--card) 80%, transparent);
}
.widget-title {
	font-size: 0.76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--muted);
	margin: 0 0 14px;
}
.footer-widgets ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-widgets a { color: var(--text-soft); }
.footer-widgets a:hover { color: var(--accent); }
.footer-widgets .custom-logo,
.footer-widgets img { max-width: 100%; height: auto; border-radius: 12px; }

/* Tag cloud (widget or block): uniform pills instead of sized links. */
.footer-widgets .widget_tag_cloud a,
.footer-widgets .wp-block-tag-cloud a {
	display: inline-block;
	margin: 0 6px 8px 0;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--surface);
	border: 1px solid var(--line);
	font-size: 0.76rem !important;
	color: var(--text-soft);
}
.footer-widgets .widget_tag_cloud a:hover,
.footer-widgets .wp-block-tag-cloud a:hover { border-color: var(--accent); color: var(--text); }

/* Generic form styling so contact-form plugins look native here. */
.footer-widgets input[type="text"],
.footer-widgets input[type="email"],
.footer-widgets input[type="url"],
.footer-widgets input[type="tel"],
.footer-widgets input[type="number"],
.footer-widgets select,
.footer-widgets textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 12px;
	margin: 0 0 10px;
	color: var(--text);
	font: inherit;
	font-size: 0.88rem;
}
.footer-widgets input:focus,
.footer-widgets select:focus,
.footer-widgets textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.footer-widgets textarea { min-height: 96px; resize: vertical; }
.footer-widgets input[type="submit"],
.footer-widgets button {
	display: inline-block;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
}
.footer-widgets input[type="submit"]:hover,
.footer-widgets button:hover { filter: brightness(1.1); }

@media (max-width: 860px) {
	.footer-widgets { grid-template-columns: 1fr; gap: 30px; }
}

.site-footer { margin: 56px 0 24px; }
.site-footer > .container {
	width: min(1400px, 100% - 40px);
	padding: clamp(22px, 3vw, 36px) clamp(18px, 2.5vw, 30px);
	background: rgba(12, 14, 19, 0.62);
	background: color-mix(in srgb, var(--card) 72%, transparent);
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
[data-theme="light"] .site-footer > .container {
	background: rgba(255, 255, 255, 0.6);
	background: color-mix(in srgb, var(--card) 80%, transparent);
}
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.footer-menu a { font-size: 0.85rem; color: var(--muted); }
.footer-menu a:hover { color: var(--text); }
.social-menu { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social-menu a {
	display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.social-menu a:hover { color: var(--text); border-color: var(--accent); }
.social-menu svg { width: 16px; height: 16px; }
.site-footer__meta { margin-top: 22px; }
.site-footer__meta p { margin: 0; font-size: 0.78rem; color: var(--muted); }
.site-footer__meta a { color: var(--muted); text-decoration: underline; }

/* -------------------------------------------------- 18. Misc pages */
.page-article .entry-title { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 48px 0 28px; letter-spacing: -0.02em; }
.error-404 .page-intro { padding-bottom: 40px; }

/* -------------------------------------------------- 19. Motion preferences */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.ambient__blob { animation: none; }
}
