/* =========================================================
   Resume_v20 — رزومه «لاکچری تیره طلایی»
   Centered serif editorial CV on a dark luxury sheet.
   Dark #0c0c0e / #14141a, gold #caa667 -> #f0d9a0 thin accents.
   All classes prefixed resume20-.
   ========================================================= */

.resume20-root {
    --r20-bg: #0c0c0e;
    --r20-sheet: #14141a;
    --r20-sheet2: #191920;
    --r20-line: #2b2b34;
    --r20-ink: #ece7df;
    --r20-mut: #9a948a;
    --r20-gold: #caa667;
    --r20-gold-lite: #f0d9a0;
    --r20-serif: Georgia, "Times New Roman", "Iran Nastaliq", serif;
    --r20-sans: Vazir, IRANYekan, Tahoma, sans-serif;

    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(202,166,103,.10), transparent 60%),
        var(--r20-bg);
    color: var(--r20-ink);
    font-family: var(--r20-sans);
    direction: rtl;
    padding: 46px 18px 90px;
    margin: 0;
    min-height: 100%;
}

.resume20-sheet {
    max-width: 920px;
    margin: 0 auto;
    background: var(--r20-sheet);
    border: 1px solid var(--r20-line);
    border-radius: 4px;
    box-shadow: 0 40px 100px rgba(0,0,0,.55);
    padding: 56px 60px 64px;
    position: relative;
}
.resume20-sheet::before,
.resume20-sheet::after {
    content: "";
    position: absolute;
    width: 26px; height: 26px;
    border: 1px solid var(--r20-gold);
    opacity: .55;
}
.resume20-sheet::before { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.resume20-sheet::after  { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }

/* ===== Masthead ===== */
.resume20-masthead {
    text-align: center;
    position: relative;
    padding-bottom: 30px;
    margin-bottom: 18px;
}
.resume20-monogram {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.resume20-monogram span {
    font-family: var(--r20-serif);
    font-size: 210px;
    font-weight: 700;
    line-height: 1;
    color: var(--r20-gold);
    opacity: .045;
    white-space: nowrap;
    letter-spacing: -6px;
}
.resume20-photo {
    position: relative;
    z-index: 1;
    width: 132px; height: 132px;
    margin: 0 auto 18px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(145deg, var(--r20-gold-lite), var(--r20-gold) 55%, #8a6f3e);
}
.resume20-photo img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--r20-sheet);
}
.resume20-name {
    position: relative;
    z-index: 1;
    font-family: var(--r20-serif);
    font-size: 2.7rem;
    font-weight: 700;
    letter-spacing: .5px;
    margin: 0 0 14px;
    color: #fff;
}
.resume20-rule {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 14px;
    margin: 0 auto 14px;
    max-width: 300px;
}
.resume20-rule span {
    height: 1px; flex: 1;
    background: linear-gradient(90deg, transparent, var(--r20-gold));
}
.resume20-rule span:last-child {
    background: linear-gradient(90deg, var(--r20-gold), transparent);
}
.resume20-rule i { color: var(--r20-gold); font-size: .8rem; }
.resume20-role {
    position: relative; z-index: 1;
    color: var(--r20-gold-lite);
    font-size: 1.06rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
}
.resume20-years {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 14px;
    padding: 6px 18px;
    border: 1px solid var(--r20-line);
    border-radius: 50px;
    color: var(--r20-mut);
    font-size: .85rem;
}
.resume20-years i { color: var(--r20-gold); font-size: .8rem; }

.resume20-contact {
    position: relative; z-index: 1;
    list-style: none;
    margin: 24px auto 26px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    max-width: 760px;
}
.resume20-contact li {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--r20-mut);
    font-size: .86rem;
}
.resume20-contact li i { color: var(--r20-gold); font-size: .8rem; }
.resume20-contact a { color: var(--r20-mut); text-decoration: none; }
.resume20-contact a:hover { color: var(--r20-gold-lite); }

.resume20-dl {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 30px;
    border: 1px solid var(--r20-gold);
    border-radius: 2px;
    color: var(--r20-gold-lite);
    background: transparent;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background .25s, color .25s, box-shadow .25s;
}
.resume20-dl:hover {
    background: linear-gradient(135deg, var(--r20-gold), #b08f50);
    color: #1a140a;
    box-shadow: 0 10px 30px rgba(202,166,103,.28);
}

/* ===== Sections ===== */
.resume20-section {
    margin-top: 40px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s ease;
}
.resume20-section.resume20-in { opacity: 1; transform: none; }

.resume20-shead {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 26px;
}
.resume20-srule {
    height: 1px; flex: 1;
    background: linear-gradient(90deg, transparent, var(--r20-line));
}
.resume20-srule:last-child {
    background: linear-gradient(90deg, var(--r20-line), transparent);
}
.resume20-shead h2 {
    font-family: var(--r20-serif);
    font-size: 1.42rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    display: inline-flex; align-items: center; gap: 10px;
}
.resume20-shead h2 i { color: var(--r20-gold); font-size: 1rem; }

.resume20-summary {
    text-align: center;
    color: var(--r20-mut);
    line-height: 2.25;
    font-size: 1rem;
    max-width: 720px;
    margin: 0 auto;
}
.resume20-summary p { margin: 0 0 10px; }

/* ===== Entries (experience / education) ===== */
.resume20-entries { display: flex; flex-direction: column; gap: 26px; }
.resume20-entry {
    display: grid;
    grid-template-columns: 150px 1px 1fr;
    gap: 22px;
    align-items: start;
}
.resume20-entry::after {
    content: "";
    grid-column: 2;
    grid-row: 1;
    width: 1px;
    align-self: stretch;
    background: linear-gradient(180deg, var(--r20-gold), transparent);
    justify-self: center;
}
.resume20-entry-period {
    text-align: left;
    color: var(--r20-gold-lite);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding-top: 3px;
    direction: ltr;
}
.resume20-entry-body { min-width: 0; }
.resume20-entry-role {
    font-family: var(--r20-serif);
    font-size: 1.18rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px;
}
.resume20-entry-org {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 9px;
}
.resume20-org-name { color: var(--r20-gold); font-size: .94rem; font-weight: 600; }
.resume20-org-loc { color: var(--r20-mut); font-size: .82rem; display: inline-flex; align-items: center; gap: 5px; }
.resume20-org-loc i { color: var(--r20-gold); font-size: .75rem; }
.resume20-entry-desc { color: var(--r20-mut); line-height: 2.05; font-size: .92rem; margin: 0; }

/* ===== Skills ===== */
.resume20-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 36px;
}
.resume20-skill-lbl {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 8px;
    font-size: .9rem;
    color: var(--r20-ink);
}
.resume20-skill-lbl span:last-child { color: var(--r20-gold-lite); font-size: .8rem; }
.resume20-skill-track {
    height: 3px;
    background: var(--r20-line);
    border-radius: 50px;
    overflow: hidden;
}
.resume20-skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #8a6f3e, var(--r20-gold) 60%, var(--r20-gold-lite));
    border-radius: 50px;
}

/* ===== Languages ===== */
.resume20-langs {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 14px;
}
.resume20-lang {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 22px;
    border: 1px solid var(--r20-line);
    border-radius: 2px;
    background: var(--r20-sheet2);
}
.resume20-lang-name { color: var(--r20-ink); font-size: .92rem; font-weight: 600; }
.resume20-lang-level { color: var(--r20-gold); font-size: .8rem; }

/* ===== Certifications ===== */
.resume20-certs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.resume20-cert {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid var(--r20-line);
    border-radius: 2px;
    background: var(--r20-sheet2);
}
.resume20-cert > i {
    color: var(--r20-gold);
    font-size: 1.1rem;
    margin-top: 2px;
}
.resume20-cert-name { color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: 3px; }
.resume20-cert-meta { color: var(--r20-mut); font-size: .8rem; }

/* ===== Projects ===== */
.resume20-projects { display: flex; flex-direction: column; gap: 16px; }
.resume20-project {
    padding: 18px 22px;
    border: 1px solid var(--r20-line);
    border-right: 2px solid var(--r20-gold);
    border-radius: 2px;
    background: var(--r20-sheet2);
}
.resume20-project-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    margin-bottom: 7px;
}
.resume20-project-name {
    font-family: var(--r20-serif);
    color: #fff; font-size: 1.05rem; font-weight: 700;
}
.resume20-project-link {
    color: var(--r20-gold-lite); font-size: .8rem; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
}
.resume20-project-link:hover { color: var(--r20-gold); }
.resume20-project-desc { color: var(--r20-mut); line-height: 2; font-size: .9rem; margin: 0; }

/* ===== Interests ===== */
.resume20-interests {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 12px;
}
.resume20-tag {
    padding: 8px 20px;
    border: 1px solid var(--r20-gold);
    border-radius: 50px;
    color: var(--r20-gold-lite);
    font-size: .85rem;
    background: rgba(202,166,103,.05);
}

/* ===== Floating download FAB ===== */
.resume20-fab {
    position: fixed;
    bottom: 26px; left: 26px;
    z-index: 9000;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--r20-gold), #b08f50);
    color: #1a140a;
    text-decoration: none;
    font-weight: 700;
    font-size: .88rem;
    border-radius: 50px;
    box-shadow: 0 14px 34px rgba(202,166,103,.35);
    cursor: pointer;
}
.resume20-fab:hover { filter: brightness(1.06); color: #1a140a; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
    .resume20-root { padding: 22px 8px 80px; }
    .resume20-sheet { padding: 36px 20px 44px; }
    .resume20-name { font-size: 2rem; }
    .resume20-monogram span { font-size: 130px; }
    .resume20-entry { grid-template-columns: 1fr; gap: 8px; }
    .resume20-entry::after { display: none; }
    .resume20-entry-period { text-align: right; }
    .resume20-skills,
    .resume20-certs { grid-template-columns: 1fr; }
    .resume20-fab { left: 14px; bottom: 16px; padding: 11px 18px; }
}

/* ===== Print (A4) ===== */
@media print {
    .resume20-fab, .resume20-dl { display: none !important; }
    .resume20-root { background: #fff !important; color: #1a1a1a !important; padding: 0; }
    .resume20-sheet {
        background: #fff !important; box-shadow: none !important;
        border: 0; max-width: none; padding: 0 14mm;
    }
    .resume20-sheet::before, .resume20-sheet::after { display: none; }
    .resume20-monogram { display: none; }
    .resume20-name, .resume20-entry-role, .resume20-cert-name,
    .resume20-project-name, .resume20-shead h2 { color: #14110a !important; }
    .resume20-role, .resume20-org-name { color: #8a6f3e !important; }
    .resume20-summary, .resume20-entry-desc, .resume20-project-desc,
    .resume20-cert-meta, .resume20-contact li, .resume20-contact a { color: #444 !important; }
    .resume20-photo { background: #b08f50 !important; }
    .resume20-photo img { border-color: #fff !important; }
    .resume20-lang, .resume20-cert, .resume20-project, .resume20-tag,
    .resume20-years { background: #fff !important; border-color: #d8cdb5 !important; }
    .resume20-section { opacity: 1 !important; transform: none !important; }
    .resume20-skill-track { background: #e7e0cf !important; }
    .resume20-skill-fill { background: #b08f50 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .resume20-entry { break-inside: avoid; }
    .resume20-cert, .resume20-project { break-inside: avoid; }
}

/* Readable editable content without scroll-dependent visibility. */
.resume20-root { overflow-wrap: anywhere; }
.resume20-section { opacity: 1; transform: none; }
.resume20-entry { grid-template-columns: 150px minmax(0, 1fr); }
.resume20-entry::after { display: none; }
.resume20-entry-body { border-inline-start: 1px solid var(--r20-gold); padding-inline-start: 20px; }
.resume20-shead h2 { white-space: normal; min-width: 0; text-align: center; }
.resume20-srule { min-width: 12px; }
.resume20-skill, .resume20-cert, .resume20-cert > div, .resume20-contact li, .resume20-contact li > * { min-width: 0; }
.resume20-contact li { max-width: 100%; }
.resume20-skill-lbl, .resume20-lang { flex-wrap: wrap; gap: 8px; }
.resume20-role, .resume20-dl { letter-spacing: normal; }
.resume20-dl { font-family: inherit; max-width: 100%; margin-block: 5px; }
.resume20-demo-note { margin: 0 0 24px; font-size: .9rem; color: var(--r20-gold-lite); text-align: center; }
.resume20-root a:focus-visible, .resume20-root button:focus-visible { outline: 3px solid var(--r20-gold-lite); outline-offset: 4px; }
@media (max-width: 760px) {
    .resume20-entry { grid-template-columns: minmax(0, 1fr); }
    .resume20-entry-body { border-inline-start: 0; padding-inline-start: 0; }
}
@media print {
    @page { size: A4; margin: 14mm; }
    body:has(.resume20-root) > :not(.page-card-shell):not(script):not(style):not(link) { display: none !important; }
    body:has(.resume20-root) .page-card-shell { display: block; border: 0; }
    .resume20-root { --r20-ink: #222; --r20-mut: #444; --r20-gold: #71551d; --r20-gold-lite: #71551d; --r20-line: #d8cdb5; }
    .resume20-sheet { padding: 0; }
    .resume20-demo-note { display: none; }
    .resume20-masthead { break-inside: avoid; padding-bottom: 2mm; margin-bottom: 3mm; }
    .resume20-photo { width: 22mm; height: 22mm; margin-bottom: 2mm; }
    .resume20-name { font-size: 22pt; margin-bottom: 2mm; }
    .resume20-contact { margin-block: 3mm; }
    .resume20-section { margin-top: 5mm; }
    .resume20-shead { break-after: avoid; margin-bottom: 3mm; }
    .resume20-entries, .resume20-projects, .resume20-certs, .resume20-skills { display: block; }
    .resume20-entry { grid-template-columns: 30mm minmax(0, 1fr); gap: 4mm; margin-bottom: 4mm; }
    .resume20-entry-body { border: 0; padding: 0; }
    .resume20-entry-desc, .resume20-summary, .resume20-project-desc { font-size: 10pt; line-height: 1.65; }
    .resume20-project, .resume20-cert { padding: 3mm; margin-bottom: 3mm; }
    .resume20-skill, .resume20-lang { break-inside: avoid; margin-bottom: 3mm; }
}
