/* FILE: css/base/base.css */

::selection {
    background: var(--accent-primary);
    color: #ffffff;
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b068ff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Custom cursor for desktop */
@media (min-width: 900px) {
    body {
        cursor: crosshair;
    }

    a,
    button,
    .nav-links li,
    .service-card {
        cursor: alias;
    }
}

/* Respects user motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .starfield,
    .vignette-overlay {
        display: none;
    }

    .glitch-text::before,
    .glitch-text::after {
        display: none;
    }
}

/* Print mode (resume-friendly) */
@media print {

    body,
    html,
    #interface-viewport,
    .view-section {
        background: #fff !important;
        color: #000 !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important;
        display: block !important;
    }

    .navbar,
    .background-container,
    .sound-control,
    .mobile-menu-btn,
    .boot-screen,
    .cmd-overlay,
    .tech-stack,
    .project-link,
    canvas {
        display: none !important;
    }

    .view-section {
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        padding: 20px 0 !important;
        border-bottom: 1px solid #ccc;
        transform: none !important;
    }

    h1,
    h2,
    h3 {
        color: #000 !important;
        text-shadow: none !important;
        page-break-after: avoid;
    }

    p {
        color: #333 !important;
    }

    /* Display link URLs in print for reference */
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .glass-panel,
    .service-card,
    .about-container,
    .project-row {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        color: #000 !important;
    }
}

/* Low power mode (automatic < 20% battery) */
body.low-power .background-container::before {
    display: none;
}

body.low-power .glass-panel {
    backdrop-filter: none;
    background: rgba(10, 10, 15, 0.95);
}

body.low-power canvas {
    opacity: 0;
}

body.low-power * {
    animation-duration: 0s !important;
    transition: none !important;
}
