/* ============================================================
   Shared CV stylesheet (cv-en.html / cv-fr.html)
   THEME - change colors and fonts here.
   ============================================================ */
:root {
  /* >>> COMPANY COLOR - change this one value per application <<<
     known company colors are listed in cv.js */
  --brand:  #124191;

  --ink:    #1B1F23;   /* main text */
  --muted:  #5F6B76;   /* companies, secondary text */
  --accent: var(--brand);   /* section headings follow the brand color */
  --rule:   #E3E7EA;   /* hairlines */
  --chip:   #F2F5F6;   /* tag chip background */
  --sans:   "IBM Plex Sans", system-ui, sans-serif;
  --cond:   "IBM Plex Sans Condensed", var(--sans);
  --mono:   "IBM Plex Mono", ui-monospace, monospace;
}

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

body {
  font-family: var(--sans);
  font-size: 9.4pt;
  line-height: 1.42;
  color: var(--ink);
  background: #DDE1E4;
}

/* Real A4 pages: fixed height, content that overflows a page is clipped,
   so the screen shows exactly what print will produce. */
.page {
  width: 210mm;
  height: 297mm;
  margin: 10mm auto;
  padding: 11mm 14mm;
  background: #fff;
  box-shadow: 0 2px 18px rgba(0,0,0,.18);
  overflow: hidden;
  position: relative;
}

/* ---------- header ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8mm;
  padding-bottom: 4mm;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 5mm;
}
.photo {
  width: 26mm;
  height: 26mm;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
header > div:first-of-type { flex: 1; }
.nw { white-space: nowrap; }
.name {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 22pt;
  letter-spacing: 0;
  line-height: 1.05;
}
.headline {
  white-space: nowrap;
  margin-top: 1.5mm;
  font-size: 10.5pt;
  font-weight: 500;
  color: var(--ink);
}
.headline small { display: block; margin-top: .5mm; color: var(--muted); font-weight: 400; font-size: 9.4pt; white-space: nowrap; }
.contact {
  flex-shrink: 0;
  max-width: 62mm;
  font-family: var(--mono);
  font-size: 7.6pt;
  text-align: right;
  color: var(--muted);
  line-height: 1.7;
}
.contact a { color: var(--ink); text-decoration: none; }
.contact .ic { width: 8px; height: 8px; fill: currentColor; vertical-align: -0.5px; margin-right: .5mm; }

/* ---------- sections ---------- */
h2 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 8.4pt;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 3mm;
  margin: 4.5mm 0 2.2mm;
}
h2::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

/* narrow vertical brand bar on each section.
   Each section is a variant of --brand, slightly less colorful down the page. */
section {
  border-left: 1.2mm solid var(--sec-bar);
  padding-left: 5mm;
}
section + section { margin-top: 4.5mm; }
section h2 { margin-top: 0; color: var(--sec-txt); }
.page:nth-of-type(1) section:nth-of-type(1) { --sec-bar: var(--brand);
                                              --sec-txt: var(--brand); }
.page:nth-of-type(1) section:nth-of-type(2) { --sec-bar: color-mix(in srgb, var(--brand) 82%, white);
                                              --sec-txt: color-mix(in srgb, var(--brand) 85%, var(--muted)); }
.page:nth-of-type(1) section:nth-of-type(3) { --sec-bar: color-mix(in srgb, var(--brand) 66%, white);
                                              --sec-txt: color-mix(in srgb, var(--brand) 72%, var(--muted)); }
.page:nth-of-type(2) section:nth-of-type(1) { --sec-bar: color-mix(in srgb, var(--brand) 52%, white);
                                              --sec-txt: color-mix(in srgb, var(--brand) 60%, var(--muted)); }
.page:nth-of-type(2) section:nth-of-type(2) { --sec-bar: color-mix(in srgb, var(--brand) 40%, white);
                                              --sec-txt: color-mix(in srgb, var(--brand) 48%, var(--muted)); }

/* ---------- experience entries ---------- */
.job { break-inside: avoid; margin-bottom: 2.3mm; }
.jobline {
  display: flex;
  align-items: baseline;
  gap: 2mm;
}
.jobline .title   { font-weight: 600; }
.jobline .company { color: var(--muted); }
.jobline .date {
  margin-left: auto;          /* dates always right-aligned */
  font-family: var(--mono);
  font-size: 8.2pt;
  white-space: nowrap;
}
.job ul { margin: .8mm 0 0; padding-left: 4.5mm; }
.job li { margin-bottom: .4mm; }
.job p.note { color: var(--muted); font-style: italic; }

/* ---------- skills ---------- */
.skills {
  display: grid;
  grid-template-columns: 36mm 1fr;
  row-gap: .8mm;
  column-gap: 2mm;
}
.skills dt { font-weight: 600; }
.skills dd { margin: 0; }

/* ---------- projects ---------- */
.project { break-inside: avoid; margin-bottom: 4mm; }
.tags { margin-top: 1.2mm; display: flex; flex-wrap: wrap; gap: 1.2mm; }
.tags span {
  font-family: var(--mono);
  font-size: 7.2pt;
  background: var(--chip);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .2mm 1.6mm;
  color: var(--muted);
}

/* ---------- language switch (screen only) ---------- */
.lang-switch {
  position: fixed;
  top: 4mm;
  right: 4mm;
  z-index: 10;
  font-family: var(--mono);
  font-size: 8.4pt;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.4mm 3mm;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- brand color switcher (screen only, built by cv.js) ---------- */
.brand-switch {
  position: fixed;
  top: 14mm;
  right: 4mm;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.6mm;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.4mm 2mm;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.brand-switch .swatch {
  width: 4.2mm;
  height: 4.2mm;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.brand-switch .swatch.active { outline: 2px solid var(--ink); outline-offset: 1px; }
.brand-switch input[type="color"] {
  width: 5mm;
  height: 5mm;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* ---------- print ---------- */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .lang-switch, .brand-switch { display: none; }
  .page { margin: 0; box-shadow: none; break-after: page; }
  .page:last-of-type { break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media screen and (max-width: 820px) {
  .page { width: auto; height: auto; overflow: visible; margin: 0; padding: 6mm; }
  header { flex-direction: column; gap: 3mm; }
  .contact { text-align: left; }
}
