/* Shared navigation typography, controls and theme reveal across all pages. */
@view-transition { navigation: auto; }
html { scrollbar-gutter: stable; }
body > nav, body > nav.landing-nav {
    font-family: 'Inter', 'Noto Serif SC', sans-serif;
    height: 100px;
    padding: 0 8%;
    left: 0;
    right: 0;
    width: auto;
}
body > nav.scrolled { height: 100px; }
body > nav .nav-brand { font: 900 1.4rem/1.8 'Inter', sans-serif; letter-spacing: 5px; }
body > nav .view-projects-btn {
    font: 700 .85rem/1.8 'Fira Code', 'Courier New', monospace;
    letter-spacing: 2px;
    padding: 6px 10px;
    margin: 0 10px;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
body > nav .view-projects-btn::before,
body > nav .view-projects-btn::after { border-width: 2px; transition: all .3s ease-out; }
body > nav .view-projects-btn:hover { letter-spacing: 4px; }
body > nav .view-projects-btn:hover::before,
body > nav .view-projects-btn:hover::after {
    width: calc(100% + 10px);
    height: 100%;
    border-color: currentColor;
}
body > nav .theme-switch,
body > nav .theme-switch-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 58px;
    height: 30px;
    padding: 4px;
    border-radius: 20px;
    cursor: pointer;
}
body > nav .theme-switch-thumb {
    position: absolute;
    left: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .4s cubic-bezier(.68, -.55, .265, 1.55);
}
body > nav .theme-switch-thumb svg { width: 14px; height: 14px; }
body > nav a:focus-visible, #theme-toggle:focus-visible { outline: 2px solid #58a6ff; outline-offset: 5px; }
::view-transition-group(root) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
    opacity: 1;
    mask-image: none;
    filter: none;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
@media (max-width: 700px) {
    body > nav, body > nav.landing-nav, body > nav.scrolled { height: 72px; padding: 0 1rem; }
    body > nav .nav-brand { font-size: 1rem; letter-spacing: 3px; }
    body > nav .view-projects-btn { margin: 0 0 0 .55rem; padding: 6px 8px; font-size: .65rem; letter-spacing: 1px; }
    body > nav .view-projects-btn:hover { letter-spacing: 2px; }
    body > nav .theme-switch, body > nav .theme-switch-wrapper { flex-shrink: 0; transform: scale(.9); transform-origin: right center; }
}
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    body > nav .theme-switch-thumb, body > nav .view-projects-btn,
    body > nav .view-projects-btn::before, body > nav .view-projects-btn::after { transition: none; }
}
