/* ============================================================
   Resume_v1 — «سایدبار اجرایی (سرمه‌ای و طلایی)»
   Executive two-column CV. Dark navy sidebar (right) + light main column.
   Gold accents. Print/ATS friendly. All classes prefixed .resume1-
   ============================================================ */

.resume1-root {
    --r1-ink: #1e293b;
    --r1-ink-soft: #334155;
    --r1-muted: #64748b;
    --r1-line: #e2e8f0;
    --r1-side: #16243b;
    --r1-side-soft: #1e3050;
    --r1-gold: #c9a24a;
    --r1-gold-soft: #e6cf95;
    --r1-bg: #eef1f5;
    --r1-white: #ffffff;
    --r1-accent: #0f766e;
    --r1-radius: 14px;

    background: var(--r1-bg);
    color: var(--r1-ink);
    font-family: Vazir, 'Vazirmatn', Tahoma, sans-serif;
    line-height: 1.9;
    padding: 32px 16px 80px;
    direction: rtl;
}

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

.resume1-cv {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--r1-white);
    border-radius: var(--r1-radius);
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(15, 23, 42, .35);
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
}

.resume1-cv > *, .resume1-cert > *, .resume1-contact-row > * { min-width: 0; }
.resume1-root { overflow-wrap: anywhere; }
.resume1-demo-note { max-width: 1000px; margin: 0 auto 18px; color: #475569; font-size: .85rem; }
.resume1-dl { border: 0; width: 100%; font-family: inherit; }
.resume1-dl:focus-visible, .resume1-root a:focus-visible { outline: 3px solid #c9a24a; outline-offset: 4px; }
.resume1-lang, .resume1-lbl { gap: 12px; flex-wrap: wrap; }
.resume1-tl-date { max-width: 100%; white-space: normal !important; }

/* ===== Sidebar ===== */
.resume1-side {
    background: linear-gradient(180deg, var(--r1-side), var(--r1-side-soft));
    color: #cbd5e1;
    padding: 44px 30px;
}

.resume1-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 22px;
    overflow: hidden;
    border: 4px solid rgba(201, 162, 74, .55);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .04);
}

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

.resume1-name {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
    margin: 0;
}

.resume1-role {
    text-align: center;
    color: var(--r1-gold-soft);
    font-weight: 600;
    font-size: .95rem;
    margin-top: 4px;
    margin-bottom: 10px;
}

.resume1-years {
    display: block;
    text-align: center;
    color: #cbd5e1;
    font-size: .8rem;
    margin-bottom: 20px;
}

.resume1-years span {
    background: rgba(201, 162, 74, .16);
    border: 1px solid rgba(201, 162, 74, .4);
    color: var(--r1-gold-soft);
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
}

.resume1-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--r1-gold);
    color: #16243b;
    font-weight: 800;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: .9rem;
    margin-bottom: 28px;
    transition: .25s;
    cursor: pointer;
}

.resume1-dl:hover {
    background: var(--r1-gold-soft);
    transform: translateY(-2px);
    color: #16243b;
}

.resume1-sblock {
    margin-bottom: 26px;
}

.resume1-stitle {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    letter-spacing: .3px;
    padding-bottom: 9px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.resume1-stitle i {
    color: var(--r1-gold);
}

.resume1-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: .83rem;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.resume1-contact-row i {
    color: var(--r1-gold);
    width: 16px;
    text-align: center;
    margin-top: 5px;
    flex-shrink: 0;
}

.resume1-contact-row a,
.resume1-contact-row span {
    color: #cbd5e1;
    text-decoration: none;
    word-break: break-word;
}

.resume1-contact-row a:hover {
    color: var(--r1-gold-soft);
}

.resume1-skill {
    margin-bottom: 13px;
}

.resume1-skill .resume1-lbl {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    margin-bottom: 5px;
}

.resume1-skill .resume1-bar {
    height: 6px;
    background: rgba(255, 255, 255, .1);
    border-radius: 6px;
    overflow: hidden;
}

.resume1-skill .resume1-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--r1-gold), var(--r1-gold-soft));
    border-radius: 6px;
}

.resume1-lang {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .83rem;
    padding: 7px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .1);
}

.resume1-lang:last-child {
    border: none;
}

.resume1-lang .resume1-langlevel {
    color: var(--r1-gold-soft);
    font-size: .78rem;
    font-weight: 600;
}

.resume1-tag {
    display: inline-block;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #e2e8f0;
    font-size: .76rem;
    padding: 5px 12px;
    border-radius: 20px;
    margin: 0 0 7px 7px;
}

/* ===== Main ===== */
.resume1-main {
    padding: 46px 42px;
}

.resume1-mhead {
    margin-bottom: 30px;
}

.resume1-mhead .resume1-hello {
    color: var(--r1-accent);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 1px;
}

.resume1-pagetitle {
    font-size: 2rem;
    font-weight: 900;
    color: var(--r1-ink);
    margin: 2px 0 14px;
    line-height: 1.3;
}

.resume1-summary {
    color: var(--r1-muted);
    font-size: .95rem;
    text-align: justify;
    line-height: 2.1;
}

.resume1-summary p {
    margin: 0 0 10px;
}

.resume1-mblock {
    margin-top: 34px;
}

.resume1-mtitle {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--r1-ink);
    margin-bottom: 22px;
}

.resume1-mtitle .resume1-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--r1-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.resume1-tl {
    position: relative;
    padding-right: 26px;
    border-right: 2px solid var(--r1-line);
}

.resume1-tl-item {
    position: relative;
    padding-bottom: 26px;
}

.resume1-tl-item:last-child {
    padding-bottom: 0;
}

.resume1-tl-item::before {
    content: '';
    position: absolute;
    right: -33px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--r1-white);
    border: 3px solid var(--r1-accent);
}

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

.resume1-tl-role {
    font-weight: 800;
    font-size: 1rem;
    color: var(--r1-ink);
}

.resume1-tl-org {
    color: var(--r1-accent);
    font-weight: 600;
    font-size: .9rem;
}

.resume1-tl-date {
    font-size: .78rem;
    color: var(--r1-muted);
    background: var(--r1-bg);
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.resume1-tl-loc {
    font-size: .78rem;
    color: var(--r1-muted);
    margin-top: 3px;
}

.resume1-tl-loc i {
    color: var(--r1-gold);
    margin-left: 4px;
}

.resume1-tl-desc {
    color: var(--r1-muted);
    font-size: .88rem;
    margin-top: 7px;
    text-align: justify;
}

.resume1-certs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.resume1-cert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--r1-bg);
    border-radius: 11px;
    border-right: 3px solid var(--r1-gold);
}

.resume1-cert i {
    color: var(--r1-gold);
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.resume1-cert .resume1-cname {
    font-weight: 700;
    font-size: .86rem;
}

.resume1-cert .resume1-cmeta {
    font-size: .76rem;
    color: var(--r1-muted);
}

/* ===== Projects ===== */
.resume1-proj {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.resume1-proj-item {
    padding: 16px 18px;
    background: var(--r1-bg);
    border-radius: 11px;
    border-right: 3px solid var(--r1-accent);
}

.resume1-proj-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.resume1-proj-name {
    font-weight: 800;
    font-size: .95rem;
    color: var(--r1-ink);
}

.resume1-proj-link {
    color: var(--r1-accent);
    font-size: .8rem;
    text-decoration: none;
    font-weight: 600;
}

.resume1-proj-link:hover {
    text-decoration: underline;
}

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

/* ===== Floating download FAB ===== */
.resume1-fab {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 50;
    background: var(--r1-side);
    color: #fff;
    border: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, .5);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.resume1-fab i {
    color: var(--r1-gold-soft);
}

.resume1-fab:hover {
    background: var(--r1-side-soft);
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
    .resume1-cv {
        grid-template-columns: 1fr;
    }

    .resume1-certs {
        grid-template-columns: 1fr;
    }

    .resume1-main {
        padding: 36px 24px;
    }
}

/* ===== Print / A4 ===== */
@media print {
    @page { size: A4; margin: 12mm; }
    body:has(.resume1-root) > :not(.page-card-shell):not(script):not(style):not(link) { display: none !important; }
    body:has(.resume1-root) .page-card-shell { display: block; border: 0; }
    .resume1-dl, .resume1-demo-note { display: none !important; }
    .resume1-root {
        background: #fff;
        padding: 0;
    }

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

    .resume1-cv {
        box-shadow: none;
        border-radius: 0;
        max-width: 100%;
        display: block;
        overflow: visible;
    }

    .resume1-side {
        background: white;
        padding: 0 0 8mm;
        border-bottom: 1px solid #777;
        position: relative;
    }
    .resume1-main { padding: 8mm 0 0; }
    .resume1-root, .resume1-root * { color: #111 !important; text-shadow: none; box-shadow: none; }
    .resume1-avatar { width: 25mm; height: 25mm; }
    .resume1-sblock { display: inline-block; vertical-align: top; width: 48%; margin: 2mm 0; padding-inline-end: 5mm; }
    .resume1-root { font-size: 10pt; line-height: 1.5; }
    .resume1-root p, .resume1-summary, .resume1-tl-desc, .resume1-proj-desc { font-size: 10pt; line-height: 1.65; text-align: start; }
    .resume1-skill { margin-bottom: 2mm; }
    .resume1-bar { display: none; }
    .resume1-lang { padding: 1mm 0; }
    .resume1-avatar { position: absolute; top: 0; left: 0; margin: 0; }
    .resume1-name, .resume1-role, .resume1-years { margin-inline-end: 30mm; }
    .resume1-name, .resume1-role, .resume1-years { text-align: start; }
    .resume1-years { margin-bottom: 3mm; }
    .resume1-side::after { content: ''; display: block; clear: both; }
    .resume1-mblock { margin-top: 5mm; }
    .resume1-mhead { margin-bottom: 4mm; }
    .resume1-pagetitle { font-size: 18pt; margin-bottom: 3mm; }
    .resume1-mtitle { font-size: 12pt; margin-bottom: 3mm; }
    .resume1-tl-item { padding-bottom: 3mm; }
    .resume1-proj { display: block; }
    .resume1-proj-item { padding: 2mm 3mm; margin-bottom: 3mm; }
    .resume1-mtitle, .resume1-stitle, .resume1-tl-top { break-after: avoid; }
    .resume1-tl-item, .resume1-cert, .resume1-proj-item { break-inside: avoid; }
    .resume1-certs { display: block; }
    .resume1-cert { margin-bottom: 3mm; }
    .resume1-root p { orphans: 3; widows: 3; }
}
