/* ===== Template 5 – Essential (A4 = 794 x 1123 px, single column, ATS safe) ===== */
.tpl-essential {
  --ac: #1f4e79; --ac-dark: #0f2942; --ac-soft: #8fa3b8; --ac-tint: #f2f5f9;
  --dens: 1; --ink: #1f2933; --gray: #667085; --photo: 78px; --bullet: "•"; --bfs: 1em; --bfsn: 1;
  --ln: var(--ac-soft);
  width: 794px; min-height: 1123px; flex: none;
  padding: 40px 52px 32px;
  background: #fff; color: var(--ink);
  font-family: var(--f-body, Arial, Helvetica, 'Liberation Sans', sans-serif);
  font-size: calc(13px * var(--s-body, 1));
  line-height: calc(1.45 + (var(--dens) - 1) * .4);
  box-shadow: 0 10px 40px rgba(15, 41, 66, .16);
}
.tpl-essential, .tpl-essential * { box-sizing: border-box; }
.tpl-essential.has-foot { padding-bottom: 56px; }

.tpl-essential .e-head { display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.tpl-essential .e-id { min-width: 0; flex: 1; }
.tpl-essential .name {
  margin: 0; font-family: var(--f-head, Arial, Helvetica, 'Liberation Sans', sans-serif); font-weight: 700;
  font-size: calc(30px * var(--s-name, 1)); line-height: 1.15; letter-spacing: .01em;
  text-transform: uppercase; color: var(--ac-dark); text-align: var(--a-name, left); overflow-wrap: anywhere;
}
.tpl-essential.nc-off .name { text-transform: none; }
.tpl-essential .title-row { margin-top: 5px; text-align: var(--a-title, left); }
.tpl-essential .title { display: inline-block; font-family: var(--f-head, Arial, Helvetica, sans-serif); font-weight: 500; font-size: calc(15px * var(--s-title, 1)); line-height: 1.3; color: var(--ac); }
.tpl-essential.ts-plain .title { color: var(--ink); }
.tpl-essential.ts-tag .title { background: var(--ac); color: #fff; padding: .25em .75em; border-radius: 3px; }
.tpl-essential .e-contact { display: flex; flex-wrap: wrap; margin-top: 10px; color: var(--gray); font-size: calc(12.5px * var(--s-body, 1)); text-align: var(--a-body, left); }
.tpl-essential .e-contact span + span::before { content: '·'; margin: 0 9px; color: var(--ac-soft); font-weight: 700; }
.tpl-essential .photo-wrap { flex: none; width: var(--photo); height: var(--photo); }
.tpl-essential .photo-wrap img { width: 100%; height: 100%; display: block; object-fit: contain; }
.tpl-essential .e-rule { margin: 16px 0 18px; border-top: 2px solid var(--ac); }
.tpl-essential.hr-none .e-rule { border-top: 0; margin: 6px 0; }
.tpl-essential.hr-thick .e-rule { border-top-width: 4px; }

.tpl-essential .sec { margin-bottom: calc(18px * var(--dens)); }
.tpl-essential .sec:last-child { margin-bottom: 0; }
.tpl-essential .sec h2 {
  margin: 0 0 calc(9px * var(--dens)); padding-bottom: 4px;
  font-family: var(--f-head, Arial, Helvetica, sans-serif); font-weight: 700;
  font-size: calc(13px * var(--s-h2, 1)); line-height: 1.25; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ac); text-align: var(--a-h2, left);
}
.tpl-essential.hc-off .sec h2 { text-transform: none; letter-spacing: .02em; }
.tpl-essential .summary { margin: 0; text-align: var(--a-body, left); white-space: pre-line; }

/* Entries: date column on the left (or inline on the title row) */
.tpl-essential .ent { display: grid; grid-template-columns: 124px 1fr; grid-template-areas: "dt it" "dt org" "dt pts"; column-gap: 18px; margin-bottom: calc(14px * var(--dens)); }
.tpl-essential .ent:last-child { margin-bottom: 0; }
.tpl-essential .ent .it { grid-area: it; font-weight: 700; font-size: calc(14px * var(--s-sub, 1)); line-height: 1.3; color: var(--ac-dark); text-align: var(--a-sub, left); }
.tpl-essential .ent .dt { grid-area: dt; color: var(--gray); font-size: .94em; line-height: 1.4; padding-top: 1px; text-align: var(--a-body, left); }
.tpl-essential .ent .org { grid-area: org; color: var(--ac); font-weight: 600; margin: 1px 0 4px; text-align: var(--a-body, left); }
.tpl-essential .ent .pts { grid-area: pts; }
.tpl-essential.el-inline .ent { grid-template-columns: 1fr auto; grid-template-areas: "it dt" "org org" "pts pts"; column-gap: 14px; }
.tpl-essential.el-inline .ent .dt { font-style: italic; white-space: nowrap; }

/* Inline lists (skills, languages) and personal details */
.tpl-essential .inl { margin: 0; text-align: var(--a-body, left); }
.tpl-essential .inl span { display: inline; }
.tpl-essential .inl span + span::before { content: var(--bullet); margin: 0 9px; color: var(--ac); font-size: var(--bfs); }
.tpl-essential .pd { display: grid; grid-template-columns: repeat(2, 1fr); gap: calc(3px * var(--dens)) 28px; }
.tpl-essential .pd-k { font-weight: 700; color: var(--ac); }

/* Bullets */
.tpl-essential ul { margin: 3px 0 0; padding-left: 15px; list-style: none; }
.tpl-essential li { --lh: calc(1.45 + (var(--dens) - 1) * .4); position: relative; margin-bottom: calc(2px * var(--dens)); line-height: var(--lh); text-align: var(--a-body, left); overflow-wrap: anywhere; }
.tpl-essential li::before { content: var(--bullet); position: absolute; left: -13px; top: 0; font-size: var(--bfs); line-height: calc(var(--lh) / var(--bfsn, 1)); color: var(--ac); }
