/* ================= متغیرها و تم‌ها ================= */
:root {
    --bg-main: #030712;
    --bg-card: #0b1329;
    --bg-card-hover: #111c3a;
    --bg-element: #131f3d;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.45);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --gradient-blue: linear-gradient(135deg, #2563eb, #1d4ed8);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --modal-bg: rgba(11, 19, 41, 0.85);
}

[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-element: #e2e8f0;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.25);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.08);
    --gradient-blue: linear-gradient(135deg, #2563eb, #3b82f6);
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --modal-bg: rgba(255, 255, 255, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.layout-container {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= سایدبار ================= */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
    overflow-y: auto;
}

.sidebar-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo i {
    color: var(--primary);
}

/* جایگزینی دکمه تم با منوی همبرگری در هدر سایدبار */
.theme-toggle-btn {
    background-color: var(--bg-element);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.theme-toggle-btn:hover {
    background-color: var(--primary);
    color: #fff;
}

.profile-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1.2rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.profile-role {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.profile-location {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-element);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.social-btn:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--bg-element);
    padding: 1rem 0.6rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
}

.stat-title {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.download-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 16px;
    background: var(--gradient-blue);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px var(--primary-glow);
    font-weight: 700;
}

/* ================= محتوای اصلی ================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* هیرو بنر با عکس ۳ بعدی لپ‌تاپ بدون پس‌زمینه */
.hero-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 3.5rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    min-height: 380px;
}

.hero-text-side {
    max-width: 55%;
    z-index: 2;
}

.hero-badge {
    background-color: var(--bg-element);
    color: var(--primary);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1.2rem;
    border: 1px solid var(--border-color);
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary,
.btn-outline {
    padding: 0.85rem 1.8rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
}

.btn-primary {
    background: var(--gradient-blue);
    color: #fff;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-element);
}

/* تصویر لپ‌تاپ ۳ بعدی با انیمیشن شناور */
.hero-image-side {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 48%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-3d-img {
    width: 80%;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.6));
    animation: float3D 5s ease-in-out infinite;
}

.hero-glow-bg {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--primary-glow);
    filter: blur(90px);
    border-radius: 50%;
    z-index: 0;
}

@keyframes float3D {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(1.5deg);
    }
}

/* ================= شبکه بنتو ================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bento-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.box-title {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.box-title i {
    color: var(--primary);
}

/* مهارت‌ها */
.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.skill-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--bg-element);
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: var(--gradient-blue);
    border-radius: 10px;
}

/* اسلایدرها (پروژه‌ها، تجربیات، نظرات) */
.slider-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.slide-item {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.slide-item.active {
    display: block;
    opacity: 1;
}

.project-card-img {
    width: 100%;
    height: 190px;
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.project-name {
    font-size: 1.15rem;
    font-weight: 800;
}

.project-tag {
    background: var(--bg-element);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg-element);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    width: 22px;
    border-radius: 10px;
    background: var(--primary);
}

.quote-icon {
    font-size: 1.8rem;
    color: var(--primary);
    opacity: 0.7;
    margin-bottom: 0.6rem;
}

.quote-text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    min-height: 80px;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.client-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.client-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.client-role {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ================= سیستم مودال اختصاصی (Modal) ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.modal-close-btn:hover {
    background: var(--primary);
    color: #fff;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.modal-body {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 0.95rem;
}

.modal-body p {
    margin-bottom: 1.2rem;
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.chip {
    background: var(--bg-element);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

/* ================= واکنش‌گرایی ================= */
@media (max-width: 1024px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .hero-card {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .hero-text-side {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-side {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 85%;
        margin-top: 2rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }
}