/* ============================================
   CRITICAL CSS - Loads First
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --bg: #09090b;
    --bg-card: rgba(19, 19, 26, 0.75);
    --bg-card-hover: rgba(25, 25, 35, 0.85);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(99, 102, 241, 0.3);
    --border-light: rgba(255, 255, 255, 0.06);
    --gradient-1: linear-gradient(135deg, #6366f1, #818cf8);
    --gradient-2: linear-gradient(135deg, #06b6d4, #6366f1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100vw;
    position: relative;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

#bg-canvas { position: fixed; inset: 0; z-index: -1; pointer-events: none; max-width: 100vw; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(9, 9, 11, 0.85); backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px); border-bottom: 1px solid var(--border-light);
    z-index: 1000; transition: var(--transition); width: 100%;
}
.navbar.scrolled { background: rgba(9, 9, 11, 0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.nav-container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav-logo { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.logo-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gradient-1); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; color: #fff; box-shadow: 0 4px 15px rgba(99,102,241,0.4); }
.logo-text { font-weight: 700; font-size: 0.95rem; color: var(--text); display: none; }

/* Hero */
.hero-section { padding: 8rem 0 5rem; min-height: 100vh; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 1.2rem; background: rgba(99,102,241,0.08); border: 1px solid var(--border); border-radius: 50px; font-size: 0.85rem; color: var(--primary-light); margin-bottom: 1.5rem; }
.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 12px rgba(34,197,94,0.6); animation: statusPulse 2s infinite; }
@keyframes statusPulse { 0%,100% { box-shadow: 0 0 12px rgba(34,197,94,0.6); } 50% { box-shadow: 0 0 25px rgba(34,197,94,1); } }
.hero-title { font-size: 3.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.text-reveal { animation: textReveal 1s ease-out; }
@keyframes textReveal { from { opacity: 0; transform: translateY(30px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.text-gradient { background: linear-gradient(135deg, var(--primary-light), #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { padding: 0.85rem 2rem; border-radius: 50px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; transition: var(--transition); cursor: pointer; border: none; font-family: inherit; font-size: 0.95rem; }
.btn-primary { background: var(--gradient-1); color: #fff; box-shadow: 0 8px 25px rgba(99,102,241,0.3); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid rgba(255,255,255,0.2); }

/* Avatar */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.avatar-wrapper { position: relative; width: 380px; height: 380px; }
.avatar-main { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 200px; height: 200px; border-radius: 50%; background: var(--gradient-2); display: flex; align-items: center; justify-content: center; z-index: 2; box-shadow: 0 0 80px rgba(99,102,241,0.5); }
.avatar-initials { font-size: 4rem; font-weight: 800; color: #fff; }

/* ============================================
   SIMPLE PRELOADER
   ============================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: #09090b;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-simple {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}