/*
Theme Name: TechPulse
Theme URI: https://example.com/techpulse
Author: Huzoor Bux
Description: A fast, modern tech blog theme with dark mode, reading progress, auto table of contents, code-copy buttons, category colors and beautiful gradient covers for posts without featured images.
Version: 1.0.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: techpulse
Tags: blog, news, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, dark-mode
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
	--tp-accent: #6366f1;
	--tp-accent-2: #22d3ee;
	--tp-bg: #f8fafc;
	--tp-surface: #ffffff;
	--tp-surface-2: #f1f5f9;
	--tp-text: #0f172a;
	--tp-muted: #64748b;
	--tp-border: #e2e8f0;
	--tp-code-bg: #0b1020;
	--tp-code-text: #e2e8f0;
	--tp-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
	--tp-shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
	--tp-radius: 16px;
	--tp-radius-sm: 10px;
	--tp-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--tp-font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
	--tp-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--tp-container: 1200px;
	--tp-gradient: linear-gradient(135deg, var(--tp-accent) 0%, var(--tp-accent-2) 100%);
	color-scheme: light;
}

[data-theme="dark"] {
	--tp-bg: #0b0f1a;
	--tp-surface: #111827;
	--tp-surface-2: #1a2234;
	--tp-text: #e5e7eb;
	--tp-muted: #94a3b8;
	--tp-border: #1f2a3d;
	--tp-code-bg: #060912;
	--tp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
	--tp-shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
	color-scheme: dark;
}

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

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

body {
	margin: 0;
	overflow-x: clip;
	font-family: var(--tp-font);
	font-size: 17px;
	line-height: 1.7;
	color: var(--tp-text);
	background: var(--tp-bg);
	-webkit-font-smoothing: antialiased;
	transition: background-color .25s ease, color .25s ease;
}

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

a { color: var(--tp-accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--tp-text); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tp-font-head);
	line-height: 1.25;
	letter-spacing: -.02em;
	margin: 0 0 .6em;
	color: var(--tp-text);
}

::selection { background: var(--tp-accent); color: #fff; }

:focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 3px; border-radius: 4px; }

.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(--tp-surface); clip: auto !important; clip-path: none;
	display: block; height: auto; width: auto; left: 8px; top: 8px; padding: 12px 20px; z-index: 100000;
}

.tp-container { width: 100%; max-width: var(--tp-container); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Header
   ========================================================================== */
.tp-progress {
	position: fixed; top: 0; left: 0; height: 3px; width: 0;
	background: var(--tp-gradient); z-index: 1000; transition: width .1s linear;
}

.tp-header {
	position: sticky; top: 0; z-index: 900;
	background: color-mix(in srgb, var(--tp-bg) 82%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--tp-border);
}
.admin-bar .tp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tp-header { top: 46px; } }

.tp-header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.tp-brand { display: flex; align-items: center; gap: 10px; font-family: var(--tp-font-head); font-weight: 800; font-size: 1.3rem; color: var(--tp-text); letter-spacing: -.03em; }
.tp-brand:hover { color: var(--tp-text); }
.tp-brand__mark {
	width: 34px; height: 34px; border-radius: 10px; background: var(--tp-gradient);
	display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--tp-accent) 40%, transparent);
}
.tp-brand__mark svg { width: 18px; height: 18px; }
.tp-brand .custom-logo { max-height: 40px; width: auto; }

.tp-nav { margin-left: auto; }
.tp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tp-nav li { position: relative; }
.tp-nav a {
	display: block; padding: 8px 14px; border-radius: 999px; color: var(--tp-muted);
	font-weight: 500; font-size: .95rem;
}
.tp-nav a:hover, .tp-nav .current-menu-item > a, .tp-nav .current-cat > a { color: var(--tp-text); background: var(--tp-surface-2); }
.tp-nav .sub-menu, .tp-nav .children {
	position: absolute; top: 100%; left: 0; min-width: 220px; flex-direction: column;
	background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius-sm);
	box-shadow: var(--tp-shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: all .2s ease;
}
.tp-nav li:hover > .sub-menu, .tp-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tp-nav .sub-menu a { border-radius: 8px; }

.tp-actions { display: flex; align-items: center; gap: 6px; }
.tp-icon-btn {
	width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--tp-border);
	background: var(--tp-surface); color: var(--tp-text); display: grid; place-items: center;
	cursor: pointer; transition: all .2s ease; padding: 0;
}
.tp-icon-btn:hover { border-color: var(--tp-accent); color: var(--tp-accent); transform: translateY(-1px); }
.tp-icon-btn svg { width: 18px; height: 18px; }
.tp-icon-sun { display: none; }
[data-theme="dark"] .tp-icon-sun { display: block; }
[data-theme="dark"] .tp-icon-moon { display: none; }
.tp-menu-toggle { display: none; }

/* Search overlay */
.tp-search-panel {
	position: fixed; inset: 0; z-index: 2000; background: color-mix(in srgb, var(--tp-bg) 70%, transparent);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	display: flex; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px;
	opacity: 0; visibility: hidden; transition: all .2s ease;
}
.tp-search-panel.is-open { opacity: 1; visibility: visible; }
.tp-search-panel__box { width: 100%; max-width: 640px; }
.tp-search-panel .tp-searchform input[type="search"] { font-size: 1.25rem; padding: 20px 22px 20px 56px; }
.tp-search-panel__hint { color: var(--tp-muted); font-size: .85rem; margin-top: 12px; text-align: center; }

.tp-searchform { position: relative; }
.tp-searchform svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--tp-muted); pointer-events: none; }
.tp-searchform input[type="search"] {
	width: 100%; padding: 14px 16px 14px 50px; border-radius: 14px; border: 1px solid var(--tp-border);
	background: var(--tp-surface); color: var(--tp-text); font: inherit; box-shadow: var(--tp-shadow);
}
.tp-searchform input[type="search"]:focus { outline: none; border-color: var(--tp-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tp-accent) 18%, transparent); }
.tp-searchform button { display: none; }

/* ==========================================================================
   Buttons, badges, chips
   ========================================================================== */
.tp-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
	background: var(--tp-gradient); color: #fff; font-weight: 600; border: 0; cursor: pointer;
	box-shadow: 0 10px 24px color-mix(in srgb, var(--tp-accent) 35%, transparent); transition: transform .2s ease, box-shadow .2s ease;
	font: inherit; font-weight: 600;
}
.tp-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--tp-accent) 45%, transparent); }
.tp-btn--ghost { background: var(--tp-surface); color: var(--tp-text); border: 1px solid var(--tp-border); box-shadow: none; }
.tp-btn--ghost:hover { color: var(--tp-accent); border-color: var(--tp-accent); box-shadow: none; }

.tp-badge {
	--c: var(--tp-accent);
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
	font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
}
.tp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.tp-badge:hover { color: var(--c); background: color-mix(in srgb, var(--c) 20%, transparent); }
.tp-badge--light { color: #fff; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.tp-badge--light::before { background: #fff; }
.tp-badge--light:hover { color: #fff; background: rgba(255,255,255,.26); }

.tp-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-chip {
	--c: var(--tp-accent);
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
	background: var(--tp-surface); border: 1px solid var(--tp-border); color: var(--tp-text);
	font-weight: 600; font-size: .9rem; transition: all .2s ease;
}
.tp-chip:hover { border-color: var(--c); color: var(--c); transform: translateY(-2px); box-shadow: var(--tp-shadow); }
.tp-chip__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.tp-chip__count { color: var(--tp-muted); font-weight: 500; font-size: .8rem; }

/* ==========================================================================
   Covers (featured image or generated gradient)
   ========================================================================== */
.tp-cover {
	position: relative; overflow: hidden; border-radius: var(--tp-radius); aspect-ratio: 16 / 9;
	background: var(--tp-surface-2);
}
.tp-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.tp-cover--generated {
	--c1: #6366f1; --c2: #22d3ee;
	background:
		radial-gradient(circle at 85% 15%, rgba(255,255,255,.28), transparent 35%),
		radial-gradient(circle at 10% 90%, rgba(0,0,0,.25), transparent 45%),
		linear-gradient(135deg, var(--c1), var(--c2));
	display: grid; place-items: center; color: #fff;
}
.tp-cover--generated::before {
	content: ""; position: absolute; inset: 0; opacity: .18;
	background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.tp-cover__icon { position: relative; width: 26%; max-width: 120px; opacity: .95; filter: drop-shadow(0 10px 25px rgba(0,0,0,.25)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.tp-cover__icon svg { width: 100%; height: auto; }
.tp-cover__label {
	position: absolute; left: 18px; bottom: 14px; font-family: var(--tp-font-mono); font-size: .72rem;
	letter-spacing: .08em; text-transform: uppercase; opacity: .85;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.tp-hero { padding: 48px 0 24px; }
.tp-hero__intro { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.tp-hero__eyebrow {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
	background: var(--tp-surface); border: 1px solid var(--tp-border); color: var(--tp-muted);
	font-size: .85rem; font-weight: 500; margin-bottom: 18px;
}
.tp-hero__eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: tp-pulse 2s infinite; }
@keyframes tp-pulse { 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }
.tp-hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; }
.tp-hero__title em {
	font-style: normal; background: var(--tp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tp-hero__desc { color: var(--tp-muted); font-size: 1.15rem; margin: 0; }

.tp-featured { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.tp-featured__main { position: relative; border-radius: calc(var(--tp-radius) + 4px); overflow: hidden; min-height: 460px; display: flex; box-shadow: var(--tp-shadow-lg); }
.tp-featured__main .tp-cover { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.tp-featured__main .tp-cover__icon { margin-bottom: 120px; }
.tp-featured__main .tp-cover__label { display: none; }
.tp-featured__main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(2,6,23,.88) 100%); pointer-events: none; }
.tp-featured__body { position: relative; z-index: 2; margin-top: auto; padding: 32px; color: #fff; }
.tp-featured__body h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 14px 0 10px; }
.tp-featured__body h2 a { color: #fff; }
.tp-featured__body p { color: rgba(255,255,255,.82); margin: 0 0 16px; max-width: 620px; }
.tp-featured__body .tp-meta { color: rgba(255,255,255,.75); }
.tp-featured__body .tp-meta a { color: #fff; }
.tp-featured__main:hover .tp-cover img, .tp-featured__main:hover .tp-cover__icon { transform: scale(1.05); }
.tp-stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.tp-featured__side { display: grid; gap: 16px; }
.tp-mini {
	position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center;
	padding: 14px; border-radius: var(--tp-radius); background: var(--tp-surface); border: 1px solid var(--tp-border);
	transition: all .25s ease;
}
.tp-mini:hover { transform: translateY(-3px); box-shadow: var(--tp-shadow-lg); border-color: transparent; }
.tp-mini .tp-cover { aspect-ratio: 4 / 3; border-radius: 12px; }
.tp-mini .tp-cover__label { display: none; }
.tp-mini h3 { font-size: 1.02rem; margin: 6px 0 4px; }
.tp-mini h3 a { color: var(--tp-text); }
.tp-mini .tp-badge { font-size: .65rem; padding: 2px 9px; }

/* ==========================================================================
   Sections & cards
   ========================================================================== */
.tp-section { padding: 40px 0; }
.tp-section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.tp-section__title { font-size: 1.6rem; margin: 0; display: flex; align-items: center; gap: 12px; }
.tp-section__title::before { content: ""; width: 6px; height: 26px; border-radius: 4px; background: var(--tp-gradient); }
.tp-section__sub { color: var(--tp-muted); margin: 4px 0 0; font-size: .95rem; }

.tp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.tp-layout--full { grid-template-columns: minmax(0, 1fr); }

.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.tp-layout--full .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tp-card {
	position: relative; display: flex; flex-direction: column; background: var(--tp-surface);
	border: 1px solid var(--tp-border); border-radius: calc(var(--tp-radius) + 4px); padding: 12px;
	transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.tp-card:hover { transform: translateY(-6px); box-shadow: var(--tp-shadow-lg); border-color: transparent; }
.tp-card:hover .tp-cover img, .tp-card:hover .tp-cover__icon { transform: scale(1.06); }
.tp-card__body { padding: 16px 10px 8px; display: flex; flex-direction: column; flex: 1; }
.tp-card__title { font-size: 1.25rem; margin: 12px 0 8px; }
.tp-card__title a { color: var(--tp-text); background-image: linear-gradient(var(--tp-accent), var(--tp-accent)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s ease; }
.tp-card:hover .tp-card__title a { background-size: 100% 2px; }
.tp-card__excerpt { color: var(--tp-muted); font-size: .95rem; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card .tp-meta { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--tp-border); }
.tp-card .tp-badge { position: relative; z-index: 2; }

.tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--tp-muted); font-size: .85rem; }
.tp-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.tp-meta svg { width: 15px; height: 15px; opacity: .8; }
.tp-meta img.avatar { width: 26px; height: 26px; border-radius: 50%; }
.tp-meta a { color: var(--tp-text); font-weight: 600; position: relative; z-index: 2; }

/* Newsletter / CTA band */
.tp-cta {
	position: relative; overflow: hidden; border-radius: calc(var(--tp-radius) + 8px); padding: 56px 40px;
	background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.18), transparent 40%), var(--tp-gradient);
	color: #fff; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
}
.tp-cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 40px solid rgba(255,255,255,.1); }
.tp-cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.tp-cta p { margin: 0; color: rgba(255,255,255,.88); }
.tp-cta form { position: relative; z-index: 1; display: flex; gap: 10px; background: rgba(255,255,255,.15); padding: 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); }
.tp-cta input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; padding: 10px 16px; font: inherit; }
.tp-cta input::placeholder { color: rgba(255,255,255,.75); }
.tp-cta input:focus { outline: none; }
.tp-cta button { background: #fff; color: var(--tp-text); border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 700; cursor: pointer; }
.tp-cta button:hover { background: #0f172a; color: #fff; }

/* Archive header */
.tp-archive-head {
	position: relative; overflow: hidden; padding: 56px 0 40px; margin-bottom: 8px;
	border-bottom: 1px solid var(--tp-border);
	background: radial-gradient(ellipse at top, color-mix(in srgb, var(--c, var(--tp-accent)) 14%, transparent), transparent 70%);
}
.tp-archive-head__kicker { font-family: var(--tp-font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--c, var(--tp-accent)); font-weight: 600; }
.tp-archive-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 8px 0; }
.tp-archive-head__desc { color: var(--tp-muted); max-width: 680px; font-size: 1.1rem; }
.tp-archive-head__desc p { margin: 0; }

/* Pagination */
.tp-pagination { margin-top: 48px; }
.tp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tp-pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 12px;
	background: var(--tp-surface); border: 1px solid var(--tp-border); color: var(--tp-text); font-weight: 600;
}
.tp-pagination .page-numbers.current, .tp-pagination .page-numbers:hover { background: var(--tp-gradient); color: #fff; border-color: transparent; }

/* ==========================================================================
   Sidebar & widgets
   ========================================================================== */
.tp-sidebar { position: sticky; top: 96px; display: grid; gap: 24px; }
.widget {
	background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius); padding: 24px;
}
.widget-title, .widget .wp-block-heading { font-size: 1.05rem; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--tp-gradient); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 9px 0; border-bottom: 1px dashed var(--tp-border); color: var(--tp-muted); font-size: .95rem; }
/* Core block widgets (when "My widgets" is chosen) */
.widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.widget .wp-block-search__input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--tp-border); background: var(--tp-bg); color: var(--tp-text); font: inherit; }
.widget .wp-block-search__button { border: 0; border-radius: 10px; padding: 10px 16px; background: var(--tp-gradient); color: #fff; font: inherit; font-weight: 600; cursor: pointer; margin: 0; }
.widget .wp-block-search__label { font-family: var(--tp-font-head); font-weight: 700; display: block; margin-bottom: 10px; }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li a { color: var(--tp-text); font-weight: 500; }
.widget li a:hover { color: var(--tp-accent); }
.widget .tagcloud a, .wp-block-tag-cloud a {
	display: inline-block; margin: 0 6px 8px 0; padding: 5px 12px; border-radius: 8px; font-size: .82rem !important;
	background: var(--tp-surface-2); color: var(--tp-text); border: 1px solid var(--tp-border);
}
.widget .tagcloud a:hover, .wp-block-tag-cloud a:hover { background: var(--tp-accent); color: #fff; border-color: transparent; }

.tp-popular { counter-reset: pop; }
.tp-popular li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.tp-popular li::before {
	counter-increment: pop; content: "0" counter(pop); font-family: var(--tp-font-mono); font-weight: 700;
	font-size: 1rem; background: var(--tp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.6;
}
.tp-popular small { display: block; color: var(--tp-muted); font-size: .78rem; margin-top: 2px; }

.tp-about-widget { text-align: center; background: var(--tp-surface); }
.tp-about-widget .tp-brand__mark { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; }
.tp-about-widget .tp-brand__mark svg { width: 28px; height: 28px; }
.tp-about-widget p { color: var(--tp-muted); font-size: .95rem; margin: 0 0 16px; }
.tp-social { display: flex; gap: 8px; justify-content: center; }
.tp-social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--tp-surface-2); color: var(--tp-text); border: 1px solid var(--tp-border); }
.tp-social a:hover { background: var(--tp-accent); color: #fff; border-color: transparent; }
.tp-social svg { width: 17px; height: 17px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.tp-single-head { padding: 56px 0 32px; text-align: center; }
.tp-single-head__inner { max-width: 860px; margin: 0 auto; }
.tp-breadcrumbs { font-size: .85rem; color: var(--tp-muted); margin-bottom: 18px; }
.tp-breadcrumbs a { color: var(--tp-muted); }
.tp-breadcrumbs a:hover { color: var(--tp-accent); }
.tp-breadcrumbs span { margin: 0 8px; opacity: .5; }
.tp-single-title { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; margin: 18px 0 16px; }
.tp-single-lead { font-size: 1.2rem; color: var(--tp-muted); margin: 0 auto 24px; max-width: 720px; }
.tp-single-head .tp-meta { justify-content: center; font-size: .92rem; }
.tp-single-head .tp-meta img.avatar { width: 36px; height: 36px; }

.tp-single-cover { max-width: 1100px; margin: 0 auto 48px; }
.tp-single-cover .tp-cover { aspect-ratio: 21 / 9; border-radius: calc(var(--tp-radius) + 8px); box-shadow: var(--tp-shadow-lg); }
.tp-single-cover .tp-cover__icon { width: 14%; }

.tp-article-wrap { display: grid; grid-template-columns: 56px minmax(0, 740px) 240px; gap: 40px; justify-content: center; }

.tp-share { position: sticky; top: 110px; align-self: start; display: grid; gap: 10px; justify-items: center; }
.tp-share__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tp-muted); font-weight: 700; }
.tp-share__links { display: flex; flex-direction: column; gap: 8px; }

.tp-toc { position: sticky; top: 110px; align-self: start; font-size: .88rem; max-height: calc(100vh - 140px); overflow: auto; }
.tp-toc__title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tp-muted); font-weight: 700; margin-bottom: 12px; }
.tp-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--tp-border); }
.tp-toc li a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; color: var(--tp-muted); border-left: 2px solid transparent; line-height: 1.4; }
.tp-toc li a:hover { color: var(--tp-text); }
.tp-toc li a.is-active { color: var(--tp-accent); border-left-color: var(--tp-accent); font-weight: 600; }
.tp-toc li.tp-toc__sub a { padding-left: 30px; font-size: .83rem; }
.tp-toc:empty, .tp-toc.is-empty { display: none; }

/* Entry content typography */
.entry-content { font-size: 1.09rem; line-height: 1.8; }
.entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.entry-content h2 { font-size: 1.85rem; margin-top: 2.2em; scroll-margin-top: 100px; }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.8em; scroll-margin-top: 100px; }
.entry-content h4 { font-size: 1.15rem; margin-top: 1.6em; }
.entry-content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--tp-accent) 40%, transparent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.entry-content a:hover { text-decoration-color: var(--tp-accent); color: var(--tp-accent); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content li::marker { color: var(--tp-accent); font-weight: 700; }
.entry-content strong { color: var(--tp-text); font-weight: 700; }
.entry-content img { border-radius: var(--tp-radius-sm); }
.entry-content hr { border: 0; height: 1px; background: var(--tp-border); margin: 3em 0; }
.entry-content blockquote {
	margin-left: 0; margin-right: 0; padding: 20px 28px; border-left: 4px solid var(--tp-accent);
	background: var(--tp-surface); border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0;
	font-size: 1.15rem; font-style: italic; color: var(--tp-text); box-shadow: var(--tp-shadow);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: 10px; font-size: .9rem; font-style: normal; color: var(--tp-muted); }

.entry-content :not(pre) > code {
	font-family: var(--tp-font-mono); font-size: .88em; padding: .15em .45em; border-radius: 6px;
	background: color-mix(in srgb, var(--tp-accent) 10%, transparent); color: var(--tp-accent);
	border: 1px solid color-mix(in srgb, var(--tp-accent) 18%, transparent);
}
.entry-content pre {
	position: relative; font-family: var(--tp-font-mono); font-size: .88rem; line-height: 1.7;
	background: var(--tp-code-bg); color: var(--tp-code-text); padding: 48px 22px 20px; border-radius: var(--tp-radius-sm);
	overflow-x: auto; border: 1px solid rgba(255,255,255,.06); box-shadow: var(--tp-shadow);
}
.entry-content pre::before {
	content: ""; position: absolute; top: 16px; left: 18px; width: 11px; height: 11px; border-radius: 50%;
	background: #ff5f57; box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
}
.entry-content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.entry-content pre[data-lang]::after {
	content: attr(data-lang); position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
	font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45);
}
.tp-copy {
	position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 6px; font: 600 .72rem var(--tp-font);
	background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.12); cursor: pointer;
}
.tp-copy:hover { background: rgba(255,255,255,.16); color: #fff; }

.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--tp-surface); border-radius: var(--tp-radius-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--tp-border); }
.entry-content th, .entry-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--tp-border); }
.entry-content th { background: var(--tp-surface-2); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content .wp-block-table { overflow-x: auto; }

.tp-callout {
	--c: var(--tp-accent);
	padding: 18px 22px 18px 56px; border-radius: var(--tp-radius-sm); position: relative;
	background: color-mix(in srgb, var(--c) 9%, var(--tp-surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
}
.tp-callout::before { content: "💡"; position: absolute; left: 20px; top: 17px; font-size: 1.2rem; font-style: normal; }
.tp-callout--warn { --c: #f59e0b; }
.tp-callout--warn::before { content: "⚠️"; }
.tp-callout p:last-child { margin-bottom: 0; }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { color: var(--tp-muted); font-size: .88rem; text-align: center; margin-top: 8px; }
.sticky, .gallery-caption, .bypostauthor { }

/* Tags, author box, post nav, related */
.tp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; }
.tp-tags a { padding: 6px 14px; border-radius: 999px; background: var(--tp-surface); border: 1px solid var(--tp-border); color: var(--tp-text); font-size: .85rem; font-weight: 500; }
.tp-tags a::before { content: "#"; color: var(--tp-accent); margin-right: 2px; }
.tp-tags a:hover { border-color: var(--tp-accent); color: var(--tp-accent); }

.tp-author-box {
	display: grid; grid-template-columns: 80px 1fr; gap: 20px; align-items: center; margin-top: 40px; padding: 28px;
	background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius);
}
.tp-author-box img { width: 80px; height: 80px; border-radius: 20px; }
.tp-author-box__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tp-muted); font-weight: 700; }
.tp-author-box h3 { margin: 2px 0 6px; font-size: 1.2rem; }
.tp-author-box p { margin: 0; color: var(--tp-muted); font-size: .95rem; }

.tp-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.tp-post-nav a { display: block; padding: 20px 22px; border-radius: var(--tp-radius); background: var(--tp-surface); border: 1px solid var(--tp-border); color: var(--tp-text); height: 100%; transition: all .2s ease; }
.tp-post-nav a:hover { border-color: var(--tp-accent); transform: translateY(-2px); box-shadow: var(--tp-shadow); }
.tp-post-nav small { display: block; color: var(--tp-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 4px; }
.tp-post-nav strong { font-family: var(--tp-font-head); line-height: 1.35; }
.tp-post-nav__next { text-align: right; }

.tp-related { background: var(--tp-surface-2); border-top: 1px solid var(--tp-border); margin-top: 72px; padding: 56px 0; }
.tp-related .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Comments */
.tp-comments { max-width: 740px; margin: 56px auto 0; }
.tp-comments__title { font-size: 1.5rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 20px 22px; margin-bottom: 16px; background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; width: 40px; height: 40px; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; margin: 4px 0 10px 50px; }
.comment-metadata a { color: var(--tp-muted); }
.comment-content { font-size: .98rem; }
.reply a { font-size: .85rem; font-weight: 600; }
.comment-respond { padding: 28px; background: var(--tp-surface); border: 1px solid var(--tp-border); border-radius: var(--tp-radius); }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
	width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--tp-border); background: var(--tp-bg); color: var(--tp-text); font: inherit;
}
.comment-respond input:focus, .comment-respond textarea:focus { outline: none; border-color: var(--tp-accent); }
.comment-respond .submit { background: var(--tp-gradient); color: #fff; border: 0; border-radius: 999px; padding: 12px 26px; font: inherit; font-weight: 700; cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: start; font-size: .9rem; color: var(--tp-muted); }

/* Page / 404 / empty */
.tp-page { max-width: 780px; margin: 0 auto; padding: 56px 0 24px; }
.tp-page__title { font-size: clamp(2rem, 4vw, 3rem); }
.tp-404 { text-align: center; padding: 100px 0; max-width: 620px; margin: 0 auto; }
.tp-404__code { font-family: var(--tp-font-head); font-size: clamp(6rem, 18vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; background: var(--tp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tp-404 p { color: var(--tp-muted); font-size: 1.1rem; }
.tp-404 .tp-searchform { margin: 28px 0; }
.tp-empty { text-align: center; padding: 60px 24px; background: var(--tp-surface); border: 1px dashed var(--tp-border); border-radius: var(--tp-radius); color: var(--tp-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.tp-footer { margin-top: 80px; background: var(--tp-surface); border-top: 1px solid var(--tp-border); padding: 64px 0 28px; font-size: .95rem; }
.tp-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.tp-footer__about p { color: var(--tp-muted); margin: 14px 0 18px; max-width: 340px; }
.tp-footer .tp-social { justify-content: flex-start; }
.tp-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tp-muted); margin-bottom: 16px; }
.tp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tp-footer ul a { color: var(--tp-text); }
.tp-footer ul a:hover { color: var(--tp-accent); }
.tp-footer .widget { background: none; border: 0; padding: 0; }
.tp-footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--tp-border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--tp-muted); font-size: .88rem; }
.tp-footer__bottom a { color: var(--tp-muted); }

.tp-to-top {
	position: fixed; right: 24px; bottom: 24px; z-index: 800; opacity: 0; visibility: hidden; transform: translateY(10px);
	background: var(--tp-gradient); color: #fff; border: 0; box-shadow: var(--tp-shadow-lg);
}
.tp-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.tp-to-top:hover { color: #fff; }

/* Reveal animation */
.tp-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.tp-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.tp-reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
	.tp-article-wrap { grid-template-columns: minmax(0, 740px) 240px; }
	.tp-share { display: none; }
}

@media (max-width: 1024px) {
	.tp-layout { grid-template-columns: minmax(0, 1fr); }
	.tp-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tp-featured { grid-template-columns: 1fr; }
	.tp-featured__side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tp-mini { grid-template-columns: 1fr; }
	.tp-footer__grid { grid-template-columns: 1fr 1fr; }
	.tp-article-wrap { grid-template-columns: minmax(0, 1fr); }
	.tp-toc { display: none; }
	.tp-cta { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.tp-menu-toggle { display: grid; }
	.tp-nav {
		position: fixed; top: 68px; left: 0; right: 0; bottom: 0; background: var(--tp-bg); padding: 24px;
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s ease, transform .25s ease, visibility .25s;
		overflow-y: auto; margin: 0;
	}
	.admin-bar .tp-nav { top: 114px; }
	.tp-nav.is-open { opacity: 1; visibility: visible; transform: none; }
	.tp-nav ul { flex-direction: column; gap: 4px; }
	.tp-nav a { font-size: 1.1rem; padding: 14px 16px; border-radius: 12px; }
	.tp-nav .sub-menu, .tp-nav .children { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 16px; }
	.tp-actions { margin-left: auto; }
	.tp-layout--full .tp-grid, .tp-related .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.tp-container { padding: 0 16px; }
	.tp-hero { padding-top: 32px; }
	.tp-featured__main { min-height: 480px; }
	.tp-featured__main .tp-cover { place-items: start center; padding-top: 44px; }
	.tp-featured__main .tp-cover__icon { margin-bottom: 0; width: 22%; }
	.tp-featured__body { padding: 22px; }
	.tp-featured__side { grid-template-columns: 1fr; }
	.tp-mini { grid-template-columns: 110px 1fr; }
	.tp-grid, .tp-layout--full .tp-grid, .tp-related .tp-grid { grid-template-columns: 1fr; }
	.tp-sidebar { grid-template-columns: 1fr; }
	.tp-footer__grid { grid-template-columns: 1fr; }
	.tp-post-nav { grid-template-columns: 1fr; }
	.tp-post-nav__next { text-align: left; }
	.tp-author-box { grid-template-columns: 1fr; text-align: center; }
	.tp-author-box img { margin: 0 auto; }
	.tp-single-cover .tp-cover { aspect-ratio: 16 / 9; border-radius: var(--tp-radius); }
	.tp-cta { padding: 36px 22px; }
	.tp-cta form { flex-direction: column; border-radius: 16px; }
	.tp-section__head { flex-direction: column; align-items: start; }
	.entry-content { font-size: 1.02rem; }
	.entry-content pre { margin-left: -16px; margin-right: -16px; border-radius: 0; }
}
