/*
    ==========================================================
    تنظیمات پایه و متغیرهای اصلی پروژه
    ==========================================================
    این قسمت برای رنگ‌ها، سایه‌ها، فاصله‌ها و تنظیمات پایه استفاده می‌شود.
    برای ارتقا:
    - می‌توان تم تیره و روشن اضافه کرد
    - می‌توان متغیرهای بیشتری برای فونت و spacing تعریف کرد
*/
:root {
    --primary: #5b5ff8;
    --secondary: #ff4f81;
    --accent: #00c2a8;
    --dark: #16172b;
    --text: #4c4f63;
    --muted: #7d8195;
    --light: #f7f8ff;
    --white: #ffffff;
    --border: #eceefe;
    --shadow: 0 12px 35px rgba(33, 40, 80, 0.10);
    --radius: 20px;
    --transition: all 0.35s ease;
}

/*
    ریست اولیه برای یکدست‌سازی ظاهر
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
    اسکرول نرم بین سکشن‌ها
*/
html {
    scroll-behavior: smooth;
}

/*
    تنظیمات کلی بدنه سایت
*/
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--white);
    color: var(--text);
    line-height: 1.9;
    overflow-x: hidden;
}

/*
    تنظیم تصاویر
*/
img {
    max-width: 100%;
    display: block;
}

/*
    لینک‌ها استایل پیش‌فرض نداشته باشند
*/
a {
    text-decoration: none;
    color: inherit;
}

/*
    ظرف اصلی محتوا
*/
.container {
    width: min(92%, 1200px);
    margin: 0 auto;
}

/*
    سکشن‌های اصلی سایت
*/
.section {
    position: relative;
    padding: 110px 0;
}

/*
    تیترهای بخش‌ها
*/
.section-heading {
    max-width: 760px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-subtitle {
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-title {
    color: var(--dark);
    font-size: 2.3rem;
    line-height: 1.5;
    margin-bottom: 15px;
    font-weight: 900;
}

.section-desc {
    color: var(--muted);
    font-size: 1rem;
}

/*
    سکشن با بک‌گراند متفاوت
*/
.alt-bg {
    background: var(--light);
}

/*
    دکمه‌ها
*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 800;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 25px rgba(91, 95, 248, 0.25);
}

.btn-primary:hover {
    transform: translateY(-4px);
}

.btn-secondary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

/*
    ==========================================================
    هدر و منوی اصلی
    ==========================================================
*/
.hero {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(255, 79, 129, 0.10), transparent 25%),
        radial-gradient(circle at bottom left, rgba(91, 95, 248, 0.10), transparent 25%),
        linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/*
    منوی ناوبری
*/
.nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    transition: var(--transition);
}

.nav-wrapper.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 24px rgba(33, 40, 80, 0.08);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    position: relative;
    transition: var(--transition);
}

.nav-wrapper.scrolled .navbar {
    padding: 14px 0;
}

.nav-cta {
    padding: 11px 24px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.logo {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--dark);
}

/*
    لینک‌های منو
*/
.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
}

.nav-links a {
    position: relative;
    color: var(--dark);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -7px;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/*
    دکمه منوی موبایل
*/
.menu-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/*
    محتوای هدر
*/
.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
    padding: 50px 0 80px;
}

/*
    متن هدر
*/
.hero-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(91, 95, 248, 0.10);
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-text h1 {
    color: var(--dark);
    font-size: 3.2rem;
    line-height: 1.5;
    margin-bottom: 18px;
    font-weight: 900;
}

.hero-text h1 span {
    color: var(--primary);
}

.hero-text p {
    max-width: 620px;
    color: var(--muted);
    margin-bottom: 28px;
    font-size: 1.03rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/*
    تک‌استک کوچک و شبکه‌های اجتماعی در هرو
*/
.hero-stack {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 18px;
    padding: 0;
}

.hero-stack li {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--dark);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.hero-social {
    display: flex;
    gap: 12px;
}

.hero-social a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--dark);
    transition: var(--transition);
}

.hero-social a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/*
    تصویر پروفایل
*/
.profile-wrapper {
    display: flex;
    justify-content: center;
}

.profile-card {
    width: 380px;
    max-width: 100%;
    padding: 18px;
    background: var(--white);
    border-radius: 35px;
    box-shadow: var(--shadow);
    transform: rotate(-4deg);
    position: relative;
}

.profile-card::before {
    content: "";
    position: absolute;
    inset: -12px;
    border: 2px dashed rgba(91, 95, 248, 0.18);
    border-radius: 40px;
    z-index: -1;
}

.profile-card img {
    border-radius: 26px;
    width: 100%;
    object-fit: cover;
}

.hero-resume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 26px auto 0;
    width: fit-content;
}

/*
    ==========================================================
    جداکننده زیگزاگی بین بخش‌ها
    ==========================================================
    برای ایجاد حس بصری مدرن و متفاوت استفاده می‌شود.
    برای ارتقا:
    - می‌توان از SVG divider حرفه‌ای استفاده کرد
*/
.zigzag-section::before,
.zigzag-section::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 32px;
    background:
        linear-gradient(-45deg, transparent 16px, var(--white) 0),
        linear-gradient(45deg, transparent 16px, var(--white) 0);
    background-size: 32px 32px;
}

.zigzag-section::before {
    top: -1px;
}

.zigzag-section::after {
    bottom: -1px;
    transform: rotate(180deg);
}

/*
    ==========================================================
    بخش درباره من
    ==========================================================
*/
.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 45px;
    align-items: center;
}

.about-visual-card {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-shape {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    filter: blur(0px);
    box-shadow: 0 25px 60px rgba(91, 95, 248, 0.20);
}

.about-badge-card {
    position: absolute;
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 85%;
    max-width: 320px;
}

.about-badge-card h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.about-badge-card p {
    color: var(--secondary);
    font-weight: 800;
    margin-bottom: 8px;
}

.about-badge-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.info-box {
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 18px;
}

.info-box strong {
    display: block;
    color: var(--dark);
    margin-bottom: 6px;
}

.info-box span {
    color: var(--muted);
}

/*
    ==========================================================
    بخش تک‌استک (مهارت‌ها)
    ==========================================================
*/
.stack-wrapper {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.stack-group {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.stack-group h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.stack-group h3 i {
    color: var(--primary);
}

.stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-tags span {
    background: var(--light);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
}

/*
    ==========================================================
    بخش رزومه و تایم‌لاین
    ==========================================================
*/
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: "";
    position: absolute;
    right: 26px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 999px;
}

.timeline-item {
    position: relative;
    padding-right: 80px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    right: 14px;
    top: 16px;
    width: 26px;
    height: 26px;
    background: var(--white);
    border: 6px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.timeline-content h3 {
    color: var(--dark);
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.timeline-content span {
    display: inline-block;
    color: var(--secondary);
    font-weight: 800;
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--muted);
}

/*
    ==========================================================
    بخش کارت‌های خدمات
    ==========================================================
*/
.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 32px 26px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
}

.service-card i {
    font-size: 2.1rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.service-card h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--muted);
    margin-bottom: 16px;
}

.service-list {
    list-style: none;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-list li {
    position: relative;
    padding-right: 22px;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.service-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 3px;
    font-size: 0.75rem;
    color: var(--accent);
}

.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
    transition: var(--transition);
}

.service-cta i {
    font-size: 0.85rem;
    margin: 0;
    color: inherit;
}

.service-cta:hover {
    gap: 12px;
    color: var(--secondary);
}

/*
    ==========================================================
    فرآیند همکاری
    ==========================================================
*/
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.process-step {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px 18px;
    text-align: center;
}

.process-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 10px;
}

.process-step h3 {
    color: var(--dark);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.process-step p {
    color: var(--muted);
    font-size: 0.9rem;
}

/*
    ==========================================================
    بخش پروژه‌ها
    ==========================================================
*/
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.filter-btn {
    font-family: inherit;
    border: none;
    background: #edf0ff;
    color: var(--dark);
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: var(--shadow);
    background: var(--white);
}

.project-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22, 23, 43, 0.92), rgba(22, 23, 43, 0.18));
    color: var(--white);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-overlay h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.project-tags span {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

/*
    ==========================================================
    بخش تماس و فوتر
    ==========================================================
*/
.contact-box {
    text-align: center;
    background: linear-gradient(180deg, #fbfbff, #f3f5ff);
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 60px 30px;
}

/*
    فرم درخواست پروژه
*/
.project-form {
    max-width: 720px;
    margin: 36px auto 0;
    text-align: right;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    transition: var(--transition);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 95, 248, 0.15);
}

.form-field textarea {
    resize: vertical;
}

.form-status {
    min-height: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-status.success {
    color: var(--accent);
}

.form-status.error {
    color: var(--secondary);
}

.form-note {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 12px;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/*
    ==========================================================
    فوتر
    ==========================================================
*/
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 40px;
    text-align: right;
}

.footer-brand .logo {
    color: var(--white);
    display: block;
    margin-bottom: 12px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer strong {
    color: #ffffff;
}

/*
    ==========================================================
    انیمیشن هنگام اسکرول
    ==========================================================
*/
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/*
    ==========================================================
    واکنش‌گرایی
    ==========================================================
    این بخش باعث می‌شود سایت در تبلت و موبایل درست نمایش داده شود.
*/
@media (max-width: 992px) {

    .hero-content,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 78px;
        right: 0;
        width: 240px;
        background: var(--white);
        padding: 20px;
        border-radius: 18px;
        box-shadow: var(--shadow);
        flex-direction: column;
        gap: 14px;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-text h1 {
        font-size: 2.6rem;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-stack {
        justify-content: center;
    }

    .process-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stack-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 85px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .hero-text h1 {
        font-size: 2.1rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        right: 18px;
    }

    .timeline-item {
        padding-right: 58px;
    }

    .timeline-dot {
        right: 6px;
    }

    .profile-card {
        width: 100%;
    }

    .process-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col a {
        margin-bottom: 8px;
    }

    .contact-actions {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* دکمه */
#backToTop {
    position: fixed;
    bottom: 25px;
    left: 25px;

    width: 58px;
    height: 58px;

    border: none;
    border-radius: 50%;

    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(10px);

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transform: translateY(20px);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        background 0.3s ease;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);

    z-index: 9999;
}

