/* ==========================================================================
   Klimovitsky Engineer: Blocksy child theme styles
   Look: blueprint grid, copper PCB traces, component-style cards,
   monospace "reference designator" labels. No web fonts, no JS.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	--ke-bg: #f4f6f9;
	--ke-surface: #ffffff;
	--ke-surface-2: #eef2f7;
	--ke-text: #1b2333;
	--ke-muted: #556073;
	--ke-border: #d9e0ea;
	--ke-copper: #a8541c;        /* text-safe copper on light (5.0:1 on white) */
	--ke-copper-bright: #e0894a; /* decorative traces */
	--ke-signal: #0a62c2;        /* links (5.6:1 on white) */
	--ke-signal-soft: rgba(10, 98, 194, .09);
	--ke-ok: #0f8a5f;

	/* Always-dark bands (header, hero, footer) */
	--ke-ink: #070e1b;
	--ke-ink-2: #0c1628;
	--ke-ink-line: rgba(122, 170, 255, .085);
	--ke-ink-text: #e7edf6;
	--ke-ink-muted: #9fb0c8;

	--ke-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
	--ke-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ke-radius: 10px;
	--ke-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
	--ke-wrap: 1200px;

	/* Hand the palette to Blocksy */
	--theme-palette-color-1: var(--ke-signal);
	--theme-palette-color-2: var(--ke-copper);
	--theme-palette-color-3: var(--ke-text);
	--theme-palette-color-4: var(--ke-text);
	--theme-palette-color-5: var(--ke-border);
	--theme-palette-color-6: var(--ke-surface-2);
	--theme-palette-color-7: var(--ke-bg);
	--theme-palette-color-8: var(--ke-surface);
	--theme-text-color: var(--ke-text);
	--theme-headings-color: var(--ke-text);
	--theme-link-initial-color: var(--ke-signal);
	--theme-link-hover-color: var(--ke-copper);
	--theme-border-color: var(--ke-border);
	--theme-button-background-initial-color: var(--ke-signal);
	--theme-button-background-hover-color: var(--ke-copper);
	--theme-font-family: var(--ke-sans);
	--theme-content-spacing: 1.4em;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ke-bg: #0a1120;
		--ke-surface: #101a2c;
		--ke-surface-2: #0d1626;
		--ke-text: #e4eaf3;
		--ke-muted: #a2afc3;
		--ke-border: #22304a;
		--ke-copper: #eb9a5f;
		--ke-copper-bright: #f0a067;
		--ke-signal: #6cb4ff;
		--ke-signal-soft: rgba(108, 180, 255, .1);
		--ke-ok: #3ccf98;
		--ke-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
		color-scheme: dark;
	}
}

/* ---------- 2. Base ---------- */
body.ke {
	background-color: var(--ke-bg);
	color: var(--ke-text);
	font-family: var(--ke-sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.ke h1, body.ke h2, body.ke h3, body.ke h4 {
	letter-spacing: -.015em;
	font-weight: 700;
	color: var(--ke-text);
}
body.ke a { text-underline-offset: .18em; text-decoration-thickness: 1px; }
body.ke ::selection { background: var(--ke-copper-bright); color: #0b0f17; }
body.ke :focus-visible { outline: 2px solid var(--ke-copper-bright); outline-offset: 3px; border-radius: 4px; }

/* Mono labels used across the site: "// SECTION" */
.ke-eyebrow, .ke-ref, .ke-mono {
	font-family: var(--ke-mono);
	font-size: .78rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.ke-eyebrow { color: var(--ke-copper); font-weight: 600; margin: 0 0 .9rem !important; }
.ke-eyebrow::before { content: "// "; opacity: .65; }

/* ---------- 3. Header (always dark) ---------- */
body.ke #header [data-row] {
	background: rgba(7, 14, 27, .94);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid rgba(224, 137, 74, .28);
	box-shadow: none;
}
body.ke #header [data-row="middle"] { --height: 76px; }
body.ke #header .site-title { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
body.ke #header .site-title a {
	color: var(--ke-ink-text);
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
}
/* IC-package mark drawn in CSS (no image request) */
body.ke #header .site-title a::before {
	content: "MK";
	display: inline-grid;
	place-items: center;
	width: 38px; height: 38px;
	flex: 0 0 38px;
	font: 700 .78rem/1 var(--ke-mono);
	letter-spacing: .04em;
	color: #0b0f17;
	background:
		radial-gradient(circle at 7px 7px, #0b0f17 2px, transparent 2.5px),
		linear-gradient(135deg, #f2a466, #c76a2b);
	border-radius: 6px;
	box-shadow:
		-5px 0 0 -3px #c8d3e3, 5px 0 0 -3px #c8d3e3,
		0 0 0 1px rgba(255, 255, 255, .08), 0 6px 16px -6px rgba(224, 137, 74, .7);
}
body.ke #header .site-description, body.ke #header .site-title-container .site-description {
	font-family: var(--ke-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ke-ink-muted);
}
body.ke #header .ct-menu-link {
	color: #c9d5e6;
	font-size: .86rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: none;
}
body.ke #header .menu-item > .ct-menu-link:hover,
body.ke #header .current-menu-item > .ct-menu-link,
body.ke #header .current_page_item > .ct-menu-link { color: #fff; }
body.ke #header [data-menu] > ul > li > .ct-menu-link::before { background: var(--ke-copper-bright) !important; }
body.ke #header .ct-header-trigger, body.ke #header .ct-header-search { color: #c9d5e6; --theme-icon-color: #c9d5e6; --theme-icon-hover-color: #fff; }
body.ke #offcanvas .ct-panel-inner { background: var(--ke-ink); }
body.ke #offcanvas .ct-menu-link { color: var(--ke-ink-text); }
body.ke #offcanvas .ct-toggle-close { --theme-icon-color: #c9d5e6; }

/* ---------- 4. Buttons ---------- */
.ke-btn, body.ke .wp-block-button__link, body.ke .ct-button, body.ke button[type="submit"], body.ke input[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	min-height: 46px;
	padding: .75rem 1.25rem;
	border-radius: 8px;
	font-weight: 650;
	font-size: .95rem;
	line-height: 1.1;
	text-decoration: none !important;
	transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.ke-btn--primary, body.ke .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: linear-gradient(180deg, #f0a067, #d17533);
	color: #120a03 !important;
	border: 1px solid #f3b183;
	box-shadow: 0 8px 22px -10px rgba(224, 137, 74, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.ke-btn--primary:hover, body.ke .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { transform: translateY(-1px); color: #120a03 !important; filter: brightness(1.05); }
.ke-btn--ghost, body.ke .is-style-outline .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 1px solid currentColor;
}
.ke-band-dark .ke-btn--ghost, .ke-band-dark .is-style-outline .wp-block-button__link { color: var(--ke-ink-text) !important; border-color: rgba(201, 213, 230, .45); }
.ke-btn--ghost:hover, body.ke .is-style-outline .wp-block-button__link:hover { border-color: var(--ke-copper-bright); color: var(--ke-copper-bright) !important; transform: translateY(-1px); }
.ke-btn .ke-arrow { font-family: var(--ke-mono); }

/* ---------- 5. Landing layout ---------- */
body.ke-is-landing #main-container > main { padding: 0 !important; }
body.ke-is-landing .hero-section { display: none; }
.ke-landing > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.ke-band { position: relative; padding: clamp(64px, 9vw, 120px) 16px; }
.ke-band > .ke-wrap, .ke-wrap { width: 100%; max-width: var(--ke-wrap); margin-inline: auto; position: relative; z-index: 1; }
.ke-band-dark {
	background-color: var(--ke-ink);
	color: var(--ke-ink-text);
	background-image:
		linear-gradient(var(--ke-ink-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--ke-ink-line) 1px, transparent 1px),
		linear-gradient(rgba(122, 170, 255, .035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(122, 170, 255, .035) 1px, transparent 1px);
	background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
	background-position: -1px -1px;
}
body.ke .ke-band-dark h1, body.ke .ke-band-dark h2, body.ke .ke-band-dark h3 { color: #fff; }
.ke-band-dark p { color: var(--ke-ink-muted); }
.ke-band-alt { background: var(--ke-surface-2); border-block: 1px solid var(--ke-border); }
.ke-section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px) !important; }
.ke-section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; margin: 0 0 .9rem; }
.ke-section-head p { color: var(--ke-muted); font-size: 1.08rem; line-height: 1.65; margin: 0; }

/* ---------- 6. Hero ---------- */
.ke-hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(64px, 9vw, 120px); overflow: hidden; }
.ke-hero::after { /* soft glow behind the portrait */
	content: ""; position: absolute; z-index: 0; pointer-events: none;
	width: 720px; height: 720px; right: -120px; top: -80px;
	background: radial-gradient(closest-side, rgba(108, 180, 255, .16), transparent 70%);
}
.ke-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
body.ke .ke-hero h1 {
	font-size: clamp(2.5rem, 6.2vw, 4.6rem);
	line-height: 1.02;
	letter-spacing: -.035em;
	margin: 0 0 1.1rem;
	color: #fff;
}
.ke-hero h1 .ke-hl {
	background: linear-gradient(90deg, #f6b07c, #e0894a 45%, #6cb4ff);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ke-hero .ke-role { font-family: var(--ke-mono); font-size: .9rem; color: #c9d5e6; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.ke-hero .ke-role span { display: inline-flex; align-items: center; gap: .5rem; }
.ke-hero .ke-role span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ke-copper-bright); box-shadow: 0 0 10px var(--ke-copper-bright); }
.ke-hero .ke-lead { font-size: clamp(1.06rem, 1.5vw, 1.2rem); line-height: 1.7; color: #b8c6da; max-width: 36em; margin: 0 0 2rem; }
.ke-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Spec readout under the buttons */
.ke-spec {
	margin: 2.4rem 0 0; padding: 0; list-style: none;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	border: 1px solid rgba(122, 170, 255, .18); border-radius: var(--ke-radius);
	background: rgba(12, 22, 40, .6);
}
.ke-spec li { padding: .9rem 1rem; border-left: 1px solid rgba(122, 170, 255, .14); margin: 0; }
.ke-spec li:first-child { border-left: 0; }
.ke-spec b { display: block; font: 600 .68rem/1.3 var(--ke-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ke-copper-bright); margin-bottom: .35rem; }
.ke-spec span { color: #dbe4f1; font-size: .9rem; line-height: 1.4; }

/* Portrait in a chip frame */
.ke-chip {
	position: relative; aspect-ratio: 1; max-width: 460px; margin-inline: auto; width: 100%;
	border-radius: 22px; padding: 22px;
	background: linear-gradient(160deg, #13223d, #0a1324);
	border: 1px solid rgba(122, 170, 255, .22);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ke-chip::before, .ke-chip::after { /* pins left and right */
	content: ""; position: absolute; top: 14%; bottom: 14%; width: 14px;
	background: repeating-linear-gradient(180deg, #b9c6d8 0 10px, transparent 10px 26px);
	opacity: .55;
}
.ke-chip::before { left: -14px; border-radius: 3px 0 0 3px; }
.ke-chip::after { right: -14px; border-radius: 0 3px 3px 0; }
.ke-chip-inner {
	position: relative; height: 100%; border-radius: 14px; overflow: hidden;
	background: radial-gradient(circle at 50% 45%, #f4f8ff 0, #dfe9f7 55%, #c4d4ea 100%);
	display: grid; place-items: center;
}
.ke-chip-inner img { width: 92%; height: auto; display: block; }
.ke-chip-label {
	position: absolute; left: 22px; right: 22px; bottom: -36px;
	display: flex; justify-content: space-between;
	font: 600 .68rem/1 var(--ke-mono); letter-spacing: .12em; color: var(--ke-ink-muted); text-transform: uppercase;
}
.ke-chip-dot { position: absolute; top: 34px; left: 34px; width: 12px; height: 12px; border-radius: 50%; background: #0b1426; box-shadow: inset 0 0 0 2px rgba(122, 170, 255, .4); z-index: 2; }

/* Animated traces (decorative SVG) */
.ke-traces { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.ke-traces path { fill: none; stroke: rgba(224, 137, 74, .32); stroke-width: 1.5; }
.ke-traces .ke-pulse { stroke: #f0a067; stroke-width: 2; stroke-dasharray: 10 600; animation: ke-flow 6s linear infinite; filter: drop-shadow(0 0 4px rgba(240, 160, 103, .9)); }
.ke-traces .ke-pulse.d2 { animation-delay: -2s; animation-duration: 7s; }
.ke-traces .ke-pulse.d3 { animation-delay: -4s; animation-duration: 8s; }
.ke-traces circle { fill: #0a1324; stroke: rgba(224, 137, 74, .55); stroke-width: 1.5; }
@keyframes ke-flow { from { stroke-dashoffset: 610; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
	.ke-traces .ke-pulse { animation: none; stroke-dasharray: none; opacity: .25; }
	.ke-btn, .wp-block-button__link, .ke-card, .ke-post { transition: none !important; }
}

/* ---------- 7. Component cards (pillars) ---------- */
.ke-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.ke-card {
	position: relative; margin: 0 !important;
	background: var(--ke-surface); border: 1px solid var(--ke-border); border-radius: var(--ke-radius);
	padding: 28px 26px 26px; box-shadow: var(--ke-shadow);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ke-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ke-copper) 45%, var(--ke-border)); }
.ke-card::before { /* top copper trace */
	content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 2px;
	background: linear-gradient(90deg, var(--ke-copper-bright), transparent);
}
.ke-card .ke-ref { color: var(--ke-muted); display: flex; justify-content: space-between; margin: 0 0 1.2rem; font-size: .72rem; }
.ke-card .ke-ref em { font-style: normal; color: var(--ke-ok); }
.ke-card .ke-icon { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--ke-signal-soft); color: var(--ke-signal); margin-bottom: 1.1rem; }
.ke-card .ke-icon svg { width: 34px; height: 34px; }
.ke-card h3 { font-size: 1.25rem; margin: 0 0 .6rem; }
.ke-card p { color: var(--ke-muted); line-height: 1.65; margin: 0; }

/* ---------- 8. About + signal path ---------- */
.ke-about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.ke-about-grid h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; margin: 0 0 1rem; }
.ke-about-grid p { font-size: 1.08rem; line-height: 1.75; color: var(--ke-muted); }
.ke-path { list-style: none; margin: 0; padding: 0; position: relative; }
.ke-path::before { /* the bus line */
	content: ""; position: absolute; left: 92px; top: 10px; bottom: 10px; width: 2px;
	background: linear-gradient(180deg, var(--ke-copper-bright), var(--ke-signal));
	opacity: .55; border-radius: 2px;
}
.ke-path li { display: grid; grid-template-columns: 76px 32px 1fr; align-items: start; gap: 0; margin: 0; padding: 0 0 18px; }
.ke-path time { font: 600 .82rem/1.6 var(--ke-mono); color: var(--ke-copper); text-align: right; padding-right: 2px; }
.ke-path .ke-node { justify-self: center; margin-top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ke-surface); border: 2px solid var(--ke-copper-bright); position: relative; left: 0; }
.ke-path li.is-now .ke-node { background: var(--ke-copper-bright); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ke-copper-bright) 22%, transparent); }
.ke-path .ke-step { background: var(--ke-surface); border: 1px solid var(--ke-border); border-radius: 8px; padding: 12px 14px; box-shadow: var(--ke-shadow); }
.ke-path .ke-step strong { display: block; font-size: 1rem; line-height: 1.35; color: var(--ke-text); }
.ke-path .ke-step span { display: block; font-size: .9rem; color: var(--ke-muted); margin-top: 2px; }
.ke-path .ke-kind { font: 600 .66rem/1 var(--ke-mono); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; margin-left: .4rem; vertical-align: 2px; }
.ke-kind.k-work { color: var(--ke-signal); background: var(--ke-signal-soft); }
.ke-kind.k-edu { color: var(--ke-copper); background: color-mix(in srgb, var(--ke-copper) 12%, transparent); }
.ke-more { margin-top: 1.4rem !important; font-weight: 650; }
.ke-more a { text-decoration: none; }
.ke-more a::after { content: " →"; font-family: var(--ke-mono); }

/* ---------- 9. Writing (query loop + archives) ---------- */
.ke-posts .wp-block-post-template { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.ke-posts .wp-block-post { margin: 0 !important; }
.ke-post {
	height: 100%; display: flex; flex-direction: column;
	background: var(--ke-surface); border: 1px solid var(--ke-border); border-radius: var(--ke-radius);
	overflow: hidden; box-shadow: var(--ke-shadow);
	transition: transform .2s ease, border-color .2s ease;
}
.ke-post:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ke-signal) 45%, var(--ke-border)); }
.ke-post .wp-block-post-featured-image { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ke-ink-2) linear-gradient(135deg, #13223d, #0a1324); }
.ke-post .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ke-post .ke-post-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.ke-post .wp-block-post-date { font: 600 .74rem/1 var(--ke-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ke-copper); margin: 0; }
.ke-post .wp-block-post-title { font-size: 1.15rem; line-height: 1.3; margin: 0; }
.ke-post .wp-block-post-title a { color: var(--ke-text); text-decoration: none; }
.ke-post .wp-block-post-title a:hover { color: var(--ke-signal); }
.ke-post .wp-block-post-excerpt { color: var(--ke-muted); font-size: .95rem; line-height: 1.6; margin: 0; }
.ke-post .wp-block-post-excerpt__more-text { display: none; }

/* Blocksy archive cards (Writing page, categories, search) */
body.ke .entries[data-layout] > article,
body.ke .entries .entry-card {
	background: var(--ke-surface); border: 1px solid var(--ke-border); border-radius: var(--ke-radius);
	box-shadow: var(--ke-shadow); overflow: hidden;
}
body.ke .entry-card .entry-title a { color: var(--ke-text); }
body.ke .entry-card .entry-title a:hover { color: var(--ke-signal); }
body.ke .entry-meta { font-family: var(--ke-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ke-copper); }
body.ke .entry-meta a { color: inherit; }
body.ke .ct-ghost { background: transparent; }

/* ---------- 10. Page title band (Blocksy hero type-2, full width) ---------- */
body.ke .hero-section[data-type="type-2"] {
	--min-height: 0;
	margin-bottom: clamp(32px, 5vw, 56px);
	background-color: var(--ke-ink);
	background-image:
		linear-gradient(var(--ke-ink-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--ke-ink-line) 1px, transparent 1px),
		radial-gradient(900px 300px at 85% 0%, rgba(108, 180, 255, .14), transparent 70%);
	background-size: 48px 48px, 48px 48px, auto;
	border-bottom: 1px solid rgba(224, 137, 74, .32);
	position: relative;
}
body.ke .hero-section[data-type="type-2"]::after { /* copper trace along the bottom */
	content: ""; position: absolute; left: 0; bottom: -1px; width: min(320px, 40%); height: 2px;
	background: linear-gradient(90deg, var(--ke-copper-bright), transparent);
}
body.ke .hero-section[data-type="type-2"] .ct-image-container, body.ke .hero-section[data-type="type-2"] figure { display: none; }
body.ke .hero-section[data-type="type-2"] > [class*="ct-container"] { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
body.ke .hero-section[data-type="type-2"] .entry-header { text-align: left; align-items: flex-start; }
body.ke .hero-section[data-type="type-2"] .entry-header::before {
	display: block; font: 600 .74rem/1 var(--ke-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ke-copper-bright); margin-bottom: 1rem;
}
body.ke.single-post .hero-section .entry-header::before { content: "// Writing"; }
body.ke.blog .hero-section .entry-header::before { content: "// Thoughts and projects"; }
body.ke.category .hero-section .entry-header::before { content: "// Category"; }
body.ke.search .hero-section .entry-header::before { content: "// Search"; }
body.ke.page .hero-section .entry-header::before { content: "// klimovitsky.info"; }
body.ke .hero-section .page-title, body.ke .hero-section .entry-title { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; letter-spacing: -.028em; max-width: 22ch; }
body.ke .hero-section .page-description, body.ke .hero-section .ct-breadcrumbs { color: var(--ke-ink-muted); font-size: 1.08rem; max-width: 60ch; }
body.ke .hero-section .entry-meta, body.ke .hero-section .entry-meta a { color: var(--ke-copper-bright); }
body.ke .hero-section .entry-meta .ct-media-container img { border-radius: 50%; }

/* ---------- 11. Article typography ---------- */
body.ke .entry-content { font-size: 1.075rem; line-height: 1.78; }
body.ke .entry-content > h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-top: 2.2em; padding-top: .2em; position: relative; }
body.ke .entry-content > h2::before { content: ""; display: block; width: 44px; height: 3px; border-radius: 2px; margin-bottom: .7rem; background: linear-gradient(90deg, var(--ke-copper-bright), var(--ke-signal)); }
body.ke .entry-content > h3 { font-size: 1.25rem; margin-top: 1.8em; }
body.ke .entry-content a { color: var(--ke-signal); }
body.ke .entry-content a:hover { color: var(--ke-copper); }
body.ke .entry-content blockquote, body.ke .entry-content .wp-block-quote {
	border-left: 3px solid var(--ke-copper-bright); background: var(--ke-surface-2); border-radius: 0 8px 8px 0;
	padding: 1rem 1.3rem; margin-inline: 0;
}
body.ke .entry-content code, body.ke .entry-content kbd { font-family: var(--ke-mono); font-size: .88em; background: var(--ke-surface-2); border: 1px solid var(--ke-border); padding: .1em .4em; border-radius: 4px; }
body.ke .entry-content pre { font-family: var(--ke-mono); background: var(--ke-ink); color: #dbe4f1; border-radius: var(--ke-radius); border: 1px solid #1d2a42; padding: 1.1rem 1.25rem; overflow-x: auto; }
body.ke .entry-content pre code { background: none; border: 0; padding: 0; color: inherit; }
body.ke .entry-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
body.ke .entry-content th { background: var(--ke-surface-2); font-family: var(--ke-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
body.ke .entry-content th, body.ke .entry-content td { border: 1px solid var(--ke-border); padding: .6rem .8rem; }
body.ke .entry-content img { border-radius: 8px; }
body.ke .entry-content hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--ke-border), transparent); }
body.ke .entry-content .wp-block-image figcaption { font-size: .85rem; color: var(--ke-muted); }

/* Author box, related posts, comments, share */
body.ke .author-box, body.ke .ct-related-posts-container, body.ke .ct-comments-container { background: var(--ke-surface-2); }
body.ke .ct-related-posts .related-entry-title a { color: var(--ke-text); }

/* ---------- 12. Forms (WPForms, search) ---------- */
body.ke input[type="text"], body.ke input[type="email"], body.ke input[type="url"], body.ke input[type="tel"],
body.ke input[type="search"], body.ke textarea, body.ke select {
	background: var(--ke-surface); color: var(--ke-text); border: 1px solid var(--ke-border); border-radius: 8px;
}
body.ke input:focus, body.ke textarea:focus, body.ke select:focus { border-color: var(--ke-signal); box-shadow: 0 0 0 3px var(--ke-signal-soft); outline: none; }
body.ke .wpforms-container .wpforms-field-label { color: var(--ke-text) !important; font-weight: 650; }
body.ke .wpforms-container .wpforms-submit {
	background: linear-gradient(180deg, #f0a067, #d17533) !important; color: #120a03 !important;
	border: 1px solid #f3b183 !important; border-radius: 8px !important; font-weight: 650 !important; padding: .8rem 1.4rem !important; height: auto !important;
}
body.ke .wpforms-container { --wpforms-field-background-color: var(--ke-surface); --wpforms-field-text-color: var(--ke-text); --wpforms-label-color: var(--ke-text); --wpforms-field-border-color: var(--ke-border); }

/* ---------- 13. Contact band ---------- */
.ke-contact-box {
	display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 56px); align-items: center;
	border: 1px solid rgba(122, 170, 255, .2); border-radius: 18px; padding: clamp(28px, 5vw, 56px);
	background: linear-gradient(140deg, rgba(19, 34, 61, .9), rgba(7, 14, 27, .9));
	box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9);
}
.ke-contact-box h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.1; margin: 0 0 1rem; }
.ke-contact-box p { font-size: 1.08rem; line-height: 1.7; margin: 0; }
.ke-contact-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ke-contact-links li { margin: 0; }
.ke-contact-links a {
	display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; border-radius: 10px;
	border: 1px solid rgba(122, 170, 255, .2); background: rgba(255, 255, 255, .03);
	color: var(--ke-ink-text) !important; text-decoration: none; font-weight: 600;
	transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.ke-contact-links a:hover { border-color: var(--ke-copper-bright); background: rgba(224, 137, 74, .08); transform: translateX(3px); }
.ke-contact-links small { display: block; font: 600 .66rem/1.2 var(--ke-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ke-copper-bright); margin-bottom: 2px; }
.ke-contact-links .ke-ci { flex: 0 0 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: rgba(108, 180, 255, .12); color: #8cc4ff; }
.ke-contact-links .ke-ci svg { width: 20px; height: 20px; }

/* ---------- 14. Timeline page (Cool Timeline plugin) ---------- */
body.ke .ctl-wrapper {
	--ctw-first-story-color: #0c1628;
	--ctw-second-story-color: #0c1628;
	--ctw-line-bg: var(--ke-copper-bright);
	--ctw-ybx-bg: var(--ke-ink);
	--ctw-cbx-des-background: var(--ke-surface);
	--ctw-cbx-date-font-family: var(--ke-mono);
	--ctw-cbx-desc-font-family: var(--ke-sans);
	--ctw-cbx-title-font-family: var(--ke-sans);
	--ctw-cbx-main-title-font-family: var(--ke-sans);
	--ctw-cbx-title-font-size: 18px;
	--ctw-cbx-date-font-size: 15px;
	--ctw-cbx-desc-font-size: 15.5px;
}
body.ke .ctl-wrapper .ctl-title { border-bottom: 2px solid var(--ke-copper-bright); line-height: 1.35; }
body.ke .ctl-wrapper .ctl-title, body.ke .ctl-wrapper .ctl-title a { color: #fff !important; text-decoration: none; }
body.ke .ctl-wrapper .ctl-title a:hover { color: var(--ke-copper-bright) !important; }
body.ke .ctl-wrapper .ctl-content { border: 1px solid var(--ke-border); border-radius: var(--ke-radius); overflow: hidden; box-shadow: var(--ke-shadow); }
body.ke .ctl-wrapper .ctl-description, body.ke .ctl-wrapper .ctl-description p { color: var(--ke-muted) !important; line-height: 1.7; }
body.ke .ctl-wrapper .ctl-media.full { background: #fff; padding: 12px; }
body.ke .ctl-wrapper .ctl-label-big { color: var(--ke-copper) !important; letter-spacing: .04em; }
body.ke .ctl-wrapper .ctl-icondot { background: var(--ke-copper-bright) !important; box-shadow: 0 0 0 5px color-mix(in srgb, var(--ke-copper-bright) 22%, transparent); }
body.ke .ctl-wrapper .ctl-year-label { font-family: var(--ke-mono); color: #fff !important; }
body.ke .ctl-wrapper .ctl-inner-line { background: linear-gradient(180deg, var(--ke-copper-bright), var(--ke-signal)) !important; }

/* ---------- 15. Footer (always dark) ---------- */
body.ke #footer [data-row] {
	background: var(--ke-ink);
	border-top: 1px solid rgba(224, 137, 74, .25);
	color: var(--ke-ink-muted);
}
body.ke #footer .ct-footer-copyright { color: var(--ke-ink-muted); font-size: .88rem; }
body.ke #footer .ke-foot-sep { color: var(--ke-copper-bright); font-family: var(--ke-mono); margin: 0 .35rem; }
body.ke #footer a { color: #c9d5e6; }

/* Back-to-top button */
body.ke .ct-back-to-top { background: var(--ke-copper-bright); color: #120a03; }

/* ---------- 16. Responsive ---------- */
@media (max-width: 999.98px) {
	.ke-hero-grid, .ke-about-grid, .ke-contact-box { grid-template-columns: minmax(0, 1fr); }
	body.ke .ke-hero .ke-hero-art { order: -1; max-width: 360px; margin: 0 auto 64px !important; width: 100%; }
	.ke-cards, .ke-posts .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ke-cards > :last-child:nth-child(odd), .ke-posts .wp-block-post-template > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 689.98px) {
	.ke-band { padding-inline: 16px; }
	.ke-cards, .ke-posts .wp-block-post-template { grid-template-columns: minmax(0, 1fr); }
	.ke-spec { grid-template-columns: minmax(0, 1fr); }
	.ke-spec li { border-left: 0; border-top: 1px solid rgba(122, 170, 255, .14); }
	.ke-spec li:first-child { border-top: 0; }
	body.ke .ke-hero .ke-hero-art { max-width: 280px; }
	.ke-traces { opacity: .35; }
	.ke-chip { padding: 14px; border-radius: 18px; }
	.ke-chip-dot { top: 24px; left: 24px; }
	.ke-path::before { left: 72px; }
	.ke-path li { grid-template-columns: 56px 32px 1fr; }
	.ke-path time { font-size: .76rem; }
	.ke-actions .ke-btn { flex: 1 1 auto; justify-content: center; }
	body.ke #header .site-title a::before { width: 32px; height: 32px; flex-basis: 32px; font-size: .7rem; }
}

/* ---------- 17. Editor ---------- */
.editor-styles-wrapper .ke-band { padding-block: 48px; }

/* Hide any logo image Blocksy still prints; the chip mark replaces it */
body.ke #header .site-logo-container { display: none; }

/* Archive cards: keep long excerpts from stretching the grid */
body.ke .entry-card .entry-excerpt { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
/* Contact form: same measure as the intro paragraph */
body.ke .entry-content .wpforms-container { max-width: 760px; }

/* ---------- 18. wpDataTables tables (follow the theme in light and dark) ---------- */
body.ke .wpdt-c .wpDataTablesWrapper { background: transparent !important; }
body.ke .wpdt-c table.wpDataTable {
	border: 1px solid var(--ke-border) !important; border-radius: var(--ke-radius); overflow: hidden;
	border-collapse: separate !important; border-spacing: 0 !important; background: var(--ke-surface) !important;
	font-size: .95rem; margin: 0 !important;
}
body.ke .wpdt-c table.wpDataTable thead th,
body.ke .wpdt-c table.wpDataTable thead th.sorting,
body.ke .wpdt-c table.wpDataTable thead th.sorting_asc,
body.ke .wpdt-c table.wpDataTable thead th.sorting_desc {
	background: var(--ke-surface-2) !important; color: var(--ke-text) !important;
	border: 0 !important; border-bottom: 2px solid var(--ke-copper-bright) !important;
	font-family: var(--ke-mono); font-size: .72rem !important; letter-spacing: .06em; text-transform: uppercase; font-weight: 700 !important;
}
body.ke .wpdt-c table.wpDataTable tbody tr td,
body.ke .wpdt-c table.wpDataTable tbody tr.odd td,
body.ke .wpdt-c table.wpDataTable tbody tr.even td {
	background: var(--ke-surface) !important; color: var(--ke-text) !important;
	border: 0 !important; border-top: 1px solid var(--ke-border) !important;
	font-variant-numeric: tabular-nums;
}
body.ke .wpdt-c table.wpDataTable tbody tr.even td { background: var(--ke-surface-2) !important; }
body.ke .wpdt-c table.wpDataTable tbody tr:hover td { background: var(--ke-signal-soft) !important; }
body.ke .wpdt-c table.wpDataTable thead th.sorting::after,
body.ke .wpdt-c table.wpDataTable thead th.sorting_asc::after,
body.ke .wpdt-c table.wpDataTable thead th.sorting_desc::after { color: var(--ke-copper) !important; opacity: 1; }
body.ke .wpdt-c .dataTables_info, body.ke .wpdt-c .dataTables_empty { color: var(--ke-muted) !important; }
body.ke .wpdt-c table.wpDataTable tfoot, body.ke .wpdt-c table.wpDataTable tfoot tr, body.ke .wpdt-c table.wpDataTable tfoot td, body.ke .wpdt-c table.wpDataTable tfoot th { display: none !important; }
