/* =========================================================
   Abdulrhman Hani — ATS-friendly CV stylesheet
   Single column · Standard fonts · Plain headings
   Compatible with Workday, Greenhouse, Lever, Bayt, Naukri,
   LinkedIn Easy Apply, Taleo, iCIMS, SmartRecruiters, etc.
   ========================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "Calibri", "Arial", "Helvetica", sans-serif;
  color: #000000;
  background: #d9d9d9;
  font-size: 11pt;
  line-height: 1.4;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ---- toolbar (screen only — hidden in print) ---- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #000000;
  color: #ffffff;
  font-size: 10pt;
}
.toolbar a, .toolbar button {
  font: inherit;
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 3px;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
}
.toolbar a:hover, .toolbar button:hover { background: #dddddd; }
.toolbar .spacer { color: #888888; }

/* ---- page ---- */
.page {
  width: 210mm;
  min-height: 297mm;
  margin: 18px auto;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .18);
  padding: 18mm 18mm;
}

/* ---- Header ---- */
.cv-header {
  text-align: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #000000;
}
.cv-header h1 {
  font-size: 22pt;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.cv-header .title {
  font-size: 12pt;
  font-weight: 600;
  margin-bottom: 8px;
}
.cv-header .contact {
  font-size: 10.5pt;
  line-height: 1.5;
}
.cv-header .contact span { margin: 0 6px; }
.cv-header .contact a { color: #000000; text-decoration: none; }

/* ---- Sections ---- */
.section { margin-top: 14px; }
.section h2 {
  font-size: 12pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #000000;
  padding-bottom: 3px;
  margin-bottom: 8px;
}

.summary { font-size: 11pt; text-align: justify; }

/* ---- Experience / Education entries ---- */
.entry { margin-bottom: 10px; page-break-inside: avoid; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.entry-title { font-size: 11.5pt; font-weight: 700; }
.entry-date { font-size: 10.5pt; font-weight: 600; white-space: nowrap; }
.entry-sub {
  font-size: 11pt;
  font-style: italic;
  margin-top: 1px;
  margin-bottom: 4px;
}
.entry ul {
  list-style: disc;
  padding-left: 20px;
  margin-top: 3px;
}
.entry ul li {
  font-size: 10.8pt;
  margin-bottom: 2px;
  line-height: 1.4;
}

/* ---- Skills (two-column plain list — still ATS-readable) ---- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 28px;
  row-gap: 4px;
}
.skill-row {
  font-size: 10.8pt;
  padding: 2px 0;
}
.skill-row b { display: inline; }

/* Plain inline skills list (used in master & ats versions) */
.skills-list {
  font-size: 10.8pt;
  line-height: 1.6;
}
.skills-list .sk-line { margin-bottom: 3px; }
.skills-list .sk-line b { display: inline; }

/* ---- Certifications & Languages ---- */
.cert-list, .lang-list {
  list-style: disc;
  padding-left: 20px;
}
.cert-list li, .lang-list li {
  font-size: 10.8pt;
  margin-bottom: 3px;
}

/* ===== Print ===== */
@page { size: A4; margin: 12mm 14mm; }

@media print {
  html, body {
    background: #ffffff;
    font-size: 10pt;
    line-height: 1.35;
  }
  .toolbar { display: none !important; }
  .page {
    margin: 0;
    box-shadow: none;
    width: auto;
    min-height: 0;
    padding: 0;
  }

  /* Keep individual entries together, but allow sections to flow across pages */
  .entry { page-break-inside: avoid; break-inside: avoid; }
  .section { page-break-inside: auto; break-inside: auto; }

  /* Section headings should never be orphaned at bottom of a page */
  .section h2 {
    page-break-after: avoid;
    break-after: avoid;
    margin-top: 8px;
  }
  .section { margin-top: 10px; }
  .cv-header { margin-bottom: 10px; padding-bottom: 8px; }
  .entry { margin-bottom: 7px; }
  .entry ul { margin-top: 2px; }
  .entry ul li { margin-bottom: 1px; line-height: 1.32; }
  .skills-list { line-height: 1.45; }
  .skills-list .sk-line { margin-bottom: 2px; }

  a { color: #000000; text-decoration: none; }
}
