/* ============================================================
   Résumé — print-optimised, A4
   ============================================================ */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --ink:        #0f1437;
  --ink-soft:   #2d3358;
  --muted:      #5b6184;
  --accent:     #5b46ff;
  --rule:       #d9deec;
  --bg:         #eef0f7;
  --paper:      #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 10.5pt;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding: 28px 16px 60px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--ink); }

/* Screen toolbar */
.toolbar {
  position: sticky; top: 12px;
  z-index: 5;
  display: flex; align-items: center; gap: .5rem;
  width: 210mm;
  max-width: calc(100% - 8px);
  margin: 0 auto 14px;
  padding: .5rem .6rem;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--rule);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px -12px rgba(15,20,55,.18);
}
.tb-spacer { flex: 1; }
.tb-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s, border-color .2s;
}
.tb-btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tb-btn--ghost { background: transparent; }
.tb-btn--primary {
  background: linear-gradient(135deg, #7c5cff, #21d4fd);
  color: #fff; border-color: transparent;
}
.tb-btn--primary:hover { color: #fff; }

/* A4 page */
.page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm 16mm;
  background: var(--paper);
  box-shadow: 0 30px 80px -30px rgba(15,20,55,.30);
  border-radius: 4px;
}

/* Header */
.cv-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 1.4rem;
}
.cv-header h1 {
  font-size: 26pt;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cv-header__role {
  margin: .35rem 0 .15rem;
  font-size: 11.5pt;
  font-weight: 600;
  color: var(--accent);
}
.cv-header__tag {
  margin: 0;
  font-size: 9.5pt;
  color: var(--muted);
}
.cv-header__contact {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .15rem;
  font-size: 9pt;
  align-content: end;
}
.cv-header__contact .lbl {
  display: inline-block;
  width: 60px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 7.5pt;
}

/* Sections */
.cv-section {
  margin-top: 1.1rem;
  break-inside: avoid-page;
}
.cv-section h2 {
  font-size: 11pt;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .25rem;
  margin-bottom: .65rem;
}
.cv-section p { margin: 0 0 .4rem; color: var(--ink-soft); }

/* Job */
.cv-job, .cv-edu { margin-bottom: .9rem; break-inside: avoid; }
.cv-job header, .cv-edu header {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.cv-job h3, .cv-edu h3 { font-size: 11.5pt; font-weight: 600; }
.cv-job__date { font-size: 9pt; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-job__company { margin: .1rem 0 .35rem; font-size: 9.5pt; font-style: italic; color: var(--muted); }
.cv-job ul {
  margin: .25rem 0 0; padding-left: 1.05rem;
}
.cv-job li { margin: .15rem 0; color: var(--ink-soft); }
.cv-job li strong { color: var(--ink); }

/* Skills */
.cv-skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem 1.5rem;
}
.cv-skills h4 { font-size: 10pt; font-weight: 600; margin-bottom: .15rem; color: var(--ink); }
.cv-skills p { font-size: 9.5pt; margin: 0; color: var(--ink-soft); }

/* Projects */
.cv-projects { list-style: none; padding: 0; margin: 0; }
.cv-projects li { margin: 0 0 .55rem; font-size: 9.5pt; color: var(--ink-soft); }
.cv-projects strong { color: var(--ink); }

/* Inline section */
.cv-section--inline {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}
.cv-section--inline h2 { margin-top: 0; }
.cv-inline-list { list-style: none; padding: 0; margin: 0; }
.cv-inline-list li { padding: .1rem 0; color: var(--ink-soft); font-size: 9.5pt; }

/* Footer */
.cv-footer {
  margin-top: 1.4rem;
  padding-top: .6rem;
  border-top: 1px solid var(--rule);
  font-size: 8.5pt; color: var(--muted);
  display: flex; justify-content: space-between; gap: 1rem;
}

/* Page break helper */
.page-break { break-after: page; page-break-after: always; height: 0; }

/* ============= PRINT ============= */
@page {
  size: A4;
  margin: 12mm 14mm;
}

@media print {
  html, body { background: #fff !important; padding: 0 !important; }
  .no-print { display: none !important; }
  .page {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  a { color: var(--ink); text-decoration: none; }
  .cv-section { break-inside: avoid; }
  .cv-job, .cv-edu { break-inside: avoid; }
  .page-break { break-after: page; }
}

/* ============= MOBILE ============= */
@media (max-width: 720px) {
  body { padding: 12px 8px 32px; font-size: 12pt; }
  .page { padding: 18px 16px; width: 100%; }
  .cv-header { grid-template-columns: 1fr; gap: .75rem; }
  .cv-skills { grid-template-columns: 1fr; }
  .cv-section--inline { grid-template-columns: 1fr; gap: 1rem; }
  .cv-job header, .cv-edu header { flex-direction: column; gap: .15rem; }
}
