/* Résumé pages: public/cv/<lang>/index.html, generated by scripts/cv/build.js.
   On screen it's a sheet of paper on a grey desk; in print (and the PDFs) it's just the sheet. */

:root {
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --rule: #cbd5e1;
  --accent: #1d4ed8;
  --desk: #e2e8f0;
  --paper: #ffffff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--desk);
  color: var(--body);
  font-family: Archivo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 9.5pt;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd {
  margin: 0;
}

/* ---------- Toolbar (screen only) ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px max(16px, calc((100vw - 8.5in) / 2));
  background: #020617;
  color: #fff;
  font-size: 14px;
}

.toolbar .home {
  margin-right: auto;
  color: #bfdbfe;
}

.toolbar .langs {
  display: flex;
  gap: 2px;
}

.toolbar .langs a,
.toolbar .langs span {
  padding: 4px 8px;
  color: #bfdbfe;
}

.toolbar .langs span {
  background: #334155;
  color: #fff;
}

.toolbar .button {
  padding: 8px 14px;
  border: 1px solid #fff;
  font-weight: 600;
  color: #fff;
}

.toolbar a:hover {
  color: #fff;
  text-decoration: none;
}

.toolbar .button:hover {
  background: #fff;
  color: #020617;
}

/* ---------- Sheet ---------- */

.sheet {
  width: 8.5in;
  max-width: 100%;
  margin: 32px auto 64px;
  padding: 0.6in 0.65in;
  background: var(--paper);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.12), 0 12px 32px rgb(15 23 42 / 0.08);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

h1 {
  color: var(--ink);
  font-size: 28pt;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.title {
  margin-top: 6px;
  color: var(--accent);
  font-size: 12.5pt;
  font-weight: 600;
}

.contact {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 9pt;
  line-height: 1.5;
  color: var(--body);
}

section {
  margin-top: 14px;
}

h2 {
  margin-bottom: 6px;
  break-after: avoid;
  color: var(--accent);
  font-size: 9pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary {
  color: var(--ink);
  font-size: 10pt;
}

.skills {
  display: grid;
  gap: 3px;
}

.skills div {
  display: grid;
  grid-template-columns: 1.7in 1fr;
  gap: 12px;
}

.skills dt {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Experience ---------- */

.job {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
}

h2 + .job {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.job-head {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  break-after: avoid;
}

.job-head h3 {
  color: var(--ink);
  font-size: 11.5pt;
  font-weight: 700;
}

.via {
  color: var(--muted);
  font-size: 9.5pt;
  font-weight: 500;
}

.period {
  color: var(--muted);
  font-size: 9pt;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  align-self: baseline;
}

.place {
  color: var(--muted);
  font-size: 9pt;
}

.role {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 600;
}

.note {
  color: var(--muted);
  font-size: 9pt;
  font-weight: 400;
  font-style: italic;
}

.sub {
  margin-top: 7px;
}

.sub-head {
  break-after: avoid;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.sub-head h4,
.sub-head h3 {
  color: var(--ink);
  font-size: 10pt;
  font-weight: 600;
}

.job ul {
  margin-top: 3px;
  padding-left: 1.1em;
}

.job li {
  break-inside: avoid;
  margin-top: 2px;
  padding-left: 2px;
}

.job li::marker {
  color: var(--muted);
}

.stack {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5pt;
}

/* ---------- Apps, education, languages ---------- */

.apps {
  break-inside: avoid;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.apps h3 {
  color: var(--ink);
  font-size: 10.5pt;
  font-weight: 700;
}

.apps p {
  font-size: 9pt;
}

.apps .platforms,
.apps .url {
  color: var(--muted);
  font-size: 8.5pt;
  font-weight: 400;
}

.apps h3 {
  margin-bottom: 2px;
}

.apps .url {
  margin-top: 3px;
}

.keep {
  break-inside: avoid;
}

/* ---------- Phones ---------- */

@media screen and (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .sheet {
    margin: 0;
    padding: 24px 16px 40px;
    box-shadow: none;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  h1 {
    font-size: 32px;
  }

  .contact {
    text-align: left;
    font-size: 14px;
  }

  .skills div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .skills div + div {
    margin-top: 6px;
  }

  .apps {
    grid-template-columns: 1fr;
  }

  .sub-head {
    flex-direction: column;
    gap: 0;
  }
}

/* ---------- Print / PDF ---------- */

@page {
  size: letter;
  margin: 0.4in 0.55in;
}

@media print {
  body {
    background: none;
  }

  .toolbar {
    display: none;
  }

  .sheet {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  a:hover {
    color: inherit;
    text-decoration: none;
  }
}
