/* ==========================================================
   CV Dost — CV document styles (10 designs)
   Sizes use em so the "text size" control scales everything.
   ========================================================== */
.cv{
  --c:#3b2fd9;--c-soft:#eeecff;--c-mid:#a7a1ef;--fs:1;--sp:1;
  --pw:210mm;--ph:297mm;
  --scripts:'Noto Sans Devanagari','Noto Sans Bengali','Noto Sans Tamil','Noto Sans Telugu','Noto Sans Kannada','Noto Sans Malayalam','Noto Sans Gujarati','Noto Sans Gurmukhi','Noto Sans Oriya','Noto Naskh Arabic','Noto Sans Ol Chiki','PingFang SC','Microsoft YaHei','Hiragino Sans','Yu Gothic','Malgun Gothic','Apple SD Gothic Neo','Noto Sans CJK SC';
  --cv-font:'Inter',var(--scripts),Arial,sans-serif;
  --cv-head:var(--cv-font);
  --gap:calc(14px * var(--sp));
  width:var(--pw);min-height:var(--ph);background:#fff;color:#1f2330;
  font-family:var(--cv-font);font-size:calc(10pt * var(--fs));line-height:1.45;
  position:relative;overflow-wrap:anywhere;text-align:start;
  -webkit-print-color-adjust:exact;print-color-adjust:exact;box-sizing:border-box;
}
.cv *,.cv *::before,.cv *::after{box-sizing:border-box;margin:0;padding:0}
.cv.paper-letter{--pw:215.9mm;--ph:279.4mm}
.cv.font-serif{--cv-font:'Source Serif 4','Noto Serif Devanagari','Noto Serif Bengali',var(--scripts),Georgia,serif}
.cv.font-round{--cv-font:'Poppins',var(--scripts),Arial,sans-serif;font-size:calc(9.6pt * var(--fs))}
.cv h1,.cv h2,.cv h3{font-family:var(--cv-head);color:#11131c;font-weight:700}
.cv a{color:inherit;text-decoration:none}
.cv p{margin:0 0 .3em}
.cv ul{margin:.25em 0 0;margin-inline-start:1.5em}
.cv li{margin-bottom:.15em}
.cv table{border-collapse:collapse;width:100%}
.cv-muted{color:#5d6273}

.cv-name{font-size:2.4em;line-height:1.08;letter-spacing:-.01em}
.cv-role{font-size:1.18em;color:var(--c);font-weight:600;margin-top:.25em}
.cv-sec{margin-top:var(--gap)}
.cv-sec-title{font-size:1.02em;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--c);margin-bottom:calc(7px * var(--sp))}
.uncased .cv-sec-title{letter-spacing:0;text-transform:none;font-size:1.1em}
.is-rtl{direction:rtl}
.cv-item{margin-bottom:calc(10px * var(--sp));break-inside:avoid;page-break-inside:avoid}
.cv-item:last-child{margin-bottom:0}
.cv-item-sm{margin-bottom:calc(6px * var(--sp))}
.cv-item-top{display:flex;justify-content:space-between;gap:1.2em;align-items:baseline}
.cv-item-title{font-weight:700;font-size:1.05em;color:#11131c}
.cv-item-sub{color:#4a4f60;font-weight:500}
.cv-date{white-space:nowrap;font-size:.9em;color:#5d6273;font-weight:600}
.cv-desc{margin-top:.3em;color:#2f3342}
.cv-skills{display:flex;flex-wrap:wrap;gap:.45em}
.cv-skill{background:var(--c-soft);color:#1f2330;padding:.28em .85em;border-radius:4px;font-size:.9em;font-weight:500}
.cv-skill-list{line-height:1.7}
.cv-skill-ul{columns:2;column-gap:1.5em}
.cv-contact{display:flex;flex-wrap:wrap;gap:.35em 1.5em;font-size:.9em;color:#4a4f60}
.cv-contact>span{display:inline-flex;align-items:center;gap:.5em}
.cv-contact.vertical{flex-direction:column;gap:.45em}
.cv-contact svg{width:1.1em;height:1.1em;flex-shrink:0;color:var(--c)}
.cv-contact i{font-style:normal;color:var(--c);font-size:.7em}
.cv-photo{width:30mm;height:30mm;object-fit:cover;flex-shrink:0;display:block}
.photo-circle .cv-photo{border-radius:50%}
.photo-rounded .cv-photo{border-radius:12px}
.photo-square .cv-photo{border-radius:0}
.cv-lang{display:flex;justify-content:space-between;gap:1em;margin-bottom:.25em}
.cv-kv th{text-align:start;font-weight:600;color:#4a4f60;padding:.2em 1em .2em 0;width:42%;vertical-align:top}
.cv-kv td{padding:.2em 0;vertical-align:top}
.cv-table th{background:var(--c-soft);text-align:start;padding:.45em .6em;font-size:.9em;border:1px solid #d9dbe3}
.cv-table td{padding:.45em .6em;border:1px solid #d9dbe3;vertical-align:top}
.cv-tsub{color:#5d6273;font-size:.9em}
.cv-decl{margin-top:calc(var(--gap) + 4px);break-inside:avoid;page-break-inside:avoid}
.cv-decl-sign{display:flex;justify-content:space-between;align-items:flex-end;margin-top:calc(12px * var(--sp));font-size:.95em;gap:2em}
.cv-sign-box{text-align:center;min-width:40mm}
.cv-sign{max-height:16mm;max-width:45mm;display:block;margin:0 auto 4px;object-fit:contain}
.cv-sign-space{height:12mm}
.cv-empty{display:grid;place-items:center;min-height:var(--ph);color:#9a9db0;text-align:center;padding:40px;font-family:system-ui,sans-serif}
.cv-empty b{display:block;font-size:1.4em;color:#60637a;margin-bottom:6px}

/* ---------- 1. CLASSIC ---------- */
.tpl-classic{padding:16mm 17mm}
.tpl-classic .cv-header{text-align:center;padding-bottom:calc(12px * var(--sp));border-bottom:2px solid var(--c)}
.tpl-classic .cv-header .cv-role{margin-bottom:.6em}
.tpl-classic .cv-contact{justify-content:center}
.tpl-classic .cv-header.has-photo{display:flex;align-items:center;gap:18px;text-align:start}
.tpl-classic .cv-header.has-photo .cv-contact{justify-content:flex-start}
.tpl-classic .cv-sec-title{border-bottom:1px solid #e3e4ea;padding-bottom:.35em}

/* ---------- 2. MODERN ---------- */
.tpl-modern{display:grid;grid-template-columns:70mm 1fr;background:linear-gradient(to right,#1c1f2e 70mm,#fff 70mm)}
.tpl-modern .cv-side{color:#e7e8ef;padding-block:16mm 14mm;padding-inline:9mm 8mm}
.tpl-modern .cv-main{padding-block:16mm 14mm;padding-inline:11mm 13mm}
.tpl-modern .cv-photo{width:36mm;height:36mm;margin:0 auto 12px;border:3px solid var(--c)}
.tpl-modern .cv-side .cv-sec:first-of-type{margin-top:0}
.tpl-modern .cv-side .cv-sec-title{color:#fff;border-bottom:2px solid var(--c);padding-bottom:.35em;font-size:.95em}
.tpl-modern .cv-side .cv-contact{color:#d6d8e3}
.tpl-modern .cv-side .cv-contact svg{color:var(--c-mid)}
.tpl-modern .cv-side .cv-skill{background:rgba(255,255,255,.1);color:#fff}
.tpl-modern .cv-side .cv-item-title,.tpl-modern .cv-side h2{color:#fff}
.tpl-modern .cv-side .cv-item-title{font-size:.95em}
.tpl-modern .cv-side .cv-muted,.tpl-modern .cv-side .cv-item-sub,.tpl-modern .cv-side .cv-date,.tpl-modern .cv-side .cv-kv th{color:#b4b7c7}
.tpl-modern .cv-side p,.tpl-modern .cv-side .cv-kv td{color:#d6d8e3}
.tpl-modern .cv-side .cv-kv th{width:auto;display:block;padding:0}
.tpl-modern .cv-side .cv-kv td{display:block;padding:0 0 .4em}
.tpl-modern .cv-name{font-size:2.5em;letter-spacing:-.02em}
.tpl-modern .cv-main .cv-sec-title{display:flex;align-items:center;gap:8px}
.tpl-modern .cv-main .cv-sec-title::after{content:"";flex:1;height:1px;background:#e3e4ea}
.tpl-modern .cv-main .cv-item{padding-inline-start:12px;border-inline-start:2px solid var(--c-soft)}
.is-rtl.tpl-modern{background:linear-gradient(to left,#1c1f2e 70mm,#fff 70mm)}

/* ---------- 3. MINIMAL ---------- */
.tpl-minimal{padding:17mm 18mm}
.tpl-minimal .cv-header{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:6px}
.tpl-minimal .cv-name{font-size:2.6em;font-weight:800;letter-spacing:-.03em;line-height:1}
.tpl-minimal .cv-role{color:#5d6273;font-weight:500}
.tpl-minimal .cv-hr{display:flex;gap:14px;align-items:flex-end}
.tpl-minimal .cv-header .cv-contact{align-items:flex-end;text-align:end}
.tpl-minimal .cv-photo{width:24mm;height:24mm}
.tpl-minimal .cv-rule{height:3px;background:var(--c);width:40px;margin:10px 0 4px}
.tpl-minimal .cv-sec{display:grid;grid-template-columns:38mm 1fr;gap:12px}
.tpl-minimal .cv-sec-title{color:#11131c;font-size:.95em;margin-bottom:0}
.tpl-minimal .cv-sec-title::before{content:"";display:block;width:18px;height:2px;background:var(--c);margin-bottom:6px}
.tpl-minimal .cv-sec-body{min-width:0}

/* ---------- 4. EXECUTIVE ---------- */
.tpl-executive .cv-band{background:var(--c);color:#fff;padding:14mm 17mm 11mm;display:flex;align-items:center;gap:18px}
.tpl-executive .cv-band .cv-name{color:#fff;font-size:2.5em}
.tpl-executive .cv-band .cv-role{color:#fff;opacity:.9;font-weight:500}
.tpl-executive .cv-band .cv-photo{border:3px solid rgba(255,255,255,.7);width:28mm;height:28mm}
.tpl-executive .cv-strip{background:#f3f4f8;padding:3mm 17mm;border-bottom:1px solid #e3e4ea}
.tpl-executive .cv-body{display:grid;grid-template-columns:1fr 58mm;gap:9mm;padding:2mm 17mm 14mm}
.tpl-executive .cv-sec-title{display:flex;align-items:center;gap:8px}
.tpl-executive .cv-sec-title::before{content:"";width:6px;height:6px;background:var(--c);transform:rotate(45deg);flex-shrink:0}
.tpl-executive .cv-aside .cv-sec{background:#fafbfd;border:1px solid #eceef3;border-radius:6px;padding:10px 11px}
.tpl-executive .cv-aside .cv-item-top{flex-direction:column;gap:1px}
.tpl-executive .cv-aside .cv-date{font-weight:500}
.tpl-executive .cv-aside .cv-kv th,.tpl-executive .cv-aside .cv-kv td{display:block;width:auto;padding:0}
.tpl-executive .cv-aside .cv-kv td{padding-bottom:.4em}
.tpl-executive .cv-decl{grid-column:1/-1}

/* ---------- 5. TIMELINE ---------- */
.tpl-timeline{padding:15mm 16mm}
.tpl-timeline .cv-header{display:flex;align-items:center;gap:18px;padding:0 0 calc(12px * var(--sp));margin-bottom:4px;border-bottom:1px solid #e3e4ea}
.tpl-timeline .cv-name{color:var(--c);font-size:2.6em}
.tpl-timeline .cv-role{color:#3d4152}
.tpl-timeline .cv-hd .cv-contact{margin-top:.6em}
.tpl-timeline .cv-photo{width:27mm;height:27mm}
.tpl-timeline .cv-sec-title{color:#11131c;display:flex;align-items:center;gap:8px}
.tpl-timeline .cv-sec-title::before{content:"";width:12px;height:12px;border-radius:50%;background:var(--c);box-shadow:0 0 0 3px var(--c-soft)}
.tpl-timeline .cv-sec-experience .cv-sec-body,.tpl-timeline .cv-sec-education .cv-sec-body,.tpl-timeline .cv-sec-projects .cv-sec-body{border-inline-start:2px solid var(--c-soft);margin-inline-start:5px;padding-inline-start:16px}
.tpl-timeline .cv-sec-experience .cv-item,.tpl-timeline .cv-sec-education .cv-item,.tpl-timeline .cv-sec-projects .cv-item{position:relative}
.tpl-timeline .cv-sec-experience .cv-item::before,.tpl-timeline .cv-sec-education .cv-item::before,.tpl-timeline .cv-sec-projects .cv-item::before{content:"";position:absolute;inset-inline-start:-21.5px;top:.45em;width:9px;height:9px;border-radius:50%;background:#fff;border:2px solid var(--c)}
.tpl-timeline .cv-date{color:var(--c)}

/* ---------- 6. COMPACT ---------- */
.tpl-compact{padding:12mm 13mm;font-size:calc(9.4pt * var(--fs))}
.tpl-compact .cv-header{display:flex;justify-content:space-between;align-items:center;gap:14px}
.tpl-compact .cv-name{font-size:2.3em}
.tpl-compact .cv-photo{width:22mm;height:22mm}
.tpl-compact .cv-cbar{background:var(--c-soft);border-radius:6px;padding:2.5mm 4mm;margin:calc(10px * var(--sp)) 0 2px}
.tpl-compact .cv-cbar .cv-contact{color:#2f3342}
.tpl-compact .cv-body{display:grid;grid-template-columns:1fr 60mm;gap:7mm}
.tpl-compact .cv-side{border-inline-start:1px solid #e3e4ea;padding-inline-start:6mm}
.tpl-compact .cv-sec{margin-top:calc(11px * var(--sp))}
.tpl-compact .cv-sec-title{font-size:.95em;border-bottom:2px solid var(--c);display:inline-block;padding-bottom:2px}
.tpl-compact .cv-side .cv-item-top{flex-direction:column;gap:0}
.tpl-compact .cv-side .cv-skill-ul{columns:1}
.tpl-compact .cv-side .cv-kv th,.tpl-compact .cv-side .cv-kv td{display:block;width:auto;padding:0}
.tpl-compact .cv-side .cv-kv td{padding-bottom:.35em}

/* ---------- 7. ELEGANT ---------- */
.tpl-elegant{padding:17mm 19mm;--cv-head:'Source Serif 4','Noto Serif Devanagari','Noto Serif Bengali',var(--scripts),Georgia,serif}
.tpl-elegant .cv-header{text-align:center}
.tpl-elegant .cv-photo{width:26mm;height:26mm;margin:0 auto 10px}
.tpl-elegant .cv-name{font-weight:600;font-size:2.5em;letter-spacing:.06em;text-transform:uppercase}
.uncased.tpl-elegant .cv-name{text-transform:none;letter-spacing:0}
.tpl-elegant .cv-role{color:#5d6273;font-weight:500;font-style:italic;font-family:var(--cv-head)}
.tpl-elegant .cv-orn{display:flex;justify-content:center;margin:.7em 0}
.tpl-elegant .cv-orn span{width:60px;height:2px;background:var(--c);position:relative}
.tpl-elegant .cv-contact{justify-content:center;gap:.35em .7em}
.tpl-elegant .cv-sec-title{display:flex;align-items:center;gap:12px;justify-content:center;color:#11131c;font-family:var(--cv-head);letter-spacing:.16em;font-weight:600}
.tpl-elegant .cv-sec-title::before,.tpl-elegant .cv-sec-title::after{content:"";flex:1;height:0;border-top:1px solid var(--c-mid)}
.tpl-elegant .cv-item-title{font-family:var(--cv-head)}

/* ---------- 8. INDIAN FORMAT ---------- */
.tpl-indian{padding:13mm 15mm}
.tpl-indian .cv-doc-title{text-align:center;font-weight:800;letter-spacing:.25em;text-transform:uppercase;font-size:1.25em;text-decoration:underline;text-underline-offset:4px;margin-bottom:calc(10px * var(--sp));color:#11131c}
.uncased.tpl-indian .cv-doc-title{letter-spacing:0;text-decoration-thickness:1px}
.tpl-indian .cv-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:calc(10px * var(--sp));border-bottom:2px solid #11131c}
.tpl-indian .cv-name{font-size:2em}
.tpl-indian .cv-role{margin-bottom:.5em}
.tpl-indian .cv-photo.box{width:30mm;height:36mm;border-radius:0 !important;border:1px solid #999;padding:2px}
.tpl-indian .cv-sec-title{background:var(--c-soft);color:#11131c;padding:.35em .7em;border-inline-start:4px solid var(--c);font-size:.98em}
.tpl-indian .cv-sec-body{padding:0 .3em}
.tpl-indian .cv-kv th{width:38%}
.tpl-indian .cv-kv th::after{content:" :";}

/* ---------- 9. GULF / OVERSEAS ---------- */
.tpl-gulf{padding:14mm 15mm}
.tpl-gulf .cv-header{display:flex;align-items:center;gap:16px;background:#f4f5f8;border-radius:8px;padding:6mm;border-top:4px solid var(--c)}
.tpl-gulf .cv-photo{width:28mm;height:32mm}
.tpl-gulf.photo-circle .cv-photo{width:28mm;height:28mm}
.tpl-gulf .cv-name{font-size:2.2em}
.tpl-gulf .cv-hd .cv-contact{margin-top:.6em}
.tpl-gulf .cv-visa .cv-sec{border:1px solid var(--c-mid);border-radius:8px;padding:8px 12px;margin-top:var(--gap)}
.tpl-gulf .cv-visa .cv-kv tbody{display:grid;grid-template-columns:1fr 1fr;column-gap:18px}
.tpl-gulf .cv-visa .cv-kv tr{display:flex}
.tpl-gulf .cv-visa .cv-kv th{width:50%;flex-shrink:0}
.tpl-gulf .cv-sec-title{display:flex;align-items:center;gap:8px;color:#11131c}
.tpl-gulf .cv-sec-title::before{content:"";width:5px;height:1.1em;background:var(--c);border-radius:2px}

/* ---------- 10. CREATIVE ---------- */
.tpl-creative .cv-header{display:flex;align-items:center;gap:20px;padding:14mm 15mm 9mm;background:var(--c-soft);position:relative}
.tpl-creative .cv-header::after{content:"";position:absolute;left:0;right:0;bottom:0;height:5px;background:var(--c)}
.tpl-creative .cv-mono{width:30mm;height:30mm;border-radius:50%;background:var(--c);display:grid;place-items:center;flex-shrink:0;overflow:hidden;border:3px solid #fff;box-shadow:0 0 0 2px var(--c)}
.tpl-creative .cv-mono span{color:#fff;font-weight:800;font-size:2.6em;letter-spacing:.02em}
.tpl-creative .cv-mono .cv-photo{width:100%;height:100%;border-radius:0}
.tpl-creative .cv-name{font-size:2.6em;font-weight:800;letter-spacing:-.02em}
.tpl-creative .cv-body{display:grid;grid-template-columns:64mm 1fr}
.tpl-creative .cv-side{padding-block:4mm 12mm;padding-inline:15mm 7mm;border-inline-end:1px dashed var(--c-mid)}
.tpl-creative .cv-main{padding-block:4mm 12mm;padding-inline:8mm 15mm}
.tpl-creative .cv-sec-title{color:var(--c);font-weight:800}
.tpl-creative .cv-side .cv-item-top{flex-direction:column;gap:0}
.tpl-creative .cv-side .cv-kv th,.tpl-creative .cv-side .cv-kv td{display:block;width:auto;padding:0}
.tpl-creative .cv-side .cv-kv td{padding-bottom:.4em}
.tpl-creative .cv-main .cv-item{background:#fafbfd;border-radius:6px;padding:7px 10px;border:1px solid #eef0f4}
.cv-table td:nth-child(3),.cv-table td:nth-child(4),.cv-table th:nth-child(3),.cv-table th:nth-child(4){white-space:nowrap;width:1%}
.cv-table td:first-child{width:38%}

/* Arabic-script languages: a little more line height, no letter-spacing anywhere */
.is-rtl{line-height:1.7}
.is-rtl *{letter-spacing:0 !important}
.is-rtl .cv-date,.is-rtl .cv-contact a{direction:ltr;unicode-bidi:isolate}
/* mixed-direction text: each block follows its own content (English inside an Urdu CV stays readable) */
.is-rtl p,.is-rtl li,.is-rtl td,.is-rtl .cv-item-title,.is-rtl .cv-item-sub,.is-rtl .cv-skill,.is-rtl .cv-name,.is-rtl .cv-role,.is-rtl .cv-contact span span,.is-rtl .cv-lang span,.is-rtl .cv-muted{unicode-bidi:plaintext}
