/*
Theme Name:   BufferNow Build Log
Theme URI:    https://buffernow.com
Description:  A terminal / build-log themed child theme of GeneratePress, built for buffernow.com — Rohit Kumar's PHP & backend engineering blog. GitHub-activity homepage hero (live repo data via the GitHub REST API), an article-optimized single post layout, and a directory-listing style archive.
Author:       Rohit Kumar
Author URI:   https://codemach.in
Template:     generatepress
Version:      1.0.10
Text Domain:  buffernow-buildlog
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root{
  --bn-ink:#0a0e14; --bn-panel:#111826; --bn-panel-2:#0d1420;
  --bn-line: rgba(219,226,234,0.09); --bn-line-soft: rgba(219,226,234,0.05);
  --bn-paper:#dbe2ea; --bn-bright:#f2f5f8; --bn-fog:#8a96a3;
  --bn-cobalt:#4c7cff; --bn-cobalt-bright:#7fa0ff;
  --bn-commit:#3fb950; --bn-amber:#e6a23c; --bn-rpi:#e0507a;
  --bn-mono:'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --bn-sans:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   Base — scoped to body.buffernow-buildlog rather than a global reset,
   so we don't fight admin-bar / plugin markup that lives outside GP's
   own template output.
   ========================================================================== */
body{
  font-family:var(--bn-sans); color:var(--bn-paper);
  background:
    radial-gradient(ellipse 800px 400px at 50% -8%, rgba(76,124,255,0.08), transparent 60%),
    radial-gradient(circle, rgba(219,226,234,0.045) 1px, transparent 1px) 0 0/22px 22px,
    var(--bn-ink);
  -webkit-font-smoothing:antialiased;
}
body.admin-bar .bn-header{ top:32px; }
@media (max-width:782px){ body.admin-bar .bn-header{ top:46px; } }

.bn-header a, .bn-console a, .bn-page-wrap a, .bn-footer a{ text-decoration:none; }
.bn-header a:focus-visible, .bn-console a:focus-visible, .bn-page-wrap a:focus-visible,
.bn-console button:focus-visible, .bn-page-wrap button:focus-visible,
.bn-page-wrap input:focus-visible, .bn-page-wrap textarea:focus-visible{
  outline:2px solid var(--bn-cobalt-bright); outline-offset:2px; border-radius:4px;
}
.bn-skip-link{
  position:absolute; left:-9999px; top:0; z-index:9999;
  background:var(--bn-cobalt-bright); color:var(--bn-ink); padding:10px 16px; border-radius:0 0 8px 0;
  font-family:var(--bn-mono); font-size:13px; font-weight:600;
}
.bn-skip-link:focus{ left:0; }

/* ==========================================================================
   Site header (header.php) — shared across every template
   ========================================================================== */
.bn-header{
  position:sticky; top:0; z-index:20;
  background:rgba(13,20,32,0.88); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--bn-line);
}
.bn-header-inner{
  max-width:1360px; margin:0 auto; padding:0 clamp(18px,3vw,32px); height:60px;
  display:flex; align-items:center; gap:28px;
}
.bn-logo{ font-family:var(--bn-mono); font-weight:700; font-size:14.5px; flex:none; color:var(--bn-paper); }
.bn-logo .bn-dim{ color:var(--bn-fog); font-weight:500; }
.bn-logo:hover{ color:var(--bn-cobalt-bright); }
.bn-nav{ flex:1; font-family:var(--bn-mono); font-size:12.8px; }
/* Real wp_nav_menu() output: <ul class="bn-nav-menu"><li><a>…<ul class="sub-menu">. Also
   matches bn_fallback_menu()'s markup in functions.php so both look identical. */
.bn-nav-menu{ display:flex; align-items:center; gap:22px; list-style:none; margin:0; padding:0; }
.bn-nav-menu li{ position:relative; }
.bn-nav-menu > li > a{ display:inline-block; padding:6px 0; border-bottom:2px solid transparent; color:var(--bn-fog); }
.bn-nav-menu > li > a:hover{ color:var(--bn-paper); border-color:var(--bn-cobalt); }
.bn-nav-menu .current-menu-item > a, .bn-nav-menu .current-menu-ancestor > a{ color:var(--bn-paper); border-color:var(--bn-cobalt); }
.bn-nav-menu .sub-menu{
  display:none; position:absolute; top:100%; left:0; margin-top:8px; z-index:5;
  flex-direction:column; background:var(--bn-panel); border:1px solid var(--bn-line);
  border-radius:8px; padding:6px; min-width:170px; list-style:none; gap:2px;
}
.bn-nav-menu li:hover > .sub-menu, .bn-nav-menu li:focus-within > .sub-menu{ display:flex; }
.bn-nav-menu .sub-menu a{ display:block; padding:8px 10px; border-radius:6px; border:none; color:var(--bn-fog); }
.bn-nav-menu .sub-menu a:hover{ background:var(--bn-panel-2); color:var(--bn-paper); }
.bn-menu-toggle{ display:none; }

@media (max-width:760px){
  .bn-nav{ display:none; }
  .bn-menu-toggle{
    display:block; margin-left:auto; background:none; border:1px solid var(--bn-line);
    color:var(--bn-fog); font-family:var(--bn-mono); font-size:11px; padding:7px 10px; border-radius:6px;
  }
  .bn-nav.bn-nav-open{
    display:flex; flex-direction:column; position:absolute; top:60px; left:0; right:0;
    background:var(--bn-panel); padding:16px 20px; border-bottom:1px solid var(--bn-line); gap:14px;
  }
  .bn-nav.bn-nav-open .bn-nav-menu{
    flex-direction:column; align-items:flex-start; gap:12px;
  }
  .bn-nav.bn-nav-open .bn-nav-menu > li > a{ display:block; }
  .bn-nav.bn-nav-open .bn-nav-menu .sub-menu{
    position:static; margin:6px 0 0; min-width:0;
  }
}

/* ==========================================================================
   Site footer (footer.php)
   ========================================================================== */
.bn-footer{ border-top:1px solid var(--bn-line); padding:24px clamp(18px,3vw,32px); }
.bn-footer-inner{ max-width:1360px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.bn-footer p{ font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); margin:0; }
.bn-footer a:hover{ color:var(--bn-cobalt-bright); }
.bn-footer-links{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.bn-footer-links a{ display:inline-flex; align-items:center; gap:7px; font-family:var(--bn-mono); font-size:12px; color:var(--bn-paper); padding:8px 12px; border-radius:8px; background:var(--bn-panel-2); border:1px solid var(--bn-line); }
.bn-footer-links a:hover{ border-color:var(--bn-cobalt); background:rgba(76,124,255,0.08); }
.bn-footer-links a b{ color:var(--bn-fog); font-weight:400; }

/* ==========================================================================
   Shared: prompt / command-line section headers, chips, panel boxes
   ========================================================================== */
.bn-prompt{
  font-family:var(--bn-mono); font-size:13.5px; font-weight:500; color:var(--bn-fog);
  margin:0 0 14px; display:flex; align-items:baseline; gap:8px;
}
.bn-prompt .bn-sign{ color:var(--bn-cobalt-bright); }
.bn-prompt .bn-cmd{ color:var(--bn-paper); font-weight:600; }
.bn-cursor{ color:var(--bn-cobalt-bright); animation:bn-blink 1s step-end infinite; font-weight:400; }
@keyframes bn-blink{ 50%{ opacity:0; } }

.bn-panel-box{ background:var(--bn-panel-2); border:1px solid var(--bn-line-soft); border-radius:10px; padding:20px; }

.bn-chip-row{ display:flex; flex-wrap:wrap; gap:8px; }
.bn-chip-label{ width:100%; font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); margin-bottom:2px; font-style:italic; }
.bn-chip{ display:inline-flex; align-items:center; gap:7px; padding:5px 11px; border-radius:999px; background:var(--bn-panel-2); border:1px solid var(--bn-line); font-family:var(--bn-mono); font-size:12px; color:var(--bn-paper); }
.bn-chip i:not(.bn-devicon){ width:6px; height:6px; border-radius:50%; flex:none; }
.bn-devicon{ font-size:15px; line-height:1; flex:none; color:var(--bn-cobalt-bright); }
.bn-chip-row.bn-interests .bn-chip{ color:var(--bn-fog); }

.bn-more-link{ display:inline-block; margin-top:14px; font-family:var(--bn-mono); font-size:12px; color:var(--bn-cobalt-bright); }
.bn-more-link:hover{ text-decoration:underline; }
.bn-more-link .bn-arrow{ display:inline-block; transition:transform .15s ease; }
.bn-more-link:hover .bn-arrow{ transform:translateX(3px); }

/* category accent colors — used on single post badges + archive rows */
.cat-cobalt{ color:var(--bn-cobalt-bright); background:rgba(76,124,255,0.1); border-color:rgba(76,124,255,0.3); }
.cat-amber{ color:var(--bn-amber); background:rgba(230,162,60,0.1); border-color:rgba(230,162,60,0.3); }
.cat-commit{ color:var(--bn-commit); background:rgba(63,185,80,0.1); border-color:rgba(63,185,80,0.3); }
.cat-rpi{ color:var(--bn-rpi); background:rgba(224,80,122,0.1); border-color:rgba(224,80,122,0.3); }

/* ==========================================================================
   Homepage terminal console (front-page.php)
   ========================================================================== */
.bn-console-wrap{ width:100%; max-width:1360px; margin:0 auto; padding:40px clamp(18px,3vw,32px) 70px; }
.bn-console{
  width:100%; margin:0; background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible;
}
.bn-home-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 28px; }
.bn-home-head .bn-breadcrumb{ margin:0; }
.bn-home-head .bn-prompt{ margin:0; }
.bn-titlebar{ display:flex; align-items:center; gap:14px; padding:0 18px; height:44px; background:var(--bn-panel-2); border-bottom:1px solid var(--bn-line); }
.bn-dots{ display:flex; gap:7px; flex:none; }
.bn-dot{ width:10px; height:10px; border-radius:50%; display:block; }
.bn-dot.bn-red{ background:#e5534b; }
.bn-dot.bn-amber{ background:var(--bn-amber); }
.bn-dot.bn-green{ background:var(--bn-commit); }
.bn-path{ font-family:var(--bn-mono); font-size:12.5px; color:var(--bn-fog); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bn-path b{ color:var(--bn-paper); font-weight:600; }
.bn-status-pill{ margin-left:auto; display:flex; align-items:center; gap:7px; font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); padding:5px 10px; border:1px solid var(--bn-line); border-radius:999px; flex:none; white-space:nowrap; }
.bn-pulse{ width:6px; height:6px; border-radius:50%; background:var(--bn-commit); animation:bn-pulse 2.4s ease-out infinite; }
@keyframes bn-pulse{ 0%{ box-shadow:0 0 0 0 rgba(63,185,80,0.45); } 70%{ box-shadow:0 0 0 6px rgba(63,185,80,0); } 100%{ box-shadow:0 0 0 0 rgba(63,185,80,0); } }

.bn-console-body{ padding:0; }

.bn-whoami-output{ opacity:0; transform:translateY(6px); transition:opacity .5s ease, transform .5s ease; }
.bn-whoami-output.bn-revealed{ opacity:1; transform:translateY(0); }
.bn-hero-grid{ display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,390px); gap:28px; align-items:start; }
.bn-whoami-top{ display:flex; gap:16px; align-items:flex-start; margin-bottom:18px; }
.bn-avatar{ flex:none; width:54px; height:54px; border-radius:12px; background:linear-gradient(155deg, rgba(76,124,255,0.22), rgba(63,185,80,0.14)); border:1px solid var(--bn-line); display:flex; align-items:center; justify-content:center; font-family:var(--bn-mono); font-weight:700; font-size:17px; color:var(--bn-cobalt-bright); }
.bn-console h1{ margin:0 0 4px; font-size:clamp(24px,3.4vw,30px); font-weight:700; letter-spacing:-0.01em; color:var(--bn-bright); }
.bn-role{ margin:0 0 8px; font-size:15.5px; font-weight:600; color:var(--bn-cobalt-bright); }
.bn-bio{ margin:0 0 10px; font-size:14.5px; line-height:1.6; color:var(--bn-paper); max-width:62ch; }
.bn-meta{ margin:0; font-size:12.5px; font-family:var(--bn-mono); color:var(--bn-fog); display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.bn-open-dot{ width:6px; height:6px; border-radius:50%; background:var(--bn-commit); display:inline-block; animation:bn-pulse 2.4s ease-out infinite; }

.bn-log-readout{ list-style:none; margin:18px 0 0; padding:14px 16px; background:var(--bn-panel-2); border:1px solid var(--bn-line-soft); border-radius:8px; font-family:var(--bn-mono); font-size:12.8px; line-height:1.9; }
.bn-log-readout li{ display:flex; flex-wrap:wrap; gap:8px; color:var(--bn-paper); }
.bn-log-readout .bn-k{ color:var(--bn-fog); min-width:104px; flex:none; }
.bn-log-readout .bn-hl{ color:var(--bn-commit); font-weight:600; }
.bn-log-readout .bn-hl.bn-blue{ color:var(--bn-cobalt-bright); }

.bn-console .bn-chip-row{ margin-top:18px; }
.bn-console .bn-chip-row.bn-interests{ margin-top:12px; }

.bn-tooldeck{ display:grid; gap:14px; }
.bn-tooldeck-card, .bn-signal-panel{ background:linear-gradient(180deg, rgba(76,124,255,0.08), rgba(13,20,32,0.55)); border:1px solid var(--bn-line-soft); border-radius:10px; padding:18px; }
.bn-tooldeck-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.bn-tooltile{ min-height:72px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; background:rgba(10,14,20,0.36); border:1px solid var(--bn-line); border-radius:8px; color:var(--bn-fog); font-family:var(--bn-mono); font-size:11px; text-align:center; }
.bn-tooltile .bn-devicon{ font-size:28px; color:var(--bn-paper); }
.bn-tooltile:hover{ border-color:rgba(76,124,255,0.45); color:var(--bn-paper); background:rgba(76,124,255,0.08); }
.bn-tooltile:hover .bn-devicon{ color:var(--bn-cobalt-bright); }
.bn-tooldeck-line{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding-top:14px; border-top:1px solid var(--bn-line-soft); font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); }
.bn-tooldeck-line b{ color:var(--bn-paper); font-weight:600; }
.bn-signal-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.bn-signal-grid span{ display:flex; flex-direction:column; gap:4px; min-height:58px; justify-content:center; padding:10px; background:rgba(10,14,20,0.34); border:1px solid var(--bn-line); border-radius:8px; font-family:var(--bn-mono); font-size:10.5px; color:var(--bn-fog); }
.bn-signal-grid b{ font-size:17px; color:var(--bn-paper); line-height:1; }
.bn-signal-note{ display:flex; align-items:center; gap:8px; margin:14px 0 0; padding-top:13px; border-top:1px solid var(--bn-line-soft); font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); }

.bn-two-col{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(360px,0.85fr); gap:20px; margin-top:30px; }

.bn-activity-caption{ font-size:12.5px; color:var(--bn-fog); margin:0 0 10px; font-family:var(--bn-mono); }
.bn-activity-caption b{ color:var(--bn-paper); font-weight:600; }
.bn-heatmap-wrap{ overflow-x:auto; padding-bottom:6px; }
.bn-heatmap{ display:grid; grid-template-rows:repeat(7,10px); grid-auto-flow:column; grid-auto-columns:10px; gap:3px; width:max-content; }
.bn-cell{ width:10px; height:10px; border-radius:2px; background:var(--bn-panel); }
.bn-cell.bn-empty{ background:transparent; }
.bn-cell.bn-l0{ background:#161f2c; }
.bn-cell.bn-l1{ background:#123a24; }
.bn-cell.bn-l2{ background:#1f6f3f; }
.bn-cell.bn-l3{ background:#2f9950; }
.bn-cell.bn-l4{ background:var(--bn-commit); }
.bn-heatmap-foot{ display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:11.5px; color:var(--bn-fog); font-family:var(--bn-mono); flex-wrap:wrap; gap:8px; }
.bn-legend{ display:flex; align-items:center; gap:4px; }
.bn-legend .bn-cell{ width:9px; height:9px; }

.bn-langbar{ display:flex; height:8px; border-radius:999px; overflow:hidden; margin-top:18px; border:1px solid var(--bn-line-soft); }
.bn-langbar span{ height:100%; }
.bn-lang-legend{ display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); }
.bn-lang-legend i:not(.bn-devicon){ width:7px; height:7px; border-radius:2px; display:inline-block; margin-right:5px; }
.bn-lang-legend .bn-devicon{ margin-right:5px; font-size:13px; vertical-align:-1px; }

.bn-stat-line{ margin-top:14px; font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); }
.bn-stat-line b{ color:var(--bn-paper); font-weight:600; }

.bn-badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.bn-badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; background:var(--bn-panel); border:1px solid var(--bn-line); font-size:11.5px; color:var(--bn-fog); font-family:var(--bn-mono); }

.bn-issues-box{ margin-top:18px; padding-top:16px; border-top:1px solid var(--bn-line-soft); }
.bn-issues-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); }
.bn-issues-head b{ min-width:26px; height:24px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; background:rgba(76,124,255,0.12); border:1px solid rgba(76,124,255,0.28); color:var(--bn-cobalt-bright); }
.bn-issues-list{ display:grid; gap:8px; }
.bn-issue-row{ display:grid; grid-template-columns:112px minmax(0,1fr) auto; align-items:center; gap:10px; padding:9px 10px; background:rgba(10,14,20,0.34); border:1px solid var(--bn-line-soft); border-radius:8px; font-family:var(--bn-mono); font-size:11.5px; }
.bn-issue-row:hover{ border-color:rgba(76,124,255,0.42); background:rgba(76,124,255,0.07); }
.bn-issue-repo{ color:var(--bn-cobalt-bright); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bn-issue-title{ color:var(--bn-paper); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bn-issue-number{ color:var(--bn-fog); }
.bn-issue-empty{ margin:0; padding:12px; border:1px solid var(--bn-line-soft); border-radius:8px; background:rgba(10,14,20,0.34); color:var(--bn-fog); font-family:var(--bn-mono); font-size:12px; }

.bn-projects-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.bn-project-card{ display:block; background:var(--bn-panel); border:1px solid var(--bn-line); border-radius:8px; padding:14px; transition:border-color .18s ease, transform .18s ease; }
.bn-project-card:hover{ border-color:var(--bn-cobalt); transform:translateY(-2px); }
.bn-card-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.bn-card-title{ display:flex; align-items:center; gap:8px; min-width:0; }
.bn-card-title .bn-devicon{ font-size:18px; }
.bn-card-name{ font-family:var(--bn-mono); font-weight:600; font-size:13.5px; color:var(--bn-paper); }
.bn-project-card:hover .bn-card-name{ color:var(--bn-cobalt-bright); }
.bn-pin{ font-size:10.5px; color:var(--bn-amber); font-family:var(--bn-mono); }
.bn-card-desc{ font-size:12.5px; color:var(--bn-fog); line-height:1.5; margin:0 0 10px; min-height:32px; }
.bn-card-meta{ display:flex; align-items:center; flex-wrap:wrap; gap:10px; font-family:var(--bn-mono); font-size:11px; color:var(--bn-fog); }
.bn-card-meta .bn-lang{ display:flex; align-items:center; gap:5px; }
.bn-card-meta .bn-lang i:not(.bn-devicon){ width:8px; height:8px; border-radius:50%; }
.bn-card-meta .bn-lang .bn-devicon{ font-size:13px; }
.bn-card-link{ display:inline-block; margin-top:12px; font-family:var(--bn-mono); font-size:12px; color:var(--bn-cobalt-bright); }
.bn-card-link:hover{ text-decoration:underline; }

.bn-feed{ margin-top:20px; }
.bn-feed-line{ display:flex; gap:12px; align-items:baseline; padding:9px 0; border-bottom:1px solid var(--bn-line-soft); flex-wrap:wrap; }
.bn-feed-line:last-of-type{ border-bottom:none; }
.bn-feed-date{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); flex:none; }
.bn-feed-title{ font-size:13.5px; color:var(--bn-paper); flex:1 1 260px; }
.bn-feed-line a.bn-feed-title:hover{ color:var(--bn-cobalt-bright); }
.bn-feed-tag{ font-family:var(--bn-mono); font-size:11px; color:var(--bn-amber); flex:none; }

@media (max-width:1080px){ .bn-hero-grid, .bn-two-col{ grid-template-columns:1fr; } }
@media (max-width:860px){ .bn-projects-grid{ grid-template-columns:1fr; } .bn-tooldeck-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:640px){ .bn-issue-row{ grid-template-columns:1fr auto; } .bn-issue-repo{ grid-column:1 / -1; } .bn-signal-grid{ grid-template-columns:1fr; } }
@media (max-width:520px){ .bn-status-pill{ display:none; } .bn-home-head{ margin-bottom:22px; } .bn-whoami-top{ flex-direction:column; } .bn-tooldeck-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){ .bn-footer-inner{ align-items:flex-start; flex-direction:column; } }

/* ==========================================================================
   Shared page shell for single + archive (narrower / wider variants)
   ========================================================================== */
.bn-page-wrap{ max-width:720px; margin:0 auto; padding:44px 20px 80px; }
.bn-page-wrap.bn-wide{ max-width:1120px; }
.bn-breadcrumb{ font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); margin:0 0 20px; }
.bn-breadcrumb .bn-sign{ color:var(--bn-cobalt-bright); }
.bn-breadcrumb a:hover{ color:var(--bn-paper); }
.bn-typed-command{ min-height:18px; }
.bn-typed-command-text{ color:var(--bn-fog); }
.bn-typed-command .bn-cursor{ margin-left:2px; }
.bn-js .bn-command-sequence > :not(.bn-typed-command){
  transition:opacity .45s ease, transform .45s ease;
}
.bn-js .bn-command-sequence:not(.bn-command-done) > :not(.bn-typed-command){
  opacity:0; transform:translateY(6px); pointer-events:none;
}

/* ==========================================================================
   Single post (single.php)
   ========================================================================== */
.bn-cat-badge{ display:inline-flex; align-items:center; gap:6px; font-family:var(--bn-mono); font-size:11.5px; font-weight:600; padding:4px 10px; border-radius:999px; margin-bottom:16px; border:1px solid transparent; }
.bn-cat-badge .bn-devicon{ font-size:13px; }
.bn-post-title{ font-size:clamp(27px,4.2vw,38px); font-weight:700; line-height:1.18; letter-spacing:-0.012em; color:var(--bn-bright); margin:0 0 16px; }
.bn-dek{ font-size:17px; line-height:1.6; color:var(--bn-fog); margin:0 0 20px; max-width:60ch; }
.bn-post-meta{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-family:var(--bn-mono); font-size:12.5px; color:var(--bn-fog); padding-bottom:24px; border-bottom:1px solid var(--bn-line); }
.bn-mini-avatar{ width:24px; height:24px; border-radius:6px; flex:none; background:linear-gradient(155deg, rgba(76,124,255,0.25), rgba(63,185,80,0.15)); border:1px solid var(--bn-line); display:flex; align-items:center; justify-content:center; font-size:9.5px; font-weight:700; color:var(--bn-cobalt-bright); }
.bn-post-meta b{ color:var(--bn-paper); font-weight:600; }
.bn-dot-sep{ width:3px; height:3px; border-radius:50%; background:var(--bn-fog); flex:none; }

.bn-toc-box{ background:var(--bn-panel-2); border:1px solid var(--bn-line-soft); border-radius:8px; padding:16px 18px; margin:28px 0; }
.bn-toc-label{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); margin:0 0 10px; font-style:italic; }
.bn-toc-box ol{ margin:0; padding:0 0 0 18px; }
.bn-toc-box li{ font-size:13.5px; margin-bottom:6px; }
.bn-toc-box a{ color:var(--bn-cobalt-bright); }
.bn-toc-box a:hover{ text-decoration:underline; }

.bn-article-body{ font-size:16.5px; line-height:1.78; color:var(--bn-paper); }
.bn-article-body p{ margin:0 0 1.3em; }
.bn-article-body h2{ display:flex; align-items:baseline; gap:9px; font-size:clamp(20px,2.6vw,24px); font-weight:700; color:var(--bn-bright); margin:2em 0 0.7em; line-height:1.3; scroll-margin-top:80px; }
.bn-article-body h2 .bn-h-mark{ font-family:var(--bn-mono); font-weight:600; font-size:0.75em; color:var(--bn-fog); }
.bn-article-body h3{ font-size:1.15em; font-weight:600; color:var(--bn-bright); margin:1.6em 0 0.6em; }
.bn-article-body ul, .bn-article-body ol{ margin:0 0 1.3em; padding-left:1.3em; }
.bn-article-body li{ margin-bottom:0.5em; }
.bn-article-body ul{ list-style:none; padding-left:0.2em; }
.bn-article-body ul li{ padding-left:1.3em; position:relative; }
.bn-article-body ul li::before{ content:'\203A'; position:absolute; left:0; color:var(--bn-cobalt-bright); font-weight:700; }
.bn-article-body a{ color:var(--bn-cobalt-bright); text-decoration:underline; text-decoration-color:rgba(76,124,255,0.35); text-underline-offset:3px; }
.bn-article-body a:hover{ text-decoration-color:var(--bn-cobalt-bright); }
.bn-article-body strong{ color:var(--bn-bright); font-weight:700; }
.bn-article-body blockquote{ margin:1.6em 0; padding:4px 0 4px 18px; border-left:3px solid var(--bn-line); color:var(--bn-fog); font-style:italic; }
.bn-article-body code{ font-family:var(--bn-mono); font-size:0.87em; background:rgba(76,124,255,0.12); color:var(--bn-cobalt-bright); padding:2px 6px; border-radius:4px; }
.bn-article-body img{ max-width:100%; height:auto; border-radius:8px; }
.bn-article-body pre{ background:var(--bn-ink); border:1px solid var(--bn-line); border-radius:8px; padding:16px 18px; overflow-x:auto; font-family:var(--bn-mono); font-size:13px; line-height:1.7; margin:1.6em 0; }
.bn-article-body pre code{ background:none; padding:0; color:var(--bn-paper); }

.bn-callout{ background:var(--bn-panel-2); border-left:3px solid var(--bn-amber); border-radius:0 8px 8px 0; padding:14px 18px; margin:1.6em 0; }
.bn-callout .bn-callout-label{ font-family:var(--bn-mono); font-size:11px; color:var(--bn-amber); font-weight:600; margin:0 0 6px; text-transform:lowercase; }
.bn-callout p{ margin:0; font-size:14.5px; color:var(--bn-paper); line-height:1.6; }

.bn-code-window{ margin:1.8em 0; border:1px solid var(--bn-line); border-radius:8px; overflow:hidden; }
.bn-code-titlebar{ display:flex; align-items:center; gap:10px; padding:9px 13px; background:var(--bn-panel-2); border-bottom:1px solid var(--bn-line); }
.bn-code-dots{ display:flex; gap:5px; }
.bn-code-dots i{ width:8px; height:8px; border-radius:50%; display:block; }
.bn-code-dots i:nth-child(1){ background:#e5534b; }
.bn-code-dots i:nth-child(2){ background:var(--bn-amber); }
.bn-code-dots i:nth-child(3){ background:var(--bn-commit); }
.bn-code-filename{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); }
.bn-code-window pre{ margin:0; border:none; border-radius:0; }
.bn-tok-key{ color:var(--bn-cobalt-bright); }
.bn-tok-str{ color:var(--bn-commit); }
.bn-tok-cmt{ color:var(--bn-fog); font-style:italic; }

.bn-img-placeholder{ margin:1.8em 0; }
.bn-placeholder-box{ background:var(--bn-panel-2); border:1px dashed var(--bn-line); border-radius:8px; height:220px; display:flex; align-items:center; justify-content:center; color:var(--bn-fog); }
.bn-img-placeholder figcaption{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); text-align:center; margin-top:8px; }

.bn-tags-row{ display:flex; flex-wrap:wrap; gap:8px; margin:2.4em 0 0; }
.bn-tag-chip{ font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); padding:5px 11px; border-radius:999px; background:var(--bn-panel-2); border:1px solid var(--bn-line); }
.bn-tag-chip:hover{ color:var(--bn-cobalt-bright); border-color:var(--bn-cobalt); }

.bn-share-row{ margin-top:16px; font-family:var(--bn-mono); font-size:12.5px; color:var(--bn-fog); display:flex; gap:14px; flex-wrap:wrap; }
.bn-share-row a:hover{ color:var(--bn-cobalt-bright); }

.bn-author-card{ display:flex; gap:14px; align-items:flex-start; margin-top:32px; padding:20px; background:var(--bn-panel-2); border:1px solid var(--bn-line-soft); border-radius:10px; }
.bn-author-card h3{ margin:0 0 4px; font-size:14.5px; color:var(--bn-bright); }
.bn-author-card p{ margin:0 0 8px; font-size:13px; color:var(--bn-fog); line-height:1.55; }
.bn-author-links{ display:flex; gap:14px; font-family:var(--bn-mono); font-size:12px; }
.bn-author-links a{ color:var(--bn-cobalt-bright); }
.bn-author-links a:hover{ text-decoration:underline; }

.bn-prev-next{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:28px; }
.bn-prev-next a{ display:block; padding:16px; border:1px solid var(--bn-line); border-radius:8px; background:var(--bn-panel-2); }
.bn-prev-next a:hover{ border-color:var(--bn-cobalt); }
.bn-prev-next .bn-pn-label{ font-family:var(--bn-mono); font-size:11px; color:var(--bn-fog); display:block; margin-bottom:6px; }
.bn-prev-next .bn-pn-title{ font-size:13.5px; color:var(--bn-paper); line-height:1.4; }
.bn-prev-next .bn-next{ text-align:right; }

.bn-related-h{ font-family:var(--bn-mono); font-size:13px; color:var(--bn-fog); margin:40px 0 14px; }
.bn-related-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.bn-related-card{ display:block; padding:14px; border:1px solid var(--bn-line); border-radius:8px; background:var(--bn-panel-2); }
.bn-related-card:hover{ border-color:var(--bn-cobalt); }
.bn-related-card .bn-rc-cat{ font-family:var(--bn-mono); font-size:10.5px; color:var(--bn-cobalt-bright); margin-bottom:6px; display:flex; align-items:center; gap:5px; }
.bn-related-card .bn-rc-cat .bn-devicon{ font-size:12px; }
.bn-related-card .bn-rc-title{ font-size:13px; color:var(--bn-paper); line-height:1.4; }

/* Comments — native Disqus embed, light scheme forced for readability on dark page */
.post-comments{ max-width:720px; margin:4rem auto 0; padding-top:2rem; border-top:1px solid var(--bn-line); color-scheme:light; }
.post-comments__title{ font-family:var(--bn-mono); font-size:0.875rem; font-weight:600; letter-spacing:0.08em; text-transform:uppercase; color:var(--bn-fog); margin:0 0 1.75rem; }
.post-comments__title span{ color:var(--bn-paper); font-weight:400; }
#disqus_thread{ width:100%; color-scheme:light; }
#disqus_thread a{ color:var(--bn-cobalt-bright); }
#disqus_thread iframe{ width:100% !important; color-scheme:light; }

@media (max-width:520px){
  .bn-prev-next{ grid-template-columns:1fr; }
  .bn-prev-next .bn-next{ text-align:left; }
  .bn-related-grid{ grid-template-columns:1fr; }
}

/* ==========================================================================
   Archive (archive.php)
   ========================================================================== */
.bn-archive-title{ font-size:clamp(28px,4vw,38px); font-weight:700; color:var(--bn-bright); margin:0 0 10px; letter-spacing:-0.01em; }
.bn-archive-desc{ font-size:15.5px; color:var(--bn-fog); line-height:1.6; max-width:64ch; margin:0 0 6px; }
.bn-archive-stats{ font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); margin:0 0 26px; }
.bn-archive-stats b{ color:var(--bn-paper); }

.bn-filter-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.bn-filter-chip{ display:inline-flex; align-items:center; gap:6px; font-family:var(--bn-mono); font-size:12.5px; color:var(--bn-fog); padding:7px 13px; border-radius:999px; background:var(--bn-panel-2); border:1px solid var(--bn-line); }
.bn-filter-chip .bn-devicon{ font-size:14px; }
.bn-filter-chip:hover{ color:var(--bn-paper); border-color:var(--bn-cobalt); }
.bn-filter-chip.bn-active{ color:var(--bn-ink); background:var(--bn-cobalt-bright); border-color:var(--bn-cobalt-bright); font-weight:600; }

.bn-search-row{ margin-bottom:32px; }
.bn-search-row input[type="search"]{ width:100%; max-width:420px; background:var(--bn-panel-2); border:1px solid var(--bn-line); border-radius:8px; padding:11px 14px; color:var(--bn-paper); font-family:var(--bn-mono); font-size:13px; }
.bn-search-row input::placeholder{ color:var(--bn-fog); }
.bn-search-row button{ display:none; } /* the label-less submit button; Enter key submits */

.bn-content-columns{ display:grid; grid-template-columns:1fr 280px; gap:40px; align-items:start; }

.bn-list-section-h{ font-family:var(--bn-mono); font-size:12.5px; color:var(--bn-fog); font-style:italic; margin:0 0 12px; padding-top:18px; border-top:1px solid var(--bn-line-soft); }
.bn-list-section-h:first-child{ padding-top:0; border-top:none; }
.bn-list-row{ display:block; padding:14px; margin:0 -14px; border-radius:8px; }
.bn-list-row:hover{ background:var(--bn-panel-2); }
.bn-list-row-top{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.bn-list-date{ font-family:var(--bn-mono); font-size:12px; color:var(--bn-fog); flex:none; width:82px; }
.bn-list-fav{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-amber); flex:none; width:82px; }
.bn-list-slug{ font-family:var(--bn-mono); font-size:14.5px; font-weight:600; color:var(--bn-paper); flex:1 1 260px; }
.bn-list-row:hover .bn-list-slug{ color:var(--bn-cobalt-bright); }
.bn-list-cat{ display:inline-flex; align-items:center; gap:5px; font-family:var(--bn-mono); font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; flex:none; border:1px solid transparent; }
.bn-list-cat .bn-devicon{ font-size:12px; }
.bn-list-time{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); flex:none; margin-left:auto; }
.bn-list-excerpt{ font-size:13.5px; color:var(--bn-fog); line-height:1.6; margin:6px 0 0 94px; max-width:70ch; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* the_posts_pagination() core markup */
.bn-pagination.navigation.pagination{ margin-top:32px; padding-top:24px; border-top:1px solid var(--bn-line); }
.bn-pagination .nav-links{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-family:var(--bn-mono); font-size:12.5px; }
.bn-pagination a, .bn-pagination span{ padding:7px 11px; border-radius:6px; color:var(--bn-fog); }
.bn-pagination a:hover{ background:var(--bn-panel); color:var(--bn-paper); }
.bn-pagination .current{ background:var(--bn-cobalt-bright); color:var(--bn-ink); font-weight:600; }

.bn-sidebar-box{ background:var(--bn-panel-2); border:1px solid var(--bn-line-soft); border-radius:10px; padding:20px; margin-bottom:18px; }
.bn-mini-profile{ display:flex; gap:12px; align-items:flex-start; }
.bn-mini-profile .bn-avatar{ width:42px; height:42px; border-radius:9px; font-size:13.5px; }
.bn-mini-profile h3{ margin:0 0 3px; font-size:14px; color:var(--bn-bright); }
.bn-mini-profile .bn-role{ font-family:var(--bn-mono); font-size:11px; color:var(--bn-cobalt-bright); margin:0 0 6px; }
.bn-mini-profile p{ margin:0; font-size:12.5px; color:var(--bn-fog); line-height:1.55; }
.bn-mini-links{ display:flex; gap:12px; margin-top:12px; font-family:var(--bn-mono); font-size:11.5px; }
.bn-mini-links a{ color:var(--bn-cobalt-bright); }
.bn-mini-links a:hover{ text-decoration:underline; }

.bn-sidebar-label{ font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); font-style:italic; margin:0 0 12px; }
.bn-topics-list{ display:flex; flex-wrap:wrap; gap:7px; }
.bn-topics-list a{ display:inline-flex; align-items:center; gap:6px; font-family:var(--bn-mono); font-size:11.5px; color:var(--bn-fog); padding:5px 10px; border-radius:999px; background:var(--bn-panel); border:1px solid var(--bn-line); }
.bn-topics-list a .bn-devicon{ font-size:13px; }
.bn-topics-list a:hover{ color:var(--bn-paper); border-color:var(--bn-cobalt); }
.bn-now-box p{ margin:0; font-size:13px; color:var(--bn-paper); line-height:1.6; }
.bn-now-status{ display:flex; align-items:center; gap:8px; }

@media (max-width:920px){
  .bn-content-columns{ grid-template-columns:1fr; }
  .bn-sidebar{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
}
@media (max-width:760px){
  .bn-list-excerpt{ margin-left:0; }
  .bn-list-date, .bn-list-fav{ width:auto; }
}
@media (max-width:520px){ .bn-sidebar{ grid-template-columns:1fr; } }

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  .bn-header *, .bn-console *, .bn-page-wrap *, .bn-footer *{ animation:none !important; transition:none !important; }
  .bn-whoami-output{ opacity:1; transform:none; }
  .bn-js .bn-command-sequence > :not(.bn-typed-command){ opacity:1; transform:none; pointer-events:auto; }
}
