/* ===================================================================
   GAZI ANAS — PRINT-FRIENDLY STYLESHEET (A4 FORMAT)
   Forces clean light mode, removes non-essential interactive elements,
   and optimizes document layout for printing or PDF export.
   =================================================================== */

@page {
  size: A4;
  margin: 1.5cm;
}

/* Base print rules */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    overflow: visible !important;
  }

  /* Hide interactive, animated, and decorative components */
  .no-print,
  .preloader,
  .custom-cursor-dot,
  .custom-cursor-follower,
  .navbar-wrapper,
  .mascot-spiderman-widget,
  .mascot-contact-widget,
  .section-marquee,
  .footer-newsletter-box,
  .footer-hand-graphic,
  .card-view-overlay,
  .card-tech-strip,
  .btn-icon-action,
  .filter-bar-wrapper,
  .cal-embed-box,
  .contact-form-layout,
  .btn-primary,
  .btn-secondary,
  .btn-contact-submit,
  .browse-all-link,
  .hero-liquid-overlay,
  video {
    display: none !important;
  }

  /* Show Print-Only Header & Footer */
  .print-only {
    display: block !important;
  }

  .print-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }

  .print-header h1 {
    font-size: 24pt;
    font-weight: 800;
    margin-bottom: 0.2rem;
  }

  .print-header .print-tagline {
    font-size: 12pt;
    color: #333333 !important;
    margin-bottom: 0.5rem;
  }

  .print-header .print-meta-row {
    font-size: 10pt;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
  }

  .print-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 9pt;
    text-align: center;
    border-top: 1px solid #CCCCCC;
    padding-top: 0.5rem;
  }

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

  /* Collapse multi-column grids to readable vertical flow */
  .projects-featured-grid,
  .projects-all-grid,
  .about-split-layout,
  .contact-form-layout,
  .cp-stats-grid,
  .quick-contact-row {
    display: block !important;
  }

  /* Prevent awkward page breaks */
  .project-card,
  .browser-card,
  .timeline-item,
  .cp-stats-card,
  .about-section-block {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    margin-bottom: 1.5rem !important;
  }

  /* Major section page breaks if needed */
  .page-break-before {
    page-break-before: always !important;
    break-before: always !important;
  }

  /* Force light mode on sections that had dark or colored backgrounds */
  .site-footer,
  .contact-page-body,
  .contact-hero-section,
  .cp-stats-card {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 1px solid #DDDDDD !important;
    box-shadow: none !important;
    padding: 1rem 0 !important;
  }

  .footer-nav-link {
    font-size: 12pt !important;
    color: #000000 !important;
  }

  /* Timeline formatting for print: clean list */
  .timeline-list {
    padding-left: 0 !important;
  }

  .timeline-list::before {
    display: none !important;
  }

  .timeline-dot {
    display: none !important;
  }

  .timeline-item {
    border-left: 2px solid #000000;
    padding-left: 1rem;
    margin-bottom: 1rem;
  }

  /* Display Links URLs cleanly */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 80%;
    color: #555555 !important;
  }
}

/* Hidden by default on screen */
.print-only {
  display: none;
}
