/* Interior pages do not load home.css, so the shared switch needs its own
   night palette. The home page uses these same values. */
:root { --line: rgba(213,240,240,.17); --white: #eef6f5; --acid: #c9ff6d; --mono: "DM Mono", monospace; }
/* The star is the transition origin and remains above both view-transition snapshots. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }
::view-transition-old(root) { z-index: 2; }
html[data-theme="dark"]::view-transition-new(root), html:not([data-theme])::view-transition-new(root) { z-index: 1; }
html[data-theme="light"]::view-transition-new(root) { z-index: 3; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 40px; background: rgba(13, 22, 25, .75); color: var(--white); font: 500 9px var(--mono); letter-spacing: .1em; white-space: nowrap; cursor: pointer; transition: border-color .25s, background .25s, transform .25s; }
.theme-toggle:hover { border-color: var(--acid); transform: translateY(-2px); }
.theme-toggle-star { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--acid); color: #15201a; font-size: 18px; box-shadow: 0 0 15px var(--acid), 0 0 38px rgba(201,255,109,.25); animation: starBreathe 3s ease-in-out infinite; }
@keyframes starBreathe { 50% { transform: scale(1.16) rotate(22deg); box-shadow: 0 0 24px var(--acid), 0 0 55px var(--acid); } }
.theme-flare { position: fixed; z-index: 999; left: var(--flare-x); top: var(--flare-y); width: 1px; height: 1px; pointer-events: none; border-radius: 50%; transform: translate(-50%,-50%); background: #fff; box-shadow: 0 0 24px 12px #fff, 0 0 95px 45px #fff6ad, 0 0 260px 85px rgba(255,205,81,.75); animation: starArrival 1s ease-out both; }
.theme-flare:before, .theme-flare:after { content: ""; position: absolute; left: 50%; top: 50%; width: 160px; height: 1px; transform: translate(-50%,-50%); background: linear-gradient(90deg, transparent, #fff, transparent); }
.theme-flare:after { transform: translate(-50%,-50%) rotate(90deg); }
.theme-flare-depart { animation-name: starDeparture; }
@keyframes starArrival { 0% { opacity: 0; scale: .1; } 30% { opacity: 1; scale: 1.3; } 100% { opacity: 0; scale: .15; } }
@keyframes starDeparture { 0% { opacity: .8; scale: 1; } 100% { opacity: 0; scale: .02; } }
html[data-theme="light"] { color-scheme: light; --bg: #f6f1e5; --surface: #ede8d9; --line: rgba(30,58,58,.2); --white: #112b32; --muted: #55686a; --acid: #d26030; --cyan: #086d82; }
html[data-theme="light"] body { background: var(--bg); color: var(--white); }
html[data-theme="light"] .hero { background: radial-gradient(ellipse 55% 57% at 72% 47%,rgba(255,185,95,.34),transparent 70%),radial-gradient(ellipse 35% 40% at 18% 68%,rgba(89,167,166,.18),transparent 72%),#f6f1e5; }
html[data-theme="light"] .hero-grid { opacity: .7; background-image: linear-gradient(rgba(30,80,87,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(30,80,87,.075) 1px,transparent 1px); }
html[data-theme="light"] .hero-orbit { border-color: rgba(35,83,88,.2); }
html[data-theme="light"] .hero:after { background: linear-gradient(transparent,var(--bg)); }
html[data-theme="light"] .site-header { border-color: rgba(30,58,58,.16); }
html[data-theme="light"] .wordmark small, html[data-theme="light"] .desktop-nav a, html[data-theme="light"] .hero-description, html[data-theme="light"] .section-heading div>p, html[data-theme="light"] .project-info>p:not(.project-overline), html[data-theme="light"] .project-tags span, html[data-theme="light"] .footer-brand p, html[data-theme="light"] .footer-right p, html[data-theme="light"] .footer-right a { color: #50696d; }
html[data-theme="light"] .section-shell, html[data-theme="light"] .projects, html[data-theme="light"] .about, html[data-theme="light"] .principles { background: #f6f1e5; }
html[data-theme="light"] .projects { background: linear-gradient(#f6f1e5,#ede7d9 75%,#f6f1e5); }
html[data-theme="light"] .project-card { background: linear-gradient(135deg,rgba(255,255,255,.9),rgba(230,224,208,.92)); border-color: rgba(32,76,78,.22); box-shadow: 0 25px 70px rgba(46,70,58,.08); }
html[data-theme="light"] .project-index:after { background: #f6f1e5; }
html[data-theme="light"] .project-index span, html[data-theme="light"] .project-card-top, html[data-theme="light"] .project-status[data-status="building"], html[data-theme="light"] .project-overline { color: #567174; }
html[data-theme="light"] .project-card:before { opacity: .25; }
html[data-theme="light"] .interlude { background: radial-gradient(circle at 50% 50%,#ffe4a6,#eec7a0 60%,#edd8bd); color: #21363b; }
html[data-theme="light"] .about-identity, html[data-theme="light"] .principle, html[data-theme="light"] .final-cta, html[data-theme="light"] .site-footer { background-color: #eee8db; color: #173137; }
html[data-theme="light"] .final-cta { background: radial-gradient(circle at 50% 45%,#fff4d4,#e6dfcb 60%,#e8e1d2); }
html[data-theme="light"] .mobile-nav { background: var(--bg); }
html[data-theme="light"] .theme-toggle { background: rgba(255,250,238,.9); }
html[data-theme="light"] .theme-toggle-star { background: #19363d; color: #fff5bc; box-shadow: 0 0 12px rgba(25,54,61,.4); }
html[data-theme="light"] .cursor-halo { border-color: var(--acid); }
html[data-theme="light"] .cursor-dot { background: var(--acid); }
html[data-theme="light"] .content-page { background: radial-gradient(circle at 88% 4%,rgba(255,179,91,.28),transparent 28%),radial-gradient(circle at 7% 38%,rgba(48,120,130,.13),transparent 26%),#f6f1e5; color: var(--white); }
html[data-theme="light"] .content-page:before { opacity: .5; background-image: linear-gradient(rgba(28,74,78,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(28,74,78,.08) 1px,transparent 1px); }
html[data-theme="light"] .content-page .page-topbar, html[data-theme="light"] .content-page .prose-section, html[data-theme="light"] .content-page .site-footer { border-color: rgba(30,58,58,.18); color: #456165; }
html[data-theme="light"] .content-page .page-lead, html[data-theme="light"] .content-page .prose-section p, html[data-theme="light"] .content-page .prose-section li { color: #4c6265; }
html[data-theme="light"] .content-page .prose-section strong, html[data-theme="light"] .content-page .prose-section a { color: #153c45; }
html[data-theme="light"] .content-page .page-topbar>a, html[data-theme="light"] .content-page .section-kicker, html[data-theme="light"] .content-page .page-cta { color: var(--acid); }
.content-page .theme-toggle { color: inherit; }
@media (max-width: 1100px) { .site-header { gap: 16px; } .theme-toggle-label { display: none; } .theme-toggle { padding: 7px; } }
@media (prefers-reduced-motion: reduce) { .theme-flare { display: none; } .theme-toggle-star { animation: none; } }
html[data-theme="light"] .about-copy>p:not(.about-lead), html[data-theme="light"] .principle p, html[data-theme="light"] .about-identity p span, html[data-theme="light"] .interlude-axis { color: #4d6669; }
html[data-theme="light"] .final-planet { background: radial-gradient(circle at 40% 30%,#fff4d8,#dfcaa5 54%,#98a8a0 85%); box-shadow: inset -25px -35px 55px rgba(64,75,67,.35), 0 0 75px rgba(255,219,142,.65); border-color: rgba(196,117,58,.3); }
html[data-theme="light"] .interlude-copy strong { color: #ab4e2b; }
