/* Theme switch (top-right corner of the header) */
.theme-toggle{flex:0 0 auto;width:2.4rem;height:2.4rem;margin-left:.6rem;border:1px solid #d9cbea;border-radius:50%;background:#fff;color:#55239c;font-size:1.15rem;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .2s,color .2s}
.theme-toggle:hover{background:#f4edfc}
.theme-toggle:focus-visible{outline:2px solid #8a4fe0;outline-offset:2px}
@media(max-width:1100px){.theme-toggle{width:2.1rem;height:2.1rem;margin-left:.2rem;font-size:1rem}.site-header .nav{gap:.5rem}}
.theme-toggle-floating{position:fixed;top:.8rem;right:.8rem;z-index:50}

/* Purple dark theme */
html.theme-dark{--ink:#f1eafc;--muted:#c4b5dc;--line:#4a3270;--soft:#2a1846;--purple:#cfa8ff;--purple-dark:#e6d4ff;--purple-mid:#b98cf5;color-scheme:dark;background:#1d1033}
html.theme-dark body{background:#1d1033;color:#f1eafc}
html.theme-dark .site-header{background:#1d1033;border-bottom-color:#4a3270}
html.theme-dark .theme-toggle{background:#352057;border-color:#5b3f86;color:#ffd98a}
html.theme-dark .theme-toggle:hover{background:#43296b}

/* Surfaces, text and borders the script found still light */
html.theme-dark [data-dk-surface="1"]{background-color:#26153f!important;background-image:none!important}
html.theme-dark [data-dk-surface="2"]{background-color:#311c50!important;background-image:none!important}
html.theme-dark [data-dk-text="main"]{color:#f1eafc!important}
html.theme-dark [data-dk-text="muted"]{color:#c4b5dc!important}
html.theme-dark [data-dk-text="accent"]{color:#d2b0ff!important}
html.theme-dark [data-dk-border]{border-color:#4a3270!important}

/* Buttons: purple stays purple, outline buttons become transparent */
html.theme-dark .btn.primary{background:#8a4fe0!important;color:#fff!important;box-shadow:none}
html.theme-dark .btn.primary:hover{background:#9d66ee!important}
html.theme-dark .btn.secondary,html.theme-dark .btn.white{background:transparent!important;color:#e6d4ff!important;border:1px solid #8a63c4!important}
html.theme-dark .btn.secondary:hover,html.theme-dark .btn.white:hover{background:#352057!important}

/* Softer shadows on dark */
html.theme-dark .premium-stat,html.theme-dark .portfolio-panel,html.theme-dark .catalog-item,html.theme-dark .premium-hero .premium-portrait img{box-shadow:0 10px 28px #0000004d}
html.theme-dark .portrait-frame{box-shadow:none}
