/* Printable version: always light, A4-shaped, no site chrome. */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #e9edf1; color: #111418; line-height: 1.5; font-size: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }

/* ---------- Toolbar (screen only) ---------- */
.toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid #dfe4ea; flex-wrap: wrap; }
.tb-back { font-weight: 600; font-size: 0.9rem; text-decoration: none; color: #4b5563; white-space: nowrap; }
.tb-back:hover { color: #111; }
.tb-hint { flex: 1; min-width: 200px; font-size: 0.85rem; color: #6b7280; }
.tb-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: #f0f3f6; border: 1px solid #dfe4ea; }
.lang-switch button { border: none; background: transparent; padding: 5px 10px; border-radius: 999px; font: inherit; font-size: 0.78rem; font-weight: 700; color: #8b95a1; cursor: pointer; letter-spacing: 0.04em; }
.lang-switch button.active { background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.tb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; border: 1px solid transparent; transition: transform 0.2s, opacity 0.2s; }
.tb-btn:hover { transform: translateY(-1px); }
.tb-btn.primary { background: #111418; color: #fff; }
.tb-btn.secondary { background: #fff; border-color: #cfd6de; color: #111; }
.tb-btn.busy { opacity: 0.6; pointer-events: none; }

/* ---------- Document ---------- */
.doc-wrap { padding: 32px 16px 64px; overflow-x: auto; }
.doc { width: 794px; max-width: 100%; margin: 0 auto; background: #fff; color: #111418; padding: 52px 56px; box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12); border-radius: 6px; }
.doc-loading { color: #6b7280; }
.doc-head { display: flex; justify-content: space-between; gap: 32px; padding-bottom: 22px; border-bottom: 2px solid #111418; margin-bottom: 26px; }
.doc-name { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.doc-tagline { font-size: 15px; font-weight: 600; color: #0b7f8a; margin-top: 6px; }
.doc-lead { font-size: 13px; color: #4b5563; margin-top: 10px; max-width: 440px; }
.doc-avail { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700; color: #15803d; background: #ecfdf3; padding: 3px 9px; border-radius: 999px; }
.doc-contact { text-align: right; font-size: 12px; color: #4b5563; flex-shrink: 0; max-width: 250px; }
.doc-contact .doc-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9ca3af; margin-bottom: 6px; }
.doc-contact div { margin-top: 3px; word-break: break-all; }
.doc-contact strong { color: #111418; font-weight: 600; }
.doc-photo { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; margin-left: auto; margin-bottom: 10px; }

.doc-sec { margin-bottom: 26px; }
.doc-h2 { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #0b7f8a; padding-bottom: 6px; border-bottom: 1px solid #e5e7eb; margin-bottom: 14px; }
.avoid-break { break-inside: avoid; page-break-inside: avoid; }

.doc-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.doc-skill { font-size: 12px; }
.doc-skill strong { font-size: 13px; }
.doc-skill .muted { color: #6b7280; }
.doc-skill p { color: #4b5563; margin-top: 2px; }

.doc-project { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 12px 0; border-bottom: 1px dashed #e5e7eb; }
.doc-project:last-child { border-bottom: none; }
.doc-project.no-thumb { grid-template-columns: 1fr; }
.doc-thumb { width: 150px; height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; background: #f3f4f6; }
.doc-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 11px; font-weight: 600; }
.doc-ptitle { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.doc-year { font-size: 11px; font-weight: 600; color: #6b7280; margin-left: 8px; }
.doc-pintro { font-size: 12.5px; color: #374151; margin-top: 3px; }
.doc-tags { margin-top: 6px; font-size: 11px; color: #6b7280; }
.doc-psec { margin-top: 7px; font-size: 12px; color: #4b5563; }
.doc-psec strong { color: #111418; }
.doc-outcomes { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.doc-outcome { font-size: 12px; }
.doc-outcome b { color: #0b7f8a; font-size: 13px; }
.doc-link { font-size: 11px; color: #0b7f8a; margin-top: 6px; word-break: break-all; }

.doc-row { display: grid; grid-template-columns: 210px 1fr; gap: 18px; padding: 9px 0; border-bottom: 1px dashed #e5e7eb; }
.doc-row:last-child { border-bottom: none; }
.doc-row-left { display: flex; gap: 10px; align-items: flex-start; }
.doc-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; border: 1px solid #e5e7eb; flex-shrink: 0; }
.doc-initials { width: 34px; height: 34px; border-radius: 9px; background: #eef2f5; color: #0b7f8a; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-role { font-size: 13px; font-weight: 700; line-height: 1.3; }
.doc-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.doc-desc { font-size: 12px; color: #4b5563; }

.doc-certs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.doc-cert { font-size: 12px; padding: 6px 0; }
.doc-cert strong { font-size: 12.5px; display: block; }
.doc-cert p { color: #4b5563; margin-top: 2px; }

.doc-about p { font-size: 12.5px; color: #374151; }
.doc-about p + p { margin-top: 8px; }
.doc-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid #e5e7eb; display: flex; justify-content: space-between; font-size: 10.5px; color: #9ca3af; }

@media (max-width: 700px) {
  .doc { padding: 28px 22px; }
  .doc-head { flex-direction: column; gap: 14px; }
  .doc-contact { text-align: left; max-width: none; }
  .doc-photo { margin-left: 0; }
  .doc-skills, .doc-certs { grid-template-columns: 1fr; }
  .doc-project, .doc-row { grid-template-columns: 1fr; gap: 10px; }
}

@page { size: A4; margin: 14mm; }
@media print {
  body { background: #fff; }
  .toolbar { display: none !important; }
  .doc-wrap { padding: 0; overflow: visible; }
  .doc { width: auto; max-width: none; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  .doc-sec { margin-bottom: 20px; }
  a { text-decoration: none; }
}
