/* ==========================================================================
   Clean, Elegant Print Stylesheet for CV Generation
   ========================================================================== */
@media print {
  /* Reset page defaults and margins */
  @page {
    size: A4 portrait;
    margin: 1.5cm;
  }

  /* Force light colors and remove screen-specific backgrounds */
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  /* Hide interactive, screen-only elements */
  .navbar,
  .mobile-nav-toggle,
  .switcher-pill,
  .theme-toggle-btn,
  .hero-actions,
  .social-links,
  .mode-intro-card,
  .pub-filters,
  .contact-form,
  .contact-icon,
  footer,
  .card-footer,
  .btn,
  .pub-links,
  .pub-year::after {
    display: none !important;
  }

  /* Remove screen borders and shadows */
  section {
    padding: 1.5rem 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    page-break-inside: avoid;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Hero Section Reformat for Print */
  .hero {
    padding-top: 0 !important;
    padding-bottom: 2rem !important;
    background: none !important;
  }

  .hero-grid {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 2rem !important;
  }

  .avatar-container {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0 !important;
  }

  .avatar-fallback {
    font-size: 2rem !important;
    background: #e2e8f0 !important;
    color: #0f172a !important;
  }

  .hero-text {
    flex: 1;
  }

  .badge-mode {
    display: none !important;
  }

  .hero-name {
    font-size: 22pt !important;
    font-weight: 800;
    margin-bottom: 0.25rem !important;
    color: #0f172a !important;
  }

  .hero-title {
    font-size: 14pt !important;
    color: #3b82f6 !important;
    margin-bottom: 0.5rem !important;
  }

  .hero-desc {
    font-size: 10pt !important;
    color: #475569 !important;
    margin-bottom: 0 !important;
  }

  /* Section Headers */
  .section-header {
    margin-bottom: 1.5rem !important;
  }

  .section-tag {
    font-size: 8pt !important;
    color: #64748b !important;
  }

  .section-title {
    font-size: 16pt !important;
    border-bottom: 1px solid #000000;
    padding-bottom: 0.25rem;
    margin-top: 1rem;
  }

  /* Cards (Projects) formatting for print */
  .grid-cards {
    display: block !important;
  }

  .card {
    background: none !important;
    border: none !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    padding: 1rem 0 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .card::before {
    display: none !important;
  }

  .card-icon {
    display: none !important;
  }

  .card-title {
    font-size: 12pt !important;
    margin-bottom: 0.25rem !important;
  }

  .card-text {
    font-size: 9.5pt !important;
    color: #334155 !important;
  }

  /* CV Timeline */
  .cv-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
  }

  .timeline {
    border-left: 1px solid #cbd5e1 !important;
    padding-left: 1rem !important;
  }

  .timeline-item::before {
    left: calc(-1rem - 4px - 0.5px) !important;
    width: 8px !important;
    height: 8px !important;
    border: 1px solid #ffffff !important;
    box-shadow: none !important;
    background-color: #0f172a !important;
  }

  .timeline-date {
    font-size: 8.5pt !important;
    color: #475569 !important;
  }

  .timeline-title {
    font-size: 11pt !important;
  }

  .timeline-institution {
    font-size: 9.5pt !important;
    font-weight: 600;
  }

  .timeline-desc {
    font-size: 9pt !important;
  }

  /* Skills print */
  .skills-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }

  .skill-card {
    background: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .skill-bar {
    background-color: #cbd5e1 !important;
    height: 2px !important;
  }

  .skill-bar-fill {
    background-color: #000000 !important;
  }

  /* Publications */
  .pub-card {
    grid-template-columns: auto 1fr !important;
    gap: 1rem !important;
    padding: 0.75rem 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: none !important;
    page-break-inside: avoid;
  }

  .pub-year {
    font-size: 10pt !important;
    background: none !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.1rem 0.4rem !important;
    min-width: auto !important;
  }

  .pub-title {
    font-size: 11pt !important;
  }

  .pub-authors, .pub-journal {
    font-size: 9pt !important;
  }

  /* Contact info for CV header */
  .contact-grid {
    display: block !important;
  }

  .contact-info {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    margin-top: 1rem !important;
  }

  .contact-details h4 {
    display: none !important;
  }

  .contact-details p, .contact-details a {
    font-size: 9pt !important;
    color: #475569 !important;
  }
}
