/* ==========================================================================
   Base Styles, Reset & Desktop Layout
   ========================================================================== */

/* The system font comes first: on a Mac or iPhone this renders San Francisco,
   which is the whole point of a macOS portfolio. Inter is only the stand-in
   for Windows/Android, where SF isn't available. */
:root {
    --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

html { font-family: var(--font-ui); }

/* inherit, not a fixed stack: a fixed value on `*` stamps every element and
   defeats inheritance, which is why the Terminal's monospace never reached
   its output lines. Form controls opt in here too (they don't inherit by
   default). */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
}

body {
    background-color: var(--bg-color);
    background-image: url('../assets/Wallpapers/26-Tahoe-Beach-Day.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* SOTA Keyboard Focus Ring Parity */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.menu-bar, .dock-container, .window-header, .title-bar, .desktop-icon, .sidebar {
    user-select: none;
    -webkit-user-select: none;
}

.finder-pane, .resume-item, .contact-card, .about-col, .content-pane, .mail-body, .notes-body, .settings-body, .safari-page-render-area, .safari-results-feed, .safari-knowledge-card, .contact-row, .experience-card, .education-card, .skills-category, .mail-reader-body, .mail-reader-subject {
    user-select: text;
    -webkit-user-select: text;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Desktop Canvas */
.desktop {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    z-index: 1;
}

/* Desktop icon styles live in css/apps/desktop.css. */

/* Icon Color Helpers */
.icon-color-blue { color: #4facfe; }
.icon-color-green { color: #43e97b; }
.icon-color-yellow { color: #f6d365; }
.icon-color-purple { color: #a18cd1; }
.icon-color-folder { color: #64b5f6; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* SOTA Typography Utilities */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* ==========================================================================
   Universal Reduced Motion Accessibility (WCAG 2.1 AA)
   ========================================================================== */
@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;
    }

    .window.minimized {
        transition: none !important;
        opacity: 0 !important;
    }

    .desktop-icon:hover {
        transform: none !important;
    }
}
