/* Print Styles */
/* Optimized styles for printing and PDF generation */

@media print {
    /* ========================================
       PAGE SETUP
       ======================================== */

    @page {
        margin: 0.5in;
        size: A4;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
    }

    /* ========================================
       CONTAINER OPTIMIZATION
       ======================================== */

    .container {
        box-shadow: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    /* ========================================
       HEADER OPTIMIZATION
       ======================================== */

    .header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        padding: 30px 20px !important;
        page-break-inside: avoid;
    }

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

    .header-layout {
        gap: 20px !important;
    }

    .profile-picture {
        width: 120px !important;
        height: 120px !important;
        border: 3px solid white !important;
    }

    /* ========================================
       TYPOGRAPHY OPTIMIZATION
       ======================================== */

    h1 {
        font-size: 24pt !important;
        margin-bottom: 8pt;
        page-break-after: avoid;
    }

    h2 {
        font-size: 18pt !important;
        margin: 16pt 0 8pt 0;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt !important;
        margin: 12pt 0 6pt 0;
        page-break-after: avoid;
    }

    h4 {
        font-size: 12pt !important;
        margin: 10pt 0 4pt 0;
    }

    p {
        margin-bottom: 6pt;
    }

    /* ========================================
       SECTION SPACING
       ======================================== */

    .section {
        margin: 16pt 0 !important;
        padding: 0 !important;
        page-break-inside: avoid;
        border: none !important;
    }

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

    .section h2 {
        border-bottom: 2px solid #667eea !important;
        padding-bottom: 4pt;
        color: #667eea !important;
        background: none !important;
        -webkit-text-fill-color: #667eea !important;
    }

    /* ========================================
       EXPERIENCE & EDUCATION
       ======================================== */

    .experience-item,
    .education-item {
        margin-bottom: 12pt !important;
        padding: 8pt !important;
        page-break-inside: avoid;
        box-shadow: none !important;
        border-left: 3px solid #667eea !important;
    }

    .experience-item h3,
    .education-item h3 {
        color: #333 !important;
    }

    .experience-item .company,
    .education-item .school {
        color: #667eea !important;
    }

    .experience-item .date,
    .education-item .year {
        background: #f0f0f0 !important;
        color: #666 !important;
    }

    /* ========================================
       SKILLS OPTIMIZATION
       ======================================== */

    .skills-grid {
        display: block !important;
    }

    .skill-category {
        margin-bottom: 12pt !important;
        padding: 8pt !important;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    .skill-item {
        display: inline-block !important;
        width: 48% !important;
        margin: 0 1% 8pt 0 !important;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    .skill-level {
        background: #667eea !important;
        color: white !important;
    }

    /* ========================================
       HIDE INTERACTIVE ELEMENTS
       ======================================== */

    .back-to-top,
    .slideshow-nav,
    .slide-button,
    .slide-btn,
    .pause-play-btn,
    button,
    .modal,
    .modal-overlay,
    .detail-modal-overlay,
    .download-section,
    .download-button,
    .download-button-primary,
    .download-button-footer,
    .video-section,
    .photo-slideshow,
    .toggle-details,
    .modal-content,
    .close-modal,
    .modal-close-btn,
    .nav-links,
    .theme-toggle,
    .skip-link,
    .smart-content-section,
    .search-container,
    .filter-container,
    .slideshow-controls,
    .slideshow-controls-enhanced,
    .progress-bar,
    .slide-counter,
    .slide-indicators,
    .indicator,
    .keyboard-hint,
    .pwa-install-banner,
    .pwa-success-banner,
    .pwa-update-banner,
    .network-status-banner,
    .read-more-btn {
        display: none !important;
    }

    /* ========================================
       SHOW/HIDE DESCRIPTIONS
       ======================================== */

    .brief-description {
        display: block !important;
    }

    .detailed-description {
        display: none !important;
    }

    .description-short {
        display: inline !important;
    }

    .description-full {
        display: none !important;
    }

    /* ========================================
       CONTACT INFORMATION
       ======================================== */

    .contact-info {
        display: flex !important;
        justify-content: space-around !important;
        margin: 12pt 0 !important;
        font-size: 11pt !important;
        flex-wrap: wrap !important;
    }

    .contact-item {
        background: rgba(102, 126, 234, 0.15) !important;
        border: 1px solid #667eea !important;
        color: #333 !important;
    }

    .contact-info a {
        color: #000 !important;
        text-decoration: none !important;
    }

    .contact-row {
        display: flex !important;
        justify-content: center !important;
        gap: 10pt !important;
        margin: 8pt 0 !important;
    }

    .contact-link {
        color: #333 !important;
        background: #f0f0f0 !important;
        border: 1px solid #ddd !important;
    }

    /* ========================================
       SOCIAL LINKS
       ======================================== */

    .social-links {
        margin-top: 8pt !important;
        display: flex !important;
        justify-content: center !important;
        gap: 8pt !important;
    }

    .social-links a,
    .social-btn {
        color: #667eea !important;
        margin-right: 12pt !important;
        text-decoration: none !important;
        background: white !important;
        border: 1px solid #667eea !important;
    }

    .social-link {
        border-color: #667eea !important;
    }

    .social-links-footer {
        display: flex !important;
        justify-content: center !important;
    }

    /* ========================================
       FOOTER & CONNECT SECTION
       ======================================== */

    .connect-section {
        page-break-inside: avoid;
        background: #f8f9fa !important;
    }

    .connect-item {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 10pt;
        color: #666;
        padding: 8pt;
        border-top: 1px solid #ddd;
    }

    /* ========================================
       PAGE BREAKS
       ======================================== */

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

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

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    /* ========================================
       LINKS STYLING
       ======================================== */

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

    /* Don't show URLs for internal links or empty hrefs */
    a[href^="#"]:after,
    a[href=""]:after,
    a[href^="javascript"]:after,
    a[href^="tel:"]:after,
    a[href^="mailto:"]:after {
        content: "";
    }

    /* ========================================
       IMAGES
       ======================================== */

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* ========================================
       COLORS FOR PRINT
       ======================================== */

    /* Ensure gradients render properly */
    .header,
    .section h2,
    .download-button,
    .back-link {
        background: #667eea !important;
        color: white !important;
    }

    /* Ensure proper contrast */
    [data-theme="dark"] * {
        background: white !important;
        color: #000 !important;
    }

    [data-theme="dark"] .header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
    }

    [data-theme="dark"] .section h2 {
        color: #667eea !important;
    }
}
