/* Layout: the PDF's single column (logo gutter + text), set on a sheet of paper on screen and printed as A4.
   Same typeface as the PDF (IBM Plex Sans); one cobalt accent for links and section rules. */
:root {
  --desk: #f3f4f1; --paper: #ffffff; --ink: #15181e; --ink-2: #474d58; --muted: #6f7682; --line: #e3e5e8;
  --accent: #2648b8; --tile: #ffffff; --tile-line: #e3e5e8;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --desk: #0e1116; --paper: #151922; --ink: #eceef2; --ink-2: #b7bdc8; --muted: #8a919d; --line: #262c37;
    --accent: #8aa6f5; --tile: #ffffff; --tile-line: #2d3440; color-scheme: dark; }
}
:root[data-theme="dark"] { --desk: #0e1116; --paper: #151922; --ink: #eceef2; --ink-2: #b7bdc8; --muted: #8a919d; --line: #262c37;
  --accent: #8aa6f5; --tile: #ffffff; --tile-line: #2d3440; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 400 15px/1.55 var(--font); padding-inline: 16px; padding-block: 0 48px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
p, ul, h1, h2, h3, h4 { margin: 0; }
b { font-weight: 600; }

/* top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; margin-inline: -16px; padding-inline: 16px;
  background: color-mix(in srgb, var(--desk) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 60rem; margin-inline: auto; display: flex; align-items: center; gap: 16px; padding-block: 10px; }
.who { font-weight: 600; color: var(--ink); white-space: nowrap; }
.jump { display: flex; gap: 16px; flex: 1; overflow-x: auto; font-size: 0.85rem; scrollbar-width: none; }
.jump a { color: var(--muted); white-space: nowrap; }
.jump a:hover { color: var(--ink); text-decoration: none; }
.actions { display: flex; gap: 8px; margin-left: auto; }
.btn { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 500 0.82rem/1 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
@media (max-width: 860px) { .jump { display: none; } }
@media (max-width: 520px) { .who { display: none; } .actions { margin-left: 0; width: 100%; } .actions .btn { flex: 1; justify-content: center; } }

/* the sheet */
.paper { max-width: 60rem; margin: 28px auto 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(24px, 5vw, 56px); display: grid; gap: 34px; }
.head { display: grid; gap: 6px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.headline { font-size: 1.1rem; font-weight: 600; }
.where { color: var(--muted); }
.contact { list-style: none; padding: 0; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.contact li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contact svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.contact a { color: var(--ink); }
.contact li:last-child a { color: var(--accent); }
.phones { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.phones a { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.flag { width: 18px; height: 13px; flex: none; }

section { display: grid; gap: 14px; min-width: 0; }
h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
section > p { color: var(--ink-2); max-width: 68ch; }

/* entries: logo gutter + body, as in the PDF */
.entry { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding-block: 6px; break-inside: avoid-page; }
.entry + .entry { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 6px; }
.logo { width: 40px; height: 40px; border-radius: 9px; background: var(--tile); border: 1px solid var(--tile-line); object-fit: contain; padding: 3px; }
.body { display: grid; gap: 4px; min-width: 0; }
.body h3 { font-size: 1.05rem; font-weight: 700; }
.org { font-weight: 500; }
.when { color: var(--muted); font-style: italic; font-size: 0.9rem; }
.body > p:not(.org):not(.when) { color: var(--ink-2); margin-top: 6px; }
.body h4 { font-size: 0.92rem; font-weight: 700; margin-top: 10px; }
.body ul { padding-left: 1.15em; margin-top: 6px; display: grid; gap: 4px; color: var(--ink-2); }
.body li::marker { color: var(--muted); }
.body li b, .body p b { color: var(--ink); }
.entry.compact .body > p { margin-top: 0; }

.certs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 14px 28px; }
.certs li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; break-inside: avoid; }
.cert { font-size: 0.95rem; }
.meta { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.meta, .phones { font-variant-numeric: tabular-nums; }

.skills { display: grid; gap: 8px; color: var(--ink-2); }
.skills b { color: var(--ink); }

/* print: the sheet alone, A4, black on white */
@page { size: A4; margin: 14mm 14mm 16mm; }
@media print {
  :root { --desk: #fff; --paper: #fff; --ink: #000; --ink-2: #222; --muted: #555; --line: #ccc; --accent: #1d3c9e; --tile-line: #ddd; color-scheme: light; }
  body { padding: 0; font-size: 10.5pt; }
  .bar { display: none; }
  .paper { border: 0; border-radius: 0; padding: 0; margin: 0; max-width: none; gap: 18pt; }
  .entry + .entry { padding-top: 10pt; }
  .certs { grid-template-columns: 1fr; gap: 6pt; }
  a { color: inherit; }
}
