/* ====== فونت‌های سفارشی فارسی ====== */
@font-face {
    font-family: 'Dana';
    src: url('fonts/Dana-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Morabba';
    src: url('fonts/Morabba-Heavy.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* متغیرهای رنگی */
:root {
    --bg-color: #0b0b13;
    --card-bg: #161625;
    --purple: #8a4af3;
    --purple-hover: #7234d6;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --border-color: #2a2a3e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* تیترها با فونت مربا */
h1, h2, h3, h4,
.section-title,
.logo,
.stat-item h3 {
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* دکمه‌ها */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple), #b06ab3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 74, 243, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 74, 243, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--purple);
    color: var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: #fff;
}

.btn-icon {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.2rem;
}

.btn-icon:hover {
    border-color: var(--purple);
    color: var(--purple);
}

/* دکمه تغییر زبان - دایره‌ای و هم‌اندازه بقیه دکمه‌ها */
.lang-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.lang-btn:hover {
    border-color: var(--purple);
    transform: scale(1.08);
}
.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* منوی ناوبری */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 11, 19, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    transition: color 0.3s;
    font-weight: 500;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.nav-links a:hover {
    color: var(--purple);
}

/* بخش Hero */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--purple);
    margin-bottom: 20px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.hero-text p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ====== تغییرات مربوط به عکس پروفایل ====== */
.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hero-image img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30px;
    position: relative;
    z-index: 2;
    transform: rotate(-5deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-image::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border: 2px solid rgba(138, 74, 243, 0.4);
    border-radius: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    z-index: 1;
}

.blob-bg {
    position: absolute;
    width: 350px;
    height: 350px;
    background: var(--purple);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
/* ====== پایان تغییرات عکس پروفایل ====== */

/* آمار */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 80px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 5px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* بخش‌های عمومی */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 10px;
    color: #fff;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* مهارت‌ها */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.skill-card h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #fff;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.skill-card p {
    color: var(--text-muted);
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* نمونه کارها */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-card:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(11, 11, 19, 0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
}

.portfolio-card:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h3 {
    color: #fff;
    margin-bottom: 5px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.portfolio-overlay p {
    color: var(--purple);
    font-size: 0.9rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* سوابق کاری */
.resume-container {
    display: flex;
    gap: 50px;
    align-items: center;
}

.timeline {
    flex: 1;
    position: relative;
    padding-right: 30px;
    border-right: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    right: -37px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--purple);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--purple);
}

.timeline-date {
    color: var(--purple);
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.timeline-content h3 {
    color: #fff;
    margin-bottom: 10px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.timeline-content p {
    color: var(--text-muted);
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.resume-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.resume-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

.circle-bg {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid var(--purple);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.5;
}

/* مدارک */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.cert-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: border-color 0.3s;
}

.cert-card:hover {
    border-color: var(--purple);
}

.cert-icon {
    font-size: 2rem;
    color: var(--purple);
    background: rgba(138, 74, 243, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.cert-info h4 {
    color: #fff;
    margin-bottom: 5px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.cert-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* مقالات */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-tag {
    display: inline-block;
    background: rgba(138, 74, 243, 0.2);
    color: var(--purple);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin: 15px 15px 0;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.blog-card h3 {
    margin: 10px 15px;
    font-size: 1.2rem;
    color: #fff;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.blog-card p {
    margin: 0 15px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* فوتر */
.footer {
    background: #07070e;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    color: #fff;
    margin-bottom: 20px;
    font-family: 'Morabba', 'Vazirmatn', sans-serif;
    font-weight: 800;
}

.footer p, .footer a {
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

.footer a:hover {
    color: var(--purple);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--purple);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Dana', 'Vazirmatn', sans-serif;
}

/* تنظیم سایز لوگو توی منو */
.navbar .logo img {
    height: 45px !important;
    width: auto !important;
    max-height: 50px;
    display: block;
    object-fit: contain;
}

/* دکمه بازگشت به بالا */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(138, 74, 243, 0.4);
    transition: all 0.3s;
    z-index: 1000;
}

.scroll-top:hover {
    background: var(--purple-hover);
    transform: translateY(-3px);
}

/* ====== تنظیمات حالت LTR (انگلیسی) ====== */
[dir="ltr"] .timeline {
    padding-right: 0;
    padding-left: 30px;
    border-right: none;
    border-left: 2px solid var(--border-color);
}

[dir="ltr"] .timeline-dot {
    right: auto;
    left: -37px;
}

[dir="ltr"] .footer {
    text-align: left;
}

[dir="ltr"] .scroll-top {
    left: auto;
    right: 30px;
}

/* ====== فونت‌های حالت انگلیسی ====== */
/* ====== فونت‌های حالت انگلیسی ====== */
[lang="en"] body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: -0.01em;
}

/* اعمال فونت Inter روی عناصر متنی (نه روی آیکون‌ها) */
[lang="en"] p,
[lang="en"] a,
[lang="en"] span,
[lang="en"] li,
[lang="en"] div,
[lang="en"] button,
[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3,
[lang="en"] h4,
[lang="en"] h5,
[lang="en"] h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ====== برگرداندن فونت آیکون‌های Font Awesome در حالت انگلیسی ====== */

/* آیکون‌های عادی (solid) مثل فلش، جایزه، دانلود، تلفن، ایمیل */
[lang="en"] .fa,
[lang="en"] .fas,
[lang="en"] .fa-solid,
[lang="en"] i.fas,
[lang="en"] i.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* آیکون‌های برند مثل گیت‌هاب، لینکدین، تلگرام، اینستاگرام */
[lang="en"] .fab,
[lang="en"] .fa-brands,
[lang="en"] i.fab,
[lang="en"] i.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* آیکون‌های Regular */
[lang="en"] .far,
[lang="en"] .fa-regular,
[lang="en"] i.far,
[lang="en"] i.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3,
[lang="en"] h4,
[lang="en"] .section-title,
[lang="en"] .logo,
[lang="en"] .stat-item h3,
[lang="en"] .hero-text h1,
[lang="en"] .hero-text h2,
[lang="en"] .timeline-content h3,
[lang="en"] .cert-info h4,
[lang="en"] .blog-card h3,
[lang="en"] .portfolio-overlay h3,
[lang="en"] .footer h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* تنظیم وزن فونت‌ها برای زیبایی بیشتر */
[lang="en"] h1 { font-weight: 700; }
[lang="en"] h2 { font-weight: 700; }
[lang="en"] h3 { font-weight: 600; }
[lang="en"] h4 { font-weight: 600; }

[lang="en"] .btn,
[lang="en"] .nav-links a,
[lang="en"] .hero-text p,
[lang="en"] .section-subtitle,
[lang="en"] .timeline-content p,
[lang="en"] .stat-item p,
[lang="en"] .skill-card p,
[lang="en"] .footer p,
[lang="en"] .footer a,
[lang="en"] .cert-info p,
[lang="en"] .blog-card p,
[lang="en"] .blog-tag,
[lang="en"] .timeline-date,
[lang="en"] .filter-btn,
[lang="en"] .footer-bottom,
[lang="en"] .portfolio-overlay p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

[lang="en"] .btn {
    font-weight: 600;
    letter-spacing: 0.01em;
}

[lang="en"] .nav-links a {
    font-weight: 500;
}

/* تنظیم سایز مناسب برای انگلیسی */
[lang="en"] .hero-text h1 { font-size: 3.2rem; }
[lang="en"] .hero-text h2 { font-size: 1.6rem; }
[lang="en"] .section-title { font-size: 2.4rem; }

/* واکنش‌گرایی (موبایل) */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-btn { display: none; }
    .hero-container { flex-direction: column !important; text-align: center; }
    .hero-buttons { justify-content: center; }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
    .resume-container { flex-direction: column; }
    
    .timeline { padding-right: 20px; border-right: 2px solid var(--border-color); }
    .timeline-dot { right: -27px; }
    
    [dir="ltr"] .timeline { padding-left: 20px; border-left: 2px solid var(--border-color); border-right: none; }
    [dir="ltr"] .timeline-dot { left: -27px; right: auto; }

    .hero-image img {
        width: 280px;
        height: 280px;
    }
    .hero-image::after {
        width: 280px;
        height: 280px;
    }
    
    /* تنظیم سایز تیترها در موبایل */
    [lang="en"] .hero-text h1 { font-size: 2.2rem; }
    [lang="en"] .hero-text h2 { font-size: 1.3rem; }
    [lang="en"] .section-title { font-size: 1.8rem; }
}