:root {
    --primary-color: #6d28d9;
    --secondary-color: #f59e0b;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --text-color: #f8fafc;
    --text-secondary: #cbd5e1;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--dark-bg);
    color: var(--text-color);
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.05) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.05) 2%, transparent 0%);
    background-size: 100px 100px;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.circle-image {
    border: 4px solid var(--secondary-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0.5;
    filter: blur(20px);
    z-index: -1;
}

.skill-bar-bg {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
}

.skill-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    position: relative;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-bar::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: shine 2s infinite;
}

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

.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#portfolio .glass-card, #contact .glass-card {
    /* حذف انیمیشن‌ها برای بخش‌های نمونه کارها و تماس */
    transition: none;
}

#portfolio .glass-card:hover, #contact .glass-card:hover {
    /* حذف افکت‌های hover */
    transform: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-card {
    overflow: hidden;
    position: relative;
}

.portfolio-card img {
    /* حذف انیمیشن تصویر */
    transition: none;
}

.portfolio-card:hover img {
    /* حذف افکت‌های hover برای تصاویر */
    transform: none;
    filter: none;
}

.portfolio-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    padding: 2rem 1rem 1rem;
    /* نمایش فوری overlay بدون انیمیشن */
    transform: translateY(0);
    opacity: 1;
}

.animated-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.animated-btn::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: all 0.5s ease;
}

.animated-btn:hover::before {
    left: 100%;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

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

/* حذف رفتار sticky nav */
.sticky-nav {
    display: none; /* به جای نمایش، کلاً مخفی می‌شود */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(-100%);
}

/* کلاس visible را غیرفعال می‌کنیم */
.sticky-nav.visible {
    display: none; /* همیشه مخفی بماند */
    transform: translateY(-100%); /* حتی با کلاس visible هم مخفی بماند */
}

.mouse-cursor {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.cursor-outer {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    opacity: 0.5;
    transition: all 0.08s ease;
}

.cursor-inner {
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    transition: all 0.01s ease;
}

.preloader {
    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;
    opacity: 1;
    transition: opacity 0.1s ease; /* کاهش زمان انیمیشن لودینگ */
}

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

.preloader-inner {
    width: 100px;
    height: 100px;
    position: relative;
}

.preloader-circle {
    width: 100%;
    height: 100%;
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 100;
}

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

/* Dark mode toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(180deg);
}

/* Animation for section headings */
.section-heading {
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Social media icons animation */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: var(--secondary-color);
}

/* Animated background */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.animated-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.shape1 {
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -300px;
    right: -300px;
    animation: floatAnimation 20s infinite alternate ease-in-out;
}

.shape2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    bottom: -200px;
    left: -200px;
    animation: floatAnimation 15s infinite alternate-reverse ease-in-out;
}

.shape3 {
    width: 300px;
    height: 300px;
    background: #ef4444;
    top: 50%;
    left: 60%;
    animation: floatAnimation 25s infinite alternate ease-in-out;
}

@keyframes floatAnimation {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(100px, 100px) rotate(180deg); }
    100% { transform: translate(0px, 200px) rotate(360deg); }
}

/* اصلاح استایل منوی همبرگری */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    z-index: 1001;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav .flex {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 10px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        width: 200px;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    nav .flex.active {
        display: flex;
    }

    .nav-link {
        margin: 0.5rem 0;
        text-align: right;
        width: 100%;
    }

    header {
        padding-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .floating-element {
        display: none;
    }
}

/* غیرفعال کردن کامل منوی sticky در حالت موبایل */
.sticky-nav .flex.active {
    display: none;
}

