:root {
  --ink: #1b2430;
  --body: #333c48;
  --muted: #6a7380;
  --rule: #dfe3e8;
  --tint: #f3f5f8;
  --accent: #1f4e79;
  --desk: #e7e9ec;
  --sans: "Inter", "Helvetica Neue", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--body);
  font: 10.5pt/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.toolbar {
  max-width: 210mm;
  margin: 0 auto;
  padding: 1.25rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.toolbar a { color: var(--ink); }
.toolbar button {
  font: 600 0.85rem/1 var(--sans);
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.toolbar button:hover { background: var(--ink); }

.sheet {
  max-width: 210mm;
  margin: 0 auto 3rem;
  background: #fff;
  padding: 16mm 17mm 18mm;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 8px 30px rgb(0 0 0 / 0.08);
}

/* ---------- header ---------- */

.head {
  display: grid;
  grid-template-columns: 31mm 1fr;
  gap: 8mm;
  align-items: center;
  padding-bottom: 7mm;
  border-bottom: 2px solid var(--accent);
}
.head img {
  width: 31mm;
  height: 38.75mm;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 26pt;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.head .title {
  margin: 1.5mm 0 4mm;
  color: var(--accent);
  font-size: 12.5pt;
  font-weight: 500;
}
.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1mm 6mm;
  font-size: 9.5pt;
  color: var(--muted);
}
.contact li { display: inline-flex; align-items: center; gap: 1.6mm; }
.contact svg { width: 3.4mm; height: 3.4mm; fill: none; stroke: var(--accent); stroke-width: 2; }

/* ---------- sections ---------- */

h2 {
  margin: 8mm 0 3mm;
  color: var(--accent);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 3mm;
  break-after: avoid;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.profile { margin: 0; font-size: 11pt; line-height: 1.6; color: var(--ink); }

.strengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4mm;
  margin-top: 5mm;
}
.strengths div {
  background: var(--tint);
  border-top: 2px solid var(--accent);
  padding: 3mm 3.5mm;
  font-size: 9.5pt;
  line-height: 1.45;
}
.strengths b { display: block; color: var(--ink); font-size: 10pt; margin-bottom: 0.8mm; }

/* ---------- jobs ---------- */

.job { padding: 3mm 0 3.5mm; break-inside: avoid; }
.job + .job { border-top: 1px solid var(--rule); }

.job header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4mm;
}
.job h3 { margin: 0; color: var(--ink); font-size: 11pt; font-weight: 650; }
.job .dates {
  flex: none;
  color: var(--muted);
  font-size: 9pt;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.job .org { margin: 0.3mm 0 1.5mm; font-weight: 600; color: var(--accent); font-size: 10pt; }
.job .org span { color: var(--muted); font-weight: 400; }
.job p { margin: 0; }
.job ul { margin: 1.5mm 0 0; padding-left: 4.5mm; }
.job li { margin: 0.6mm 0; }
.job li::marker { color: var(--accent); }

.tech {
  margin-top: 2mm;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2mm;
  padding: 0;
  list-style: none;
}
.tech li {
  font-size: 8pt;
  line-height: 1;
  padding: 1.2mm 2mm;
  border-radius: 2px;
  background: var(--tint);
  color: var(--body);
}

.compact { display: grid; gap: 2.5mm; margin-top: 1mm; }
.compact .row { display: flex; justify-content: space-between; gap: 4mm; }
.compact b { color: var(--ink); font-weight: 600; }

/* ---------- bottom grid ---------- */

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10mm;
}

.skills { margin: 0; display: grid; gap: 2.5mm; }
.skills dt { color: var(--ink); font-weight: 650; font-size: 9.5pt; }
.skills dd { margin: 0.4mm 0 0; font-size: 9.5pt; }

.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 2.5mm; font-size: 9.5pt; }
.facts b { color: var(--ink); display: block; font-size: 10pt; }

@media (max-width: 760px) {
  body { font-size: 10pt; }
  .toolbar { padding: 1rem; }
  .sheet { padding: 1.5rem 1.25rem; box-shadow: none; }
  .head { grid-template-columns: 1fr; }
  .strengths, .two { grid-template-columns: 1fr; }
  .job header, .compact .row { flex-direction: column; gap: 0; }
}

@media print {
  @page { size: A4; margin: 13mm 15mm 14mm; }
  body { background: #fff; font-size: 9.5pt; }
  .toolbar { display: none; }
  .sheet { box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .strengths div, .tech li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: var(--accent); }
}
