/* Shared light/dark theme for project pages */
/* ===== Theme toggle ===== */
.theme-toggle{position:relative;flex:0 0 auto;width:40px;height:40px;margin-left:10px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid rgba(255,255,255,.8);background:linear-gradient(135deg,rgba(255,255,255,.7),rgba(255,255,255,.3));-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 6px 18px rgba(22,41,58,.08),inset 0 1px 0 rgba(255,255,255,.85);color:#16293A;-webkit-tap-highlight-color:transparent;transition:box-shadow .3s var(--ease),transform .3s var(--ease),border-color .3s var(--ease)}
.theme-toggle:hover{box-shadow:0 10px 24px rgba(22,41,58,.14),inset 0 1px 0 rgba(255,255,255,.9);transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:2px solid rgba(22,41,58,.5);outline-offset:3px}
.theme-toggle svg{position:absolute;width:18px;height:18px;transition:opacity .35s var(--ease),transform .5s var(--ease)}
.theme-toggle .ic-sun{opacity:0;transform:rotate(-90deg) scale(.5)}
.theme-toggle .ic-moon{opacity:1;transform:none}
html[data-theme="dark"] .theme-toggle{border-color:rgba(255,255,255,.16);background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(255,255,255,.04));box-shadow:0 8px 22px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.1);color:#E9EDF1}
html[data-theme="dark"] .theme-toggle:hover{box-shadow:0 12px 28px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.14)}
html[data-theme="dark"] .theme-toggle:focus-visible{outline-color:rgba(255,255,255,.6)}
html[data-theme="dark"] .theme-toggle .ic-sun{opacity:1;transform:none}
html[data-theme="dark"] .theme-toggle .ic-moon{opacity:0;transform:rotate(90deg) scale(.5)}
::view-transition-old(root),::view-transition-new(root){animation-duration:.5s}
@media (max-width:768px){.theme-toggle{width:38px;height:38px;margin-left:8px}}
@media (prefers-reduced-motion:reduce){.theme-toggle svg{transition:none}::view-transition-old(root),::view-transition-new(root){animation:none}}

/* ===== Dark theme for project pages ===== */
.pright{display:flex;align-items:center;gap:0}
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark;--text:#E9EDF1;--text-muted:#AAB4BE;--text-subtle:#7F8A96;--border:rgba(255,255,255,.12);--glass-line:rgba(255,255,255,.13)}
html[data-theme="dark"] body{background:#0b0d10;color:var(--text)}
html[data-theme="dark"] .bg-gradient{background:#0b0d10}
html[data-theme="dark"] .bg-gradient::before{background:radial-gradient(ellipse 58% 38% at 50% 43%,rgba(120,128,142,.13) 0%,rgba(120,128,142,.06) 42%,rgba(0,0,0,0) 76%),radial-gradient(ellipse 72% 48% at 50% 57%,rgba(86,94,108,.16) 0%,rgba(0,0,0,0) 72%)}
html[data-theme="dark"] .bg-gradient::after{background:linear-gradient(180deg,#14171c 0%,#101317 20%,#0c0e11 100%);box-shadow:0 -18px 46px rgba(150,160,176,.06),0 -2px 18px rgba(150,160,176,.05)}
html[data-theme="dark"] .bg-live span:nth-child(1){background:radial-gradient(circle,rgba(150,158,172,.11) 0%,rgba(150,158,172,0) 68%)}
html[data-theme="dark"] .bg-live span:nth-child(2){background:radial-gradient(circle,rgba(180,188,200,.08) 0%,rgba(180,188,200,0) 68%)}
html[data-theme="dark"] .bg-live span:nth-child(3){background:radial-gradient(circle,rgba(120,128,142,.11) 0%,rgba(120,128,142,0) 68%)}
html[data-theme="dark"] .logo img{filter:brightness(0) invert(.95)}
html[data-theme="dark"] .back{color:var(--text);border-color:rgba(255,255,255,.16);background:linear-gradient(135deg,rgba(255,255,255,.1),rgba(255,255,255,.04));box-shadow:0 8px 22px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.1)}
html[data-theme="dark"] .back:hover{box-shadow:0 12px 28px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.14)}
html[data-theme="dark"] .pbtn{background:#E9EDF1;color:#0b0d10;box-shadow:0 10px 26px rgba(0,0,0,.45)}
html[data-theme="dark"] .pbtn:hover{background:#fff;box-shadow:0 14px 32px rgba(0,0,0,.55)}
html[data-theme="dark"] .cover img{box-shadow:0 24px 60px rgba(0,0,0,.6)}
html[data-theme="dark"] .psec,html[data-theme="dark"] a.psec{border:1px solid var(--glass-line);background:linear-gradient(135deg,rgba(255,255,255,.085),rgba(255,255,255,.03));box-shadow:0 12px 34px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.09)}
html[data-theme="dark"] a.psec:hover{background:linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.045));border-color:rgba(255,255,255,.24);box-shadow:0 20px 48px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.12)}
html[data-theme="dark"] a.psec:focus-visible{outline-color:rgba(255,255,255,.6)}
html[data-theme="dark"] a.psec::after{border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E9EDF1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/14px no-repeat}
html[data-theme="dark"] a.psec:hover::after{background:#E9EDF1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0d10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/14px no-repeat;border-color:#E9EDF1}
@media (max-width:620px){.theme-toggle{margin-left:8px}}
