/* =============================================
              CSS Reset و متغیرها
============================================= */
:root {
    --primary-color: #4f0dca;
    --primary-light: #7a3aff;
    --primary-dark: #3a0a9a;
    --accent-color: #b565ff;
    --accent-light: #ff8fa3;
    --accent-dark: #e64c6d;
    --text-color: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-lighter: rgba(255, 255, 255, 0.7);
    --text-lightest: rgba(255, 255, 255, 0.5);
    --bg-color: #0f0f1a;
    --bg-dark: #0a0a12;
    --bg-darker: #050509;
    --bg-light: #1a1a2e;
    --bg-lighter: #24243e;
    --gray-900: #000000;
    --gray-800: #1e1e1e;
    --gray-700: #2d2d2d;
    --success-color: #4ade80;
    --warning-color: #facc15;
    --error-color: #f87171;
    --info-color: #60a5fa;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --blur-intensity: 12px;
    --blur-intensity-light: 8px;
    --blur-intensity-heavy: 16px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-xxl: 32px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xxl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --glass-bg: rgba(0, 0, 3, 0.781);
    --glass-border: rgb(255, 255, 255);
    --glass-highlight: rgba(255, 255, 255, 0.05);


}

@font-face {
    font-family: 'Vazir';
    src: url('../content/font/Vazir-Black.woff2');
    font-display: swap;
}


@font-face {
    font-family: 'Fira Code';
    src: url('../content/font/FiraCode-Regular.woff2');
    font-display: swap;
}

/* Reset و پایه‌های استایل */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    font-family: 'Vazir', sans-serif;
    font-weight: 100;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



/* ذرات پس‌زمینه */
.particles-background {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* اشکال دکوراتیو */
.background {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 30%;
    filter: blur(5px);
    opacity: 0.5;
}

.shape:nth-child(1) {
    width: 500px;
    height: 500px;
    background-color: #4f0dca;
    top: -100px;
    right: -100px;
}

.shape:nth-child(2) {
    width: 300px;
    height: 300px;
    background-color: #4f0dca;
    bottom: -100px;
    left: -100px;
}

/* اسکرول بار */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgb(0, 0, 0);
}

::-webkit-scrollbar-thumb {
    background-color: #3a0a9a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}


/* تایپوگرافی */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4.8rem;
    line-height: 1.1;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.8rem;
}

h4 {
    font-size: 2.2rem;
}

h5 {
    font-size: 1.8rem;
}

h6 {
    font-size: 1.6rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

/* لیست‌ها */
ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* جداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

th,
td {
    padding: 1rem;
    text-align: right;
    border: 1px solid var(--bg-light);
}

th {
    background-color: var(--bg-light);
    font-weight: 700;
}

/* فرم‌ها */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background-color: transparent;
    border: none;
    outline: none;
    transition: var(--transition-fast);
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

button {
    cursor: pointer;
}

/* تصاویر */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}

/* Utility کلاس‌ها */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.text-light {
    color: var(--text-light);
}

.text-lighter {
    color: var(--text-lighter);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-accent {
    background-color: var(--accent-color);
}

.bg-dark {
    background-color: var(--bg-dark);
}

.bg-light {
    background-color: var(--bg-light);
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mt-4 {
    margin-top: 4rem;
}

.mt-5 {
    margin-top: 5rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.mb-5 {
    margin-bottom: 5rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}

.p-3 {
    padding: 3rem;
}

.p-4 {
    padding: 4rem;
}

.p-5 {
    padding: 5rem;
}

.rounded-sm {
    border-radius: var(--border-radius-sm);
}

.rounded-md {
    border-radius: var(--border-radius-md);
}

.rounded-lg {
    border-radius: var(--border-radius-lg);
}

.rounded-xl {
    border-radius: var(--border-radius-xl);
}

.rounded-xxl {
    border-radius: var(--border-radius-xxl);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.shadow-xxl {
    box-shadow: var(--shadow-xxl);
}

/* انیمیشن‌های پایه */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.6s var(--transition);
}

.slide-up {
    animation: slideUp 0.8s var(--transition);
}

.pulse {
    animation: pulse 2s infinite;
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* =============================================
                لایه‌های شیشه‌ای
============================================= */
.glass-card {
    background: var(--glass-bg);
    border-radius: 30px;
    backdrop-filter: blur(var(--blur-intensity));
    -webkit-backdrop-filter: blur(var(--blur-intensity));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    pointer-events: none;
}

.glass-card:hover {
    box-shadow: var(--shadow-xxl);
}

.glass-card-primary {
    background: rgba(79, 13, 202, 0.25);
    border-color: rgba(79, 13, 202, 0.3);
}

.glass-card-accent {
    background: rgba(255, 101, 132, 0.2);
    border-color: rgba(255, 101, 132, 0.3);
}

/* =============================================
                  صفحه اصلی
============================================= */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom right,
            var(--bg-dark),
            var(--bg-darker));
}

/* هدر */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(var(--blur-intensity-light));
    -webkit-backdrop-filter: blur(var(--blur-intensity-light));
    background: rgba(15, 15, 26, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 70%;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.header-container.scrolled {
    padding: 1rem 3rem;
    background: rgba(10, 10, 18, 0.9);
    box-shadow: var(--shadow-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--text-color);
    transition: var(--transition);
    margin-left: 60%;
    margin-right: 2%;
}

.logo-icon {
    color: var(--accent-color);
    font-weight: 900;
}

.logo-text {
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* منوی اصلی */
.capsule-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 1000px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    color: var(--text-light);
    width: 190px;
}

.menu-item:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active-item {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    border-radius: 2px;
}

.menu-item svg {
    width: 4.8rem;
    height: 4.8rem;
    fill: currentColor;
}

.menu-text {
    font-size: 1.5rem;
    font-weight: 500;
}

/* منوی موبایل */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    cursor: pointer;
    z-index: 1100;

}

.toggle-line {
    width: 2.5rem;
    height: 2px;
    background-color: var(--text-color);
    margin: 0.3rem 0;
    transition: var(--transition);
    transform-origin: center;
}

.mobile-menu-toggle.active .toggle-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .toggle-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .toggle-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 35rem;
    height: 90vh;
    background-color: #000000bb;
    backdrop-filter: blur(10px);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom-left-radius: 30px;
    padding: 8rem 3rem 3rem;
    z-index: 1050;
    transition: var(--transition);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .menu-item {
    width: 100%;
    justify-content: flex-start;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-md);
}

/* محتوای اصلی */
main {
    position: relative;
    z-index: 1;
    transition: 0.5;
}

/* انیمیشن fadeIn */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.section {
    min-height: 100vh;
    padding: 12rem 5% 8rem;
    display: none;
    opacity: 0;
}

.section.active {
    display: block;
    opacity: 1;
    animation: fadeIn 1.0s ease;
}

/* هیرو بخش */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    padding: 5rem;
    margin: 0 auto;
    max-width: 1400px;
    background: linear-gradient(rgb(0, 0, 0), rgba(31, 36, 45, 0.699)),
        url('../content/images/logohead/bghero.webp') no-repeat center center/cover;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

}

.hero-content {
    flex: 1;
    max-width: 60rem;
}

.hero-title {
    font-size: 4.8rem;
    margin-bottom: 2.5rem;
    line-height: 1.2;
    background: linear-gradient(to right,
            var(--text-color),
            var(--text-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title span {
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-animate {
    overflow: hidden;
    text-align: center;
    width: 100%;
    justify-content: center;
    height: 50px;
    position: relative;
    /* width: fit-content; */
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;

}

.text-animate h3 {
    font-size: 1.9rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: .7px rgb(255, 255, 255);
    text-shadow:
        0 0 10px var(--primary-color),
        0 0 10px var(--primary-color),
        0 0 10px var(--primary-color),
        0 0 10px var(--primary-color),
        0 0 10px var(--primary-color);
    white-space: nowrap;
    margin-right: 5px;
    margin-bottom: 10px;
}

.text-animateorg {
    font-size: 2.2rem;
    margin-top: 20px;
}

#typing-text {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 3.5rem;
    animation: blink 1s infinite;
    transition: var(--transition-fast);
    background-color: #ffffff;
    margin-right: 5px;
}

.cursor.inactive {
    opacity: 0;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-description {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-light);
    max-width: 50rem;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.4rem;
    border-radius: var(--border-radius-lg);
    font-size: 1.6rem;
    font-weight: 100;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(to right,
            var(--primary-color),
            var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 13, 202, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(79, 13, 202, 0.4);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-secondary:active {
    transform: translateY(0);
}

/* تصویر پروفایل */

.profile-container-header {
    width: 50px;
    height: 50px;
}

.profile-container-header .hero-image {
    width: 50px;
    height: 50px;
}

.profile-container-header .image-wrapper-header {
    width: 50px;
    height: 50px;
    background-color: #3b0134;
    border-radius: 10px;
    transition: 0.5s;
}

.profile-container-header .image-wrapper-header:hover {
    transition: 0.5s;
    background-color: #000000;
}

.profile-container-header .image-wrapper-header img:hover{
         animation: rotate 3s ease-in-out infinite;
}

/* تصویر پروفایل */
.profile-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image {
    position: relative;
    width: 35rem;
    height: 35rem;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-xxl);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    animation: rotate 10s ease-in-out infinite;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right,
            rgba(79, 13, 202, 0.3),
            rgba(255, 101, 132, 0.3));
    mix-blend-mode: overlay;
    z-index: 1;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-xl);
    z-index: -1;
    animation: pulse 4s infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* شبکه‌های اجتماعی */
.contact-social {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: 0.5s;

}

.social-icon:hover {
    background-color: #3a0a9a;
    transition: 0.5s;
}

.social-icon svg {
    width: 3rem;
    height: 3rem;
    fill: currentColor;
    margin-top: 10px;
}

/* =============================================
                  درباره ما
============================================= */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem;
}

.section-title {
    font-size: 4rem;
    margin-bottom: 5rem;
    text-align: center;
    position: relative;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right,
            var(--primary-color),
            var(--accent-color));
    border-radius: 2px;
}

.section-title span {
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-text {
    margin-bottom: 5rem;
}

.about-text p {
    font-size: 1.8rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stats-item {
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.stats-item:hover {
    transform: translateY(-10px);
}

.stats-number {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right,
            var(--primary-light),
            var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stats-text {
    font-size: 1.6rem;
    color: var(--text-light);
}

/* ---------------------------------------- */
/* استایل‌های پیشرفته بخش نمونه کارها */
/* ---------------------------------------- */

/* هدر و کنترل‌ها */
.portfolio-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.portfolio-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* جعبه جستجو */
.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

#portfolio-search {
    width: 100%;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.582);
    backdrop-filter: blur(15px);
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

#portfolio-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.3);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

/* فیلتر نمونه کارها */
.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.582);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
    transition: var(--transition);
    font-size: 2.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* گرید نمونه کارها - نسخه پیشرفته */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    width: 100%;
    max-width: 100%;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.portfolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 5px solid rgb(69, 0, 134);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    background: rgb(0, 0, 0);
    display: inline-block;
    margin: 0 auto;
    /*居中 کردن کارت*/
    max-width: 100%;
}

.portfolio-item:hover {
    transition: 0.5s;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* استایل تصاویر */
.portfolio-image img {
    width: 100%;
    height: 100%;
    display: block;
    max-width: 100%;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    /* تغییر یافته */
    object-fit: contain;
    /* تغییر یافته */
    display: block;
    /* اضافه شده */
}

/* افکت اورلی پیشرفته */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.699);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.5s;
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: 5.4rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.portfolio-description {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.portfolio-link {
    color: white;
    font-size: 1.2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.849);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.portfolio-link:hover {
    background: rgb(0, 0, 0);
    color: var(--primary-color);
}

/* وضعیت بارگذاری و خطا */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #ff6b6b;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    text-align: center;
    max-width: 80%;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
                  تماس با ما
============================================= */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 5rem;
}

.contact-info,
.contact-form {
    padding: 4rem;
}

.contact-subtitle {
    font-size: 2.4rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.contact-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 6rem;
    height: 3px;
    background: linear-gradient(to right,
            var(--primary-color),
            var(--accent-color));
    border-radius: 2px;
}

.info-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 5rem;
    height: 5rem;
    fill: var(--primary-light);
}

.info-content h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.info-content p,
.info-content a {
    font-size: 1.6rem;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 2rem;
    outline: none;
    scroll-behavior: smooth;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -moz-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 1.6rem;
    transition: var(--transition);
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 13, 202, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 15rem;
}



/* =============================================
                  ریسپانسیو
============================================= */
@media (max-width: 1200px) {

    .mobile-menu-toggle {
        display: flex;
    }

    .capsule-header {
        display: none;
    }

    .mobile-menu-toggle {
        margin-right: 50%;
    }

    .logo {
        margin-left: 40%;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-description {
        text-align: center;
    }

    .profile-container {
        margin-top: 5rem;
    }
}

@media (max-width: 992px) {

    .mobile-menu-toggle {
        display: flex;
    }

    .capsule-header {
        display: none;
    }

    html {
        font-size: 58%;
    }

    .section {
        padding: 10rem 5% 6rem;
    }

    .hero-title {
        font-size: 4rem;
    }

    #typing-text {
        font-size: 2.4rem;
    }

    .profile-container {
        width: 100%;
    }

    .hero-image {
        width: 30rem;
        height: 30rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .capsule-header {
        display: none;
    }

    .hero-title {
        font-size: 3.6rem;
    }

    .section-title {
        font-size: 3.2rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
    }
}

@media (max-width: 576px) {

    html {
        font-size: 55%;
    }

    .header-container {
        padding: 1.5rem 2rem;
        padding-left: 200px;
    }

    .section {
        padding: 8rem 3% 4rem;
    }

    .hero {
        padding: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1.5rem;
    }

    .btn {
        width: 100%;
    }

    .portfolio-header,
    .portfolio-grid,
    .contact-container {
        padding: 0 2rem;
    }

    .portfolio-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .hero-image {
        width: 25rem;
        height: 25rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* استایل برای لینک‌های منو */
.menu-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* در نسخه موبایل */
@media (max-width: 768px) {
    .mobile-menu .menu-item {
        padding: 1.5rem 2rem;
    }
    
    .mobile-menu .menu-link {
        padding: 0;
    }
}