/* ===========================================================
   Resume_v4 — «شرکتی نواری فیروزه‌ای» (Corporate Teal Band)
   Solid teal header band + clean two-column body. Prefix: resume4-
   =========================================================== */

.resume4-root {
    --r4-teal: #0d9488;
    --r4-teal-2: #14b8a6;
    --r4-teal-dark: #0f766e;
    --r4-ink: #1e293b;
    --r4-ink-soft: #334155;
    --r4-muted: #64748b;
    --r4-line: #e2e8f0;
    --r4-bg: #eef2f5;
    --r4-box: #f6f8fa;
    --r4-white: #fff;
    --r4-radius: 14px;
    font-family: 'Vazirmatn', Vazir, Tahoma, sans-serif;
    background: var(--r4-bg);
    color: var(--r4-ink);
    line-height: 1.9;
    direction: rtl;
    padding: 32px 16px 60px;
}

.resume4-root *,
.resume4-root *::before,
.resume4-root *::after {
    box-sizing: border-box;
}

.resume4-cv {
    max-width: 1040px;
    margin: 0 auto;
    background: var(--r4-white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px -34px rgba(15, 23, 42, .35);
}

/* ===== Header band ===== */
.resume4-band {
    position: relative;
    background: linear-gradient(120deg, var(--r4-teal) 0%, var(--r4-teal-2) 100%);
    color: #fff;
    padding: 44px 46px;
    overflow: hidden;
}

.resume4-band::before {
    content: '';
    position: absolute;
    top: -70px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.resume4-band::after {
    content: '';
    position: absolute;
    bottom: -90px;
    right: 8%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.resume4-band-in {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 34px;
    flex-wrap: wrap;
}

.resume4-photo {
    width: 134px;
    height: 134px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, .4);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35);
}

.resume4-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.resume4-band-txt {
    flex: 1;
    min-width: 250px;
}

.resume4-name {
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1.25;
    margin: 0;
}

.resume4-role {
    font-size: 1.08rem;
    font-weight: 600;
    opacity: .96;
    margin-top: 5px;
}

.resume4-role .resume4-yrs {
    background: rgba(255, 255, 255, .22);
    padding: 2px 13px;
    border-radius: 30px;
    margin-right: 8px;
    font-size: .85rem;
    font-weight: 700;
    white-space: nowrap;
}

.resume4-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.resume4-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .16);
    padding: 7px 14px;
    border-radius: 30px;
    font-size: .82rem;
    color: #fff;
    text-decoration: none;
    transition: background .2s;
}

.resume4-chip:hover {
    background: rgba(255, 255, 255, .28);
    color: #fff;
}

.resume4-chip i {
    font-size: .82rem;
}

.resume4-dl {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    background: #fff;
    color: var(--r4-teal-dark);
    font-weight: 800;
    padding: 12px 26px;
    border-radius: 12px;
    text-decoration: none;
    font-size: .92rem;
    box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .35);
    transition: transform .22s, box-shadow .22s;
    cursor: pointer;
}

.resume4-dl:hover {
    transform: translateY(-3px);
    color: var(--r4-teal-dark);
    box-shadow: 0 18px 34px -10px rgba(0, 0, 0, .4);
}

/* ===== Body two-column ===== */
.resume4-body {
    padding: 44px 46px;
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 42px;
    align-items: start;
}

.resume4-sec {
    margin-bottom: 34px;
}

.resume4-sec:last-child {
    margin-bottom: 0;
}

.resume4-sec-h {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 1.18rem;
    font-weight: 900;
    color: var(--r4-ink);
    margin-bottom: 20px;
}

.resume4-sec-h .resume4-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--r4-teal), var(--r4-teal-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}

.resume4-summary {
    color: var(--r4-muted);
    font-size: .94rem;
    text-align: justify;
    line-height: 2.1;
}

/* ===== Boxed cards (experience / education) ===== */
.resume4-card {
    background: var(--r4-box);
    border: 1px solid var(--r4-line);
    border-right: 4px solid var(--r4-teal);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 22px -18px rgba(15, 23, 42, .5);
}

.resume4-card:last-child {
    margin-bottom: 0;
}

.resume4-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.resume4-card-role {
    font-weight: 800;
    font-size: 1rem;
    color: var(--r4-ink);
}

.resume4-card-date {
    font-size: .76rem;
    color: var(--r4-teal-dark);
    background: rgba(13, 148, 136, .1);
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 700;
}

.resume4-card-org {
    color: var(--r4-teal);
    font-weight: 700;
    font-size: .9rem;
    margin-top: 3px;
}

.resume4-card-loc {
    color: var(--r4-muted);
    font-size: .8rem;
    margin-right: 6px;
    font-weight: 500;
}

.resume4-card-desc {
    color: var(--r4-muted);
    font-size: .87rem;
    margin-top: 8px;
    text-align: justify;
}

/* ===== Skills ===== */
.resume4-skill {
    margin-bottom: 14px;
}

.resume4-skill .resume4-skill-lbl {
    display: flex;
    justify-content: space-between;
    font-size: .84rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--r4-ink-soft);
}

.resume4-skill .resume4-skill-pct {
    color: var(--r4-teal);
    font-weight: 700;
}

.resume4-skill .resume4-track {
    height: 8px;
    background: #e6ecef;
    border-radius: 8px;
    overflow: hidden;
}

.resume4-skill .resume4-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--r4-teal), var(--r4-teal-2));
}

/* ===== Languages ===== */
.resume4-langs {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.resume4-lng {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .86rem;
    padding: 8px 0;
    border-bottom: 1px dashed var(--r4-line);
}

.resume4-lng:last-child {
    border-bottom: none;
}

.resume4-lng .resume4-pill {
    font-size: .72rem;
    background: rgba(13, 148, 136, .1);
    color: var(--r4-teal-dark);
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}

/* ===== Certifications ===== */
.resume4-certs {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.resume4-cert {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px 15px;
    border-radius: 12px;
    background: var(--r4-box);
    border: 1px solid var(--r4-line);
}

.resume4-cert i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--r4-teal), var(--r4-teal-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .95rem;
}

.resume4-cert .resume4-cert-name {
    font-weight: 700;
    font-size: .86rem;
    color: var(--r4-ink);
}

.resume4-cert .resume4-cert-meta {
    font-size: .76rem;
    color: var(--r4-muted);
    margin-top: 2px;
}

/* ===== Projects ===== */
.resume4-proj {
    background: var(--r4-box);
    border: 1px solid var(--r4-line);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 13px;
}

.resume4-proj:last-child {
    margin-bottom: 0;
}

.resume4-proj-name {
    font-weight: 800;
    font-size: .94rem;
    color: var(--r4-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resume4-proj-name i {
    color: var(--r4-teal);
    font-size: .85rem;
}

.resume4-proj-desc {
    color: var(--r4-muted);
    font-size: .85rem;
    margin-top: 6px;
    text-align: justify;
}

.resume4-proj-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: var(--r4-teal-dark);
    font-weight: 700;
    font-size: .8rem;
    text-decoration: none;
}

.resume4-proj-link:hover {
    text-decoration: underline;
    color: var(--r4-teal-dark);
}

/* ===== Interests / tags ===== */
.resume4-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resume4-tag {
    font-size: .78rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 30px;
    background: rgba(13, 148, 136, .08);
    color: var(--r4-teal-dark);
    border: 1px solid rgba(13, 148, 136, .18);
}

/* ===== Floating download button ===== */
.resume4-fab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 50;
    background: linear-gradient(135deg, var(--r4-teal), var(--r4-teal-2));
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 16px 34px -12px rgba(13, 148, 136, .7);
    display: inline-flex;
    gap: 8px;
    align-items: center;
    text-decoration: none;
}

.resume4-fab:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
    .resume4-body {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .resume4-name {
        font-size: 1.85rem;
    }

    .resume4-band {
        padding: 36px 26px;
    }

    .resume4-body {
        padding: 34px 26px;
    }
}

/* ===== Print (Save as PDF) ===== */
@media print {
    .resume4-root {
        background: #fff;
        padding: 0;
    }

    .resume4-fab {
        display: none !important;
    }

    .resume4-cv {
        box-shadow: none;
        max-width: 100%;
        border-radius: 0;
    }

    .resume4-band {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .resume4-card,
    .resume4-cert,
    .resume4-proj {
        break-inside: avoid;
    }
}
.resume4-root {overflow-wrap:anywhere;}
.resume4-body > *, .resume4-band-in > *, .resume4-skill-lbl > *, .resume4-cert > * {min-width:0;}
.resume4-card-date, .resume4-yrs {white-space:normal;}
.resume4-skill-lbl {gap:8px;flex-wrap:wrap;}
.resume4-demo-note {max-width:1000px;margin:0 auto 18px;color:#475569;}
.resume4-dl {font-family:inherit;cursor:pointer;border:0;}
.resume4-dl:focus-visible {outline:3px solid #087f8c;outline-offset:4px;}
@media print {
 @page {size:A4;margin:12mm;}
 body:has(.resume4-root) > :not(.page-card-shell):not(script):not(style):not(link) {display:none!important;}
 body:has(.resume4-root) .page-card-shell {display:block;border:0;}
 .resume4-dl,.resume4-demo-note {display:none!important;}
 .resume4-cv {overflow:visible;}
 .resume4-body {display:block;padding:4mm 0;}
 .resume4-band {padding:4mm;background:white;}
 .resume4-band * {color:#111!important;}
 .resume4-root p {font-size:10pt;line-height:1.6;orphans:3;widows:3;}
 .resume4-root [data-row-index] {break-inside:avoid;}
 .resume4-sec-h {break-after:avoid;}
}
