@media print {
  @page {
    margin: 1.5cm 2cm;
  }

  /* Reset layout to single column */
  .no-print { display: none !important; }

  body {
    font-size: 10pt;
    color: #000 !important;
    background: #fff !important;
  }

  .dark body {
    background: #fff !important;
    color: #000 !important;
  }

  main {
    max-width: 100% !important;
    padding: 0 !important;
  }

  /* Force single-column: collapse the grid */
  .grid {
    display: block !important;
    grid-template-columns: none !important;
  }

  .lg\:col-span-2,
  .lg\:col-span-1,
  aside,
  .space-y-10,
  .space-y-8 {
    display: block !important;
    width: 100% !important;
  }

  /* Remove all shadows and rounded borders */
  .shadow-lg, .shadow-md, .shadow-sm {
    box-shadow: none !important;
  }

  .rounded-xl, .rounded-full, .rounded-lg, .rounded-md {
    border-radius: 0 !important;
  }

  /* Force all text colors to black for print */
  .text-blue-600, .text-blue-500, .text-blue-400, .text-blue-300, .text-blue-700 {
    color: #000 !important;
  }

  .text-gray-700, .text-gray-600, .text-gray-500, .text-gray-400, .text-gray-300 {
    color: #333 !important;
  }

  /* Section headings: page-break-friendly */
  h2 {
    break-after: avoid;
    break-inside: avoid;
    font-size: 13pt !important;
    margin-top: 0;
  }

  /* Each article/job/project stays together, but can break between them */
  article, .print-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Allow large sections to break between articles */
  section {
    break-inside: auto;
    page-break-inside: auto;
  }

  /* Project cards: simplify for print */
  article.rounded-xl {
    border: 1px solid #ccc !important;
    padding: 8pt !important;
    margin-bottom: 10pt !important;
  }

  /* Header: compact for print */
  header {
    margin-bottom: 14pt !important;
  }

  h1 {
    font-size: 20pt !important;
  }

  /* Section spacing: tighter for print */
  section {
    margin-bottom: 14pt !important;
  }

  /* Links: no decoration, black text */
  a {
    text-decoration: none !important;
    color: #000 !important;
  }

  /* Skill badges: subtle for print */
  .bg-blue-50, .bg-blue-950, .bg-gray-100, .bg-gray-800 {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
  }

  /* Borders: lighten for print */
  .border-gray-200, .border-gray-800 {
    border-color: #ccc !important;
  }

  /* Lists: tighter spacing */
  ul {
    margin-top: 4pt !important;
  }

  li {
    margin-bottom: 2pt !important;
  }

  /* Avoid orphan headings at page bottom */
  h2, h3 {
    break-after: avoid;
  }

  /* Sidebar sections: add top border to separate from main content */
  aside section {
    border-top: 1px solid #ccc !important;
    padding-top: 10pt !important;
  }

  aside section:first-child {
    border-top: none !important;
  }
}
