        /* CSS Reset & Base Styles */
        :root {
            --primary-color: #4361ee;  /* نیلا رنگ */
            --secondary-color: #3a0ca3; /* گہرا نیلا */
            --primary-dark: #1d4ed8;
            --dark-color: #1e293b;
            --light-color: #f8fafc;
            --gray-color: #64748b;
            --success-color: #10b981;
            --error-color: #ef4444;
            --accent-color: #f59e0b;
            --border-color: #e5e7eb;
            --transition: all 0.3s ease;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
            --max-width: 1200px;
            --border-radius: 8px;
        }

        .dark-mode {
            --dark-color: #f8fafc;
            --light-color: #1e293b;
            --gray-color: #94a3b8;
            --bg-primary: #111827;
            --bg-secondary: #1f2937;
            --border-color: #374151;
        }

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

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: var(--dark-color);
            background-color: var(--light-color);
            transition: var(--transition);
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        ul {
            list-style: none;
        }

        img {
            max-width: 100%;
            display: block;
        }

        .container {
            width: 90%;
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 1rem;
        }

        section {
            padding: 6rem 0;
        }

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

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: var(--primary-color);
            border-radius: 2px;
        }

        .btn {
            display: inline-block;
            padding: 0.8rem 1.8rem;
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            background-size: 200% 200%;
            color: white;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
            animation: gradient 3s ease infinite;
        }

        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
            animation: none;
        }

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

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

        /* Header Styles */
        header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
            background: rgba(248, 250, 252, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: var(--shadow);
            transition: var(--transition);
            border-bottom: 1px solid var(--border-color);
        }

        .dark-mode header {
            background: rgba(17, 24, 39, 0.95);
        }

        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }

        .nav-menu {
    display: flex;
    gap: 2rem;
    transition: var(--transition);
}

        .nav-menu.active {
            transform: translateX(0);
        }

        .nav-link {
            font-weight: 500;
            position: relative;
            padding: 0.5rem 0;
            transition: all 0.3s ease;
        }

        .nav-link:hover {
            color: var(--primary-color);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: var(--transition);
        }

        .nav-link:hover::after,
        .nav-link.active::after {
            width: 100%;
        }

        .hamburger {
            display: none;
            cursor: pointer;
            font-size: 1.5rem;
        }

        .theme-toggle {
            width: 60px;
            height: 30px;
            background: var(--border-color);
            border-radius: 15px;
            position: relative;
            cursor: pointer;
            transition: var(--transition);
        }

        .theme-toggle::before {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 24px;
            height: 24px;
            background: white;
            border-radius: 50%;
            transition: var(--transition);
        }

        .dark-mode .theme-toggle {
            background: var(--primary-color);
        }

        .dark-mode .theme-toggle::before {
            transform: translateX(30px);
        }

        /* Hero Section */
        #home {
            min-height: 100vh;
            display: flex;
            align-items: center;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            position: relative;
            overflow: hidden;
        }

        #home::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff10" points="0,0 1000,300 1000,1000 0,700"/></svg>');
            z-index: 1;
        }

        .hero-content {
            display: flex;
            align-items: center;
            gap: 3rem;
            position: relative;
            z-index: 2;
        }

        .hero-text {
            flex: 1;
        }

        .hero-image {
            flex: 1;
            display: flex;
            justify-content: center;
        }

        .hero-image img {
            width: 350px;
            height: 350px;
            object-fit: cover;
            border-radius: 50%;
            border: 8px solid var(--primary-color);
            box-shadow: var(--shadow-lg);
            animation: float 6s ease-in-out infinite;
        }

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

        .hero-title {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            line-height: 1.2;
            color: white;
        }

        .hero-subtitle {
            font-size: 1.5rem;
            color: white;
            margin-bottom: 1rem;
        }

        .hero-description {
            font-size: 1.1rem;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 2rem;
            max-width: 600px;
        }

        .hero-cta {
            display: flex;
            gap: 1rem;
        }

        .hero-cta .btn {
            animation: pulse 2s infinite;
        }

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

        .hero-cta .btn:hover {
            animation: none;
        }

        .social-links {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

        .social-link {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--primary-color);
            color: white;
            transition: var(--transition);
        }

        .social-link:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
        }

        /* About Section */
        #about {
            background-color: rgba(248, 250, 252, 0.5);
        }

        .dark-mode #about {
            background-color: var(--bg-secondary);
        }

        .about-content {
            display: flex;
            align-items: center;
            gap: 3rem;
        }

        .about-image {
            flex: 1;
        }

        .about-image img {
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
        }

        .about-text {
            flex: 1;
        }

        .about-text h3 {
            font-size: 1.8rem;
            margin-bottom: 1rem;
        }

        .about-text p {
            margin-bottom: 1.5rem;
            color: var(--gray-color);
        }

        .about-details {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .detail-item {
            display: flex;
            gap: 0.5rem;
        }

        .detail-item i {
            color: var(--primary-color);
        }

        /* Services Section */
        #services {
            background-color: rgba(248, 250, 252, 0.3);
        }

        .dark-mode #services {
            background-color: var(--bg-secondary);
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .service-card {
            background: white;
            padding: 2rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
            text-align: center;
        }

        .dark-mode .service-card {
            background: var(--bg-secondary);
        }

        .service-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-lg);
        }

        .service-icon {
            width: 70px;
            height: 70px;
            background: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin: 0 auto 1.5rem;
            transition: var(--transition);
        }

        .service-card:hover .service-icon {
            background: var(--primary-dark);
            transform: rotateY(180deg);
        }

        .service-card h3 {
            font-size: 1.3rem;
            margin-bottom: 1rem;
        }

        .service-card p {
            color: var(--gray-color);
        }

        /* Skills Section */
        #skills {
            background-color: rgba(248, 250, 252, 0.5);
        }

        .dark-mode #skills {
            background-color: var(--bg-secondary);
        }

        .skills-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 2rem;
        }

        .skills-content {
            background: white;
            padding: 2rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .dark-mode .skills-content {
            background: var(--bg-secondary);
        }

        .skills-content:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

        .skills-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            color: var(--primary-color);
        }

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

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

        .skill-info span:last-child {
            opacity: 0.8;
            transition: var(--transition);
        }

        .skill-item:hover .skill-info span:last-child {
            opacity: 1;
        }

        .skill-bar {
            height: 8px;
            background: var(--border-color);
            border-radius: 5px;
            overflow: hidden;
        }

        .dark-mode .skill-bar {
            background: #334155;
        }

        .skill-progress {
            height: 100%;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
            border-radius: 5px;
            position: relative;
            width: 0;
            transition: width 1.5s ease;
        }

        .skill-progress::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            animation: shine 2s infinite;
        }

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

        /* Projects Section */
        #projects {
            background-color: rgba(248, 250, 252, 0.5);
        }

        .dark-mode #projects {
            background-color: var(--bg-secondary);
        }

        .project-filters {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-bottom: 3rem;
        }

        .filter-btn {
            padding: 0.5rem 1.5rem;
            background: transparent;
            border: 2px solid var(--primary-color);
            color: var(--primary-color);
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 500;
        }

        .filter-btn.active,
        .filter-btn:hover {
            background: var(--primary-color);
            color: white;
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
        }

        .project-card {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
            border: 1px solid var(--border-color);
        }

        .dark-mode .project-card {
            background: var(--bg-secondary);
        }

        .project-card:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-lg);
        }

        .project-img {
            height: 200px;
            overflow: hidden;
        }

        .project-img img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }

        .project-card:hover .project-img img {
            transform: scale(1.1);
        }

        .project-info {
            padding: 1.5rem;
        }

        .project-title {
            font-size: 1.3rem;
            margin-bottom: 0.5rem;
            transition: var(--transition);
        }

        .project-card:hover .project-title {
            color: var(--primary-color);
        }

        .project-category {
            display: inline-block;
            padding: 0.3rem 0.8rem;
            background: var(--primary-color);
            color: white;
            border-radius: 30px;
            font-size: 0.8rem;
            margin-bottom: 1rem;
        }

        .project-links {
            display: flex;
            gap: 1rem;
        }

        /* Testimonials Section */
        #testimonials {
            background-color: rgba(248, 250, 252, 0.3);
        }

        .dark-mode #testimonials {
            background-color: var(--bg-secondary);
        }

        .testimonials-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .testimonial-card {
            background: white;
            padding: 2rem;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .dark-mode .testimonial-card {
            background: var(--bg-secondary);
        }

        .testimonial-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

        .testimonial-content {
            position: relative;
            margin-bottom: 1.5rem;
            padding-left: 1.5rem;
        }

        .testimonial-content::before {
            content: '"';
            position: absolute;
            left: 0;
            top: -10px;
            font-size: 3rem;
            color: var(--primary-color);
            opacity: 0.3;
            font-family: Georgia, serif;
        }

        .testimonial-content p {
            color: var(--gray-color);
            font-style: italic;
        }

        .testimonial-author {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .testimonial-author img {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--primary-color);
        }

        .testimonial-author h4 {
            font-size: 1.1rem;
            margin-bottom: 0.3rem;
        }

        .testimonial-author span {
            color: var(--gray-color);
            font-size: 0.9rem;
        }

        /* Articles Section */
        #articles {
            background-color: rgba(248, 250, 252, 0.5);
        }

        .dark-mode #articles {
            background-color: var(--bg-secondary);
        }

        .articles-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }

        .article-card {
            background: white;
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .dark-mode .article-card {
            background: var(--bg-secondary);
        }

        .article-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
        }

        .article-image {
            height: 200px;
            overflow: hidden;
        }

        .article-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: var(--transition);
        }

        .article-card:hover .article-image img {
            transform: scale(1.1);
        }

        .article-content {
            padding: 1.5rem;
        }

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

        .article-card h3 {
            font-size: 1.2rem;
            margin-bottom: 1rem;
        }

        .article-card p {
            color: var(--gray-color);
            margin-bottom: 1.5rem;
        }

        .read-more {
            color: var(--primary-color);
            font-weight: 500;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: var(--transition);
        }

        .read-more:hover {
            color: var(--primary-dark);
            gap: 0.8rem;
        }

        /* Contact Section */
        .contact-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 3rem;
        }

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

        .contact-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
        }

        .contact-icon {
            width: 50px;
            height: 50px;
            background: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }

        .contact-text h3 {
            margin-bottom: 0.3rem;
        }

        .contact-text p {
            color: var(--gray-color);
        }

        .contact-form .form-group {
            margin-bottom: 1.5rem;
        }

        .contact-form label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }

        .contact-form input,
        .contact-form textarea {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            font-family: inherit;
            transition: var(--transition);
            background: var(--bg-secondary);
        }

        .dark-mode .contact-form input,
        .dark-mode .contact-form textarea {
            background: #334155;
            border-color: #475569;
            color: var(--light-color);
        }

        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
        }

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

        .error-message {
            color: var(--error-color);
            font-size: 0.9rem;
            margin-top: 0.3rem;
            display: none;
        }

        .success-message {
            background: var(--success-color);
            color: white;
            padding: 1rem;
            border-radius: var(--border-radius);
            margin-bottom: 1rem;
            display: none;
        }

        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Footer */
        footer {
            background: var(--dark-color);
            color: white;
            padding: 2rem 0;
            text-align: center;
        }

        .dark-mode footer {
            background: var(--bg-primary);
            color: var(--dark-color);
        }

        .footer-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .footer-links {
            display: flex;
            gap: 1.5rem;
        }

        .footer-link {
            transition: var(--transition);
        }

        .footer-link:hover {
            color: var(--primary-color);
        }

        .copyright {
            color: var(--gray-color);
            font-size: 0.9rem;
        }

        .dark-mode .copyright {
            color: #94a3b8;
        }

        /* Back to Top Button */
        .back-to-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 50px;
            height: 50px;
            background: var(--primary-color);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            z-index: 999;
        }

        .back-to-top.active {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
        }

        /* Animations */
        .hidden {
            opacity: 0;
            transform: translateY(20px);
            transition: all 1s;
        }

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

        .scroll-reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.6s ease;
        }

        .scroll-reveal.revealed {
            opacity: 1;
            transform: translateY(0);
        }

        /* Responsive Styles */
        @media screen and (max-width: 992px) {
            .hero-content,
            .about-content,
            .contact-container {
                flex-direction: column;
                grid-template-columns: 1fr;
            }

            .hero-image {
                order: -1;
            }

            .hero-title {
                font-size: 2.8rem;
            }

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

        @media screen and (max-width: 768px) {
            .nav-menu {
                position: fixed;
                top: 70px;
                right: 0;
                width: 64%;
                height: calc(100vh - 70px);
                background: var(--light-color);
                flex-direction: column;
                align-items: center;
                padding: 2rem 0;
                transition: var(--transition);
                z-index: 999;
                transform: translateX(100%);
            }

            .dark-mode .nav-menu {
                background: var(--bg-primary);
            }

            .nav-menu.active {
                transform: translateX(0);
            }

            .hamburger {
                display: block;
            }

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

            .project-filters {
                flex-wrap: wrap;
            }
        }

        @media screen and (max-width: 576px) {
            .hero-title {
                font-size: 2.2rem;
            }

            .hero-subtitle {
                font-size: 1.2rem;
            }

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

            .hero-cta {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                text-align: center;
            }
        }