/* ================= متغیرهای پایه (تم شب) ================= */
:root {
    --bg-dark: #050507;
    --bg-panel: rgba(25, 25, 35, 0.7);
    --primary: #7C4DFF;
    --accent: #9d4edd;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* ================= متغیرهای تم روشن (صبح) ================= */
body.light-mode {
    --bg-dark: #f8f9fc;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --text-main: #1a1a24;
    --text-muted: #5a5a6a;
    --glass-border: rgba(124, 77, 255, 0.15);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
}

body.light-mode header { background: rgba(255, 255, 255, 0.85); }
body.light-mode .info-item { background: rgba(0, 0, 0, 0.03); }

/* ================= تنظیمات کلی ================= */
* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: 'VazirMatn', sans-serif !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.08) 0%, transparent 40%);
}

/* ================= انیمیشن‌های اسکرول ================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ================= هدر ================= */
header {
    position: fixed; top: 0; left: 0; right: 0;
    padding: 12px 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: background 0.5s ease;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 40px; height: 40px; border-radius: 10px; }
.logo h1 {
    font-size: 18px; 
    background: linear-gradient(45deg, var(--primary), #a0a0b0); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
}

/* ================= دکمه تغییر تم ================= */
.theme-toggle {
    cursor: pointer;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    transition: all 0.5s ease;
}
.theme-toggle:hover {
    background: rgba(124, 77, 255, 0.2);
    transform: scale(1.05);
}
.theme-toggle svg { width: 24px; height: 24px; transition: transform 0.5s ease; }
.sun-rays { transition: opacity 0.5s ease, transform 0.5s ease; transform-origin: center; }
.moon-mask-circle { transition: cx 0.5s ease, cy 0.5s ease; }
.sun-core { transition: r 0.5s ease; }

body.light-mode .theme-toggle svg { transform: rotate(90deg); }
body.light-mode .moon-mask-circle { cx: 30; cy: 0; }
body.light-mode .sun-core { r: 5; }
body.light-mode .sun-rays { opacity: 1; transform: scale(1); }
body:not(.light-mode) .sun-rays { opacity: 0; transform: scale(0.5); }
body:not(.light-mode) .moon-mask-circle { cx: 16; cy: 6; }
body:not(.light-mode) .sun-core { r: 8; }

/* ================= ساختار اصلی ================= */
main { padding: 120px 20px 50px; max-width: 900px; margin: 0 auto; }

/* بخش هیرو */
.hero { text-align: center; margin-bottom: 60px; }
.hero h2 { font-size: clamp(28px, 5vw, 42px); line-height: 1.4; margin-bottom: 20px; }
.hero h2 span { color: var(--primary); }
.hero p { color: var(--text-muted); margin-bottom: 25px; }

/* المان‌های شیشه‌ای (کارت‌ها) */
.glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* پروفایل */
.profile-container { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: center; }
.avatar-aside { text-align: center; }
.avatar-wrapper { position: relative; width: 140px; height: 140px; margin: 0 auto 15px; }
.avatar-wrapper img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--bg-dark); position: relative; z-index: 2;
    transition: border-color 0.5s ease;
}
.avatar-wrapper::after {
    content: ''; position: absolute; inset: -4px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%; z-index: 1; filter: blur(8px); opacity: 0.7;
}
.status-badge {
    font-size: 11px; color: var(--primary); 
    border: 1px solid rgba(124, 77, 255, 0.3); 
    display: inline-block; padding: 2px 10px; border-radius: 20px;
}

.profile-info h2 { font-size: 24px; margin-bottom: 5px; border-right: 4px solid var(--primary); padding-right: 12px; }
.profile-info .role-text { font-size: 13px; margin-top: 10px; color: var(--text-muted); }

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
.info-item {
    background: rgba(255, 255, 255, 0.03); padding: 10px; border-radius: 12px;
    border: 1px solid var(--glass-border); text-align: center;
    transition: background 0.5s ease, border-color 0.5s ease;
}
.info-item label { display: block; font-size: 10px; color: var(--text-muted); }
.info-item span { font-size: 12px; font-weight: bold; }
.email-text { font-size: 9px !important; direction: ltr; display: inline-block; }

/* دکمه‌ها */
.cta-group { display: flex; justify-content: center; width: 100%; margin: 20px 0; }
.btn {
    display: inline-block; padding: 12px 30px; border-radius: 50px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: #fff; font-weight: bold; text-decoration: none;
    box-shadow: 0 5px 15px rgba(124, 77, 255, 0.3); transition: 0.3s;
    cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(157, 78, 221, 0.4); }

/* کانال */
.channel-card { text-align: center; padding: 20px; }
.channel-card p { color: var(--text-muted); font-size: 1.1rem; }
.channel-link {
    color: var(--primary); font-weight: bold; font-size: 1.5rem; 
    text-decoration: none; display: inline-block; margin-top: 10px; direction: ltr;
}

/* ================= فوتر ================= */
footer {
    text-align: center; padding: 40px; border-top: 1px solid var(--glass-border);
    color: var(--text-muted); font-size: 13px; margin-top: 40px;
}
.footer-highlight { font-weight: bold; color: var(--text-main); margin-top: 15px; }
.footer-bottom { margin-top: 30px; border-top: 1px solid var(--glass-border); padding-top: 20px; }
.footer-email { direction: ltr; font-weight: bold; font-size: 14px; margin-bottom: 15px; }
.footer-email a { color: var(--text-main); text-decoration: none; }
.heart-icon { margin-top: 10px; opacity: 0.6; }

/* ================= واکنش‌گرایی (موبایل) ================= */
@media (max-width: 768px) {
    .profile-container { grid-template-columns: 1fr; text-align: center; }
    .profile-info h2 { 
        border-right: none; border-bottom: 2px solid var(--primary); 
        display: inline-block; padding-bottom: 5px; 
    }
}
