/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOKENS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  --bg:       #07090c;
  --bg2:      #0c0f14;
  --bg3:      #111520;
  --bg4:      #181e2c;
  --border:   rgba(255,255,255,0.055);
  --border2:  rgba(255,255,255,0.10);
  --text:     #cdc8c0;
  --text2:    #9a948c;
  --muted:    #555050;
  --faint:    #272b36;
  --gold:     #c9a96e;
  --gold-d:   #7a6040;
  --gold-g:   rgba(201,169,110,0.08);
  --cyan:     #4fc3c3;
  --cyan-d:   rgba(79,195,195,0.12);
  --green:    #3eb489;
  --green-d:  rgba(62,180,137,0.10);
  --red:      #d97070;
  --red-d:    rgba(217,112,112,0.10);
  --blue:     #6fa8d6;
  --blue-d:   rgba(111,168,214,0.10);
  --purple:   #9d84d6;
  --serif:    'Crimson Pro', Georgia, serif;
  --mono:     'IBM Plex Mono', monospace;
  --nav-w:    274px;
  --bar-h:    44px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--serif); font-weight: 300; line-height: 1.75; min-height: 100vh; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOME PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body.home { display: flex; flex-direction: column; overflow-x: hidden; }

#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.site-wrap { position: relative; z-index: 1; }
.wrapper { max-width: 860px; margin: 0 auto; padding: 0 2rem; }

header { padding: 2.8rem 0 2rem; border-bottom: 1px solid var(--border); animation: fadeDown .7s ease both; }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { font-family: var(--mono); font-size: .85rem; color: var(--gold); letter-spacing: .12em; text-decoration: none; }
.logo-sep { color: var(--muted); }
.nav-tag { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .1em; }

.hero { padding: 6rem 0 4.5rem; animation: fadeUp .8s .1s ease both; }
.hero-eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--cyan); margin-bottom: 2rem; display: flex; align-items: center; gap: .75rem; }
.hero-eyebrow::before { content: ''; display: block; width: 32px; height: 1px; background: var(--cyan); opacity: .6; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.1; letter-spacing: -.025em; color: #eae5dc; margin-bottom: 2rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-desc { font-size: 1.1rem; font-weight: 300; color: #8e8880; max-width: 560px; line-height: 1.8; }
.hero-desc strong { color: var(--text); font-weight: 400; }

.formats { padding: 4rem 0 3rem; animation: fadeUp .8s .2s ease both; }
.section-label { font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; margin-bottom: 2.5rem; }
.format-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.5rem 2.5rem; }
.format-item { display: flex; flex-direction: column; gap: .35rem; }
.format-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; color: var(--cyan); }
.format-desc { font-size: .9rem; font-weight: 300; color: var(--muted); line-height: 1.5; }

.divider { border: none; border-top: 1px solid var(--border); }
.divider-sm { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.topics-section { padding: 4rem 0; animation: fadeUp .8s .3s ease both; }
.topics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.topic-card { background: var(--bg); padding: 1.8rem 1.6rem; transition: background .2s; }
.topic-card:hover { background: var(--bg2); }
.topic-icon { font-family: var(--mono); font-size: .72rem; color: var(--gold-d); margin-bottom: .9rem; }
.topic-title { font-size: 1.05rem; font-weight: 600; color: #ccc6bc; margin-bottom: .5rem; }
.topic-desc { font-size: .875rem; font-weight: 300; color: var(--muted); line-height: 1.5; }
.topic-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.mini-tag { font-family: var(--mono); font-size: .6rem; letter-spacing: .07em; padding: .15rem .5rem; border: 1px solid var(--faint); color: var(--faint); }

/* POSTS LIST ON HOME */
.posts-section { padding: 4rem 0; animation: fadeUp .8s .35s ease both; }
.posts-list { display: flex; flex-direction: column; gap: .5rem; }
.post-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; text-decoration: none; transition: border-color .15s, background .15s; }
.post-card:hover { border-color: var(--gold-d); background: var(--bg3); }
.post-card-inner { flex: 1; }
.post-card-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; flex-wrap: wrap; }
.post-date { font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .08em; }
.post-tag { font-family: var(--mono); font-size: .58rem; padding: .1rem .5rem; border-radius: 3px; background: var(--gold-g); color: var(--gold-d); border: 1px solid rgba(201,169,110,0.18); }
.post-card-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: #ddd8cf; line-height: 1.3; }
.post-card-desc { font-family: var(--serif); font-size: .875rem; font-weight: 300; color: var(--muted); margin-top: .3rem; line-height: 1.5; }
.post-card-arrow { font-family: var(--mono); font-size: 1rem; color: var(--muted); flex-shrink: 0; transition: color .15s, transform .15s; }
.post-card:hover .post-card-arrow { color: var(--gold); transform: translateX(3px); }

.quote-block { padding: 4rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); animation: fadeUp .8s .45s ease both; }
.quote-block blockquote { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 300; font-style: italic; color: #a09a90; line-height: 1.5; max-width: 640px; border-left: 2px solid var(--gold-d); padding-left: 1.8rem; }
.quote-block cite { display: block; margin-top: 1rem; font-family: var(--mono); font-size: .65rem; font-style: normal; letter-spacing: .14em; color: var(--muted); }

.status-bar { border-top: 1px solid var(--border); padding: 1.4rem 0; animation: fadeUp .8s .55s ease both; }
.status-inner { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.status-item { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--muted); }
.status-item.push-right { margin-left: auto; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.online { background: #4ec94e; box-shadow: 0 0 6px #4ec94e88; }
.dot.pending { background: var(--gold-d); }

footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; animation: fadeUp .8s .6s ease both; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.5rem; }
.footer-copy { font-family: var(--mono); font-size: .65rem; color: var(--muted); letter-spacing: .1em; }
.footer-copy.dim { margin-top: .4rem; opacity: .5; }
.footer-services { font-size: .72rem; font-weight: 300; font-style: italic; color: #3d3932; text-align: right; max-width: 300px; line-height: 1.6; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARTICLE / SINGLE PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body.article { display: flex; flex-direction: column; }

#progress-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: linear-gradient(90deg, var(--gold-d), var(--gold), var(--cyan)); z-index: 1000; transition: width .1s linear; }

.topbar { position: sticky; top: 0; z-index: 40; height: var(--bar-h); background: rgba(7,9,12,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem; }
.topbar-logo { font-family: var(--mono); font-size: .75rem; color: var(--gold); letter-spacing: .12em; text-decoration: none; flex-shrink: 0; }
.topbar-logo span { color: var(--muted); }
.topbar-sep { width: 1px; height: 16px; background: var(--border2); flex-shrink: 0; }
.topbar-crumb { font-family: var(--mono); font-size: .65rem; color: var(--muted); letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.topbar-back { font-family: var(--mono); font-size: .65rem; color: var(--muted); text-decoration: none; letter-spacing: .1em; display: flex; align-items: center; gap: .4rem; flex-shrink: 0; transition: color .15s; }
.topbar-back:hover { color: var(--gold); }
.topbar-back::before { content: '←'; }

.layout { display: flex; flex: 1; }

/* Sidebar */
.sidebar { width: var(--nav-w); flex-shrink: 0; background: var(--bg2); border-right: 1px solid var(--border); position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--faint) transparent; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 2px; }
.nav-head { padding: 1.2rem 1.1rem 1rem; border-bottom: 1px solid var(--border); }
.nav-title { font-family: var(--mono); font-size: .72rem; font-weight: 500; color: var(--gold); letter-spacing: .1em; }
.nav-sub { font-family: var(--mono); font-size: .58rem; color: var(--muted); margin-top: .3rem; letter-spacing: .06em; }
.nav-body { padding: .5rem 0 1.5rem; }

/* Hugo TOC — override default styling */
.nav-body nav#TableOfContents ul { list-style: none; padding: 0; }
.nav-body nav#TableOfContents li { margin: 0; }
.nav-body nav#TableOfContents a { display: flex; align-items: center; padding: .32rem 1.1rem; font-family: var(--mono); font-size: .66rem; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; transition: color .12s, background .12s, border-color .12s; line-height: 1.4; }
.nav-body nav#TableOfContents a:hover { color: var(--text); background: rgba(255,255,255,.02); }
.nav-body nav#TableOfContents a.active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-g); }
.nav-body nav#TableOfContents ul ul a { padding-left: 2rem; font-size: .62rem; }

.sidebar-tags { padding: .75rem 1.1rem 1.2rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .4rem; }
.sidebar-tag { font-family: var(--mono); font-size: .6rem; padding: .15rem .55rem; background: var(--gold-g); color: var(--gold-d); border: 1px solid rgba(201,169,110,0.18); border-radius: 3px; text-decoration: none; transition: background .15s, color .15s; }
.sidebar-tag:hover { background: rgba(201,169,110,0.15); color: var(--gold); }

/* Main content */
.content { flex: 1; min-width: 0; padding: 3.5rem 4.5rem 8rem; max-width: 860px; }

/* Article hero */
.article-hero { margin-bottom: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); }
.article-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.atag { font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; padding: .2rem .6rem; border-radius: 3px; text-transform: uppercase; background: var(--gold-g); color: var(--gold); border: 1px solid rgba(201,169,110,0.2); text-decoration: none; }
.atag:hover { background: rgba(201,169,110,0.15); }
.article-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.025em; color: #eae5dc; margin-bottom: .8rem; }
.article-title em { font-style: italic; color: var(--gold); }
.article-lead { font-size: 1.05rem; font-weight: 300; color: var(--text2); max-width: 600px; line-height: 1.8; margin-bottom: 1.2rem; }
.article-meta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.meta-item { font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .08em; display: flex; align-items: center; gap: .35rem; }
.meta-item::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.meta-item.ref-item::before { background: var(--cyan); }
.meta-ref { color: var(--cyan); text-decoration: none; transition: color .15s; }
.meta-ref:hover { color: var(--gold); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARTICLE BODY TYPOGRAPHY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.article-body h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -.015em; color: #ddd8cf; margin: 4rem 0 1.2rem; padding-top: 4rem; border-top: 1px solid var(--border); line-height: 1.2; }
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.article-body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: #ccc7bf; margin: 2rem 0 .7rem; letter-spacing: -.01em; }
.article-body h4 { font-family: var(--mono); font-size: .8rem; font-weight: 500; color: #b5b0a8; margin: 1.4rem 0 .5rem; letter-spacing: .04em; }
.article-body p { margin-bottom: 1rem; }
.article-body strong { color: #ddd8cf; font-weight: 400; }
.article-body em { color: var(--gold); font-style: italic; }
.article-body a { color: var(--cyan); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: .3rem; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CODE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
code { font-family: var(--mono); font-size: .78rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border2); padding: .1em .4em; border-radius: 3px; color: #86efac; }
pre { background: #050708; border: 1px solid var(--border2); border-radius: 7px; padding: 1.1rem 1.2rem; overflow-x: auto; margin: 1rem 0; }
pre code { background: none; border: none; padding: 0; font-size: .78rem; color: var(--text); line-height: 1.75; }
.code-block { margin: 1.2rem 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border2); }
.code-block pre { margin: 0; border: none; border-radius: 0; }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: .45rem .9rem; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
.code-lang { font-family: var(--mono); font-size: .58rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.copy-btn { font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; color: var(--muted); background: none; border: 1px solid var(--border2); border-radius: 3px; padding: .18rem .5rem; cursor: pointer; transition: color .15s, border-color .15s; }
.copy-btn:hover { color: var(--gold); border-color: var(--gold-d); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* Hugo syntax highlight blocks */
.article-body .highlight { margin: 1.2rem 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border2); }
.article-body .highlight pre { margin: 0; border: none; border-radius: 0; padding: 1.1rem 1.2rem; background: #050708; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .875rem; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.article-body th { background: var(--bg3); font-family: var(--mono); font-size: .6rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--border2); white-space: nowrap; }
.article-body td { padding: .55rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: rgba(255,255,255,0.012); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CALLOUTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.callout { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 7px; margin: 1.2rem 0; font-size: .9rem; line-height: 1.65; border-left: 2px solid; }
.callout-icon { font-size: .9rem; flex-shrink: 0; line-height: 1.65; }
.callout-note   { background: var(--cyan-d);  border-color: var(--cyan);  }
.callout-warn   { background: var(--gold-g);  border-color: var(--gold-d);}
.callout-tip    { background: var(--green-d); border-color: var(--green); }
.callout-danger { background: var(--red-d);   border-color: var(--red);   }
.callout p { margin: 0; }
.callout strong { color: inherit; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STEPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.steps { counter-reset: step; margin: 1.5rem 0; }
.step { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 0 1.2rem; }
.step-num { display: flex; flex-direction: column; align-items: center; }
.step-num::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border2); border-radius: 50%; background: var(--bg3); font-family: var(--mono); font-size: .65rem; color: var(--gold); font-weight: 500; flex-shrink: 0; margin-top: .05rem; }
.step-num::after { content: ''; flex: 1; width: 1px; background: var(--border2); margin: .4rem 0; min-height: 1rem; }
.step:last-child .step-num::after { display: none; }
.step-body { padding-bottom: 1.8rem; }
.step-body h4 { font-family: var(--mono); font-size: .78rem; font-weight: 500; color: #ddd8cf; margin: 0 0 .5rem; letter-spacing: .04em; }
.step-body p { margin-bottom: .8rem; }
.step-body p:last-child { margin-bottom: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DIAGRAMS & CARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.diagram { background: var(--bg2); border: 1px solid var(--border2); border-radius: 9px; padding: 1.2rem 1.2rem 1rem; margin: 1.4rem 0; overflow-x: auto; }
.diagram-label { font-family: var(--mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.2rem 0; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; padding: 1rem 1.1rem; }
.card h4 { font-family: var(--mono); font-size: .73rem; font-weight: 500; color: var(--text); margin: 0 0 .4rem; letter-spacing: .04em; }
.card p { font-size: .875rem; color: var(--text2); margin: 0; line-height: 1.55; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   REFERENCES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.refs { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.refs-title { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.ref-link { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; text-decoration: none; margin-bottom: .5rem; transition: border-color .15s, background .15s; }
.ref-link:hover { border-color: var(--cyan-d); background: var(--bg3); }
.ref-link-icon { font-family: var(--mono); font-size: .65rem; color: var(--cyan); flex-shrink: 0; }
.ref-link-body { flex: 1; }
.ref-link-title { font-family: var(--mono); font-size: .7rem; color: var(--text); display: block; }
.ref-link-url { font-family: var(--mono); font-size: .6rem; color: var(--muted); display: block; margin-top: .15rem; }
.ref-link-arrow { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.article-foot { margin-top: 2rem; font-family: var(--mono); font-size: .6rem; color: var(--muted); letter-spacing: .08em; line-height: 1.9; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIST / TAG PAGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.list-layout .content { max-width: 760px; }
.list-header { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.list-eyebrow { font-family: var(--mono); font-size: .65rem; letter-spacing: .2em; color: var(--cyan); margin-bottom: .8rem; }
.list-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4vw, 2.8rem); color: #eae5dc; letter-spacing: -.02em; }
.list-count { font-family: var(--mono); font-size: .65rem; color: var(--muted); margin-top: .5rem; }
.all-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.all-tag { font-family: var(--mono); font-size: .68rem; padding: .3rem .75rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 100px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: .5rem; transition: border-color .15s, color .15s; }
.all-tag:hover { border-color: var(--gold-d); color: var(--gold); }
.tag-count { font-size: .6rem; background: rgba(255,255,255,0.06); padding: .05rem .4rem; border-radius: 100px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(20px);  } to { opacity: 1; transform: translateY(0); } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 960px) {
  .sidebar { display: none; }
  .content { padding: 2rem 1.5rem 5rem; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrapper { padding: 0 1.2rem; }
  .hero { padding: 4rem 0 3rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-services { text-align: left; }
  .status-item.push-right { margin-left: 0; }
  .topbar-crumb { display: none; }
  .topbar-sep { display: none; }
  .format-list { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHT THEME
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
[data-theme="light"] {
  --bg:       #f5f2ec;
  --bg2:      #ede9e1;
  --bg3:      #e4dfd5;
  --bg4:      #d8d2c6;
  --border:   rgba(0,0,0,0.08);
  --border2:  rgba(0,0,0,0.14);
  --text:     #2a2520;
  --text2:    #5a5248;
  --muted:    #8a8278;
  --faint:    #c8c2b8;
  --gold:     #8a6a2e;
  --gold-d:   #6a5020;
  --gold-g:   rgba(138,106,46,0.10);
  --cyan:     #1a7878;
  --cyan-d:   rgba(26,120,120,0.12);
  --green:    #1a7a58;
  --green-d:  rgba(26,122,88,0.10);
  --red:      #b04040;
  --red-d:    rgba(176,64,64,0.10);
  --blue:     #2a68a0;
  --blue-d:   rgba(42,104,160,0.10);
  --purple:   #5a44a0;
}

[data-theme="light"] #bg-canvas { opacity: .12; }

[data-theme="light"] .logo-sep { color: var(--muted); }

[data-theme="light"] .post-card { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
[data-theme="light"] .post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.10); }

[data-theme="light"] .qnav-card { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
[data-theme="light"] .qnav-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.10); }

[data-theme="light"] pre,
[data-theme="light"] .code-block pre { background: #f0ece4; }
[data-theme="light"] pre code { color: var(--text); }
[data-theme="light"] code { background: rgba(0,0,0,.05); color: var(--green); }

[data-theme="light"] .diagram { background: #ede9e1; }
[data-theme="light"] .sidebar { background: #ede9e1; }
[data-theme="light"] .topbar { background: rgba(245,242,236,.92); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   THEME TOGGLE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: .25rem .75rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: .08em;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--gold-d); color: var(--gold); }

.theme-icon { display: none; font-size: .9rem; line-height: 1; }
.theme-label { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }

/* Show correct icon based on data-mode */
.theme-toggle[data-mode="system"] .theme-icon-system,
.theme-toggle:not([data-mode]) .theme-icon-system { display: inline; }
.theme-toggle[data-mode="dark"]   .theme-icon-dark   { display: inline; }
.theme-toggle[data-mode="light"]  .theme-icon-light  { display: inline; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER RIGHT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.header-right { display: flex; align-items: center; gap: 1.2rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HERO BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.hero-cta { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }

.btn-primary {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  padding: .6rem 1.4rem;
  background: var(--gold);
  color: #0a0806;
  border-radius: 4px;
  text-decoration: none;
  transition: background .15s, transform .15s;
  font-weight: 500;
}
.btn-primary:hover { background: #d4b478; transform: translateY(-1px); text-decoration: none; }

.btn-ghost {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  padding: .6rem 1.4rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color .15s, color .15s, transform .15s;
}
.btn-ghost:hover { border-color: var(--gold-d); color: var(--gold); transform: translateY(-1px); text-decoration: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   QUICK NAV
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.quicknav {
  padding: 0 0 3rem;
  animation: fadeUp .8s .2s ease both;
}
.qnav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
.qnav-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.qnav-card:hover { transform: translateY(-2px); text-decoration: none; }
.qnav-all:hover    { border-color: var(--gold-d);   background: var(--gold-g); }
.qnav-tuto:hover   { border-color: var(--cyan);     background: var(--cyan-d); }
.qnav-homelab:hover{ border-color: var(--green);    background: var(--green-d); }
.qnav-detect:hover { border-color: var(--purple);   background: rgba(157,132,214,0.08); }

.qnav-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}
.qnav-all    .qnav-icon { color: var(--gold-d); }
.qnav-tuto   .qnav-icon { color: var(--cyan); }
.qnav-homelab .qnav-icon{ color: var(--green); }
.qnav-detect .qnav-icon { color: var(--purple); }

.qnav-body { flex: 1; min-width: 0; }
.qnav-title { font-family: var(--mono); font-size: .75rem; font-weight: 500; color: var(--text); letter-spacing: .05em; }
.qnav-count { font-family: var(--mono); font-size: .6rem; color: var(--muted); margin-top: .2rem; }
.qnav-arrow { font-family: var(--mono); font-size: .8rem; color: var(--muted); transition: transform .15s, color .15s; flex-shrink: 0; }
.qnav-card:hover .qnav-arrow { transform: translateX(3px); color: var(--gold); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION HEADER + TAG FILTERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.articles-section { padding: 3.5rem 0; animation: fadeUp .8s .3s ease both; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-header .section-label { margin-bottom: 0; }

.tag-filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.tf {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  padding: .25rem .7rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.tf:hover  { border-color: var(--gold-d); color: var(--gold); }
.tf.active { border-color: var(--gold-d); color: var(--gold); background: var(--gold-g); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   POST CARDS (redesigned)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.posts-list { display: flex; flex-direction: column; gap: .5rem; }
.post-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: start;
  gap: 1rem 1.2rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.post-card:hover { border-color: var(--gold-d); background: var(--bg3); transform: translateX(3px); text-decoration: none; }
.post-card-left { padding-top: .25rem; }
.post-card-date { font-family: var(--mono); font-size: .6rem; color: var(--muted); letter-spacing: .06em; line-height: 1.6; }
.post-card-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 400; color: #ddd8cf; line-height: 1.3; margin-bottom: .35rem; }
[data-theme="light"] .post-card-title { color: #1a1510; }
.post-card-desc { font-family: var(--serif); font-size: .875rem; font-weight: 300; color: var(--muted); line-height: 1.5; margin-bottom: .5rem; }
.post-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.post-card-arrow { font-family: var(--mono); font-size: .9rem; color: var(--muted); padding-top: .3rem; transition: color .15s, transform .15s; align-self: center; }
.post-card:hover .post-card-arrow { color: var(--gold); transform: translateX(3px); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR THEME TOGGLE POSITION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.topbar .theme-toggle { margin-right: .5rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE QUICKNAV
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 860px) {
  .qnav-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .qnav-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .qnav-card { padding: .9rem 1rem; }
  .qnav-icon { font-size: 1.1rem; }
  .post-card { grid-template-columns: 1fr auto; }
  .post-card-left { display: none; }
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-ghost { text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .nav-tag { display: none; }
}
