/* formulatux - dark theme (opt-in via html[data-theme="dark"]); light is default */

/* Theme toggle button (header) */
.theme-toggle{flex:none;width:42px;height:42px;border-radius:50%;border:1.5px solid rgba(255,255,255,.25);background:transparent;color:#fff;display:grid;place-items:center;transition:background .2s,border-color .2s}
.theme-toggle:hover{background:rgba(255,255,255,.1);border-color:var(--green)}
.theme-toggle svg{width:20px;height:20px}
.theme-toggle .i-sun{display:none}
[data-theme="dark"] .theme-toggle .i-sun{display:block}
[data-theme="dark"] .theme-toggle .i-moon{display:none}

[data-theme="dark"]{
  color-scheme:dark;
  --d-bg:#081a1e;
  --d-surface:#0f282e;
  --d-paper:#0b2227;
  --d-line:#23434b;
  --d-head:#eaf4f3;
  --d-text:#b9d0d3;
  --d-muted:#8fb0b5;
  --paper:var(--d-paper);
  --mint:#10362f;
  --line:var(--d-line);
  --text:var(--d-text);
  --muted:var(--d-muted);
}
[data-theme="dark"] body{background:var(--d-bg)}
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] h4,
[data-theme="dark"] .quote-card blockquote,[data-theme="dark"] .quote-card b,
[data-theme="dark"] .checklist li,[data-theme="dark"] .facts-box b,[data-theme="dark"] .reach b,
[data-theme="dark"] .mega b,[data-theme="dark"] th,[data-theme="dark"] .tab,
[data-theme="dark"] .prose blockquote,[data-theme="dark"] .light .tech-item b{color:var(--d-head)}
[data-theme="dark"] .cta h2{color:var(--ink-deep)}
[data-theme="dark"] .cta p{color:var(--ink)}

/* surfaces */
[data-theme="dark"] .card,[data-theme="dark"] .proj,[data-theme="dark"] .post,
[data-theme="dark"] .acc,[data-theme="dark"] .job,[data-theme="dark"] .step,
[data-theme="dark"] .bg-mint .step,[data-theme="dark"] .quote-card,
[data-theme="dark"] .light .tech-item,[data-theme="dark"] .mega{background:var(--d-surface);border-color:var(--d-line)}
[data-theme="dark"] .card.dark,[data-theme="dark"] .card.feature{background:var(--ink-soft);border-color:rgba(255,255,255,.07)}
[data-theme="dark"] .bg-ink .quote-card,[data-theme="dark"] .bg-deep .quote-card{background:var(--ink-soft)}
[data-theme="dark"] .bg-paper{background:var(--d-paper)}
[data-theme="dark"] .bg-mint{background:linear-gradient(180deg,#0b2a27,#0d302c)}
[data-theme="dark"] .facts-box,[data-theme="dark"] th{background:var(--d-paper)}
[data-theme="dark"] .ic,[data-theme="dark"] .mega .mi,[data-theme="dark"] .m-photo{background:linear-gradient(135deg,#123f37,#0f3530);color:var(--green)}
[data-theme="dark"] .card:hover .ic,[data-theme="dark"] .mega a:hover .mi{background:var(--green);color:var(--ink-deep)}
[data-theme="dark"] .mega a:hover{background:#143841}
[data-theme="dark"] .mega .mega-all{background:var(--ink)}
[data-theme="dark"] .card,[data-theme="dark"] .proj,[data-theme="dark"] .post{border-color:var(--d-line)}
[data-theme="dark"] .card:hover,[data-theme="dark"] .proj:hover,[data-theme="dark"] .post:hover,[data-theme="dark"] .step:hover{box-shadow:0 26px 60px rgba(0,0,0,.45)}
[data-theme="dark"] #services .card:not(.dark)::after{color:#1a3b42}
[data-theme="dark"] .step:not(:has(.step-ic))::before{color:#1f4047}
[data-theme="dark"] .timeline .t-item::before{border-color:var(--d-bg)}
[data-theme="dark"] .link-arrow,[data-theme="dark"] .chip{color:var(--green)}
[data-theme="dark"] .chip.dark{color:#cfe2e4}
[data-theme="dark"] .light .tech-item .dot,[data-theme="dark"] .light .tech-item .dot.has-logo{background:#123f37;color:var(--green)}

/* buttons / tabs */
[data-theme="dark"] .btn-outline{border-color:var(--d-line);color:var(--d-head)}
[data-theme="dark"] .btn-outline:hover{background:var(--green);border-color:var(--green);color:var(--ink-deep)}
[data-theme="dark"] .tab{border-color:var(--d-line)}
[data-theme="dark"] .tab[aria-pressed="true"]{background:var(--green);border-color:var(--green);color:var(--ink-deep)}
[data-theme="dark"] .cta .btn-dark{background:var(--ink-deep);color:#fff}

/* tables, flash bars, media */
[data-theme="dark"] .table-wrap{border-color:var(--d-line)}
[data-theme="dark"] td{border-color:var(--d-line)}
[data-theme="dark"] .flash-bar.ok{background:#10362f;color:#8ff0bf}
[data-theme="dark"] .flash-bar.err{background:#3a1a1a;color:#ffb4b4}
[data-theme="dark"] .split-art img,[data-theme="dark"] .proj img,[data-theme="dark"] .post img{filter:brightness(.92)}
[data-theme="dark"] .no-hero .site-header{background:rgba(6,26,31,.97)}

[data-theme="dark"] .reach .ri-wa{background:#0f3a26;color:#4be08a}
[data-theme="dark"] .reach .wa-link{color:#4be08a}

[data-theme="dark"] .job-more{border-color:var(--d-line)}
[data-theme="dark"] .job-more summary{color:var(--green)}

[data-theme="dark"] .apply-direct{background:#0b2a27;border-color:#1b4a42}
[data-theme="dark"] .ad-list a{background:var(--d-surface);border-color:var(--d-line)}
[data-theme="dark"] .ad-list b{color:var(--d-head)}
[data-theme="dark"] .ad-ic{background:#123f37}
