/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-optical-sizing: auto;
}

/* Subtle grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 160px;
}

/* ===== BACKGROUND DECOR ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(139, 124, 248, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 124, 248, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, black 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 85% at 50% 40%, black 30%, transparent 100%);
}

.bg-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(110px);
}

.bg-glow--1 {
    width: 640px;
    height: 640px;
    top: -180px;
    left: -120px;
    background: radial-gradient(circle, rgba(139, 124, 248, 0.09) 0%, transparent 70%);
}

.bg-glow--2 {
    width: 520px;
    height: 520px;
    bottom: -140px;
    right: -80px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 70%);
}

/* ===== PAGE VIEWS ===== */
.page-view {
    display: none;
    position: relative;
    z-index: 1;
}

.page-view.active {
    display: block;
}

/* ===== PARTICLES ===== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
