/* ==========================================================================
   cassette - print view
   The on-screen toolbar, then the shared A4 rules used by print.html, the
   plain view's print action and Chromium → resume.pdf.
   ========================================================================== */

.print-page {
  --print-accent: #0b6b45;
  --print-ink: #203329;
  --print-muted: #64756b;
  margin: 0;
  min-height: 100dvh;
  padding: 16px clamp(12px, 3vw, 28px) 64px;
  background: #e8e5db;
  color: var(--print-ink);
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
}

.print-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(900px, 100%);
  margin: 0 auto 14px;
  padding: 11px 2px;
  border-bottom: 1px solid #cbd4ca;
  background: #e8e5db;
  background: color-mix(in srgb, #e8e5db 88%, transparent);
  backdrop-filter: blur(9px);
  color: var(--print-muted);
  font-size: 12px;
}

.print-back {
  color: var(--print-accent);
  text-decoration: none;
}

.print-back:hover {
  text-decoration: underline;
}

.print-title {
  color: var(--print-muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.print-actions {
  margin-left: auto;
  white-space: nowrap;
}

.print-actions a,
.print-actions button {
  border: 0;
  background: none;
  color: var(--print-accent);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.print-actions a:hover,
.print-actions button:hover {
  text-decoration: underline;
}

.print-page .cv-page {
  width: min(900px, 100%);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   A4
   -------------------------------------------------------------------------- */

@page {
  size: A4;
  margin: 13mm 14mm 13mm;
}

@media print {
  html,
  body {
    background: #fff !important;
  }

  body::before {
    display: none !important;
  }

  .print-page {
    min-height: 0;
    padding: 0;
    background: #fff;
  }

  .print-bar,
  .no-print,
  .shell,
  .quickstart,
  .plain-bar,
  .skip,
  .noscript,
  #fx {
    display: none !important;
  }

  /* Printing from the terminal page still produces the CV, not the shell. */
  #plain-view {
    display: block !important;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .cv-page {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: 9.35pt;
    line-height: 1.38;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .cv-header {
    gap: 20px;
    padding-bottom: 10px;
    border-bottom-width: 1.5px;
  }

  .cv-kicker {
    margin-bottom: 4px !important;
    font-size: 7pt;
  }

  .cv-identity h1 {
    font-size: 22pt;
  }

  .cv-role {
    margin-top: 3px !important;
    font-size: 9.5pt;
  }

  .cv-contact,
  .cv-links {
    margin-top: 4px !important;
    font-size: 7.4pt;
    line-height: 1.45;
  }

  .cv-links {
    margin-top: 2px !important;
  }

  .cv-photo {
    width: 82px;
    height: 82px;
  }

  .cv-section {
    margin-top: 13px;
  }

  .cv-section h2 {
    margin-bottom: 7px;
    padding-bottom: 3px;
    font-size: 7.2pt;
    break-after: avoid;
  }

  .cv-summary {
    margin-top: 10px;
  }

  .cv-lede {
    font-size: 9.2pt;
  }

  .cv-prose {
    margin-top: 5px;
    font-size: 8.1pt;
    line-height: 1.4;
  }

  .cv-prose p + p {
    margin-top: 4px;
  }

  .cv-job {
    padding-bottom: 9px;
    margin-bottom: 9px;
  }

  .cv-job h3 {
    font-size: 9.5pt;
  }

  .cv-company {
    font-size: 8pt;
  }

  .cv-job-meta {
    font-size: 7.2pt;
    line-height: 1.4;
  }

  .cv-job-lede {
    margin-top: 4px !important;
    font-size: 8.2pt;
  }

  .cv-job-body {
    margin-top: 2px;
  }

  .cv-job-body ul {
    margin-top: 2px;
    padding-left: 13px;
  }

  .cv-job-body li {
    margin: 1px 0;
    font-size: 7.9pt;
    line-height: 1.38;
  }

  .cv-stack {
    margin-top: 3px !important;
    font-size: 6.9pt;
  }

  .cv-skill-grid {
    gap: 5px 20px;
  }

  .cv-skill h3 {
    font-size: 6.8pt;
  }

  .cv-skill p {
    font-size: 7.3pt;
    line-height: 1.35;
  }

  .cv-strengths {
    margin-top: 7px !important;
    font-size: 7.2pt;
  }

  .cv-projects li {
    padding: 2px 0;
    font-size: 7.7pt;
  }

  .cv-two {
    gap: 24px;
  }

  .cv-education li {
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .cv-edu-degree {
    font-size: 7.9pt;
  }

  .cv-edu-school,
  .cv-edu-period {
    font-size: 7.4pt;
  }

  .cv-languages {
    font-size: 8pt;
  }

  .cv-footer {
    margin-top: 14px;
    padding-top: 7px;
    font-size: 6.8pt;
  }

  .cv-footer p:last-child {
    display: none;
  }

  .cv-page a {
    color: var(--cv-accent);
    text-decoration: none;
  }

  .cv-job,
  .cv-skill,
  .cv-projects li,
  .cv-education li {
    break-inside: avoid;
  }
}
