/* ==========================================================================
   David Zörb — CV / Print Stylesheet
   Screen view inherits CSS variables from style.css. Print is self-contained.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 24px 48px;
  scroll-padding-top: 48px;
}

/* ─── CV card ─── */
.cv {
  max-width: 800px;
  margin: 64px auto 0;
  background: var(--surface);
  padding: 48px;
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ─── Print button in nav ─── */
#cv-print-btn {
  font-size: 0.75rem; padding: 0 14px; height: 36px; border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--transition);
  line-height: 36px;
}
#cv-print-btn:hover {
  color: var(--text);
  border-color: var(--text-tertiary);
}


/* ─── Header ─── */
.cv-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; padding-bottom: 24px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 32px;
}
.cv-name {
  font-size: 2rem; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px; line-height: 1.1;
}
.cv-title {
  font-size: 1rem; font-weight: 500; color: var(--accent);
  margin-top: 4px;
}
.cv-contact-block {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 3px; font-size: 0.8rem; color: var(--text-secondary);
}
.cv-contact-block a { color: var(--text-secondary); text-decoration: none; }
.cv-contact-block a:hover { color: var(--accent); }

/* ─── Sections ─── */
.cv-section { margin-bottom: 28px; }
.cv-section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin-bottom: 16px;
}
.cv-summary {
  font-size: 0.9rem; color: var(--text);
  line-height: 1.7;
}

/* ─── Entries ─── */
.cv-entry { margin-bottom: 20px; }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 4px;
}
.cv-entry-role {
  font-size: 0.95rem; font-weight: 600; color: var(--text);
}
.cv-entry-org {
  font-size: 0.82rem; color: var(--text-secondary);
  margin-top: 1px;
}
.cv-entry-period {
  font-size: 0.8rem; color: var(--text-tertiary);
  white-space: nowrap; flex-shrink: 0; padding-top: 2px;
}
.cv-entry-desc {
  font-size: 0.85rem; color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── Certs / Awards ─── */
.cv-certs { display: flex; flex-direction: column; gap: 10px; }
.cv-cert { display: flex; flex-direction: column; gap: 1px; }
.cv-cert-name {
  font-size: 0.88rem; font-weight: 600; color: var(--text);
}
.cv-cert-note {
  font-size: 0.8rem; color: var(--text-secondary);
}

/* ─── Skills ─── */
.cv-skills { display: flex; flex-direction: column; gap: 8px; }
.cv-skill-group {
  display: flex; gap: 12px; font-size: 0.85rem;
}
.cv-skill-label {
  font-weight: 600; color: var(--text);
  min-width: 90px; flex-shrink: 0;
}
.cv-skill-list { color: var(--text-secondary); line-height: 1.5; }

/* ─── Print ─── */
@media print {
  @page { size: A4; margin: 16mm 18mm; }
  html { font-size: 13px; }
  body {
    background: #fff !important;
    padding: 0;
    color: #111;
  }
  .cv {
    max-width: 100%; margin: 0; padding: 0;
    box-shadow: none; border: none; border-radius: 0;
    background: #fff !important;
  }
  .cv-section-title {
    color: #1d8cf8;
  }
  .cv-entry { page-break-inside: avoid; }
  .cv-section { page-break-inside: avoid; }
  .no-print { display: none !important; }
}

/* ─── Mobile ─── */
@media (max-width: 640px) {
  body { padding: 0 0 32px; }
  .cv { padding: 24px; margin-top: 56px; }
  .cv-header { flex-direction: column; }
  .cv-contact-block { align-items: flex-start; }
  .cv-entry-header { flex-direction: column; gap: 2px; }
  .cv-skill-group { flex-direction: column; gap: 2px; }
}
