/*
Theme Name: dds_hubetjr.com
Theme URI: https://hubetjr.com/
Author: Daniel Mercer
Description: Cinematic Neon — a dark, monitor-inspired theme for a real estate video production resource: shooting advice, gear reviews, editing tutorials and property marketing.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hbtjr
*/

/* ------------------------------------------------------------------
   Visibility rules for JS-controlled elements (must precede components)
   ------------------------------------------------------------------ */
.cookie-banner[hidden] { display: none !important; }

/* ------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
    --bg: #0D1117;
    --bg-alt: #161B22;
    --bg-foot: #010409;
    --line: #1F2937;
    --border: #30363D;
    --pattern: #1A1F26;
    --text: #E6EDF3;
    --text-soft: #C9D1D9;
    --muted: #8B949E;
    --accent: #2DD4BF;
    --accent-2: #F472B6;
    --lavender: #C4B5FD;
    --mint: #86EFAC;
    --glow: rgba(45, 212, 191, 0.4);
    --font-head: "Space Grotesk", "Inter Tight", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 12px;
    --radius-btn: 8px;
    --cut: 12px;
    --diag: repeating-linear-gradient(45deg, var(--pattern) 0, var(--pattern) 1px, transparent 1px, transparent 40px);
}

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

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

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: var(--diag);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    right: 2vw;
    bottom: 3vh;
    width: 340px;
    height: 240px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 140'%3E%3Cg fill='%232DD4BF'%3E%3Ccircle cx='52' cy='30' r='24'/%3E%3Ccircle cx='106' cy='30' r='24'/%3E%3Crect x='22' y='54' width='118' height='66' rx='10'/%3E%3Cpath d='M140 72l48-22v74l-48-22z'/%3E%3Crect x='60' y='120' width='8' height='18'/%3E%3Crect x='96' y='120' width='8' height='18'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

p { margin: 0 0 1.1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
    margin: 1.6em 0 0.6em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }

p, li, dd, dt, h1, h2, h3, h4, h5, h6, blockquote, figcaption, td, th, .widget {
    overflow-wrap: break-word;
    hyphens: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #5EEAD4; }

img { max-width: 100%; height: auto; }

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

::selection { background: rgba(45, 212, 191, 0.3); color: #fff; }

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: fixed !important;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    clip: auto;
    margin: 0;
    padding: 0.7rem 1.1rem;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    border-radius: var(--radius-btn);
    z-index: 1000;
}

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

.shell-front {
    width: 85%;
    max-width: 1280px;
    margin-inline: auto;
    position: relative;
}

.site-main {
    position: relative;
    z-index: 1;
    display: block;
}

/* Animated underline for text links */
.entry-content a,
.page-lead a,
.text-link,
.breadcrumbs a,
.cookie-text a,
.comment-notes a,
.logged-in-as a,
.must-log-in a,
.reply-text a,
.card-excerpt a {
    color: var(--accent);
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease, color 0.2s ease;
    padding-bottom: 1px;
}
.entry-content a:hover,
.page-lead a:hover,
.text-link:hover,
.breadcrumbs a:hover,
.cookie-text a:hover,
.comment-notes a:hover,
.logged-in-as a:hover,
.must-log-in a:hover,
.reply-text a:hover,
.card-excerpt a:hover {
    background-size: 100% 1px;
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.7rem 1.35rem;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.97rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
    white-space: normal;
}
.btn-solid,
button.btn-solid,
input[type="submit"] {
    background: var(--accent);
    color: var(--bg);
    border: 1.5px solid var(--accent);
}
.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.btn:hover,
button:hover,
input[type="submit"]:hover {
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.4);
    transform: translateY(-2px);
}
.btn-solid:hover,
input[type="submit"]:hover { color: var(--bg); background: #3FE0CB; }
.btn-ghost:hover { color: var(--text); background: rgba(45, 212, 191, 0.08); }

/* ------------------------------------------------------------------
   Top signal bar
   ------------------------------------------------------------------ */
.signal-bar {
    height: 2px;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.35) 0%, #2DD4BF 40%, #E6FFFB 50%, #2DD4BF 60%, rgba(45, 212, 191, 0.35) 100%);
    background-size: 220% 100%;
    animation: hbtjr-signal 5s linear infinite;
    position: relative;
    z-index: 2;
}
@keyframes hbtjr-signal {
    from { background-position: 110% 0; }
    to { background-position: -110% 0; }
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.masthead {
    position: relative;
    z-index: 5;
    background: var(--bg);
    border-bottom: 1px solid var(--accent);
    box-shadow: 0 1px 14px rgba(45, 212, 191, 0.3);
}
.masthead-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1 1 26rem;
    min-width: 0;
}
.brand-mark {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}
.brand-logo {
    display: block;
    width: auto;
    max-height: 52px;
    max-width: 160px;
}
.brand-logo--stub { width: 46px; height: 46px; filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.35)); }
.brand-text { min-width: 0; max-width: 62ch; }
.brand-name {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-name a { color: var(--text); }
.brand-name a:hover { color: var(--accent); }
.brand-tagline {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-toggle {
    display: inline-flex;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    min-height: 2.6rem;
    padding: 0.5rem 0.9rem;
}
.nav-toggle:hover { transform: none; border-color: var(--accent); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    position: relative;
    transition: transform 0.2s ease;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.primary-nav {
    display: none;
    flex: 1 0 100%;
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.primary-nav .menu {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0 0.4rem;
    border-top: 1px solid var(--line);
}
.primary-nav a {
    display: inline-block;
    padding: 0.55rem 0;
    color: var(--text);
    font-weight: 500;
    font-size: 0.97rem;
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 2px;
    background-position: 0 90%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease, color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    color: var(--accent);
    background-size: 100% 2px;
}
.primary-nav .sub-menu { padding-left: 1rem; }
.primary-nav .sub-menu a { color: var(--text-soft); font-size: 0.92rem; }

@media (min-width: 960px) {
    .masthead-inner { flex-wrap: nowrap; }
    .nav-toggle { display: none; }
    .primary-nav,
    .primary-nav.is-open {
        display: block;
        flex: 0 0 auto;
    }
    .primary-nav .menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem 1.8rem;
        padding: 0;
        border-top: 0;
    }
    .primary-nav .menu > li { position: relative; }
    .primary-nav .sub-menu {
        position: absolute;
        top: 100%;
        left: -1rem;
        min-width: 13rem;
        padding: 0.6rem 1rem;
        background: rgba(22, 27, 34, 0.92);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border);
        border-radius: 10px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 20;
    }
    .primary-nav li:hover > .sub-menu,
    .primary-nav li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ------------------------------------------------------------------
   Section titles
   ------------------------------------------------------------------ */
.sec-title {
    position: relative;
    margin: 1.4rem 0 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
    box-shadow: -6px 0 14px -9px rgba(45, 212, 191, 0.9);
    font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem);
    text-shadow: 0 0 22px rgba(45, 212, 191, 0.22);
}
.sec-title::before {
    content: "";
    position: absolute;
    left: -3px;
    top: -1.15rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px 2px rgba(45, 212, 191, 0.55);
}
.sec-lead {
    color: var(--muted);
    max-width: 60ch;
    margin: 0;
}

/* Timeline-style dashed divider with an end dot */
.reel-divider {
    position: relative;
    height: 1px;
    width: 100%;
    margin: 0 0 3rem;
    background-image: repeating-linear-gradient(90deg, rgba(45, 212, 191, 0.55) 0, rgba(45, 212, 191, 0.55) 8px, transparent 8px, transparent 16px);
}
.reel-divider::after {
    content: "";
    position: absolute;
    right: -4px;
    top: -4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px 2px rgba(45, 212, 191, 0.6);
}
.glow-rule {
    width: 40%;
    height: 1px;
    margin: 4.5rem auto 0;
    background: var(--line);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.25);
}

/* ------------------------------------------------------------------
   Front page
   ------------------------------------------------------------------ */
.fp-section {
    position: relative;
    padding: 5.5rem 0;
}
.fp-section > .shell-front { z-index: 1; }

/* Hero */
.fp-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(540px, 80vh, 780px);
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.fp-hero-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
}
.fp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(13, 17, 23, 0.9) 0%, rgba(13, 17, 23, 0.55) 45%, rgba(13, 17, 23, 0.15) 100%),
        linear-gradient(180deg, rgba(13, 17, 23, 0.35) 0%, rgba(13, 17, 23, 0) 45%, rgba(13, 17, 23, 0.95) 100%);
    z-index: 1;
}
.fp-hero-ruler {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 22px;
    z-index: 2;
    border-bottom: 1px solid rgba(45, 212, 191, 0.35);
    background-image:
        repeating-linear-gradient(90deg, rgba(45, 212, 191, 0.55) 0, rgba(45, 212, 191, 0.55) 1px, transparent 1px, transparent 120px),
        repeating-linear-gradient(90deg, rgba(139, 148, 158, 0.35) 0, rgba(139, 148, 158, 0.35) 1px, transparent 1px, transparent 24px);
    background-size: 100% 100%, 100% 45%;
    background-position: 0 0, 0 100%;
    background-repeat: no-repeat;
}
.fp-hero-playhead {
    position: absolute;
    top: 0;
    left: 12%;
    width: 2px;
    height: 34px;
    background: var(--accent-2);
    box-shadow: 0 0 10px rgba(244, 114, 182, 0.8);
    animation: hbtjr-playhead 14s linear infinite;
}
.fp-hero-playhead::before {
    content: "";
    position: absolute;
    top: 0;
    left: -5px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--accent-2);
}
@keyframes hbtjr-playhead {
    from { left: 4%; }
    to { left: 96%; }
}
.fp-hero-inner {
    z-index: 2;
    padding: 7rem 0 4.5rem;
}
.fp-hero-panel {
    max-width: 44rem;
    padding: 2.4rem 2.4rem 2.2rem;
    background: rgba(22, 27, 34, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(230, 237, 243, 0.09);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.fp-hero-title {
    margin: 0 0 1.1rem;
    color: #FFFFFF;
    font-size: clamp(2.2rem, 1.3rem + 3.2vw, 3.5rem);
    line-height: 1.06;
    text-shadow: 0 0 30px rgba(45, 212, 191, 0.18);
}
.fp-hero-lead {
    color: #A6B1BD;
    font-size: 1.12rem;
    max-width: 38rem;
    margin-bottom: 1.8rem;
}
.fp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
}
.fp-hero-actions .btn-solid { box-shadow: 0 0 18px rgba(45, 212, 191, 0.35); }

/* Stats */
.fp-stats {
    background-color: var(--bg-alt);
    background-image:
        radial-gradient(ellipse at center, rgba(45, 212, 191, 0.05) 0%, rgba(45, 212, 191, 0) 70%),
        var(--diag);
}
.fp-stats-head { margin-bottom: 2.6rem; }
.stats-plate {
    padding: 2.4rem 2.2rem;
    background: rgba(13, 17, 23, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
    box-shadow: inset 0 0 0 1px var(--border);
}
.stats-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
}
.stat {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 0.35rem;
    min-width: 0;
    padding: 1.2rem 1.4rem;
}
.stat + .stat { border-top: 1px solid var(--border); }
.stat-num {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem);
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 0 22px rgba(45, 212, 191, 0.45);
    font-variant-numeric: tabular-nums;
}
.stat-label {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Latest posts */
.fp-latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-bottom: 2.2rem;
}
.fp-latest-head .sec-title { margin-bottom: 0; }
.text-link { font-weight: 600; }

/* Steps */
.fp-steps {
    background-color: var(--bg-alt);
    background-image: var(--diag);
}
.fp-steps-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
}
.fp-steps-head { min-width: 0; }
.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.2rem;
    min-width: 0;
}
.step {
    position: relative;
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 1.3rem;
    padding: 1.4rem 1.5rem 1.3rem 1.2rem;
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
}
.step:nth-child(even) { border-left-color: var(--accent-2); }
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(2.5rem - 1px);
    top: calc(1.4rem + 2.6rem + 6px);
    bottom: calc(-2.6rem + 6px);
    border-left: 2px dashed rgba(45, 212, 191, 0.5);
    z-index: 1;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: rgba(45, 212, 191, 0.12);
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 0 14px rgba(45, 212, 191, 0.3);
    position: relative;
    z-index: 2;
}
.step-body { min-width: 0; }
.step-title {
    margin: 0.35rem 0 0.4rem;
    font-size: 1.2rem;
    color: #FFFFFF;
}
.step-body p { margin: 0; color: var(--muted); }

/* CTA */
.cta-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 3.2rem 3rem;
    background-color: var(--bg-alt);
    background-image:
        radial-gradient(circle at center, rgba(45, 212, 191, 0.07) 0%, rgba(45, 212, 191, 0) 65%),
        var(--diag);
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
    box-shadow: inset 0 0 0 1px var(--border);
}
.cta-copy { min-width: 0; max-width: 44rem; }
.cta-title {
    margin: 0 0 0.8rem;
    font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
    line-height: 1.1;
    background: linear-gradient(90deg, #2DD4BF 0%, #F472B6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.cta-copy p { margin: 0; color: var(--muted); }
.btn-glow { box-shadow: 0 0 14px rgba(45, 212, 191, 0.25); }

@media (min-width: 600px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat + .stat { border-top: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--border); }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

@media (min-width: 960px) {
    .fp-section { padding: 6.5rem 0; }
    .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat:nth-child(n+3) { border-top: 0; }
    .stat + .stat { border-left: 1px solid var(--border); }
    .fp-steps-inner {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 4rem;
        align-items: start;
    }
    .cta-panel {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 3.6rem 3.4rem;
    }
    .cta-panel .btn { flex: 0 0 auto; }
}

@media (max-width: 600px) {
    .shell-front { width: 90%; }
    .fp-section { padding: 4rem 0; }
    .fp-hero-inner { padding: 5rem 0 2.5rem; }
    .fp-hero-panel { padding: 1.6rem 1.4rem; }
    .stats-plate { padding: 1.4rem 1.2rem; }
    .stat { padding: 1rem 0.4rem; }
    .step { padding: 1.2rem 1.1rem 1.1rem 1rem; gap: 1rem; }
    .step:not(:last-child)::after {
        left: calc(2.3rem - 1px);
        top: calc(1.2rem + 2.6rem + 6px);
        bottom: calc(-2.4rem + 6px);
    }
    .cta-panel { padding: 2.2rem 1.5rem; }
}

/* ------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 1.6rem;
}
.card-grid > * { min-width: 0; }
@media (min-width: 960px) {
    .card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(22, 27, 34, 0.88);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 18px 38px -16px rgba(45, 212, 191, 0.35), 0 0 18px rgba(45, 212, 191, 0.15);
}
.card-thumb { position: relative; background: #0A0E13; }
.card-thumb a { display: block; line-height: 0; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}
.card-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #0F141B;
    background-image:
        radial-gradient(circle at 70% 30%, rgba(45, 212, 191, 0.14) 0%, rgba(45, 212, 191, 0) 55%),
        radial-gradient(circle at 20% 90%, rgba(244, 114, 182, 0.1) 0%, rgba(244, 114, 182, 0) 50%),
        var(--diag);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.25rem 1.35rem 1.4rem;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.8rem;
    margin-bottom: 0.7rem;
    font-size: 0.82rem;
    color: var(--muted);
}
.card-title {
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    line-height: 1.3;
}
.card-title a { color: var(--text); transition: color 0.2s ease; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--accent);
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}
.card-more:hover { background-size: 100% 1px; }

/* Category chips */
.chip {
    display: inline-block;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    border: 1px solid;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
    transition: box-shadow 0.2s ease;
}
.chip:hover { box-shadow: 0 0 12px currentColor; }
.tone-1 { color: #2DD4BF; background: rgba(45, 212, 191, 0.1); border-color: rgba(45, 212, 191, 0.4); }
.tone-2 { color: #F9A8D4; background: rgba(244, 114, 182, 0.1); border-color: rgba(244, 114, 182, 0.4); }
.tone-3 { color: #C4B5FD; background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.4); }
.tone-4 { color: #86EFAC; background: rgba(134, 239, 172, 0.09); border-color: rgba(134, 239, 172, 0.38); }
.tone-1:hover, .tone-2:hover, .tone-3:hover, .tone-4:hover { color: #FFFFFF; }

.empty-note {
    color: var(--muted);
    padding: 1.4rem 1.5rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: rgba(22, 27, 34, 0.6);
}

/* ------------------------------------------------------------------
   Inner pages layout
   ------------------------------------------------------------------ */
.page-shell {
    padding: 2rem 0 5rem;
    position: relative;
}
.layout-single { display: block; }
.layout-single .content-area { min-width: 0; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
}
.content-area,
.sidebar { min-width: 0; }

@media (min-width: 960px) {
    .layout-single .content-area {
        width: 85%;
        margin-left: auto;
        margin-right: auto;
    }
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
}

.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 2.2rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}
.breadcrumbs .sep { color: #4B5563; margin: 0 0.3rem; }
.crumb-current { color: var(--muted); }

.page-head { margin-bottom: 2.4rem; }
.page-title {
    margin: 0 0 0.7rem;
    font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem);
}
.page-lead { color: var(--muted); margin: 0; max-width: 62ch; }

/* ------------------------------------------------------------------
   Single / page content
   ------------------------------------------------------------------ */
.entry-head { margin-bottom: 2rem; }
.entry-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.entry-title {
    margin: 0 0 0.9rem;
    font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem);
}
.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.entry-cover {
    margin: 0 0 2.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.entry-cover img { display: block; width: 100%; height: auto; }

.entry-content { color: var(--text); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 {
    margin-top: 2.2em;
    padding-left: 0.85rem;
    border-left: 3px solid var(--accent);
}
.entry-content h3 { margin-top: 1.8em; }
.entry-content ul,
.entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--accent); }
.entry-content blockquote {
    margin: 1.8em 0;
    padding: 1.2rem 1.5rem;
    background: var(--bg-alt);
    border-left: 3px solid var(--accent-2);
    border-radius: 0 10px 10px 0;
    color: var(--text-soft);
    font-size: 1.08rem;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption,
.wp-caption-text {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.entry-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #010409;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.1em 0.35em;
}
.entry-content pre {
    background: #010409;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    font-size: 0.9rem;
}
.entry-content pre code { background: none; border: 0; padding: 0; }
.entry-content hr {
    border: 0;
    height: 1px;
    margin: 2.5em 0;
    background-image: repeating-linear-gradient(90deg, rgba(45, 212, 191, 0.5) 0, rgba(45, 212, 191, 0.5) 8px, transparent 8px, transparent 16px);
}
.entry-content iframe,
.entry-content video { max-width: 100%; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    border: 1px solid var(--border);
    font-size: 0.95rem;
}
th, td {
    border: 1px solid var(--border);
    padding: 0.65rem 0.8rem;
    text-align: left;
    vertical-align: top;
}
th { background: var(--bg-alt); color: var(--text); font-weight: 600; }
.wp-block-table { overflow-x: auto; }

.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide,
.alignfull { max-width: 100%; }

.page-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.page-links-label { color: var(--muted); margin-right: 0.3rem; }

.entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.post-navigation { margin-top: 3rem; }
.post-navigation .nav-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}
.post-navigation a {
    display: block;
    height: 100%;
    padding: 1.1rem 1.3rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-navigation a:hover { border-color: var(--accent); box-shadow: 0 0 16px rgba(45, 212, 191, 0.2); }
.post-navigation .nav-label { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 0.2rem; }
.post-navigation .nav-title { display: block; color: var(--text); font-family: var(--font-head); font-weight: 600; }
.post-navigation .nav-next { text-align: right; }
@media (min-width: 600px) {
    .post-navigation .nav-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-navigation .nav-next:only-child { grid-column: 2; }
}

/* ------------------------------------------------------------------
   Pagination (paginate_links type => plain)
   ------------------------------------------------------------------ */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    height: 2.7rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--bg-alt);
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.3);
    transform: translateY(-2px);
}
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 700;
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.35);
}
.pager .page-numbers.dots {
    border: 0;
    background: none;
    min-width: auto;
    padding: 0 0.3rem;
    color: var(--muted);
}

/* ------------------------------------------------------------------
   Sidebar widgets
   ------------------------------------------------------------------ */
.sidebar .widget {
    margin-bottom: 1.6rem;
    padding: 1.5rem 1.5rem 1.3rem;
    background: #161B22;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #C9D1D9;
    font-size: 0.95rem;
}
.sidebar .widget-title {
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
    color: #E6EDF3;
    font-size: 1.05rem;
    position: relative;
    padding-left: 0.9rem;
}
.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(45, 212, 191, 0.7);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    color: #C9D1D9;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: #E6EDF3; transition: color 0.2s ease; }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date,
.sidebar .widget .rss-date { display: block; color: #8B949E; font-size: 0.82rem; }
.sidebar .widget p { color: #C9D1D9; }
.sidebar .search-form { flex-direction: column; }

/* ------------------------------------------------------------------
   Search form
   ------------------------------------------------------------------ */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.2rem 0;
}
.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.post-password-form input[type="password"] {
    width: 100%;
    min-height: 2.9rem;
    padding: 0.65rem 0.9rem;
    background: #010409;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-field { flex: 1 1 14rem; width: auto; min-width: 0; }
.search-field::placeholder { color: #6E7681; }
.search-field:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

/* ------------------------------------------------------------------
   404
   ------------------------------------------------------------------ */
.notfound { padding: 1rem 0 2rem; }
.notfound-code {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(5rem, 3rem + 10vw, 9rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    text-shadow: 0 0 30px rgba(45, 212, 191, 0.35);
}
.notfound .search-form { max-width: 34rem; }
.notfound-actions { margin-top: 1.4rem; }

/* ------------------------------------------------------------------
   Comments
   ------------------------------------------------------------------ */
.comments {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}
.comments-title { margin-top: 0; }
.reply-list,
.reply-list .children { list-style: none; margin: 0; padding: 0; }
.reply-list .children { padding-left: 1.5rem; border-left: 1px dashed rgba(45, 212, 191, 0.35); margin-left: 0.6rem; }
.reply-card {
    margin-bottom: 1rem;
    padding: 1.2rem 1.4rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.reply-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.reply-head img { border-radius: 50%; display: block; }
.reply-who { display: flex; flex-direction: column; min-width: 0; }
.reply-author { font-weight: 600; color: var(--text); }
.reply-time { font-size: 0.82rem; color: var(--muted); }
.reply-pending { color: var(--accent-2); font-size: 0.9rem; }
.reply-text { color: var(--text-soft); }
.reply-text p:last-child { margin-bottom: 0; }
.reply-action { margin-top: 0.6rem; font-size: 0.9rem; font-weight: 600; }
.comments-closed { color: var(--muted); }
.comment-respond { margin-top: 2rem; }
.comment-reply-title { margin-top: 0; }
.comment-reply-title small { font-size: 0.85rem; margin-left: 0.6rem; }
.comment-form label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; color: var(--text-soft); }
.comment-form p { margin-bottom: 1rem; }
.comment-form .required { color: var(--accent-2); }
.comment-form-cookies-consent { display: flex; gap: 0.6rem; align-items: flex-start; }
.comment-form-cookies-consent label { margin: 0; }
.comment-form-cookies-consent input { margin-top: 0.35rem; accent-color: var(--accent); }
.comment-notes,
.logged-in-as,
.must-log-in { color: var(--muted); font-size: 0.92rem; }
.comments .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
    position: relative;
    z-index: 1;
    background: #010409;
    border-top: 1px solid #1F2937;
    padding: 4rem 0 0;
    color: #8B949E;
    font-size: 0.95rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    padding-bottom: 3rem;
}
.footer-col { min-width: 0; }
.site-footer .widget { color: #8B949E; }
.site-footer .widget-title {
    margin: 0 0 1rem;
    color: #E6EDF3;
    font-size: 1.05rem;
}
.site-footer .widget p,
.site-footer .widget .textwidget { color: #8B949E; }
.site-footer .widget a { color: #C9D1D9; transition: color 0.2s ease; }
.site-footer .widget a:hover { color: #2DD4BF; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 0.3rem 0; color: #8B949E; }
.site-footer .widget .post-date { color: #6E7681; font-size: 0.82rem; }
.footer-base {
    border-top: 1px solid #1F2937;
    padding: 1.4rem 0 1.8rem;
    color: #6E7681;
    font-size: 0.86rem;
}
.footer-base p { margin: 0; }

@media (min-width: 760px) {
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
}

/* ------------------------------------------------------------------
   Cookie banner
   ------------------------------------------------------------------ */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.4rem;
    padding: 1.1rem 1.3rem;
    background: rgba(22, 27, 34, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(45, 212, 191, 0.5);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9), 0 0 24px rgba(45, 212, 191, 0.12);
}
.cookie-text {
    flex: 1 1 20rem;
    min-width: 0;
    margin: 0;
    color: #C9D1D9;
    font-size: 0.9rem;
    line-height: 1.55;
}
.cookie-accept { flex: 0 0 auto; }

/* ------------------------------------------------------------------
   Responsive tweaks
   ------------------------------------------------------------------ */
@media (max-width: 960px) {
    .masthead-inner { padding: 0.9rem 0; }
    .brand-name { -webkit-line-clamp: 3; font-size: 0.92rem; }
    .brand-tagline { -webkit-line-clamp: 2; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .page-shell { padding: 1.4rem 0 3.5rem; }
    .sidebar .widget { padding: 1.2rem 1.1rem; }
    .entry-content blockquote { padding: 1rem 1.1rem; }
    .reply-list .children { padding-left: 0.8rem; margin-left: 0.2rem; }
    body::after { width: 180px; height: 130px; }
}

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