 /* ============================================
    CSS VARIABLES — DARK & LIGHT THEMES
    ============================================ */
:root {
     --transition-speed: 0.4s;
}

[data-theme="dark"] {
     --bg-primary: #0a0a1a;
     --bg-secondary: #0f0f2e;
     --bg-card: rgba(15, 15, 46, 0.7);
     --bg-card-hover: rgba(25, 25, 60, 0.9);
     --bg-nav: rgba(10, 10, 26, 0.85);
     --text-primary: #e0e0ff;
     --text-secondary: #8888bb;
     --text-muted: #ffffff;
     --accent-1: #00d4ff;
     --accent-2: #7b2fff;
     --accent-3: #ff2d95;
     --accent-gradient: linear-gradient(135deg, #00d4ff, #7b2fff, #ff2d95);
     --glow-1: rgba(0, 212, 255, 0.3);
     --glow-2: rgba(123, 47, 255, 0.3);
     --border-color: rgba(100, 100, 200, 0.15);
     --code-bg: #1a1a3e;
     --particle-color: rgba(0, 212, 255, 0.6);
     --shadow-color: rgba(0, 0, 0, 0.5);
     --scrollbar-track: #0a0a1a;
     --scrollbar-thumb: #7b2fff;
     --input-bg: rgba(15, 15, 46, 0.8);
     --success: #00ff88;
     --matrix-color: #00d4ff;
}
[data-theme="light"] {
    --bg-primary: #f0f2ff;
    --bg-secondary: #e8eaff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-nav: rgba(240, 242, 255, 0.9);
    --text-primary: #1a1a3e;
    --text-secondary: #4a4a7a;
    --text-muted: #8888aa;
    --accent-1: #0088cc;
    --accent-2: #6b1fff;
    --accent-3: #e0006f;
    --accent-gradient: linear-gradient(135deg, #0088cc, #6b1fff, #e0006f);
    --glow-1: rgba(0, 136, 204, 0.2);
    --glow-2: rgba(107, 31, 255, 0.2);
    --border-color: rgba(100, 100, 200, 0.2);
    --code-bg: #e8eaff;
    --particle-color: rgba(107, 31, 255, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --scrollbar-track: #f0f2ff;
    --scrollbar-thumb: #6b1fff;
    --input-bg: rgba(255, 255, 255, 0.9);
    --success: #00aa55;
    --matrix-color: #6b1fff;
}
/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background var(--transition-speed), color var(--transition-speed);
    line-height: 1.8;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
/* ============================================
   CANVAS BACKGROUNDS
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.06;
}
/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    transition: all var(--transition-speed);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    position: relative;
}
.nav-logo::after {
    content: '_';
    -webkit-text-fill-color: var(--accent-1);
    animation: blink 1s infinite;
}
@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s;
}
.nav-links a:hover {
    color: var(--accent-1);
}
.nav-links a:hover::after {
    width: 100%;
}
/* Theme Toggle */
.theme-toggle {
    width: 56px;
    height: 28px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}
.theme-toggle .toggle-ball {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gradient);
    position: absolute;
    top: 2px;
    right: 2px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
[data-theme="light"] .toggle-ball {
    transform: translateX(-28px);
}
/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}
.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(5px, -5px);
}
/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 6rem 2rem 2rem;
}
.hero-content {
    text-align: center;
    max-width: 900px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-1);
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease;
}
.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}
/* title  */
.hero-title .gradient-text {
    background: linear-gradient(90deg,
            #6366f1,
            #8b5cf6,
            #06b6d4,
            #34d399,
            #8b5cf6,
            #6366f1);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
    position: relative;
    display: inline-block;
    min-height: 1.2em;
    min-width: 1ch;
}
/* کرسر چشمک‌زن */
.hero-title .gradient-text::after {
    content: '|';
    position: relative;
    color: #6366f1;
    font-weight: 100;
    -webkit-text-fill-color: #6366f1;
    animation: cursorBlink 0.8s step-end infinite;
    margin-right: 2px;
}
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes cursorBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}
/* ========================= */
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}
/* Terminal Style Typing */
.hero-terminal {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    text-align: left;
    direction: ltr;
    font-family: 'Courier New', monospace;
    animation: fadeInUp 0.8s ease 0.5s both;
    position: relative;
    overflow: hidden;
}
.hero-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
}
.terminal-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}
.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.terminal-dots span:nth-child(1) {
    background: #ff5f57;
}
.terminal-dots span:nth-child(2) {
    background: #ffbd2e;
}
.terminal-dots span:nth-child(3) {
    background: #28c840;
}
.terminal-line {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    opacity: 0;
    animation: typeLine 0.5s ease forwards;
}
.terminal-line .prompt {
    color: var(--accent-1);
}
.terminal-line .cmd {
    color: var(--accent-3);
}
.terminal-line .str {
    color: var(--success);
}
.terminal-line .comment {
    color: var(--text-muted);
}
.terminal-line:nth-child(2) {
    animation-delay: 0.8s;
}
.terminal-line:nth-child(3) {
    animation-delay: 1.2s;
}
.terminal-line:nth-child(4) {
    animation-delay: 1.6s;
}
.terminal-line:nth-child(5) {
    animation-delay: 2.0s;
}
.terminal-line:nth-child(6) {
    animation-delay: 2.4s;
}
.terminal-line:nth-child(7) {
    animation-delay: 2.8s;
}
@keyframes typeLine {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}
.btn-primary {
    background: linear-gradient(135deg,
            #6366f1 0%,
            #8b5cf6 30%,
            #06b6d4 70%,
            #34d399 100%);
    background-size: 300% 300%;
    color: #fff;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.3),
        0 0 0 0 rgba(99, 102, 241, 0);
    animation: btnGradient 6s ease infinite;
    letter-spacing: 0.5px;
}
/* لایه درخشان روی دکمه — شاین افکت */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 40%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.15) 60%,
            transparent 100%);
    transition: left 0.6s ease;
    z-index: 2;
}
/* ذرات نوری پشت دکمه */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 52px;
    background: linear-gradient(135deg,
            #6366f1,
            #8b5cf6,
            #06b6d4,
            #34d399,
            #8b5cf6,
            #6366f1);
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.4s ease;
    animation: btnGradient 6s ease infinite;
}
/* ===== هاور ===== */
.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 8px 30px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(139, 92, 246, 0.2),
        0 0 40px rgba(6, 182, 212, 0.15);
    letter-spacing: 1px;
}
/* شاین از چپ به راست */
.btn-primary:hover::before {
    left: 100%;
}
/* گلو پشت دکمه */
.btn-primary:hover::after {
    opacity: 0.6;
}
/* ===== کلیک ===== */
.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow:
        0 2px 10px rgba(99, 102, 241, 0.3),
        0 0 15px rgba(139, 92, 246, 0.2);
    transition: all 0.1s ease;
}
/* ===== ریپل افکت با کلیک ===== */
.btn-primary .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 3;
}
/* ===== فوکوس — دسترسی‌پذیری ===== */
.btn-primary:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 3px;
    box-shadow:
        0 0 0 4px rgba(6, 182, 212, 0.2),
        0 8px 30px rgba(99, 102, 241, 0.4);
}
/* ============================================
YFRAMES
======================================= */
@keyframes btnGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
@keyframes rippleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}
/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}
.scroll-indicator i {
    color: var(--text-muted);
    font-size: 1.5rem;
}
@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}
/* ============================================
   SECTIONS COMMON
   ============================================ */
section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem;
}
.section-container {
    max-width: 1200px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-1);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    direction: ltr;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1rem;
}
.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}
/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-image {
    position: relative;
}
.about-avatar {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: 20px;
    background: var(--accent-gradient);
    padding: 3px;
    margin: 0 auto;
    display: block;
}
.about-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    position: relative;
    overflow: hidden;
}
.about-avatar-inner .code-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.3;
    font-family: 'Courier New', monospace;
    direction: ltr;
    line-height: 1.4;
    padding: 1rem;
    overflow: hidden;
}
.about-avatar-inner i {
    position: relative;
    z-index: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.floating-badge {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
    white-space: nowrap;
}
.floating-badge i {
    color: var(--accent-1);
}
.floating-badge:nth-child(2) {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}
.floating-badge:nth-child(3) {
    top: 40%;
    right: -15%;
    animation-delay: 1s;
}
.floating-badge:nth-child(4) {
    bottom: 10%;
    left: -5%;
    animation-delay: 2s;
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 2;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}
.stat-item:hover {
    border-color: var(--accent-1);
    transform: translateY(-3px);
}
.stat-number {
    font-size: 2rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}
/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s;
}
.skill-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}
.skill-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--shadow-color);
}
.skill-icon {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid rgba(192,192,192,0.25);
    margin-bottom: 1rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* تصویر کامل و وسط */
.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
    border-radius: 10px;
}

/* هاور روی کارت */
.skill-card:hover .skill-icon {
    transform: rotate(-8deg) scale(1.08);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

/* حرکت نرم تصویر */
.skill-card:hover .skill-icon img {
    transform: scale(1.05);
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}
.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.skill-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    direction: ltr;
    transition: all 0.3s;
}
.skill-tags span:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
}
/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s;
    position: relative;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}
.project-preview {
    height: 200px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project-preview .code-preview {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: left;
    padding: 1rem;
    line-height: 1.6;
    width: 100%;
}
.project-preview .code-preview .keyword {
    color: var(--accent-3);
}
.project-preview .code-preview .func {
    color: var(--accent-1);
}
.project-preview .code-preview .string {
    color: var(--success);
}
.project-preview .code-preview .comment {
    color: var(--text-muted);
}
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, var(--bg-card));
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.project-card:hover .project-overlay {
    opacity: 1;
}
.project-overlay .btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}
.project-info {
    padding: 1.5rem;
}
.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.project-tech span {
    padding: 0.2rem 0.6rem;
    background: var(--bg-primary);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent-1);
    font-family: 'Courier New', monospace;
    direction: ltr;
}
/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
}
.contact-link:hover {
    border-color: var(--accent-1);
    transform: translateX(-5px);
}
/* تنظیم خود باکس رنگی (همان کدی که داشتی با کمی اصلاح) */
.contact-link i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* جلوگیری از تغییر سایز باکس در موبایل */
    overflow: hidden; /* برای اینکه اگر عکس بزرگ بود بیرون نزند */
}

/* تنظیم دقیق عکس داخل باکس */
.contact-link i img {
    width: 25px; /* سایز آیکون داخل باکس - می‌توانی کم و زیاد کنی */
    height: 25px;
    object-fit: contain; /* حفظ تناسب تصویر و جلوگیری از دفرمه شدن */
    display: block;
}
.contact-link span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    direction: ltr;
}
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--glow-1);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-2);
}
.btn-submit .btn-text {
    position: relative;
    z-index: 1;
}
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}
.btn-submit:hover::before {
    left: 100%;
}
/* ============================================
   FOOTER
   ============================================ */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-social {
    display: flex;
    gap: 1rem;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s;
}
.footer-social a:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-3px);
}
.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-text .heart {
    color: var(--accent-3);
}
/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 {
    transition-delay: 0.1s;
}
.reveal-delay-2 {
    transition-delay: 0.2s;
}
.reveal-delay-3 {
    transition-delay: 0.3s;
}
.reveal-delay-4 {
    transition-delay: 0.4s;
}
/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-1), transparent 70%);
    position: fixed;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0.5;
}
/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    border: none;
    font-size: 1.1rem;
    -webkit-background-clip: text;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--glow-2);
}
/* ============================================
   LOADING SCREEN
   ============================================ */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    transition: opacity 0.5s, visibility 0.5s;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
}
.loader-code {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: var(--accent-1);
    direction: ltr;
}
.loader-bar {
    width: 200px;
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}
.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    animation: loadBar 1.5s ease forwards;
}
@keyframes loadBar {
    to {
        width: 100%;
    }
}
/* ============================================
   RESPONSIVE
   ============================================ */
@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;
        padding: 2rem;
        transition: right 0.4s;
        border-left: 1px solid var(--border-color);
    }
    .nav-links.active {
        right: 0;
    }
    .hamburger {
        display: flex;
    }
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
    .timeline::before {
        right: 20px;
        transform: none;
    }
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        padding-right: 3rem;
        padding-left: 0;
        margin-left: 0;
        text-align: right;
    }
    .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        right: 12px;
        left: auto;
    }
    .timeline-item:nth-child(odd) .timeline-tags,
    .timeline-item:nth-child(even) .timeline-tags {
        justify-content: flex-end;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .floating-badge {
        display: none;
    }
    .hero-title {
        font-size: 2rem;
   }
}
