/**
 * GLOBAL THEME STYLES
 * ===================
 * Shared global font + theme toggle styles for non-bundled pages.
 * Color tokens are sourced from /theme-tokens.css.
 */

@import url('/theme-tokens.css');

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/inter.woff2') format('woff2');
}

.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--black-light);
    border: 1px solid var(--border-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    color: var(--text-color);
    box-shadow: 0 2px 10px var(--shadow-subtle);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--gray);
}

[data-theme="dark"] .theme-toggle {
    background: var(--black-lighter);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon-sun svg,
.theme-icon-moon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg);
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
}
