/* Printable CV. Single column, plain text, standard fonts: built for ATS and OCR parsers first. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: var(--space-5) var(--space-4);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  color: #111;
  background: var(--color-surface-alt);
}

h1, h2, h3, p, ul {
  margin: 0;
}

a {
  color: var(--color-brand-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  max-width: 800px;
  margin: 0 auto var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.toolbar .chip-row {
  margin: 0;
  justify-content: flex-start;
}

.toolbar button.print {
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cv {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-7);
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.cv-header {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: 2px solid #111;
}

.cv-header h1 {
  font-size: 20pt;
  line-height: 1.2;
}

.cv-header #label {
  margin-top: 2pt;
  font-size: 12pt;
  color: #444;
}

.cv-contact {
  margin-top: var(--space-2);
  font-style: normal;
  font-size: 9.5pt;
  color: #333;
}

.cv-contact .sep {
  color: #999;
}

section {
  margin-bottom: var(--space-5);
}

section[hidden] {
  display: none;
}

h2 {
  padding-bottom: 3pt;
  margin-bottom: var(--space-3);
  border-bottom: 1px solid #bbb;
  font-size: 12pt;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h3 {
  font-size: 10.5pt;
  font-weight: 700;
}

.entry {
  margin-bottom: var(--space-4);
}

.entry:last-child {
  margin-bottom: 0;
}

.entry header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.entry time,
.entry .keywords {
  flex-shrink: 0;
  font-size: 9.5pt;
  color: #555;
}

.entry .keywords {
  text-align: right;
}

.entry .org {
  font-weight: 600;
  color: #333;
}

.entry .lede {
  margin-top: 2pt;
  color: #333;
}

.entry ul,
#certificates-container,
#languages-container {
  margin-top: 3pt;
  padding-left: 1.1em;
}

li {
  margin-bottom: 2pt;
}

.skill-line {
  margin-bottom: 3pt;
}

@media (max-width: 600px) {
  .cv {
    padding: var(--space-5) var(--space-4);
  }

  .entry header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .entry .keywords {
    text-align: left;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm 14mm;
  }

  body {
    padding: 0;
    font-size: 9.5pt;
    line-height: 1.3;
    background: #fff;
  }

  .toolbar {
    display: none;
  }

  .cv {
    max-width: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .cv-header {
    margin-bottom: var(--space-4);
  }

  section {
    margin-bottom: var(--space-4);
  }

  .entry {
    margin-bottom: var(--space-3);
  }

  a {
    color: #111;
  }

  /* Keep headings with what follows, and never split a single line item, but let long entries flow across pages. */
  h2,
  .entry header,
  .entry .org {
    break-after: avoid;
  }

  .cv-header,
  .entry header,
  li,
  .skill-line {
    break-inside: avoid;
  }

  p {
    orphans: 2;
    widows: 2;
  }
}

/* Screen-only role filter chips in the toolbar */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-ink-soft);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}
