/* ============================================================
   CV Studio — CV page rendering + shared template base styles
   Templates restyle these shared classes under their own scope.
   ============================================================ */

.measure-layer{position:absolute; left:-100000px; top:0; pointer-events:none;}

.page{
  background:#fff; color:#1f2937;
  box-shadow:0 2px 6px rgba(15,23,42,.08), 0 14px 36px rgba(15,23,42,.14);
  margin:0 auto 28px; overflow:hidden; position:relative;
  border-radius:2px;
}
.measure-layer .page{margin:0}

.cv-root{
  height:100%; display:flex; flex-direction:column;
  padding:var(--pad,48px);
  font-family:var(--font,'Inter',system-ui,sans-serif);
  font-size:var(--fs,14px); line-height:var(--lh,1.5); color:#1f2937;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.cv-root *{box-sizing:border-box}
.cv-root a{color:inherit; text-decoration:none}

/* markdown-lite output */
.cv-root .md p{margin:0 0 .35em}
.cv-root .md p:last-child{margin-bottom:0}
.cv-root .md ul{margin:.15em 0 0; padding-left:1.15em}
.cv-root .md li{margin:.18em 0}
.cv-root .md code{font-family:'JetBrains Mono',ui-monospace,monospace; font-size:.88em; background:rgba(15,23,42,.06); padding:.05em .35em; border-radius:3px}

/* columns — always flex so pagination can measure definite column heights */
.cv-cols{flex:1; display:flex; min-height:0; gap:calc(var(--gap,18px)*1.5)}
.cv-side{flex:0 0 32%; min-width:0; overflow:hidden}
.cv-body{flex:1 1 auto; min-width:0; overflow:hidden}

/* blocks */
.cv-blk{margin-bottom:var(--igap,10px)}
.blk-head{margin-bottom:calc(var(--igap,10px)*.85); margin-top:calc(var(--gap,18px)*.6)}
.cv-side > .cv-blk:first-child,
.cv-body > .cv-blk:first-child{margin-top:0}

.sec-title{
  font-family:var(--hfont,inherit); font-size:1.02em; font-weight:700;
  letter-spacing:.07em; text-transform:var(--hcase,uppercase);
  color:var(--accent,#0f766e); margin:0;
}

/* generic entry item */
.it-top{display:flex; justify-content:space-between; gap:12px; align-items:baseline}
.it-title{font-weight:600; color:#111827}
.it-date{font-size:.86em; color:#6b7280; white-space:nowrap}
.it-sub{display:flex; gap:4px 10px; font-size:.94em; color:#4b5563; margin-top:1px; flex-wrap:wrap; align-items:baseline}
.it-org{font-weight:500}
.it-loc{color:#6b7280}
.it-sub .it-loc::before{content:'·  '; color:#9ca3af}
.it-desc{margin-top:3px; color:#374151}
.it-link{font-size:.88em; color:var(--accent)}

/* photo */
.cv-photo{width:96px; height:96px; object-fit:cover; border-radius:var(--photo-r,50%); display:block}

/* contacts */
.contacts{display:flex; flex-direction:column; gap:5px; font-size:.93em}
.contact{display:flex; align-items:center; gap:7px; min-width:0}
.contact .ic{color:var(--accent); flex:0 0 auto}
.contact span, .contact a{overflow-wrap:anywhere; min-width:0}
.contacts.inline{flex-direction:row; flex-wrap:wrap; gap:4px 16px}

/* skills */
.skills-grid{display:grid; grid-template-columns:1fr 1fr; gap:6px 18px}
.cv-side .skills-grid{grid-template-columns:1fr}
.skill{display:flex; align-items:center; gap:8px; min-width:0}
.skill-name{flex:1 1 auto; min-width:0}
.skill-bar{flex:0 0 42%; height:5px; border-radius:3px; background:rgba(100,116,139,.22); overflow:hidden}
.skill-fill{display:block; height:100%; background:var(--accent); border-radius:3px}
.skill-dots{display:flex; gap:3px; flex:0 0 auto}
.skill-dots i{width:7px; height:7px; border-radius:50%; background:rgba(100,116,139,.25)}
.skill-dots i.on{background:var(--accent)}
.skills-inline{display:flex; flex-wrap:wrap; gap:4px 6px}
.skills-inline .sk{white-space:nowrap}
.skills-inline .sk:not(:last-child)::after{content:'  ·'; color:#9ca3af}
.lang{display:flex; align-items:center; gap:8px}
.lang .lang-name{flex:1}
.lang .lvl-txt{font-size:.85em; color:#6b7280}

/* chips (interests etc.) */
.chips{display:flex; flex-wrap:wrap; gap:6px}
.chip{padding:2.5px 10px; border-radius:999px; background:var(--accent-soft,rgba(15,118,110,.12)); color:var(--accent-strong,var(--accent,#0f766e)); font-size:.88em}

/* references */
.ref .ref-name{font-weight:600}
.ref .ref-meta{font-size:.9em; color:#4b5563}

/* icons inside CV */
.cv-root .ic{display:inline-flex; width:1em; height:1em; vertical-align:-.125em}
.cv-root .ic svg{width:100%; height:100%}

/* QR code overlay (page 1) */
.cv-qr{
  position:absolute; z-index:5; line-height:0;
  background:#fff; padding:5px; border-radius:8px;
  box-shadow:0 1px 5px rgba(15,23,42,.2);
}
.cv-qr.qr-tr{top:16px; right:16px}
.cv-qr.qr-br{bottom:16px; right:16px}
.cv-qr.qr-bl{bottom:16px; left:16px}

/* ============ print ============ */
#print-holder{display:none}
@media print{
  body > #app{display:none !important}
  .w-toast-wrap, .w-modal-overlay, .w-pop{display:none !important}
  #print-holder{display:block !important; position:static}
  #print-holder .page{margin:0 !important; box-shadow:none !important; border-radius:0; page-break-after:always; break-after:page}
  #print-holder .page:last-child{page-break-after:auto; break-after:auto}
  html, body{background:#fff !important; margin:0 !important; padding:0 !important; height:auto !important; overflow:visible !important}
}
