/* Print-specific styles for PDF output */
@media print {
    /* Reset page and body */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    @page {
        margin: 0.5in;
        size: letter portrait;
    }
    
    body {
        background: white !important;
        margin: 0;
        padding: 0;
    }
    
    /* Hide download button */
    .download-wrapper {
        display: none !important;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 !important;
        min-height: auto !important;
    }
    
    /* Resume container */
    .resume {
        box-shadow: none !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Header adjustments for print - compact version */
    .header {
        padding: 1.5rem 2rem 1rem 2rem !important;
        page-break-after: avoid;
        background: white !important;
        border-bottom: 3px solid #2C3E50 !important;
    }
    
    .header h1 {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
        color: #2C3E50 !important;
        text-align: center !important;
    }
    
    /* Hide decorative elements in print */
    .decorative-circle {
        display: none !important;
    }
    
    /* Hide accent bar in print */
    .accent-bar {
        display: none !important;
    }
    
    /* Section adjustments */
    .section {
        padding: 1.5rem 2rem !important;
        page-break-inside: avoid;
    }
    
    .summary-section {
        page-break-after: avoid;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: 1rem !important;
        page-break-after: avoid;
    }
    
    .section-header h2 {
        font-size: 1.5rem !important;
    }
    
    /* Skills section */
    .skills-grid {
        gap: 1rem !important;
    }
    
    .skill-card {
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 1rem !important;
    }
    
    /* Experience section */
    .experience-section {
        page-break-inside: auto;
    }
    
    .experience-item {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    
    .experience-item ul {
        margin-left: 1rem !important;
    }
    
    .experience-item li {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Timeline adjustments */
    .timeline::before {
        background: linear-gradient(180deg, #F9C74F 0%, rgba(249, 199, 79, 0.3) 100%) !important;
    }
    
    /* Community section */
    .community-grid {
        gap: 1rem !important;
    }
    
    .community-card {
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 1rem !important;
    }
    
    .community-card p,
    .speaker-list li {
        font-size: 0.8rem !important;
    }
    
    /* Awards section */
    .awards-section {
        page-break-inside: avoid;
    }
    
    .awards-grid {
        gap: 0.75rem !important;
    }
    
    .award-card {
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 1rem !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    .award-card:hover {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    .award-content p {
        font-size: 0.8rem !important;
    }
    
    /* Education section */
    .education-list {
        gap: 0.5rem !important;
    }
    
    .education-item {
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 0.75rem 1rem !important;
    }
    
    .education-title,
    .education-date {
        font-size: 0.8rem !important;
    }
    
    /* Optimize gradients for print */
    .skill-card,
    .community-card,
    .education-item {
        background: white !important;
        border: 1px solid #e5e7eb !important;
    }
    
    /* Keep header gradient */
    .header {
        border-bottom: 3px solid #F9C74F !important;
    }
    
    /* Ensure badges are visible */
    .skill-badge,
    .badge,
    .date-badge.current,
    .education-date.current {
        background: #F9C74F !important;
        color: #2C3E50 !important;
        border: 1px solid #F9C74F !important;
    }
    
    .date-badge,
    .education-date {
        background: #e5e7eb !important;
        border: 1px solid #d1d5db !important;
    }
    
    .award-year {
        background: #fef3c7 !important;
        border: 1px solid #F9C74F !important;
    }
    
    /* Ensure icons are visible */
    .icon {
        stroke-width: 2 !important;
    }
    
    /* Summary section */
    .summary-section {
        background: #f9fafb !important;
        border-top: 2px solid #F9C74F !important;
        border-bottom: 2px solid #F9C74F !important;
    }
    
    /* Awards section background */
    .awards-section {
        background: #f9fafb !important;
    }
    
    /* Ensure text is black for readability */
    .skill-card p,
    .experience-item li,
    .community-card p,
    .award-content p {
        color: #374151 !important;
    }
    
    /* Links - if any */
    a {
        color: #2C3E50 !important;
        text-decoration: none !important;
    }
    
    /* Prevent orphaned headings */
    h1, h2, h3 {
        page-break-after: avoid;
        break-after: avoid;
    }
    
    /* Contact grid - inline with pipes */
    .contact-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0 !important;
        justify-content: center !important;
        margin-top: 0.5rem !important;
    }
    
    .contact-item {
        font-size: 0.8rem !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 0 0.75rem !important;
        border-right: 1px solid rgba(249, 199, 79, 0.5) !important;
    }
    
    .contact-item:last-child {
        border-right: none !important;
    }
    
    /* Fix text color for contact items in print */
    .contact-item span {
        color: #2C3E50 !important;
    }
    
    /* Hide icons in print */
    .contact-item .icon-wrapper {
        display: none !important;
    }
    
    /* Summary icon */
    .summary-icon {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Award icon */
    .award-icon {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Ensure experience headers don't break */
    .experience-header {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: avoid;
        break-after: avoid;
    }
    
    /* Ensure community headers don't break */
    .community-header {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: avoid;
        break-after: avoid;
    }
}

/* High-quality print mode */
@media print and (min-resolution: 150dpi) {
    .header h1 {
        font-size: 2.75rem !important;
    }
    
    .experience-item li,
    .community-card p,
    .award-content p {
        font-size: 0.85rem !important;
    }
}