/* ============================================================
   فایل استایل کامل - رزومه حرفه‌ای
   رنگ‌های آبی آسمانی، سفید و سرمه‌ای
   ============================================================ */

/* ===== متغیرهای رنگ (لایت مود) ===== */
:root {
    --bg-body: #f0f7ff;
    --bg-card: #ffffff;
    --bg-header: linear-gradient(145deg, #0f172a, #1e293b);
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --border-color: #dbeafe;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 0, 0, 0.02);
    --accent: #38bdf8;
    --accent-light: #7dd3fc;
    --accent-dark: #0284c7;
    --tag-bg: #e0f2fe;
    --tag-text: #0369a1;
    --card-bg: #f8fafc;
    --hover-bg: #e2e8f0;
    --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    --avatar-border: #38bdf8;
}

/* ===== دارک مود ===== */
[data-theme="dark"] {
    --bg-body: #0a1628;
    --bg-card: #141f33;
    --bg-header: linear-gradient(145deg, #0a1628, #020a1a);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #1e3a5f;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    --card-bg: #1a2a44;
    --hover-bg: #243b5e;
    --tag-bg: #0f2a4a;
    --tag-text: #7dd3fc;
    --avatar-border: #38bdf8;
}

/* ===== ریست کلی ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background var(--transition), color var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== کارت اصلی ===== */
.resume-card {
    max-width: 1100px;
    width: 100%;
    background: var(--bg-card);
    border-radius: 40px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: background var(--transition), box-shadow var(--transition);
}

/* ===== هدر ===== */
.header {
    background: var(--bg-header);
    padding: 28px 36px 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -10%;
    width: 120%;
    height: 70px;
    background: var(--bg-card);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: 0.06;
    transition: background var(--transition);
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 28px;
    position: relative;
    z-index: 2;
}

/* ===== عکس پروفایل ===== */
.profile-avatar {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--avatar-border);
    overflow: hidden;
    box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.15);
    transition: 0.3s;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar:hover {
    transform: scale(1.03);
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.25);
}

.header-info {
    flex: 1;
}

.header-info h1 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(to left, #7dd3fc, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.header-info .title {
    font-size: 0.95rem;
    font-weight: 400;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 18px;
    border-radius: 40px;
    display: inline-block;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

/* ===== دکمه‌های هدر ===== */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.header-actions button {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s;
}

.header-actions button:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
}

/* ===== اطلاعات تماس ===== */
.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    color: #e2e8f0;
    position: relative;
    z-index: 2;
}

.contact-row a {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.contact-row a i {
    color: #38bdf8;
}

.contact-row a:hover {
    color: #7dd3fc;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-right: auto;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
    font-size: 1rem;
}

.social-links a:hover {
    background: #38bdf8;
    color: #0f172a;
    transform: translateY(-3px);
}

/* ===== بدنه اصلی ===== */
.main-body {
    padding: 32px 36px 40px;
}

/* ===== درباره من ===== */
.about-section {
    background: var(--card-bg);
    padding: 18px 24px;
    border-radius: 20px;
    border-right: 6px solid var(--accent);
    margin-bottom: 30px;
    transition: background var(--transition);
}

.about-section p {
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== عنوان بخش‌ها ===== */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-title i {
    color: var(--accent);
    width: 36px;
    height: 36px;
    background: var(--tag-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.1rem;
}

/* ===== مهارت‌ها ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px 30px;
    margin-bottom: 35px;
}

.skill-item .skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.skill-item .skill-label span:last-child {
    color: var(--accent);
    font-weight: 700;
}

.progress-bg {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to left, var(--accent-light), var(--accent));
    border-radius: 20px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== تایم‌لاین ===== */
.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 35px;
}

.timeline-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    position: relative;
    padding-right: 18px;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    right: 5px;
    top: 32px;
    width: 2px;
    height: calc(100% + 10px);
    background: var(--border-color);
}

.timeline-icon {
    min-width: 44px;
    height: 44px;
    background: var(--tag-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    z-index: 2;
    border: 2px solid var(--bg-card);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.timeline-content {
    background: var(--card-bg);
    padding: 14px 20px;
    border-radius: 18px;
    flex: 1;
    transition: background var(--transition);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-content .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.timeline-content .meta i {
    margin-left: 4px;
    color: var(--accent);
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 300;
}

/* ===== گواهی‌نامه‌ها ===== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: 0.25s;
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.06);
}

.cert-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--tag-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
}

.cert-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cert-meta i {
    color: var(--accent);
    margin-left: 3px;
}

/* ===== پروژه‌ها ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.08);
    border-color: var(--accent);
}

.project-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 6px 0 10px;
    font-weight: 300;
}

.tech-tag {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 0.7rem;
    padding: 2px 12px;
    border-radius: 20px;
    margin-left: 6px;
    margin-bottom: 4px;
}

/* ===== زبان‌ها و علاقه‌مندی‌ها ===== */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 10px;
}

.lang-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.lang-badge {
    background: var(--card-bg);
    padding: 8px 22px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.lang-badge i {
    color: var(--accent);
}

.lang-badge:hover {
    background: var(--tag-bg);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.interest-tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    transition: 0.2s;
}

.interest-tag:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

/* ===== مودال بزرگنمایی عکس ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
    padding: 20px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border: 4px solid var(--accent);
    object-fit: contain;
    animation: modalImageZoom 0.4s ease;
}

@keyframes modalImageZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s ease;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
    color: #fff;
}

/* ===== انیمیشن‌ها ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.2s; }
.delay-4 { animation-delay: 0.3s; }
.delay-5 { animation-delay: 0.4s; }

/* ============================================================
   ریسپانسیو
   ============================================================ */

@media (max-width: 768px) {
    body { padding: 10px; }
    .header { padding: 20px 18px 16px; }
    .header-top { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar { width: 80px; height: 80px; }
    .header-info h1 { font-size: 1.7rem; }
    .header-actions { justify-content: center; }
    .contact-row { flex-direction: column; align-items: center; gap: 8px; }
    .social-links { margin-right: 0; justify-content: center; }
    .main-body { padding: 18px 14px 24px; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cert-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .bottom-grid { grid-template-columns: 1fr; gap: 20px; }
    .timeline-item { padding-right: 10px; gap: 12px; }
    .timeline-content { padding: 10px 14px; }
    .cert-card { padding: 12px 14px; }
    .modal-content { max-width: 95%; max-height: 80%; border-radius: 16px; }
    .close-modal { top: 20px; right: 20px; font-size: 2.2rem; width: 50px; height: 50px; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
    .header-info h1 { font-size: 1.4rem; }
    .header-actions button { font-size: 0.75rem; padding: 6px 14px; }
    .contact-row a { font-size: 0.8rem; }
    .about-section { padding: 14px 16px; }
    .section-title { font-size: 1rem; }
    .profile-avatar { width: 70px; height: 70px; }
    .cert-icon { width: 36px; height: 36px; min-width: 36px; font-size: 1rem; }
    .cert-info h5 { font-size: 0.8rem; }
    .timeline-icon { min-width: 36px; height: 36px; font-size: 0.9rem; }
    .modal-content { max-width: 98%; max-height: 70%; border-radius: 12px; }
    .close-modal { top: 15px; right: 15px; font-size: 1.8rem; width: 44px; height: 44px; }
}