/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    /* Dark theme colors (default) */
    --dark-bg: #0a0a0a;
    --dark-card: #1a1a1a;
    --dark-text: #ffffff;
    --dark-text-secondary: #b0b0b0;
    --dark-border: #333333;
    
    /* Light theme colors */
    --light-bg: #ffffff;
    --light-card: #f8f9fa;
    --light-text: #212529;
    --light-text-secondary: #6c757d;
    --light-border: #dee2e6;
    
    /* Primary colors (Green) */
    --primary-color: #00d3a9;
    --primary-dark: #00b896;
    --primary-light: rgba(0, 211, 169, 0.1);
    
    /* Secondary colors */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark theme settings (default) */
body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    transition: var(--transition-normal);
}

/* Light theme settings */
body.light-mode {
    background-color: var(--light-bg);
    color: var(--light-text);
    transition: var(--transition-normal);
}

/* ===== TYPOGRAPHY ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    direction: ltr; /* Changed to LTR for English */
    text-align: left; /* Changed to left for English */
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ... باقی CSS تغییرات جزئی برای انگلیسی ... */

/* Typing Banner */
.typing-banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.typing-container {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.typing-container img {
    max-width: 100%;
    height: auto;
}

.light-mode .typing-container {
    background: var(--light-card);
}

/* ===== TYPOGRAPHY ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

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

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--dark-border);
    transition: var(--transition-normal);
}

.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--light-border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* لوگو */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-text);
}

.light-mode .logo {
    color: var(--light-text);
}

.logo-text {
    color: inherit;
}

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

/* منوی هامبورگر */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--dark-text);
    border-radius: 3px;
    transition: var(--transition-normal);
}

.light-mode .hamburger span {
    background: var(--light-text);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* منوی اصلی */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.dark-mode .nav-link {
    color: var(--dark-text-secondary);
}

.light-mode .nav-link {
    color: var(--light-text-secondary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* دکمه‌های ناوبری */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 2rem;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition-normal);
}

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

/* ===== HERO SECTION ===== */
.hero {
    padding: 10rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* بنر */
.hero-banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* محتوای هیرو */
.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.typing-text {
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    width: 3px;
    background: var(--primary-color);
    animation: blink 1s infinite;
    margin-right: 2px;
}

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

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

.description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--dark-text-secondary);
}

.light-mode .description {
    color: var(--light-text-secondary);
}

/* دکمه‌های هیرو */
.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* آمار هیرو */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--dark-text-secondary);
}

.light-mode .stat-label {
    color: var(--light-text-secondary);
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--primary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    margin-top: 1.5rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text-secondary);
}

.light-mode .about-list li {
    color: var(--light-text-secondary);
}

.about-list i {
    color: var(--primary-color);
}

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

.image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
}

.image-placeholder span {
    font-size: 1rem;
    margin-top: 1rem;
}

/* ===== SKILLS SECTION ===== */
.skills {
    padding: 5rem 0;
    background: rgba(0, 211, 169, 0.05);
}

.light-mode .skills {
    background: rgba(0, 0, 0, 0.02);
}

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

.category-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-normal);
}

.light-mode .category-card {
    background: var(--light-card);
    border: 1px solid var(--light-border);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--primary-color);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 5rem 0;
}

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

.project-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.light-mode .project-card {
    background: var(--light-card);
    border: 1px solid var(--light-border);
}

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

.project-image {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--dark-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.light-mode .project-description {
    color: var(--light-text-secondary);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(0, 211, 169, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

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

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 5rem 0;
    background: rgba(0, 211, 169, 0.05);
}

.light-mode .contact {
    background: rgba(0, 0, 0, 0.02);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* فرم تماس */
.contact-form {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.light-mode .contact-form {
    background: var(--light-card);
    border: 1px solid var(--light-border);
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-sm);
    color: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.light-mode .form-group input,
.light-mode .form-group select,
.light-mode .form-group textarea {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--light-border);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 211, 169, 0.1);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
}

/* پیام موفقیت */
.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    border-radius: var(--radius-lg);
    color: var(--success-color);
}

.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* اطلاعات تماس */
.contact-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.light-mode .info-card {
    background: var(--light-card);
    border: 1px solid var(--light-border);
}

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

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.info-content p {
    color: var(--dark-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.light-mode .info-content p {
    color: var(--light-text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-card);
    color: var(--dark-text-secondary);
    padding: 4rem 0 0;
}

.light-mode .footer {
    background: var(--light-card);
    color: var(--light-text-secondary);
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.footer-description {
    line-height: 1.8;
}

.footer-links h3,
.footer-social h3 {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.light-mode .footer-links h3,
.light-mode .footer-social h3 {
    color: var(--light-text);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: inherit;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: inherit;
    transition: var(--transition-normal);
}

.light-mode .social-icon {
    background: rgba(0, 0, 0, 0.05);
}

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

.btn-download-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition-normal);
}

.btn-download-footer:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* پایین فوتر */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--dark-border);
}

.light-mode .footer-bottom {
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid var(--light-border);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.hosting-note {
    color: var(--primary-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--dark-bg);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transition: var(--transition-normal);
        overflow-y: auto;
    }
    
    .light-mode .nav-menu {
        background: var(--light-bg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-buttons {
        margin-right: 0;
        flex-direction: column;
        width: 100%;
    }
    
    .theme-toggle,
    .btn-download {
        width: 100%;
        justify-content: center;
    }
    
    .hero {
        padding: 8rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .skills-categories,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}