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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s var(--ease);
}

ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--accent-2));
    border-radius: 10px;
}

/* ============================================
   Layout helpers
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}

.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textShine 6s linear infinite;
}

@keyframes textShine {
    to { background-position: 200% center; }
}

/* ============================================
   Animated gradient background
   ============================================ */
.bg-gradient {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 20% 20%, #0d1030 0%, var(--bg) 55%);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}

.blob--1 {
    width: 480px; height: 480px;
    background: var(--accent);
    top: -120px; left: -80px;
    animation: drift1 18s ease-in-out infinite;
}
.blob--2 {
    width: 420px; height: 420px;
    background: var(--accent-2);
    bottom: -140px; right: -60px;
    animation: drift2 22s ease-in-out infinite;
}
.blob--3 {
    width: 360px; height: 360px;
    background: var(--accent-3);
    top: 40%; left: 55%;
    opacity: 0.3;
    animation: drift3 26s ease-in-out infinite;
}

@keyframes drift1 {
    50% { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes drift2 {
    50% { transform: translate(-100px, -60px) scale(1.1); }
}
@keyframes drift3 {
    50% { transform: translate(-80px, 90px) scale(0.9); }
}

#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   Scroll progress & reveal animations
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--grad-primary);
    z-index: 1000;
    box-shadow: 0 0 12px var(--accent-glow);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
