/* ==========================================
   سینا زربخش | Portfolio Website CSS
   ========================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('./font/Vazir-Bold.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
}
/* متغیرهای رنگی */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #f59e0b;
    --dark: #0f172a;
    --dark-secondary: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-alt: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ریست */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* پس‌زمینه شکل‌ها */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, 50px) rotate(5deg); }
    50% { transform: translate(0, 100px) rotate(0deg); }
    75% { transform: translate(-50px, 50px) rotate(-5deg); }
}

/* دکمه‌ها */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
}

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

/* هدر */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    gap: 4px;
}

.logo .logo-text:last-child {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--primary); }

/* همبرگر */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 7px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }
/* هیرو سکشن */
.hero {
    min-height: 78vh;
    display: flex;
    align-items: center;
    padding: 70px 24px 40px;
    position: relative;
}
.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(99, 102, 241, 0.1);
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title { margin-bottom: 24px; }

.title-line {
    display: block;
    font-size: 24px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 8px;
}

.title-name {
    display: block;
    font-size: 50px;
    font-weight: 900;
    line-height: 1.1;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-role {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: var(--dark-secondary);
    margin-top: 8px;
}

.typewriter { color: var(--primary); }

.cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 17px;
    color: var(--gray);
    max-width: 550px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-description strong { color: var(--dark); }

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat-item { text-align: center; }

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
}

.stat-label { font-size: 14px; color: var(--gray); }

.stat-divider {
    width: 1px;
    height: 50px;
    background: #e2e8f0;
}


/* ویژوال هیرو */
.hero-visual { position: relative; }

.code-window {
    background: var(--dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #1e293b;
}

.window-dots { display: flex; gap: 8px; }

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #22c55e; }

.window-title {
    color: #94a3b8;
    font-size: 13px;
    margin-left: auto;
}

.window-content { padding: 24px; }

.window-content pre {
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.8;
}

.window-content code { color: #e2e8f0; }
.code-keyword { color: #c084fc; }
.code-variable { color: #60a5fa; }
.code-key { color: #f472b6; }
.code-string { color: #34d399; }
.code-boolean { color: #fbbf24; }
.code-function { color: #60a5fa; }

/* شناور آیکون‌ها */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    font-size: 24px;
    color: var(--primary);
    left: var(--x, 10%);
    top: var(--y, 10%);
    animation: floatIcon 4s ease-in-out var(--delay, 0s) infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* اسکرول indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 13px;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--gray);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}

/* ==========================================
   بخش‌های عمومی
   ========================================== */

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
}

.section-header h2 span { color: var(--primary); }

/* ==========================================
   درباره من
   ========================================== */
.about { background: var(--white); }
.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.about-card {
    background: var(--light);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

/* هاور - بنفش شدن */
.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    background: var(--gradient);
    color: var(--white);
}

/* آیکون در حالت عادی */
.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 16px;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
}

/* آیکون در هاور */
.about-card:hover .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.about-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}
.about-card p {
    font-size: 14px;
    opacity: 0.8;
}
.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-text p {
    color: var(--gray);
    margin-bottom: 16px;
    line-height: 1.9;
}
.about-text strong { color: var(--dark); }

/* ==========================================
   خدمات
   ========================================== */

.services { background: var(--light); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: var(--transition);
}

.service-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.service-number {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 48px;
    font-weight: 900;
    color: var(--light);
    line-height: 1;
}

.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: var(--white);
    font-size: 30px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--dark);
}

.service-card > p {
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-list { text-align: right; }

.service-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.service-list li i {
    color: var(--primary);
    font-size: 12px;
}

/* ==========================================
   نمونه کارها
   ========================================== */

.portfolio { background: var(--white); }

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: none;
    background: var(--light);
    color: var(--gray);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    border-radius: 20px;
    overflow: hidden;
    background: var(--light);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.portfolio-image {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    overflow: hidden;
}

.portfolio-placeholder {
    font-size: 60px;
    color: var(--white);
    opacity: 0.3;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-link {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    font-size: 20px;
    transform: scale(0);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-link { transform: scale(1); }

.portfolio-info {
    padding: 24px;
}

.portfolio-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.portfolio-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--dark);
}

.portfolio-info p {
    color: var(--gray);
    font-size: 14px;
}

/* ==========================================
   مهارت‌ها
   ========================================== */

.skills { background: var(--light); }

.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.skills-category { margin-bottom: 30px; }

.skills-category h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
}

.skills-category h3 i { color: var(--primary); }

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    color: var(--gray);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-3px);
}

.progress-item { margin-bottom: 24px; }

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-header span:first-child {
    font-weight: 500;
    color: var(--dark);
}

.progress-header span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
}

/* ==========================================
   تماس
   ========================================== */

.contact { background: var(--white); }

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 24px;
    border-radius: 16px;
}

.contact-details h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--dark);
}

.contact-details p {
    color: var(--gray);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    color: var(--dark);
    border-radius: 12px;
    font-size: 20px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form {
    background: var(--light);
    padding: 40px;
    border-radius: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group { margin-bottom: 20px; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    background: var(--white);
    transition: var(--transition);
    color: var(--dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray);
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    padding: 18px 32px;
}

/* ==========================================
   فوتر
   ========================================== */

.footer {
    background: var(--dark);
    padding: 60px 0 20px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    gap: 4px;
}

.footer-logo span:last-child {
    color: var(--primary);
}

.footer-content p {
    color: #94a3b8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 12px;
    font-size: 20px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #64748b;
    font-size: 14px;
}

/* ==========================================
   دکمه بازگشت به بالا
   ========================================== */

.back-to-top {
    position: fixed;
    bottom: 15px;
    left: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: var(--white);
    border-radius: 12px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border: none;
    font-size: 18px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   ریسپانسیو
   ========================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description { margin: 0 auto 32x; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-wrapper { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active { right: 0; }
    
    .title-name { font-size: 42px; }
    .title-role { font-size: 22px; }
    .hero-cta { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .stat-divider { display: none; }
    
    .about-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    
    .section-header h2 { font-size: 32px; }
}