/* One shared control for the portfolio and the arcade page. */
.theme-switch {
    position: relative;
    isolation: isolate;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    flex: none;
    width: 80px;
    height: 34px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 4%, var(--paper));
    color: var(--muted);
    cursor: pointer;
    box-shadow: inset 0 1px 2px #0002;
    transition: border-color .25s, background .25s;
}
.theme-switch::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: inherit;
    background: var(--ink);
    box-shadow: 0 1px 10px color-mix(in srgb, var(--ink) 14%, transparent);
    transition: transform .35s cubic-bezier(.2, .75, .25, 1), background .3s, box-shadow .3s;
}
.theme-switch[aria-pressed="true"]::before {
    transform: translateX(100%);
    background: var(--accent);
    box-shadow: 0 1px 14px color-mix(in srgb, var(--accent) 28%, transparent);
}
.theme-switch span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: color .25s;
}
.theme-switch svg {
    display: block;
    width: 17px;
    height: 17px;
}
.theme-switch[aria-pressed="false"] .theme-switch__studio,
.theme-switch[aria-pressed="true"] .theme-switch__crimson {
    color: var(--on-accent);
}
.theme-switch:hover {
    border-color: color-mix(in srgb, var(--accent) 65%, transparent);
}
.theme-switch:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
@media (max-width: 420px) {
    .theme-switch { width: 76px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .theme-switch, .theme-switch::before, .theme-switch span { transition: none; }
}
