/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #EDDBD9;
    background: #0E1319;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Performance optimizations */
    will-change: auto;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Uniform Viewport Scaling Wrapper */
#viewport-scaler {
    width: 2560px;
    /* Let height be determined by content, not fixed min-height */
    transform-origin: top left;
    position: relative;
    margin: 0;
    padding: 0;
    /* Ensure content flows naturally */
    overflow: visible;
}

/* Background Canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
    opacity: 1;
    background-color: var(--color-bg-primary, #0E1319) !important;
}

/* Ensure all main content is above the background */
main, section, footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 5px;
}

/* Global scrollbar theme (matches section pages) */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(112, 118, 138, 0.55) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(112, 118, 138, 0.55) 0%,
        rgba(112, 118, 138, 0.35) 100%
    );
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(237, 219, 217, 0.45) 0%,
        rgba(112, 118, 138, 0.55) 100%
    );
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(237, 219, 217, 0.55);
    background-clip: padding-box;
}


