/*
 * Circuits DIY 3.0 — the stylesheet.
 *
 * Hand-written rather than compiled: no build step on the server, and every
 * class name says what it styles. Colours, fonts and widths come from the
 * Customizer (--bh-*) with a fallback for each, so the theme looks right before
 * anything is set.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --hx-primary: var(--bh-primary, #0a64dc);
    --hx-primary-dark: color-mix(in srgb, var(--hx-primary) 82%, #000);
    --hx-primary-soft: color-mix(in srgb, var(--hx-primary) 10%, #fff);
    --hx-accent: var(--bh-accent, #ffd400);
    --hx-ink: #0f1728;
    --hx-ink-2: #344054;
    --hx-muted: #667085;
    --hx-line: #e4e7ec;
    --hx-line-2: #d0d5dd;
    --hx-bg: #f6f8fb;
    --hx-card: #fff;
    --hx-header-bg: var(--bh-header-bg, #fff);
    --hx-footer-bg: var(--bh-footer-bg, #0b1220);
    --hx-radius: 14px;
    --hx-radius-sm: 10px;
    --hx-shadow: 0 1px 2px rgb(16 24 40 / .05);
    --hx-shadow-lg: 0 12px 32px -12px rgb(16 24 40 / .22);
    --hx-font: var(--bh-font-body, Inter, system-ui, -apple-system, "Segoe UI", sans-serif);
    --hx-font-head: var(--bh-font-heading, Inter, system-ui, -apple-system, "Segoe UI", sans-serif);
    --hx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --hx-width: var(--bh-content-width, 1240px);
    --hx-side: var(--bh-sidebar-width, 300px);
    --hx-header-h: 68px;
    --bh-accent: var(--hx-primary); /* core components (buttons, avatars) follow the brand */
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hx-header-h) + 16px); }
body {
    margin: 0; font-family: var(--hx-font); font-size: var(--bh-font-size, 16px); line-height: 1.6;
    color: var(--hx-ink); background: #fff; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--hx-primary); text-decoration: none; }
a:hover { color: var(--hx-primary-dark); }
h1, h2, h3, h4 { font-family: var(--hx-font-head); color: var(--hx-ink); line-height: 1.2; letter-spacing: -.015em; margin: 0; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 2px; }
.hx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hx-skip { position: absolute; left: -9999px; top: 12px; z-index: 300; padding: .6rem 1rem; border-radius: 8px; background: var(--hx-ink); color: #fff; font-weight: 600; }
.hx-skip:focus { left: 12px; }
.hx-wrap { width: 100%; max-width: var(--hx-width); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .hx-wrap { padding: 0 32px; } }
.hx-icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.hx-header {
    position: sticky; top: 0; z-index: 80; background: var(--hx-header-bg);
    border-bottom: 1px solid var(--hx-line); transition: box-shadow .2s;
}
.hx-header.is-scrolled { box-shadow: 0 6px 20px -12px rgb(16 24 40 / .25); }
.hx-header--static { position: relative; }
.hx-header__bar { display: flex; align-items: center; gap: 12px; height: var(--hx-header-h); }
.hx-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hx-ink); flex: 0 0 auto; min-width: 0; }
.hx-brand:hover { color: var(--hx-ink); }
.hx-brand__mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    background: var(--hx-ink); color: var(--hx-accent); flex: 0 0 auto;
}
.hx-brand__mark svg { width: 22px; height: 22px; }
.hx-brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.hx-brand__name { font-family: var(--hx-font-head); font-weight: 800; font-size: 1.22rem; letter-spacing: -.03em; white-space: nowrap; }
.hx-brand__name b { color: var(--hx-primary); font-weight: 800; }
.hx-brand__tag { font-size: .7rem; color: var(--hx-muted); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-brand img { max-height: 42px; max-width: 220px; width: auto; object-fit: contain; }
body[data-logo="small"] .hx-brand img { max-height: 34px; max-width: 180px; }
body[data-logo="large"] .hx-brand img { max-height: 52px; max-width: 280px; }
@media (max-width: 1023.98px) { .hx-header .hx-brand img { max-height: 36px; max-width: 170px; } }
.hx-footer .hx-brand img { max-height: 44px; max-width: 240px; }

/* Primary navigation (menu_html markup) */
.hx-nav { display: none; margin-left: 18px; flex: 1 1 auto; min-width: 0; }
.hx-nav > .bh-menu { display: flex; align-items: center; gap: 2px; list-space: none; margin: 0; padding: 0; list-style: none; }
.hx-nav .bh-menu__item { position: relative; list-style: none; }
.hx-nav > .bh-menu > .bh-menu__item > .bh-menu__link {
    display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border-radius: 8px;
    color: var(--hx-ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.hx-nav > .bh-menu > .bh-menu__item > .bh-menu__link:hover,
.hx-nav > .bh-menu > .bh-menu__item:focus-within > .bh-menu__link,
.hx-nav .bh-menu__link[aria-current="page"] { background: var(--hx-bg); color: var(--hx-ink); }
.hx-nav .bh-menu__caret { opacity: .6; transition: transform .2s; }
.hx-nav .bh-menu__item--parent:hover > .bh-menu__link .bh-menu__caret { transform: rotate(180deg); }
.hx-nav .bh-submenu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 90; min-width: 240px; margin: 0; padding: 8px;
    list-style: none; background: #fff; border: 1px solid var(--hx-line); border-radius: 12px; box-shadow: var(--hx-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility .16s;
}
.hx-nav .bh-submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.hx-nav .bh-menu__item--parent:hover > .bh-submenu,
.hx-nav .bh-menu__item--parent:focus-within > .bh-submenu,
.hx-nav .bh-menu__link[aria-expanded="true"] + .bh-submenu { opacity: 1; visibility: visible; transform: none; }
.hx-nav .bh-submenu .bh-menu__link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px;
    color: var(--hx-ink-2); font-size: .9rem; font-weight: 500;
}
.hx-nav .bh-submenu .bh-menu__link:hover { background: var(--hx-primary-soft); color: var(--hx-primary-dark); }
.hx-nav .bh-submenu .bh-submenu { top: -9px; left: calc(100% + 6px); }

.hx-header__tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hx-search { position: relative; display: none; }
.hx-search input {
    width: 250px; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--hx-line); border-radius: 999px;
    background: var(--hx-bg); color: var(--hx-ink); font: inherit; font-size: .9rem; transition: border-color .15s, background .15s, width .2s;
}
.hx-search input::placeholder { color: var(--hx-muted); }
.hx-search input:focus { outline: none; border-color: var(--hx-primary); background: #fff; box-shadow: 0 0 0 4px var(--hx-primary-soft); }
.hx-search .hx-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--hx-muted); pointer-events: none; }
.hx-iconbtn {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 10px;
    background: transparent; color: var(--hx-ink); cursor: pointer;
}
.hx-iconbtn:hover { background: var(--hx-bg); }
.hx-iconbtn .hx-icon { width: 22px; height: 22px; }

/* Mobile search, expanding under the bar */
.hx-msearch { display: none; padding: 0 0 12px; }
.hx-header.search-open .hx-msearch { display: block; }
.hx-msearch form { position: relative; }
.hx-msearch input {
    width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid var(--hx-line-2); border-radius: 12px;
    font: inherit; font-size: 16px; background: #fff; color: var(--hx-ink);
}
.hx-msearch .hx-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--hx-muted); }

@media (min-width: 1024px) {
    .hx-nav, .hx-search { display: block; }
    .hx-burger, .hx-msearch-toggle { display: none; }
}
@media (max-width: 1023.98px) {
    .hx-brand { margin-right: auto; }
    .hx-header__tools { margin-left: 0; }
}
@media (max-width: 380px) { .hx-brand__tag { display: none; } }

/* Drawer */
.hx-drawer { position: fixed; inset: 0; z-index: 120; visibility: hidden; }
.hx-drawer.is-open { visibility: visible; }
.hx-drawer__scrim { position: absolute; inset: 0; background: rgb(15 23 40 / .45); opacity: 0; transition: opacity .25s; }
.hx-drawer.is-open .hx-drawer__scrim { opacity: 1; }
.hx-drawer__panel {
    position: absolute; inset: 0 auto 0 0; width: min(86vw, 360px); display: flex; flex-direction: column; background: #fff;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.25,1); box-shadow: 0 0 60px rgb(15 23 40 / .25);
}
.hx-drawer.is-open .hx-drawer__panel { transform: none; }
.hx-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--hx-line); }
.hx-drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px; }
.hx-drawer .bh-menu { display: block; list-style: none; margin: 0; padding: 0; }
.hx-drawer .bh-menu__item { display: block; list-style: none; border-bottom: 1px solid var(--hx-line); }
.hx-drawer .bh-submenu .bh-menu__item { border-bottom: 0; }
.hx-drawer .bh-menu > .bh-menu__item:last-child { border-bottom: 0; }
.hx-drawer .bh-menu__link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
    min-height: 48px; padding: 10px 12px; border-radius: 10px; color: var(--hx-ink); font-weight: 600; font-size: 1rem; white-space: normal;
}
.hx-drawer .bh-menu__link:hover, .hx-drawer .bh-menu__link:focus-visible { background: var(--hx-bg); }
.hx-drawer .bh-menu__caret {
    display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border-radius: 8px;
    background: var(--hx-bg); color: var(--hx-ink-2); opacity: 1; flex: 0 0 auto; transition: transform .2s, background .2s;
}
.hx-drawer .bh-menu__item.is-open > .bh-menu__link { color: var(--hx-primary); }
.hx-drawer .bh-menu__item.is-open > .bh-menu__link .bh-menu__caret { transform: rotate(180deg); background: var(--hx-primary-soft); color: var(--hx-primary); }
.hx-drawer .bh-submenu {
    position: static; margin: 0 0 10px 12px; padding: 4px 0 4px 10px; border: 0; border-left: 2px solid var(--hx-primary-soft);
    border-radius: 0; box-shadow: none; background: none; min-width: 0; opacity: 1; visibility: visible; transform: none;
}
.hx-drawer .bh-submenu .bh-menu__link { min-height: 42px; padding: 8px 12px; font-weight: 500; font-size: .95rem; color: var(--hx-ink-2); }
.hx-drawer .bh-submenu .bh-menu__link:hover { color: var(--hx-primary); }
.hx-drawer .hx-drawer__all .bh-menu__link { color: var(--hx-primary); font-weight: 600; }
.hx-drawer__foot { padding: 16px 20px; border-top: 1px solid var(--hx-line); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.hx-drawer__foot a { color: var(--hx-muted); font-size: .85rem; }
body.hx-locked { overflow: hidden; }

/* ── Buttons, chips, section heads ─────────────────────────────────────── */
.hx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
    border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
}
.hx-btn--primary { background: var(--hx-primary); color: #fff; }
.hx-btn--primary:hover { background: var(--hx-primary-dark); color: #fff; }
.hx-btn--ghost { background: #fff; color: var(--hx-ink); border-color: var(--hx-line-2); }
.hx-btn--ghost:hover { border-color: var(--hx-ink); color: var(--hx-ink); }
.hx-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
    background: var(--hx-bg); color: var(--hx-ink-2); border: 1px solid var(--hx-line); font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.hx-chip:hover { border-color: var(--hx-primary); color: var(--hx-primary); background: #fff; }
.hx-chip small { color: var(--hx-muted); font-weight: 500; }
.hx-section { padding: 48px 0; }
.hx-section--tint { background: var(--hx-bg); }
.hx-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.hx-section__title { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 800; }
.hx-section__sub { color: var(--hx-muted); margin-top: 4px; }
.hx-section__more { font-weight: 600; font-size: .92rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hx-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1200px 400px at 85% -10%, color-mix(in srgb, var(--hx-primary) 55%, transparent), transparent 60%),
        linear-gradient(160deg, #0b1220 0%, #0f1f3d 60%, #0b1220 100%);
}
.hx-hero::before {
    content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none;
    background-image:
        linear-gradient(rgb(255 255 255 / .09) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / .09) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}
.hx-hero__inner { position: relative; padding: 64px 0 56px; max-width: 760px; }
.hx-hero__kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); font-size: .8rem; font-weight: 600; color: #dbe6ff; }
.hx-hero__kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--hx-accent); box-shadow: 0 0 0 4px rgb(255 212 0 / .18); }
.hx-hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.06; }
.hx-hero h1 em { font-style: normal; color: var(--hx-accent); }
.hx-hero p { margin-top: 14px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: #c3cfe6; max-width: 620px; }
.hx-hero__search { position: relative; margin-top: 28px; display: flex; gap: 8px; max-width: 620px; }
.hx-hero__search input {
    flex: 1; min-width: 0; height: 54px; padding: 0 16px 0 48px; border-radius: 12px; border: 0;
    font: inherit; font-size: 16px; color: var(--hx-ink); background: #fff; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5);
}
.hx-hero__search .hx-icon { position: absolute; left: 17px; top: 27px; transform: translateY(-50%); color: var(--hx-muted); width: 20px; height: 20px; }
.hx-hero__search .hx-btn { height: 54px; padding: 0 24px; border-radius: 12px; }
.hx-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hx-hero__chips .hx-chip { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .16); color: #e6edff; }
.hx-hero__chips .hx-chip small { color: #9fb1d6; }
.hx-hero__chips .hx-chip:hover { background: #fff; color: var(--hx-ink); border-color: #fff; }
.hx-hero__stats { display: flex; gap: 28px; margin-top: 30px; color: #9fb1d6; font-size: .85rem; }
.hx-hero__stats b { display: block; color: #fff; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 560px) {
    .hx-hero__inner { padding: 40px 0 36px; }
    .hx-hero__search .hx-btn { display: none; }
    .hx-hero__stats { gap: 20px; }
}

/* ── Page header band (archives, search, single) ───────────────────────── */
.hx-band { background: var(--hx-bg); border-bottom: 1px solid var(--hx-line); }
.hx-band__inner { padding: 36px 0 32px; }
.hx-crumbs { margin-bottom: 14px; font-size: .85rem; color: var(--hx-muted); min-width: 0; }
.hx-crumbs ol { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.hx-crumbs li { display: inline-flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.hx-crumbs a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; margin: 0 -2px; border-radius: 6px; color: var(--hx-ink-2); font-weight: 500; white-space: nowrap; }
.hx-crumbs a:hover { background: rgb(15 23 40 / .05); color: var(--hx-primary); }
.hx-crumbs__home .hx-icon { width: 16px; height: 16px; }
.hx-crumbs__sep { color: var(--hx-line-2); }
.hx-crumbs__sep .hx-icon { width: 14px; height: 14px; }
.hx-crumbs__current { flex: 0 1 auto !important; min-width: 0; color: var(--hx-muted); }
.hx-crumbs__current span { display: block; max-width: 48ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 0; }
@media (max-width: 767.98px) {
    /* One line on a phone: the trail scrolls sideways, the page title truncates. */
    .hx-crumbs { margin-left: -20px; margin-right: -20px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
    .hx-crumbs::-webkit-scrollbar { display: none; }
    .hx-crumbs__current span { max-width: 60vw; }
}
.hx-band h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.hx-band__desc { margin-top: 10px; color: var(--hx-ink-2); max-width: 70ch; }
.hx-band__meta { margin-top: 12px; color: var(--hx-muted); font-size: .9rem; }
.hx-band__author { display: flex; align-items: center; gap: 16px; }
.hx-band__author img, .hx-band__author .hx-avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.hx-band .hx-hero__search input { box-shadow: none; border: 1px solid var(--hx-line-2); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.hx-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .hx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .hx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) {
    .hx-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hx-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hx-card {
    position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--hx-card);
    border: 1px solid var(--hx-line); border-radius: var(--hx-radius); overflow: hidden; box-shadow: var(--hx-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.hx-card:hover { transform: translateY(-3px); box-shadow: var(--hx-shadow-lg); border-color: var(--hx-line-2); }
.hx-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e9eef6, #dfe6f1); overflow: hidden; }
.hx-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hx-card:hover .hx-card__media img { transform: scale(1.03); }
.hx-card__media--empty { display: grid; place-items: center; color: #9aa7bd; }
.hx-card__media--empty svg { width: 42px; height: 42px; }
.hx-card__badge {
    position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px;
    background: rgb(255 255 255 / .94); color: var(--hx-ink); font-size: .72rem; font-weight: 700; letter-spacing: .01em;
    box-shadow: 0 2px 8px rgb(0 0 0 / .12); max-width: calc(100% - 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hx-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.hx-card__title { font-size: 1.02rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.hx-card__title a { color: var(--hx-ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* whole card clickable */
.hx-card__title a:hover { color: var(--hx-primary); }
.hx-card__excerpt { color: var(--hx-muted); font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hx-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hx-line); font-size: .8rem; color: var(--hx-muted); }
.hx-card__author { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--hx-ink-2); font-weight: 600; }
.hx-card__author span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-card__stats { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.hx-card__stats span { display: inline-flex; align-items: center; gap: 4px; }
.hx-card__stats .hx-icon { width: 15px; height: 15px; }
.hx-avatar {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
    background: var(--hx-primary-soft); color: var(--hx-primary-dark); font-weight: 800; font-size: .72rem; text-transform: uppercase; overflow: hidden;
}
.hx-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Featured (lead) card */
.hx-lead { display: grid; gap: 0; background: #fff; border: 1px solid var(--hx-line); border-radius: 18px; overflow: hidden; box-shadow: var(--hx-shadow); }
.hx-lead:hover { box-shadow: var(--hx-shadow-lg); }
.hx-lead .hx-card__media { aspect-ratio: 16 / 9; }
.hx-lead__body { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.hx-lead__label { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-primary); }
.hx-lead h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.hx-lead h2 a { color: var(--hx-ink); }
.hx-lead h2 a:hover { color: var(--hx-primary); }
.hx-lead p { color: var(--hx-ink-2); }
.hx-lead .hx-card__foot { border-top: 0; padding-top: 4px; margin-top: auto; }
@media (min-width: 900px) {
    .hx-lead { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .hx-lead .hx-card__media { aspect-ratio: auto; min-height: 340px; }
    .hx-lead__body { padding: 36px; justify-content: center; }
}

/* Category tiles */
.hx-cats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .hx-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hx-cat {
    display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--hx-radius-sm);
    background: #fff; border: 1px solid var(--hx-line); color: var(--hx-ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hx-cat:hover { border-color: var(--hx-primary); color: var(--hx-ink); box-shadow: var(--hx-shadow-lg); transform: translateY(-2px); }
.hx-cat__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--hx-primary-soft); color: var(--hx-primary); flex: 0 0 auto; }
.hx-cat__icon svg { width: 22px; height: 22px; }
.hx-cat b { display: block; font-size: .95rem; line-height: 1.25; }
.hx-cat small { color: var(--hx-muted); font-size: .8rem; }

/* ── Layout with sidebars ───────────────────────────────────────────────── */
.hx-main { padding-top: 36px; padding-bottom: 56px; } /* sides come from .hx-wrap */
.hx-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) {
    .hx-layout--right { grid-template-columns: minmax(0, 1fr) var(--hx-side); }
    .hx-layout--left { grid-template-columns: var(--hx-side) minmax(0, 1fr); }
    .hx-layout--left .hx-aside { order: -1; }
}
@media (min-width: 1180px) {
    .hx-layout--both { grid-template-columns: var(--hx-side) minmax(0, 1fr) var(--hx-side); }
    .hx-layout--both .hx-aside--left { order: -1; }
}
.hx-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 1024px) { .hx-aside.is-sticky { position: sticky; top: calc(var(--hx-header-h) + 20px); } }

/* Widgets */
.cd-widget { background: #fff; border: 1px solid var(--hx-line); border-radius: var(--hx-radius); padding: 18px; }
.cd-widget__title { margin: 0 0 12px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-muted); }
.cd-widget ul { list-style: none; margin: 0; padding: 0; }
.cd-widget li a { color: var(--hx-ink-2); }
.cd-widget li a:hover { color: var(--hx-primary); }

/* ── Single project ─────────────────────────────────────────────────────── */
.hx-post-head { background: var(--hx-bg); border-bottom: 1px solid var(--hx-line); }
.hx-post-head__inner { padding: 32px 0 30px; max-width: 900px; }
.hx-post-head h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.hx-post-head__lede { margin-top: 14px; font-size: 1.1rem; color: var(--hx-ink-2); max-width: 70ch; }
.hx-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 22px; font-size: .9rem; color: var(--hx-muted); }
.hx-byline__author { display: inline-flex; align-items: center; gap: 10px; color: var(--hx-ink); font-weight: 700; }
.hx-byline__author .hx-avatar { width: 40px; height: 40px; font-size: .9rem; }
.hx-byline__author small { display: block; font-weight: 500; color: var(--hx-muted); font-size: .8rem; }
.hx-byline__item { display: inline-flex; align-items: center; gap: 6px; }
.hx-byline__item .hx-icon { width: 16px; height: 16px; }
.hx-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hx-post-tags .hx-chip { height: 28px; font-size: .78rem; background: #fff; }

.hx-article { min-width: 0; }
.hx-cover { margin: 0 0 28px; border-radius: var(--hx-radius); overflow: hidden; border: 1px solid var(--hx-line); background: var(--hx-bg); }
.hx-cover img { width: 100%; }
@media (min-width: 1024px) { .hx-single { grid-template-columns: minmax(0, 1fr) 300px; } }
.hx-rail { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 1024px) { .hx-rail { position: sticky; top: calc(var(--hx-header-h) + 20px); max-height: calc(100vh - var(--hx-header-h) - 40px); overflow-y: auto; } }
.hx-panel { background: #fff; border: 1px solid var(--hx-line); border-radius: var(--hx-radius); padding: 18px; }
.hx-panel__title { margin: 0 0 12px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-muted); }
.hx-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--hx-line); }
.hx-toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--hx-ink-2); font-size: .88rem; line-height: 1.35; }
.hx-toc li.is-sub a { padding-left: 26px; font-size: .84rem; color: var(--hx-muted); }
.hx-toc li a:hover { color: var(--hx-primary); }
.hx-toc li a.is-active { border-left-color: var(--hx-primary); color: var(--hx-primary); font-weight: 600; }
.hx-share { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-share a, .hx-share button {
    position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 10px;
    border: 1px solid var(--hx-line); background: #fff; color: var(--hx-ink-2); cursor: pointer; transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.hx-share a:hover, .hx-share button:hover { transform: translateY(-1px); color: #fff; }
.hx-share .hx-bicon, .hx-share .hx-icon { width: 18px; height: 18px; }
.hx-share__fb:hover { background: #1877f2; border-color: #1877f2; }
.hx-share__x:hover { background: #000; border-color: #000; }
.hx-share__in:hover { background: #0a66c2; border-color: #0a66c2; }
.hx-share__wa:hover { background: #25d366; border-color: #25d366; }
.hx-share__copy:hover, .hx-share__native:hover { background: var(--hx-primary); border-color: var(--hx-primary); }
.hx-share__done { display: none; }
.hx-share__copy.is-done { background: #12b76a; border-color: #12b76a; color: #fff; }
.hx-share__copy.is-done .hx-icon:first-child { display: none; }
.hx-share__copy.is-done .hx-share__done { display: block; }
@media (max-width: 1023.98px) { .hx-rail .hx-toc { display: none; } }

/* Article typography */
.hx-prose { color: var(--hx-ink-2); font-size: 1.05rem; line-height: 1.75; overflow-wrap: break-word; }
.hx-prose > * + * { margin-top: 1.1em; }
.hx-prose h2 { margin-top: 2em; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--hx-ink); }
.hx-prose h3 { margin-top: 1.7em; font-size: 1.22rem; font-weight: 700; color: var(--hx-ink); }
.hx-prose h4 { margin-top: 1.5em; font-size: 1.05rem; font-weight: 700; color: var(--hx-ink); }
.hx-prose a { color: var(--hx-primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--hx-primary) 35%, transparent); text-underline-offset: 3px; }
.hx-prose a:hover { text-decoration-color: currentColor; }
.hx-prose strong { color: var(--hx-ink); }
.hx-prose img { border-radius: 10px; margin-left: auto; margin-right: auto; }
.hx-prose figure { margin: 1.6em 0; }
.hx-prose figcaption { margin-top: 8px; text-align: center; font-size: .85rem; color: var(--hx-muted); }
.hx-prose ul, .hx-prose ol { padding-left: 1.4em; }
.hx-prose li + li { margin-top: .35em; }
.hx-prose li::marker { color: var(--hx-primary); }
.hx-prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 18px; border-left: 4px solid var(--hx-primary); background: var(--hx-bg); border-radius: 0 10px 10px 0; color: var(--hx-ink); }
.hx-prose code { font-family: var(--hx-mono); font-size: .88em; background: var(--hx-bg); border: 1px solid var(--hx-line); padding: .1em .35em; border-radius: 6px; color: var(--hx-ink); }
.hx-prose pre { overflow-x: auto; padding: 16px 18px; border-radius: 12px; background: #0b1220; color: #e6edf7; font-size: .88rem; line-height: 1.6; }
.hx-prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.hx-prose table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.hx-prose th, .hx-prose td { padding: 10px 12px; border: 1px solid var(--hx-line); text-align: left; }
.hx-prose th { background: var(--hx-bg); color: var(--hx-ink); }
.hx-prose hr { border: 0; border-top: 1px solid var(--hx-line); margin: 2em 0; }
.hx-prose iframe, .hx-prose video { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }

/* Author box (core component) */
.hx-authorbox.bh-author-box { margin: 0; padding: 18px; border: 1px solid var(--hx-line); border-radius: var(--hx-radius); background: #fff; }
.hx-authorbox .bh-author-box__title { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hx-muted); opacity: 1; }
.hx-authorbox .bh-author-box__avatar--initials { background: var(--hx-primary-soft); color: var(--hx-primary-dark); }
.hx-authorbox .bh-author-box__name a:hover { color: var(--hx-primary); }
.hx-authorbox .bh-author-box__bio { font-size: .9rem; color: var(--hx-ink-2); }
.hx-authorbox .bh-author-box__link { font-weight: 600; }
.hx-after { margin-top: 40px; }

/* ── Discussion ─────────────────────────────────────────────────────────── */
.hx-discussion { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--hx-line); }
.hx-discussion__title { font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.hx-discussion__title span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--hx-bg); border: 1px solid var(--hx-line); font-size: .85rem; color: var(--hx-ink-2); }
.hx-comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 18px 0; border-top: 1px solid var(--hx-line); }
.hx-comment:first-of-type { border-top: 0; padding-top: 0; }
.hx-comment .hx-avatar { width: 40px; height: 40px; font-size: .85rem; }
.hx-comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hx-comment__name { font-weight: 700; color: var(--hx-ink); }
.hx-comment__date { font-size: .8rem; color: var(--hx-muted); }
.hx-comment__body { margin-top: 4px; color: var(--hx-ink-2); overflow-wrap: anywhere; }
.hx-comment__reply { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--hx-muted); font-size: .8rem; font-weight: 700; cursor: pointer; }
.hx-comment__reply:hover { color: var(--hx-primary); }
.hx-comment__replies { grid-column: 2; }
.hx-comment__replies .hx-comment { border-top: 0; padding-bottom: 0; }
.hx-commentform.bh-comment-form { margin-top: 28px; padding: 22px; background: var(--hx-bg); border: 1px solid var(--hx-line); border-radius: var(--hx-radius); }
.hx-commentform .bh-comment-form__title { font-size: 1.15rem; font-weight: 800; }
.hx-commentform .bh-comment-form__label { font-size: .8rem; font-weight: 700; color: var(--hx-ink-2); }
.hx-commentform .bh-comment-form__input,
.hx-commentform .bh-comment-form__textarea { background: #fff; border: 1px solid var(--hx-line-2); border-radius: 10px; }
.hx-commentform .bh-comment-form__input:focus,
.hx-commentform .bh-comment-form__textarea:focus { outline: none; border-color: var(--hx-primary); box-shadow: 0 0 0 4px var(--hx-primary-soft); }
.hx-commentform .bh-comment-form__submit { background: var(--hx-primary); border-radius: 10px; padding: .75em 1.4em; }
.hx-commentform .bh-comment-form__submit:hover { background: var(--hx-primary-dark); }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.hx-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 40px; }
.hx-pager > a, .hx-pager > span {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 42px; height: 42px; padding: 0 12px;
    border-radius: 10px; border: 1px solid var(--hx-line); background: #fff; color: var(--hx-ink-2); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums;
}
.hx-pager > a:hover { border-color: var(--hx-primary); color: var(--hx-primary); }
.hx-pager > [aria-current] { background: var(--hx-primary); border-color: var(--hx-primary); color: #fff; }
.hx-pager > .hx-pager__gap { border: 0; background: none; min-width: 20px; padding: 0; }
.hx-pager__note { margin-top: 12px; text-align: center; font-size: .82rem; color: var(--hx-muted); }

/* ── Empty states, 404, page ────────────────────────────────────────────── */
.hx-empty { padding: 56px 24px; text-align: center; border: 1px dashed var(--hx-line-2); border-radius: var(--hx-radius); color: var(--hx-muted); background: #fff; }
.hx-empty h2 { font-size: 1.3rem; margin-bottom: 8px; }
.hx-404 { padding: 72px 0; text-align: center; }
.hx-404__code { font-family: var(--hx-mono); font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; color: var(--hx-primary); letter-spacing: -.04em; }
.hx-404 h1 { margin-top: 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.hx-404 p { margin: 12px auto 0; max-width: 52ch; color: var(--hx-muted); }
.hx-404 .hx-hero__search { margin: 26px auto 0; }
.hx-404 .hx-hero__search input { border: 1px solid var(--hx-line-2); box-shadow: none; }
.hx-page { max-width: 780px; margin: 0 auto; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.hx-footer { background: var(--hx-footer-bg); color: #9aa8c0; margin-top: 0; }
.hx-footer a { color: #c5d0e3; }
.hx-footer a:hover { color: #fff; }
.hx-footer__top { display: grid; gap: 36px; padding: 56px 0 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .hx-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hx-footer__top { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 48px; } }
.hx-footer .hx-brand { color: #fff; }
.hx-footer .hx-brand__mark { background: #fff; color: var(--hx-ink); }
.hx-footer .hx-brand__name b { color: var(--hx-accent); }
.hx-footer .hx-brand__tag { color: #8594b0; }
.hx-footer__about { margin-top: 16px; max-width: 38ch; font-size: .92rem; line-height: 1.65; }
.hx-footer__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hx-footer__social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .08); color: #dbe3f1; }
.hx-footer__social .hx-bicon { width: 18px; height: 18px; }
.hx-footer__social a:hover { background: var(--hx-primary); border-color: var(--hx-primary); color: #fff; }
.hx-footer__col h2 { margin-bottom: 14px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.hx-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hx-footer__col a { font-size: .92rem; }
.hx-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 26px; border-top: 1px solid rgb(255 255 255 / .08); font-size: .82rem; }
.hx-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }

.hx-totop {
    position: fixed; right: 18px; bottom: 18px; z-index: 70; display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 12px; background: var(--hx-ink); color: #fff; box-shadow: var(--hx-shadow-lg); cursor: pointer;
    opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.hx-totop.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.hx-totop:hover { background: var(--hx-primary); }

@media print {
    .hx-header, .hx-footer, .hx-rail, .hx-discussion, .hx-totop, .hx-drawer { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* "More projects" tile: fills the last row of the home grid and leads on. */
.hx-card--more {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 24px;
    background: linear-gradient(160deg, #0b1220, color-mix(in srgb, var(--hx-primary) 55%, #0b1220)); border: 0; color: #fff; min-height: 260px;
}
.hx-card--more:hover { color: #fff; }
.hx-card--more b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.hx-card--more span { color: #c3cfe6; font-size: .9rem; }
.hx-card--more i { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 14px; border-radius: 10px; background: #fff; color: var(--hx-ink); font-style: normal; font-weight: 700; font-size: .88rem; }
