/* The CV as a document: two A4 pages. Shared by the story page (#cv, where js/cv.js zooms around it), the full-size
   page (cv/) and the PDFs (printed from cv/ by cv/make-pdf.sh). Generated markup: script/build-cv.py from cv/cv.json. */

.cvdoc {
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #a1a1a6; --rule: #d9d9de; --acc: #e4550f;
  --mark: rgba(228, 85, 15, .17); --fade: #b9b9be;
  font-family: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cvdoc, .cvdoc * { box-sizing: border-box; }
.cvdoc a { color: inherit; text-decoration: none; }
.pg { position: relative; width: 210mm; height: 297mm; padding: 13mm 15mm 12mm; background: #fff; font-size: 8.4pt; line-height: 1.4; overflow: visible; }
.pg-in { height: 100%; display: flex; flex-direction: column; }
.pg-foot { margin-top: auto; padding-top: 3mm; display: flex; justify-content: space-between; font-size: 6.8pt; color: var(--ink-3); letter-spacing: .02em; }

/* header */
.cvh { display: grid; grid-template-columns: 1fr auto; gap: 0 7mm; align-items: start; }
.cvh-name { margin: 0; font-size: 25pt; line-height: .95; font-weight: 760; letter-spacing: -.035em; font-stretch: 92%; }
.cvh-name .dot { color: var(--acc); }
.cvh-role { margin: 2.2mm 0 0; font-size: 11pt; font-weight: 500; letter-spacing: -.01em; }
.cvh-contact { margin: 3mm 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 1mm 4.5mm; font-size: 7.8pt; color: var(--ink-2); }
.cvh-contact a { color: var(--ink); border-bottom: .6pt solid var(--rule); }
.cvh-photo { width: 25mm; height: 30mm; object-fit: cover; border-radius: 1.6mm; display: block; filter: saturate(.9); }
.cvh-profile { grid-column: 1 / -1; margin: 4.5mm 0 0; font-size: 9.4pt; line-height: 1.45; letter-spacing: -.005em; max-width: 165mm; }
.cvh-profile .for { display: block; margin-bottom: 1mm; font-size: 7pt; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--acc); }

/* the years at a glance: work, studies and the detours, honestly in one bar */
.tl { position: relative; margin: 5mm 0 1mm; height: 13mm; }
.tl-axis { position: absolute; left: 0; right: 0; top: 4.2mm; height: .6pt; background: var(--rule); }
.tl-seg { position: absolute; top: 2.6mm; height: 3.4mm; border-radius: 1.7mm; background: var(--ink); transition: background .4s, opacity .4s; }
.tl-seg.study { background: #8e8e93; }
.tl-seg.detour { background: repeating-linear-gradient(-45deg, var(--acc) 0 1.1mm, #f6b48f 1.1mm 2.2mm); }
.tl-seg.now { background: var(--acc); }
.tl-lab { position: absolute; top: 7.4mm; font-size: 6.6pt; font-weight: 600; white-space: nowrap; color: var(--ink); }
.tl-yr { position: absolute; top: -.6mm; font-size: 6pt; color: var(--ink-3); transform: translateX(-50%); font-variant-numeric: tabular-nums; }

/* sections and entries */
.cs { margin-top: 5mm; }
.cs-h { margin: 0 0 1.6mm; padding-bottom: 1.4mm; border-bottom: .8pt solid var(--ink); font-size: 7.2pt; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ce { position: relative; display: grid; grid-template-columns: 27mm 1fr; gap: 0 4mm; padding: 2.1mm 0 2.2mm; border-bottom: .5pt solid #ececf0; }
.ce:last-child { border-bottom: 0; }
.ce-when { padding-top: .5mm; font-size: 7.2pt; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; transition: color .4s; }
.ce-t { margin: 0 0 .9mm; font-size: 9.1pt; line-height: 1.3; letter-spacing: -.008em; transition: color .4s; }
.ce-t b { font-weight: 700; }
.ce-org { color: var(--ink-2); font-weight: 400; }
.ce-org::before { content: " · "; }
.ce-proof { margin-left: 1.5mm; font-size: 6.8pt; font-weight: 600; color: var(--acc) !important; white-space: nowrap; }
.ce.detour .ce-t b::after { content: "detour"; margin-left: 2mm; padding: .2mm 1.4mm; border-radius: 3mm; font-size: 6pt; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--acc); box-shadow: inset 0 0 0 .6pt var(--acc); vertical-align: 1px; }
.ce-l { margin: 0; padding: 0; list-style: none; display: grid; gap: .7mm; }
.ce-l li { position: relative; padding-left: 3mm; color: #3a3a3c; transition: color .4s; }
.ce-l li::before { content: ""; position: absolute; left: .3mm; top: .62em; width: 1.1mm; height: 1.1mm; border-radius: 50%; background: var(--ink-3); transition: background .4s; }
.hl { padding: 0 .4mm; margin: 0 -.4mm; border-radius: .7mm; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 0 / 0% 100%; transition: background-size .7s cubic-bezier(.6, 0, .2, 1); }
.ce-links { white-space: nowrap; font-size: 6.9pt; }
.ce-links a { margin-left: 1.6mm; color: var(--acc); font-weight: 600; }
/* two-column pages: the shorter "Also" bits sit side by side */
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 7mm; }
.cs-grid .ce { grid-template-columns: 1fr; }
.cs-grid .ce-when:empty { display: none; }

/* skills: four short columns of tags */
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2mm 4mm; padding-top: 1mm; }
.sk-g h4 { margin: 0 0 1.4mm; font-size: 7.4pt; font-weight: 700; }
.sk-g ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; align-items: flex-start; gap: .9mm; }
.sk { padding: .4mm 1.6mm; border-radius: 3mm; font-size: 7.4pt; box-shadow: inset 0 0 0 .6pt var(--rule); transition: background .4s, color .4s, box-shadow .4s; }
.ce.sk-e { display: block; }

/* margin notes: what a lens or a match points at, written next to the entry */
.note { position: absolute; left: calc(100% + 6mm); top: 1.2mm; width: 36mm; padding-left: 2.6mm; border-left: 1pt solid var(--acc);
  font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 11pt; line-height: 1.2; color: var(--acc);
  opacity: 0; transform: translateX(-2mm); transition: opacity .45s, transform .45s; pointer-events: none; display: none; }
.cs-grid .note { position: static; width: auto; margin-top: 1mm; transform: none; font-size: 10pt; }
.note b { font-family: "Archivo", sans-serif; font-style: normal; font-size: 6.6pt; font-weight: 700; margin-right: 1mm; }

/* ---- a lens (or a matched role) is on ---- */
.cvdoc[data-lens] .ce-l li, .cvdoc[data-lens] .sk { color: var(--fade); }
.cvdoc[data-lens] .ce-l li::before { background: #e3e3e8; }
.cvdoc[data-lens] .ce.off .ce-t, .cvdoc[data-lens] .ce.off .ce-when { color: var(--fade); }
.cvdoc[data-lens] .ce.off .ce-org { color: var(--fade); }
.cvdoc[data-lens] .ce-l li.on { color: var(--ink); }
.cvdoc[data-lens] .ce-l li.on::before { background: var(--acc); }
.cvdoc[data-lens] li.on.lit .hl { background-size: 100% 100%; }
.cvdoc[data-lens] .sk.on { color: var(--ink); }
.cvdoc[data-lens] .sk.on.lit { background: var(--mark); box-shadow: inset 0 0 0 .6pt var(--acc); }
.cvdoc[data-lens] .tl-seg:not(.on) { opacity: .22; }
.cvdoc[data-lens] .note.show { display: block; }
.cvdoc[data-lens] .ce.seen .note.show { opacity: 1; transform: none; }

/* soft: a tailored PDF marks what fits without fading the rest of the CV */
.cvdoc[data-soft][data-lens] .ce-l li { color: #3a3a3c; }
.cvdoc[data-soft][data-lens] .ce-l li:not(.on)::before { background: var(--ink-3); }
.cvdoc[data-soft][data-lens] .sk { color: var(--ink); }
.cvdoc[data-soft][data-lens] .ce.off .ce-t { color: var(--ink); }
.cvdoc[data-soft][data-lens] .ce.off .ce-when, .cvdoc[data-soft][data-lens] .ce.off .ce-org { color: var(--ink-2); }
.cvdoc[data-soft][data-lens] .tl-seg { opacity: 1; }
.cvdoc[data-soft] .note { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .cvdoc * { transition: none !important; }
}

/* ---- the full-size page and print ---- */
.cvpage { margin: 0; background: #e8e8ed; }
.cvpage .bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 18px; align-items: center; justify-content: center; padding: 12px 16px;
  background: rgba(232, 232, 237, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 500 14px/1.3 "Archivo", sans-serif; }
.cvpage .bar a { color: #1d1d1f; }
.cvpage .bar .btn { background: #1d1d1f; color: #fff; text-decoration: none; padding: 8px 16px; border-radius: 99px; }
.cvpage .cvdoc { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 24px 16px 64px; }
.cvpage .pg { box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.08); }
@media screen and (max-width: 860px) {
  .cvpage .cvdoc { align-items: stretch; }
  .cvpage .pg { width: auto; height: auto; min-height: 0; padding: 22px 18px; font-size: 13px; }
  .cvpage .pg-in { height: auto; }
}
@page { size: A4; margin: 0; }
@media print {
  .cvpage { background: #fff; }
  .cvpage .bar { display: none; }
  .cvpage .cvdoc { display: block; padding: 0; }
  .cvpage .pg { box-shadow: none; page-break-after: always; break-after: page; }
  .cvpage .pg:last-child { page-break-after: auto; break-after: auto; }
  .ce-proof { display: none; }
  .cvdoc * { transition: none !important; }
}
