/* Shared by every page: the theme button and the logo variant switch.
   There is no header bar. Footer styles: footer.css. */

/* =========================================
   LOGO: one file per theme (the light one has dark text, same cube)
========================================= */
.logo-light-theme,
:root[data-theme="light"] .logo-dark-theme {
    display: none;
}

:root[data-theme="light"] .logo-light-theme {
    display: block;
}

.footer-logo img {
    width: 100%;
    height: auto;
}

/* =========================================
   THEME BUTTON
   Above the content on narrower screens; floating in the window corner once there is
   free space next to the 1200px grid (see the media query below).
========================================= */
.top-line {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem 0;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-sun,
:root[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

@media (min-width: 1300px) {
    .top-line {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 10;
        width: auto;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .top-line {
        padding: 1rem 1rem 0;
    }
}
