        :root {
            --bg: #0f172a;
            --bg-secondary: #1e293b;
            --text: #e2e8f0;
            --text-muted: #94a3b8;
            --card: #1e293b;
            --primary: #38bdf8;
            --primary-dark: #0ea5e9;
            --secondary: #a78bfa;
            --border: rgba(148, 163, 184, 0.15);
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            --gradient: linear-gradient(135deg, #38bdf8, #a78bfa);
        }

        [data-theme="light"] {
            --bg: #f8fafc;
            --bg-secondary: #ffffff;
            --text: #0f172a;
            --text-muted: #64748b;
            --card: #ffffff;
            --border: rgba(100, 116, 139, 0.2);
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            transition: background-color 0.4s, color 0.4s, border-color 0.4s;
        }

        html {
            scroll-behavior: smooth;
        }

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

        /* ========== پس‌زمینه ذرات ========== */
        #particles-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.5;
            pointer-events: none;
        }

        /* ========== نوار ناوبری ========== */
        .navbar {
            position: fixed;
            top: 0;
            width: 100%;
            z-index: 1000;
            padding: 1rem 5%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
        }

        [data-theme="light"] .navbar {
            background: rgba(255, 255, 255, 0.75);
        }

        /* .logo {
            font-size: 1.8rem;
            font-weight: 900;
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: pulse 3s infinite;
        }
 */

.logo img {
    height: 65px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* حالت پیش‌فرض: تم تاریک */
[data-theme="dark"] .logo .logo-dark {
    display: block;
    opacity: 1;
}
[data-theme="dark"] .logo .logo-light {
    display: none;
    opacity: 0;
}

/* تم روشن */
[data-theme="light"] .logo .logo-dark {
    display: none;
    opacity: 0;
}
[data-theme="light"] .logo .logo-light {
    display: block;
    opacity: 1;
}


        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            list-style: none;
            align-items: center;
        }

        .nav-links a {
            color: var(--text);
            text-decoration: none;
            font-weight: 500;
            position: relative;
            padding: 0.3rem 0;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            right: 0;
            width: 0;
            height: 2px;
            background: var(--gradient);
            transition: width 0.3s;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        .theme-toggle {
            background: var(--card);
            border: 1px solid var(--border);
            color: var(--text);
            width: 42px;
            height: 42px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            box-shadow: var(--shadow);
            transition: transform 0.3s;
        }

        .theme-toggle:hover {
            transform: rotate(20deg) scale(1.1);
        }

        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            background: none;
            border: none;
        }

        .hamburger span {
            width: 25px;
            height: 3px;
            background: var(--text);
            border-radius: 3px;
            transition: all 0.3s;
        }

        /* ========== بخش قهرمان ========== */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 8rem 5% 4rem;
            position: relative;
        }

        .hero-content {
            text-align: center;
            max-width: 800px;
        }

        .hero-img {
            width: 160px;
            height: 160px;
            border-radius: 50%;
            margin: 0 auto 2rem;
            background: var(--gradient);
            padding: 4px;
            animation: float 4s ease-in-out infinite;
            box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
        }

        .hero-img img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--bg);
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        .hero h1 {
            font-size: 3.5rem;
            font-weight: 900;
            margin-bottom: 0.5rem;
            animation: fadeInDown 1s ease;
        }

        .hero .typed-text {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary);
            min-height: 3rem;
            margin-bottom: 1.5rem;
        }

        .typed-cursor {
            animation: blink 0.8s infinite;
            font-weight: 300;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .hero p {
            color: var(--text-muted);
            font-size: 1.1rem;
            margin-bottom: 2rem;
            animation: fadeInUp 1.2s ease;
        }

        .hero-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
            animation: fadeInUp 1.4s ease;
        }

        .btn {
            padding: 0.8rem 2rem;
            border-radius: 50px;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
            border: none;
            font-family: inherit;
            font-size: 1rem;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-primary {
            background: var(--gradient);
            color: white;
            box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 35px rgba(56, 189, 248, 0.6);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
        }

        .btn-outline:hover {
            background: var(--primary);
            color: white;
            transform: translateY(-3px);
        }

        .social-icons {
            display: flex;
            gap: 1.2rem;
            justify-content: center;
            margin-top: 2.5rem;
            animation: fadeInUp 1.6s ease;
        }

        .social-icons a {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--card);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text);
            font-size: 1.3rem;
            text-decoration: none;
            transition: all 0.3s;
            box-shadow: var(--shadow);
        }

        .social-icons a:hover {
            background: var(--gradient);
            color: white;
            transform: translateY(-5px) scale(1.1);
            box-shadow: 0 12px 30px rgba(56, 189, 248, 0.5);
        }

        /* ========== بخش‌های عمومی ========== */
        section {
            padding: 6rem 5%;
        }

        .section-title {
            text-align: center;
            font-size: 2.5rem;
            font-weight: 900;
            margin-bottom: 1rem;
            position: relative;
        }

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

        .section-subtitle {
            text-align: center;
            color: var(--text-muted);
            margin-bottom: 3rem;
            font-size: 1.1rem;
        }

        /* ========== انیمیشن‌های ظهور ========== */
        .reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        .reveal-left {
            opacity: 0;
            transform: translateX(-60px);
            transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .reveal-left.active {
            opacity: 1;
            transform: translateX(0);
        }

        .reveal-right {
            opacity: 0;
            transform: translateX(60px);
            transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .reveal-right.active {
            opacity: 1;
            transform: translateX(0);
        }

        /* ========== درباره من ========== */
        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            align-items: center;
            max-width: 1100px;
            margin: 0 auto;
        }

        .about-text p {
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
            text-align: center;
        }

        .stat-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 2rem 1rem;
            box-shadow: var(--shadow);
            transition: transform 0.3s;
        }

        .stat-card:hover {
            transform: translateY(-8px);
            border-color: var(--primary);
        }

        .stat-card .counter {
            font-size: 2.5rem;
            font-weight: 900;
            background: var(--gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .stat-card p {
            color: var(--text-muted);
            margin-top: 0.5rem;
            font-weight: 500;
        }

        /* ========== مهارت‌ها ========== */
        .skills-container {
            max-width: 900px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }

        .skill-group h3 {
            margin-bottom: 1.5rem;
            font-size: 1.4rem;
            color: var(--primary);
        }

        .skill-item {
            margin-bottom: 1.5rem;
        }

        .skill-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }

        .skill-bar {
            height: 10px;
            background: var(--bg-secondary);
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid var(--border);
        }

        .skill-fill {
            height: 100%;
            width: 0;
            background: var(--gradient);
            border-radius: 10px;
            transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            position: relative;
        }

        .skill-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        /* ========== تجربه و تحصیلات ========== */
        .timeline {
            max-width: 800px;
            margin: 0 auto;
            position: relative;
        }

        .timeline::before {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            right: 50%;
            width: 2px;
            background: var(--gradient);
            transform: translateX(50%);
        }

        .timeline-item {
            display: flex;
            justify-content: flex-end;
            padding-left: 0;
            margin-bottom: 3rem;
            position: relative;
            width: 50%;
            padding-right: 3rem;
        }

        .timeline-item:nth-child(odd) {
            align-self: flex-end;
            justify-content: flex-start;
            padding-left: 3rem;
            padding-right: 0;
            margin-right: 50%;
        }

        .timeline-item::after {
            content: '';
            position: absolute;
            top: 0;
            right: -8px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary);
            box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
            animation: pulse-dot 2s infinite;
        }

        .timeline-item:nth-child(odd)::after {
            right: auto;
            left: -8px;
        }

        @keyframes pulse-dot {
            0%, 100% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.6); }
            50% { box-shadow: 0 0 30px rgba(56, 189, 248, 1); }
        }

        .timeline-card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1.8rem;
            box-shadow: var(--shadow);
            transition: all 0.3s;
            position: relative;
        }

        .timeline-card:hover {
            transform: translateY(-6px);
            border-color: var(--primary);
            box-shadow: 0 15px 40px rgba(56, 189, 248, 0.25);
        }

        .timeline-card .date {
            color: var(--primary);
            font-weight: 700;
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
            display: block;
        }

        .timeline-card h3 {
            font-size: 1.3rem;
            margin-bottom: 0.5rem;
        }

        .timeline-card h4 {
            color: var(--secondary);
            font-size: 1rem;
            margin-bottom: 0.8rem;
            font-weight: 500;
        }

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

        /* ========== نمونه کارها ========== */
        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
            max-width: 1100px;
            margin: 0 auto;
        }

        .portfolio-item {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: all 0.4s;
            position: relative;
            cursor: pointer;
        }

        .portfolio-item:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 50px rgba(56, 189, 248, 0.3);
        }

        .portfolio-img {
            height: 200px;
            background: var(--gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3rem;
            color: white;
            position: relative;
            overflow: hidden;
        }

        .portfolio-img::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(56,189,248,0.7), rgba(167,139,250,0.7));
            opacity: 0;
            transition: opacity 0.4s;
        }

        .portfolio-item:hover .portfolio-img::after {
            opacity: 1;
        }

        .portfolio-info {
            padding: 1.5rem;
        }

        .portfolio-info h3 {
            margin-bottom: 0.5rem;
            font-size: 1.2rem;
        }

        .portfolio-info p {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        /* ========== تماس ========== */
        .contact-container {
            max-width: 800px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
        }

        .contact-info {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .contact-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.2rem;
            transition: all 0.3s;
        }

        .contact-item:hover {
            border-color: var(--primary);
            transform: translateX(-5px);
        }

        .contact-item i {
            width: 45px;
            height: 45px;
            background: var(--gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .contact-item p {
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .contact-form input,
        .contact-form textarea {
            width: 100%;
            padding: 1rem;
            margin-bottom: 1rem;
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text);
            font-family: inherit;
            font-size: 1rem;
            transition: all 0.3s;
        }

        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
            transform: translateY(-2px);
        }

        .contact-form textarea {
            height: 120px;
            resize: vertical;
        }

        /* ========== فوتر ========== */
        footer {
            text-align: center;
            padding: 2rem;
            border-top: 1px solid var(--border);
            color: var(--text-muted);
        }

        /* ========== رسپانسیو ========== */
        @media (max-width: 768px) {
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 70%;
                height: 100vh;
                background: var(--bg-secondary);
                flex-direction: column;
                justify-content: center;
                gap: 2rem;
                transition: right 0.4s;
                box-shadow: -10px 0 40px rgba(0,0,0,0.3);
            }

            .nav-links.active {
                right: 0;
            }

            .hamburger {
                display: flex;
                z-index: 1001;
            }

            .hamburger.active span:nth-child(1) {
                transform: rotate(45deg) translate(5px, 5px);
            }
            .hamburger.active span:nth-child(2) {
                opacity: 0;
            }
            .hamburger.active span:nth-child(3) {
                transform: rotate(-45deg) translate(7px, -7px);
            }

            .hero h1 {
                font-size: 2.5rem;
            }
            .hero .typed-text {
                font-size: 1.4rem;
            }

            .about-grid,
            .skills-container,
            .contact-container {
                grid-template-columns: 1fr;
            }

            .stats {
                grid-template-columns: 1fr;
            }

            .timeline::before {
                right: 0;
                transform: none;
            }

            .timeline-item {
                width: 100%;
                padding-right: 2rem;
                padding-left: 0;
            }

            .timeline-item:nth-child(odd) {
                margin-right: 0;
                padding-left: 0;
                padding-right: 2rem;
            }

            .timeline-item::after {
                right: -8px;
                left: auto;
            }

            .timeline-item:nth-child(odd)::after {
                right: -8px;
                left: auto;
            }

            .section-title {
                font-size: 2rem;
            }
        }

        @media (max-width: 480px) {
            .hero h1 {
                font-size: 2rem;
            }
            .hero .typed-text {
                font-size: 1.2rem;
            }
            .btn {
                padding: 0.7rem 1.5rem;
                font-size: 0.9rem;
            }
            .portfolio-grid {
                grid-template-columns: 1fr;
            }
        }
