/* ── TOKENS (colors from zand_yassin_cv.html) ── */
:root {
  --ink: #151f30;
  --ink-soft: #3A4555;
  --rule: #D4DAE4;
  --page: #FFFFFF;
  --accent: #E84545;
  --accent-dim: #FDE8E8;
  --accent-mid: #f5c0c0;
  --side-bg: #151f30;
  --side-fg: #EEF2F8;
  --side-muted: #8A9BB5;
  --gold: #F59E0B;
  --gold-dim: #FFF7E6;
  --mono: 'Fira Code', monospace;
  --serif: 'Playfair Display', serif;
  --sans: 'Outfit', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 9.8pt;
}

body {
  font-family: var(--sans);
  background: #C8CDD6;
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.page {
  width: 210mm;
  min-height: 297mm;
  margin: 8mm auto;
  background: var(--page);
  display: grid;
  grid-template-columns: 65mm 1fr;
  grid-template-rows: auto 1fr;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .22);
}

/* ─── HEADER ─── */
.header {
  grid-column: 1 / -1;
  background: var(--side-bg);
  display: grid;
  grid-template-columns: 65mm 1fr;
  align-items: center;
}

.header-photo-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9mm 7mm;
}

.avatar-wrap {
  position: relative;
  width: 33mm;
  height: 33mm;
}

.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8c8c 100%);
  z-index: 0;
}

.avatar-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--side-bg);
}

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

.header-text-col {
  padding: 8mm 10mm 8mm 0;
}

.header-name {
  font-family: var(--serif);
  font-size: 26pt;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.header-name em {
  color: var(--accent);
  font-style: normal;
}

.header-title {
  font-family: var(--mono);
  font-size: 7pt;
  color: var(--side-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 1.5mm;
}

.header-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 5mm;
}

.contact-item {
  font-size: 7.5pt;
  color: var(--side-fg);
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.ci-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ─── SIDEBAR ─── */
.sidebar {
  background: var(--side-bg);
  padding: 6mm 6mm 10mm 7mm;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ─── MAIN ─── */
.main {
  padding: 6mm 8mm 10mm 7mm;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ─── SECTION LABELS ─── */
.section-label {
  font-family: var(--mono);
  font-size: 6.3pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 3.5mm;
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.sidebar .section-label {
  color: #5D7094;
}

.sidebar .section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #1E2C40;
}

.main .section-label {
  color: var(--side-muted);
}

.main .section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ─── SIDEBAR SKILLS ─── */
.s-section {
  margin-bottom: 5.5mm;
  page-break-inside: avoid;
  break-inside: avoid;
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 6pt;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 3mm 0 2mm;
  padding-bottom: 1mm;
  border-bottom: 1px solid #1E2C40;
}

/* Skill pills grid */
.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5px;
}

.pill {
  font-family: var(--mono);
  font-size: 6.2pt;
  color: var(--side-fg);
  background: #1A2B3D;
  border: 1px solid #253650;
  padding: 2px 5.5px;
  border-radius: 3px;
  line-height: 1.4;
}

.pill.top {
  border-color: #473131;
}

/* ─── CONTACT / LANG ─── */
.s-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 2.8mm;
  text-decoration: none;
}

.s-ci-icon {
  color: var(--accent);
  font-size: 8pt;
  flex-shrink: 0;
  line-height: 1.3;
}

.s-ci-text {
  font-size: 7.2pt;
  color: var(--side-fg);
  line-height: 1.5;
  word-break: break-all;
}

.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5mm;
}

.lang-name {
  font-size: 7.5pt;
  color: var(--side-fg);
  font-weight: 500;
}

.lang-lvl {
  font-size: 6.3pt;
  color: var(--side-muted);
  font-family: var(--mono);
}

.lang-bar {
  height: 3px;
  background: #1E2C40;
  border-radius: 2px;
  margin-bottom: 2.5mm;
  overflow: hidden;
}

.lang-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #ff8c8c);
}

/* ─── SOFT SKILLS ─── */
.soft-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5px;
}

.soft-list li {
  font-size: 6.5pt;
  color: var(--side-muted);
  border: 1px solid #253650;
  padding: 1.5px 5px;
  border-radius: 10px;
  line-height: 1.5;
}

/* ─── MAIN: SUMMARY ─── */
.summary-text {
  font-size: 7.8pt;
  line-height: 1.8;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
  padding: 3mm 4mm 3mm 5mm;
  border-radius: 0 4px 4px 0;
}

/* ─── MAIN: EXPERIENCE ─── */
.job {
  margin-bottom: 2mm;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3mm;
  margin-bottom: 2mm;
}

.job-title {
  font-family: var(--serif);
  font-size: 10.5pt;
  color: var(--ink);
  line-height: 1.2;
}

.job-company {
  font-size: 7pt;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1mm;
}

.job-meta {
  text-align: right;
  flex-shrink: 0;
}

.job-date {
  font-family: var(--mono);
  font-size: 6.5pt;
  color: var(--ink-soft);
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  padding: 1.5px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.job-location {
  font-size: 6.3pt;
  color: #9AA5B4;
  margin-top: 1.5mm;
}

/* Sub-project block */
.sub-job {
  margin-top: 1.5mm;
  padding: 1.5mm 3.5mm;
  background: #FDF5F5;
  border-left: 2.5px solid var(--accent-mid);
  border-radius: 0 4px 4px 0;
  page-break-inside: avoid;
  break-inside: avoid;
}

.sub-job+.sub-job {
  margin-top: 1.5mm;
}

.sub-job-title {
  font-family: var(--mono);
  font-size: 7pt;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2mm;
}

.sub-job-title em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.bullet-list {
  list-style: none;
}

.bullet-list li {
  font-size: 7.3pt;
  color: var(--ink-soft);
  line-height: 1.65;
  padding-left: 9px;
  position: relative;
  margin-bottom: 0.5px;
}

.bullet-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 7pt;
  top: 1px;
}

.bullet-list li strong {
  color: var(--ink);
  font-weight: 600;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5px;
  margin-top: 2mm;
}

.tag {
  font-family: var(--mono);
  font-size: 6pt;
  color: var(--ink-soft);
  background: #F0F3F8;
  border: 1px solid var(--rule);
  padding: 1.5px 5px;
  border-radius: 3px;
}

.tag.hl {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-mid);
}

.divider {
  height: 1px;
  background: var(--rule);
  margin: 4mm 0;
}

/* ─── EDUCATION ─── */
.edu-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3mm;
}

.edu-degree {
  font-family: var(--serif);
  font-size: 10pt;
  color: var(--ink);
  line-height: 1.2;
}

.edu-school {
  font-size: 7.3pt;
  color: var(--ink-soft);
  margin-top: 1.5mm;
  line-height: 1.5;
}

.edu-badges {
  display: flex;
  gap: 3mm;
  flex-direction: column;
  align-items: flex-end;
}

.edu-badge {
  font-family: var(--mono);
  font-size: 6.5pt;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}

.edu-badge.gpa {
  background: var(--accent);
  color: #fff;
}

.edu-badge.rank {
  background: var(--gold-dim);
  color: #92400E;
  border: 1px solid #FCD34D;
}

@media print {
  body {
    background: none;
  }

  .page {
    margin: 0;
    box-shadow: none;
    width: 100%;
  }
}

@page {
  size: A4;
  margin: 0;
}