/* ==========================================================================
   David Zörb — CV / Print Stylesheet
   Designed for browser print-to-PDF. Screen view mimics the print layout.
   ========================================================================== */

:root {
  --cv-accent:    #1d8cf8;
  --cv-text:      #111;
  --cv-muted:     #555;
  --cv-subtle:    #888;
  --cv-border:    #ddd;
  --cv-bg:        #fff;
  --cv-max:       800px;
  --cv-pad:       48px;
}

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

html {
  font-size: 15px;
}

body {
  background: #f0f0f4;
  color: var(--cv-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Screen actions bar (hidden on print)
   -------------------------------------------------------------------------- */
.cv-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  padding: 20px;
  background: #1d1d2e;
}

.cv-print-btn {
  background: #1d8cf8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.cv-print-btn:hover {
  background: #1371d9;
}

.cv-back-link {
  color: #7878a0;
  text-decoration: none;
  font-size: 0.875rem;
}

.cv-back-link:hover {
  color: #e2e2f0;
}

/* --------------------------------------------------------------------------
   CV Container
   -------------------------------------------------------------------------- */
.cv {
  max-width: var(--cv-max);
  margin: 32px auto;
  background: var(--cv-bg);
  padding: var(--cv-pad);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--cv-accent);
  margin-bottom: 32px;
}

.cv-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cv-text);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.cv-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--cv-accent);
  margin-top: 4px;
}

.cv-contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 0.8rem;
  color: var(--cv-muted);
}

.cv-contact-block a {
  color: var(--cv-muted);
  text-decoration: none;
}

.cv-contact-block a:hover {
  color: var(--cv-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(--cv-accent);
  border-bottom: 1px solid var(--cv-border);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.cv-summary {
  font-size: 0.9rem;
  color: var(--cv-text);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Experience 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(--cv-text);
}

.cv-entry-org {
  font-size: 0.82rem;
  color: var(--cv-muted);
  margin-top: 1px;
}

.cv-entry-period {
  font-size: 0.8rem;
  color: var(--cv-subtle);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.cv-entry-desc {
  font-size: 0.85rem;
  color: var(--cv-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Certifications & 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(--cv-text);
}

.cv-cert-note {
  font-size: 0.8rem;
  color: var(--cv-muted);
}

/* --------------------------------------------------------------------------
   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(--cv-text);
  min-width: 90px;
  flex-shrink: 0;
}

.cv-skill-list {
  color: var(--cv-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Print styles
   -------------------------------------------------------------------------- */
@media print {
  @page {
    size: A4;
    margin: 16mm 18mm;
  }

  html {
    font-size: 13px;
  }

  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .cv {
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .cv-entry {
    page-break-inside: avoid;
  }

  .cv-section {
    page-break-inside: avoid;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive (screen only)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root {
    --cv-pad: 24px;
  }

  .cv {
    margin: 0;
    box-shadow: none;
  }

  .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;
  }
}
