:root {
  --ink: #111;
  --muted: #666;
  --faint: #999;
  --dark: #222;
  --on-dark: rgba(255, 255, 255, 0.92);
  --chip: #f1f1f1;
  --hairline: #e8e8e8;
}

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

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body {
  font-family: "Manuale", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: #f7f7f5;
  font-size: 11px;
  line-height: 1.65;
}

h1, h2, h3, h4, .role, .contact, .tag, .org {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  padding: 12mm 13mm 10mm;
}

/* ---------- Header ---------- */
.head { text-align: center; padding: 1mm 0 4mm; }

h1 {
  font-size: 25px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
}

.role {
  margin-top: 4px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 18px;
  margin-top: 6px;
  font-size: 9.8px;
  color: var(--muted);
}

.contact a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.contact a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Profile ---------- */
.profile {
  margin: 0 0 5mm;
  padding: 5mm 7mm;
  background: var(--dark);
  color: var(--on-dark);
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.65;
}

.profile strong { color: #fff; font-weight: 700; }

/* ---------- Layout ---------- */
.layout {
  display: flex;
  gap: 7mm;
}

.main { flex: 1 1 61%; }
.side { flex: 1 1 39%; }

/* ---------- Sections ---------- */
h2 {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 3.5mm;
}

section + section h2 { margin-top: 3.5mm; }

.main article { margin-bottom: 3mm; }
.main article:last-child { margin-bottom: 0; }

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.job-head .org, .poste h3 .org { margin-left: auto; }

h3 { font-size: 12px; font-weight: 700; letter-spacing: 0.01em; }

.org {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.92em;
}

.poste h3 {
  font-size: 12px;
  font-weight: 700;
  margin-top: 3mm;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.date {
  color: var(--faint);
  font-weight: 400;
  font-size: 9.5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.context {
  color: var(--muted);
  font-size: 9.9px;
  font-style: italic;
  margin: 1px 0 1.5mm;
}

.gain { margin: 1mm 0 0; }

ul { list-style: none; padding-left: 0; }
li { margin: 1.8px 0; }

/* ---------- Sidebar ---------- */
.side h3 {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin: 4mm 0 2mm;
}

.side h3:first-of-type { margin-top: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 3.5px; margin-bottom: 1mm; }

.main .tags { margin-top: 1.5mm; }

.mini { margin-bottom: 1mm; }

.mini + h3, .tags + h3 { margin-top: 4mm; }

.tag {
  background: var(--chip);
  border-radius: 999px;
  padding: 1.5px 8px;
  font-size: 9.2px;
  color: var(--ink);
}

.tag.strong {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.mini li { margin: 2.5px 0; }

/* ---------- Print ---------- */
@page { size: A4; margin: 0; }

@media print {
  body { background: #fff; }
  .page { width: 210mm; min-height: 297mm; margin: 0; }
}

@media screen and (max-width: 800px) {
  .page { width: auto; padding: 20px; }
  .contact { flex-direction: column; gap: 2px; }
  .layout { flex-direction: column; }
}
