/* ===== متغیرها ===== */
:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --surface: #1c2333;
    --surface-hover: #232c40;
    --border: #263041;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #7c5cff;
    --accent-2: #00d9a6;
    --gradient: linear-gradient(135deg, #7c5cff 0%, #00d9a6 100%);
    --radius: 18px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.9;
    overflow-x: hidden;
}

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 24px;
}

/* نوار پیشرفت */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0;
    background: var(--gradient);
    z-index: 1000;
}

/* ===== هدر ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.3px;
}

.logo .dot {
    color: var(--accent-2);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: color var(--transition), background var(--transition);
}

.main-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

.main-nav.closed {
    display: block;
}

/* ===== بخش قهرمان ===== */
.hero {
    position: relative;
    padding: 120px 0 110px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.15), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0, 217, 166, 0.12), transparent 40%);
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-2);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 217, 166, 0.5); }
    100% { box-shadow: 0 0 0 12px rgba(0, 217, 166, 0); }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

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

.hero-sub {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 0 auto 42px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent-2);
}

/* ===== بخش‌ها ===== */
section {
    padding: 90px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.eyebrow {
    color: var(--accent-2);
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.4;
}

/* ===== درباره من ===== */
.about {
    background: var(--bg-soft);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 28px;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s;
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: var(--surface-hover);
}

.about-card .icon {
    font-size: 2.4rem;
    margin-bottom: 18px;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== وبلاگ ===== */
.blog {
    background: var(--bg);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 26px;
}

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 92, 255, 0.6);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.tag {
    background: rgba(124, 92, 255, 0.15);
    color: var(--accent-2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: letter-spacing 0.3s ease;
}

.read-more:hover {
    letter-spacing: 1px;
}

/* ===== خبرنامه ===== */
.newsletter {
    background:
        radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.12), transparent 60%);
    text-align: center;
}

.newsletter-text {
    color: var(--text-muted);
    max-width: 560px;
    margin: -30px auto 36px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    min-width: 230px;
    padding: 14px 20px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--accent);
}

/* ===== تماس ===== */
.contact {
    background: var(--bg-soft);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-link {
    display: block;
    text-align: center;
    padding: 22px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-link:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

/* ===== فوتر ===== */
.site-footer {
    background: #0a0e14;
    padding: 50px 0 28px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-top p {
    color: var(--text-muted);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== واکنش‌گرایی ===== */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 24px;
        left: 24px;
        background: var(--bg-soft);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 20px;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 6px;
    }

    .main-nav a {
        display: block;
        padding: 12px 16px;
    }

    .hero {
        padding: 80px 0 70px;
    }

    .about-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }
}
