/* Global Reset, Typography, Scrollbars, Accessibility & Shared Utilities */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-charcoal);
    background-color: var(--color-panel-0);
    overflow: hidden;
    line-height: 1.5;
    transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}

:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

/* Unified Profile Backdrop Theme (Abyssal Ocean Dark / Nordic Glacier Light + 24px Blueprint Grid) */
.grid-dots {
    background-color: #091120;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.030) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.030) 1px, transparent 1px),
        radial-gradient(ellipse 48% 64% at 14% 24%, rgba(28, 204, 246, 0.18) 0%, transparent 68%),
        radial-gradient(ellipse 54% 66% at 50% 48%, rgba(126, 108, 252, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 48% 62% at 88% 82%, rgba(255, 114, 54, 0.16) 0%, transparent 68%),
        linear-gradient(135deg, #091120 0%, #0b1020 55%, #150e1d 100%);
    background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

html[data-theme="light"] .grid-dots {
    background-color: #dfe2ef;
    background-image:
        linear-gradient(rgba(14, 36, 62, 0.052) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 36, 62, 0.052) 1px, transparent 1px),
        radial-gradient(ellipse 48% 64% at 14% 24%, rgba(86, 178, 232, 0.25) 0%, transparent 68%),
        radial-gradient(ellipse 54% 66% at 50% 48%, rgba(152, 146, 236, 0.17) 0%, transparent 70%),
        radial-gradient(ellipse 48% 62% at 88% 82%, rgba(254, 146, 98, 0.25) 0%, transparent 68%),
        linear-gradient(135deg, #cee2f2 0%, #dfe2ef 52%, #f0ddd4 100%);
    background-size: 24px 24px, 24px 24px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

/* Cross-browser Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--hairline-strong) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--hairline-strong);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-steel);
}

/* Shared Scrollbar-Hidden Utility */
.no-scrollbar,
.horizontal-scroll {
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

@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;
    }
}
