/*--------------------------------------------------------------
# Global Settings & Persian Font
--------------------------------------------------------------*/
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root{
    /* فونت فارسی */
    --font-family: 'Vazirmatn', 'Rubik', sans-serif;
    
    --primary-color: #415de6;
    --secondary-color: #e64157;
    --tertiary-color: #12c2e9;
    --primary-gradient-color: linear-gradient(90deg,#e64157,#415de6);
    --secondary-gradient-color: linear-gradient(to right, #12c2e9, #f64f59, #f64f59);
    --underline-gradient: linear-gradient(to left, #12c2e9, #c471ed, #f64f59);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --transition-default: all .4s ease;
}   

html, body {
    overflow-x: hidden; /* حذف اسکرول افقی مزاحم */
    width: 100%;
    position: relative;
}

body{
    font-family: var(--font-family);
    font-weight: 300;
    direction: rtl; /* راست چین کردن کل سایت */
    text-align: right;
}

/* اصلاحات بوت‌استرپ برای حالت راست‌چین */
.ms-auto { margin-right: auto !important; margin-left: 0 !important; }
.me-auto { margin-left: auto !important; margin-right: 0 !important; }
.ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
.ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
.me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
.ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }

/* تنظیم جهت باز شدن منوی موبایل */
.offcanvas-end { left: 0; right: auto; transform: translateX(-100%); }
.offcanvas-start { right: 0; left: auto; transform: translateX(100%); }

/* Global Styles */
a{ color: var(--primary-color); text-decoration: none; }
a:hover{ color: var(--secondary-color); }

/* Dark Mode Background */
[data-bs-theme="dark"]::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000 url(/assets/images/dark-bg.webp) 50% no-repeat;
    background-size: cover;
    filter: brightness(50%);
    z-index: -1;
}

[data-bs-theme="dark"] {
    --text-color: #fff;
    --muted-text: #9a9a9a;
    --bg-color: #212121;
}

/*--------------------------------------------------------------
# Hero Section Overrides (اصلاح شده)
--------------------------------------------------------------*/
#hero { 
    padding: 140px 0px 80px 0px; 
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#hero .name {
    background: var(--primary-gradient-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 2.5rem; /* سایز فونت موبایل */
}

@media (min-width: 992px) {
    #hero .name { font-size: 4rem; }
}

.hero-content p.tagline {
    font-size: 1.1rem;
    color: var(--muted-text);
}

/*--------------------------------------------------------------
# New Timeline (Resume) Styles
--------------------------------------------------------------*/
.resume-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 20px;
    color: var(--text-color);
}

.timeline-box {
    border-right: 3px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px; 
}

@media (min-width: 768px) {
    .timeline-box { padding-right: 30px; }
}

.timeline-item {
    position: relative;
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    transition: var(--transition-default);
}

.timeline-item:hover {
    transform: translateX(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -29px; /* تنظیم دقیق برای موبایل */
    top: 25px;
    width: 15px;
    height: 15px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 10px var(--primary-color);
}

@media (min-width: 768px) {
    .timeline-item::before { right: -39px; }
}

.timeline-item .date {
    display: inline-block;
    background: var(--primary-gradient-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    margin-bottom: 10px;
}

.timeline-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.timeline-item .place {
    display: block;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.timeline-item p {
    font-size: 14px;
    color: var(--muted-text);
    margin: 0;
    line-height: 1.6;
}

/*--------------------------------------------------------------
# Skills & Cards
--------------------------------------------------------------*/
.skill-bar-wrapper {
    margin-bottom: 25px;
    background: var(--glass-bg);
    padding: 15px 20px;
    border-radius: 15px;
    border: var(--glass-border);
    transition: 0.3s;
}

.custom-progress {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.custom-progress .progress-bar {
    border-radius: 10px;
    animation: loadSkill 1.5s ease-in-out forwards;
}

.gradient-1 { background: linear-gradient(90deg, #ff9966, #ff5e62); }
.gradient-2 { background: linear-gradient(90deg, #56ccf2, #2f80ed); }
.gradient-3 { background: linear-gradient(90deg, #11998e, #38ef7d); }

@keyframes loadSkill { from { width: 0; } }

.glass-card, .project-card, .contact-form, .tool {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/*--------------------------------------------------------------
# Typography & Utilities
--------------------------------------------------------------*/
.section-heading {
    font-family: var(--font-family);
    font-weight: 900;
}

.ltr-text {
    direction: ltr;
    display: inline-block;
}

.theme-text {
    background: var(--secondary-gradient-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.primary-bg-btn {
    background: var(--primary-gradient-color);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
}