/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
    --bg: #0a0a0c;
    --bg-card: #0f0f12;
    --text: #e8e8ec;
    --text-muted: #6a6a7a;
    --line: rgba(255, 255, 255, 0.035);
    --line-strong: rgba(255, 255, 255, 0.065);
    --line-border: rgba(255, 255, 255, 0.065);
    /* رنگ مات خطوط کشیده‌شده — چون مات است، روی هم افتادنِ چند خط
       (مثل خطوط تمام‌عرض هر ستون در یک ردیف) روشن‌ترشان نمی‌کند. */
    --line-px: #1a1a1c;
    --accent: #48ff91;
    --accent-dim: rgba(72, 255, 145, 0.03);
    --btn-bg: #ffffff;
    --btn-text: #0a0a0c;
    --dot-filled: rgba(255, 255, 255, 0.06);
    --dot-empty: rgba(255, 255, 255, 0.015);
    --line-ext: 2000px;
}

[data-theme="light"] {
    --bg: #f0f0f2;
    --bg-card: #f8f8fa;
    --text: #121214;
    --text-muted: #5a5a6a;
    --line: rgba(0, 0, 0, 0.035);
    --line-strong: rgba(0, 0, 0, 0.065);
    --line-border: rgba(0, 0, 0, 0.065);
    --line-px: #e0e0e2;
    --accent: #2a9d5a;
    --accent-dim: rgba(42, 157, 90, 0.03);
    --btn-bg: #121214;
    --btn-text: #f0f0f2;
    --dot-filled: rgba(0, 0, 0, 0.06);
    --dot-empty: rgba(0, 0, 0, 0.015);
}

/* ============================================================
   2. RESET
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
}

body {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
    overflow-x: clip;
    max-width: 100%;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Utility icons */
.icon-right { margin-left: 8px; }
.icon-left { margin-right: 8px; }
.accent-icon { color: var(--accent); }

/* ============================================================
   SCROLLBAR — باریک و هم‌رنگ تم (خاکستری خنثی، مثل خطوط سایت)
   ============================================================ */
html {
    /* فایرفاکس */
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.4) var(--bg);
}

/* کروم / اج / سفاری */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.32);
    border: 2px solid var(--bg);
    border-radius: 999px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.6);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: var(--bg);
}