/* Print-optimized styles for CV page */
@media print {
  /* Reset and base styles */
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: white;
    margin: 0;
    padding: 0;
  }

  /* Hide elements that shouldn't print */
  .print\\:hidden,
  nav,
  header,
  footer,
  .no-print {
    display: none !important;
  }

  /* Container and layout */
  .container {
    max-width: none !important;
    padding: 0.5in !important;
    margin: 0 !important;
  }

  /* Typography */
  h1 {
    font-size: 24pt !important;
    font-weight: bold !important;
    margin-bottom: 8pt !important;
    page-break-after: avoid;
    color: #000 !important;
  }

  h2 {
    font-size: 16pt !important;
    font-weight: bold !important;
    margin-top: 16pt !important;
    margin-bottom: 8pt !important;
    page-break-after: avoid;
    color: #000 !important;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 4pt;
  }

  h3 {
    font-size: 14pt !important;
    font-weight: bold !important;
    margin-bottom: 4pt !important;
    page-break-after: avoid;
    color: #000 !important;
  }

  h4 {
    font-size: 12pt !important;
    font-weight: bold !important;
    margin-bottom: 4pt !important;
    color: #000 !important;
  }

  p, li, span {
    font-size: 11pt !important;
    line-height: 1.3 !important;
    color: #000 !important;
  }

  /* Links */
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  /* Sections and spacing */
  section {
    page-break-inside: avoid;
    margin-bottom: 16pt !important;
  }

  /* Experience timeline */
  .border-l-2 {
    border-left: 2pt solid #ccc !important;
    padding-left: 12pt !important;
    position: relative;
    page-break-inside: avoid;
    margin-bottom: 12pt !important;
  }

  .border-l-2::before {
    content: '';
    position: absolute;
    left: -6pt;
    top: 0;
    width: 8pt;
    height: 8pt;
    background: #666 !important;
    border-radius: 50%;
  }

  /* Skills and technology tags */
  .bg-zinc-100,
  .bg-zinc-50,
  .bg-white,
  .dark\\:bg-zinc-800,
  .dark\\:bg-zinc-700 {
    background: #f5f5f5 !important;
    border: 1pt solid #ccc !important;
    padding: 2pt 4pt !important;
    margin: 1pt !important;
    display: inline-block;
    font-size: 9pt !important;
  }

  /* Grid layouts */
  .grid {
    display: block !important;
  }

  .grid > * {
    margin-bottom: 8pt !important;
  }

  /* Contact information */
  .flex {
    display: block !important;
  }

  .flex.items-center {
    display: inline-block !important;
    margin-right: 12pt !important;
  }

  /* Icons - hide in print or replace with text */
  svg {
    display: none !important;
  }

  /* Project status badges */
  .bg-green-100,
  .bg-green-900 {
    background: #e8f5e8 !important;
    color: #2d5a2d !important;
    border: 1pt solid #4a7c4a !important;
  }

  /* Lists */
  ul {
    margin: 4pt 0 !important;
    padding-left: 16pt !important;
  }

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

  /* Page breaks */
  .page-break-before {
    page-break-before: always;
  }

  .page-break-after {
    page-break-after: always;
  }

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

  /* Ensure proper spacing for sections */
  .mb-12,
  .mb-8,
  .mb-6 {
    margin-bottom: 12pt !important;
  }

  .mt-16,
  .mt-32 {
    margin-top: 0 !important;
  }

  /* Personal info section */
  .text-center {
    text-align: center !important;
  }

  .text-4xl,
  .text-5xl {
    font-size: 24pt !important;
  }

  .text-xl {
    font-size: 14pt !important;
  }

  .text-2xl {
    font-size: 16pt !important;
  }

  .text-lg {
    font-size: 13pt !important;
  }

  .text-base {
    font-size: 11pt !important;
  }

  .text-sm {
    font-size: 10pt !important;
  }

  .text-xs {
    font-size: 9pt !important;
  }

  /* Ensure dark mode colors are converted to print-friendly colors */
  .text-zinc-800,
  .dark\\:text-zinc-100 {
    color: #000 !important;
  }

  .text-zinc-600,
  .dark\\:text-zinc-400 {
    color: #333 !important;
  }

  .text-zinc-500 {
    color: #666 !important;
  }

  .text-teal-500,
  .text-teal-600,
  .dark\\:text-teal-400 {
    color: #0d7377 !important;
  }

  /* Borders and backgrounds */
  .border-zinc-200,
  .dark\\:border-zinc-700 {
    border-color: #ccc !important;
  }

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

  /* Remove shadows and effects */
  .shadow,
  .shadow-lg {
    box-shadow: none !important;
  }

  /* Optimize for A4 paper */
  @page {
    size: A4;
    margin: 0.5in;
  }

  /* First page specific styles */
  @page :first {
    margin-top: 0.3in;
  }

  /* Avoid orphans and widows */
  p, li {
    orphans: 2;
    widows: 2;
  }

  h1, h2, h3, h4, h5, h6 {
    orphans: 3;
    widows: 3;
  }
}

/* Print preview styles (when print dialog is open) */
@media screen and (prefers-color-scheme: print) {
  body {
    background: white;
    color: black;
  }
}