/* ========================================
   Print-Friendly Styles
   Optimized for printing portfolios and resumes
   ======================================== */

@media print {
    /* ========================================
       Page Setup
       ======================================== */

    @page {
        margin: 2cm;
        size: A4 portrait;
    }

    /* Reset to print-friendly defaults */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html {
        font-size: 12pt;
    }

    body {
        font-family: Georgia, 'Times New Roman', serif;
        line-height: 1.6;
        color: #000;
        background: #fff;
    }

    /* ========================================
       Hide Interactive Elements
       ======================================== */

    /* Hide navigation and interactive elements */
    .site-header,
    .nav-container,
    .navbar,
    .nav-toggle,
    .theme-toggle,
    .site-footer,
    .footer-social,
    .back-to-top-btn,
    .hero-actions-clean,
    .project-filters,
    .filter-btn,
    button,
    .btn-clean,
    .cta-section,
    footer,
    nav,
    .skip-link {
        display: none !important;
    }

    /* Hide decorative elements */
    .hero-visual-clean,
    .code-window-clean,
    .project-overlay,
    .accordion-icon,
    svg.accordion-icon {
        display: none !important;
    }

    /* ========================================
       Content Optimization
       ======================================== */

    /* Main content */
    main,
    .main-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    section {
        page-break-inside: avoid;
        margin-bottom: 2em;
    }

    .container-clean {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    /* ========================================
       Typography
       ======================================== */

    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
        page-break-inside: avoid;
        font-weight: bold;
        margin-top: 1em;
        margin-bottom: 0.5em;
    }

    h1 {
        font-size: 24pt;
        border-bottom: 2pt solid #000;
        padding-bottom: 0.3em;
    }

    h2 {
        font-size: 18pt;
        margin-top: 1.5em;
    }

    h3 {
        font-size: 14pt;
    }

    h4 {
        font-size: 12pt;
    }

    p, li {
        orphans: 3;
        widows: 3;
        font-size: 11pt;
        line-height: 1.5;
    }

    /* ========================================
       Links
       ======================================== */

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

    /* Show URLs after links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        font-style: italic;
    }

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

    /* ========================================
       Hero Section
       ======================================== */

    .hero-clean {
        padding: 0;
        margin-bottom: 2em;
    }

    .hero-content-clean {
        display: block;
    }

    .hero-text-clean {
        width: 100%;
        padding: 0;
    }

    .hero-title-clean {
        font-size: 28pt;
        margin-bottom: 0.5em;
        color: #000 !important;
    }

    .hero-badge-clean {
        border: 1pt solid #000;
        padding: 0.2em 0.5em;
        display: inline-block;
        margin-bottom: 0.5em;
    }

    .hero-description-clean {
        font-size: 11pt;
        margin-bottom: 1em;
    }

    /* ========================================
       Projects & Portfolio
       ======================================== */

    .portfolio-stats,
    .stat-item {
        display: inline-block;
        margin-right: 2em;
        page-break-inside: avoid;
    }

    .stat-number {
        font-size: 18pt;
        font-weight: bold;
    }

    .stat-label {
        font-size: 10pt;
    }

    /* Project Grid */
    .portfolio-grid {
        display: block;
    }

    .project-portfolio-card,
    .showcase-card {
        page-break-inside: avoid;
        border: 1pt solid #000;
        padding: 1em;
        margin-bottom: 1.5em;
        background: #fff !important;
    }

    .project-portfolio-image,
    .project-overlay {
        display: none;
    }

    .project-portfolio-title,
    .showcase-title {
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 0.5em;
        color: #000 !important;
    }

    .project-category,
    .showcase-category {
        font-size: 9pt;
        font-weight: bold;
        text-transform: uppercase;
        display: block;
        margin-bottom: 0.3em;
    }

    .project-portfolio-description,
    .showcase-description {
        font-size: 10pt;
        margin-bottom: 0.5em;
    }

    /* Technologies */
    .project-technologies-enhanced,
    .showcase-tech {
        margin-top: 0.5em;
    }

    .tech-badge-enhanced,
    .tech-pill {
        display: inline-block;
        border: 1pt solid #000;
        padding: 0.1em 0.4em;
        margin-right: 0.3em;
        margin-bottom: 0.3em;
        font-size: 9pt;
        background: #fff !important;
    }

    /* Showcase Highlights */
    .showcase-highlights {
        border: 1pt solid #000;
        padding: 0.5em;
        margin: 0.5em 0;
        background: #fff !important;
    }

    .highlight-item {
        display: inline-block;
        margin-right: 1.5em;
        margin-bottom: 0.5em;
    }

    .highlight-icon {
        display: none;
    }

    .highlight-label {
        font-size: 8pt;
        font-weight: bold;
        text-transform: uppercase;
    }

    .highlight-value {
        font-size: 10pt;
    }

    .showcase-badge {
        position: static;
        border: 1pt solid #000;
        padding: 0.2em 0.5em;
        display: inline-block;
        margin-bottom: 0.5em;
        background: #fff !important;
    }

    /* ========================================
       Timeline / Journey
       ======================================== */

    .journey-accordion {
        display: block;
    }

    .accordion-item {
        page-break-inside: avoid;
        border: 1pt solid #000;
        padding: 1em;
        margin-bottom: 1em;
    }

    .accordion-header {
        display: block;
        position: static;
        background: none;
        border: none;
        padding: 0;
        margin-bottom: 0.5em;
    }

    .accordion-header-content {
        display: block;
    }

    .era-period {
        font-size: 10pt;
        font-weight: bold;
        display: block;
        margin-bottom: 0.3em;
    }

    .era-title {
        font-size: 14pt;
        font-weight: bold;
    }

    .accordion-content {
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
    }

    .era-description {
        font-size: 10pt;
        margin-bottom: 0.5em;
    }

    .era-tech {
        display: inline-block;
        border: 1pt solid #000;
        padding: 0.1em 0.4em;
        margin-right: 0.3em;
        margin-bottom: 0.3em;
        font-size: 9pt;
    }

    /* ========================================
       About Page
       ======================================== */

    .about-content,
    .experience-item,
    .skill-category {
        page-break-inside: avoid;
        margin-bottom: 1em;
    }

    .skill-badge,
    .skill-item {
        display: inline-block;
        border: 1pt solid #000;
        padding: 0.1em 0.4em;
        margin-right: 0.3em;
        margin-bottom: 0.3em;
        font-size: 9pt;
    }

    /* ========================================
       Contact Information
       ======================================== */

    .contact-info,
    .footer-contact-info {
        border: 2pt solid #000;
        padding: 1em;
        margin: 1em 0;
        page-break-inside: avoid;
    }

    /* Hide contact form on print */
    .contact-form,
    form {
        display: none;
    }

    /* ========================================
       Utilities
       ======================================== */

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

    .no-print {
        display: none !important;
    }

    /* Section headers */
    .section-header-clean {
        page-break-after: avoid;
        margin-bottom: 1em;
    }

    .section-title-clean {
        font-size: 18pt;
        font-weight: bold;
        margin-bottom: 0.5em;
        border-bottom: 1pt solid #000;
        padding-bottom: 0.3em;
    }

    .section-description-clean {
        font-size: 10pt;
        margin-bottom: 1em;
    }

    /* Accent text */
    .accent {
        color: #000 !important;
        font-weight: bold;
    }

    /* ========================================
       Special Elements
       ======================================== */

    /* Empty states */
    .empty-state {
        display: none;
    }

    /* Icons in text */
    .material-icons,
    .icon-sm {
        display: none;
    }

    /* Show icon text labels */
    .icon-text span:not(.material-icons) {
        display: inline;
    }

    /* ========================================
       Header for all pages
       ======================================== */

    /* Add site name to top of each printed page */
    body::before {
        content: "Rajeswaran - Full-Stack Developer Portfolio";
        display: block;
        font-size: 14pt;
        font-weight: bold;
        margin-bottom: 1em;
        padding-bottom: 0.5em;
        border-bottom: 2pt solid #000;
    }

    /* ========================================
       Images
       ======================================== */

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

    /* Hide decorative images */
    .hero-visual-clean img,
    .code-window-clean img {
        display: none;
    }

    /* ========================================
       Lists
       ======================================== */

    ul, ol {
        page-break-inside: avoid;
    }

    li {
        page-break-inside: avoid;
    }

    /* ========================================
       Footer Information
       ======================================== */

    .footer-legal,
    .footer-copyright {
        display: block !important;
        text-align: center;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1pt solid #000;
        font-size: 9pt;
    }

    /* ========================================
       Print Meta Information
       ======================================== */

    /* Add print date to footer */
    body::after {
        content: "Printed: " attr(data-print-date);
        display: block;
        text-align: center;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1pt solid #000;
        font-size: 9pt;
        page-break-before: avoid;
    }
}

/* ========================================
   Print-specific utility classes
   Available for manual control
   ======================================== */

@media print {
    .print-only {
        display: block !important;
    }

    .print-hide {
        display: none !important;
    }

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

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

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