/* Print Styles for CV/Resume Output */
/* This stylesheet transforms the website into a professional A4 resume when printed */

@media print {

    /* Page Setup */
    @page {
        size: A4;
        margin: 15mm 20mm;
    }

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

    body {
        font-size: 10pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
        margin: 0;
        padding: 0;
    }

    /* Hide Navigation, Footer, and Interactive Elements */
    nav,
    footer,
    .no-print,
    button,
    #mobile-menu,
    #mobile-menu-btn,
    #download-cv-btn,
    #download-cv-btn-mobile {
        display: none !important;
    }

    /* Main Content */
    main {
        padding: 0;
        margin: 0;
    }

    /* Sections */
    section {
        page-break-inside: avoid;
        margin-bottom: 0;
        padding: 0 0 15px 0;
    }

    /* Remove Background Colors */
    section,
    div,
    article {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Professional Header */
    .print-header {
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    #home {
        padding-top: 0 !important;
        padding-bottom: 15px !important;
    }

    #home h1 {
        font-size: 20pt;
        font-weight: bold;
        margin-bottom: 2px;
        color: #000;
    }

    #home p:first-of-type {
        font-size: 12pt;
        font-weight: 600;
        margin-bottom: 5px;
        color: #333;
    }

    #home .print-bio {
        font-size: 9pt;
        margin-bottom: 10px;
        color: #444;
        line-height: 1.3;
    }

    /* Contact Info in Header */
    .print-contact {
        display: flex !important;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        font-size: 9pt;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #ccc;
    }

    .print-contact a {
        color: #000;
        text-decoration: none;
        display: inline-block;
    }

    .print-contact svg {
        display: none;
    }

    .print-contact a::before {
        content: "• ";
    }

    .print-contact a:first-child::before {
        content: "";
    }

    /* Section Headers */
    h2 {
        font-size: 14pt;
        font-weight: bold;
        color: #000;
        border-bottom: 1px solid #000;
        padding-bottom: 3px;
        margin-bottom: 10px;
        margin-top: 15px;
        page-break-after: avoid;
    }

    h3 {
        font-size: 11pt;
        font-weight: 600;
        color: #000;
        margin-bottom: 4px;
        page-break-after: avoid;
    }

    /* Paragraphs */
    p {
        font-size: 9pt;
        line-height: 1.4;
        margin-bottom: 6px;
        color: #333;
    }

    /* Lists */
    ul {
        margin: 5px 0;
        padding-left: 20px;
    }

    li {
        font-size: 9pt;
        line-height: 1.5;
        margin-bottom: 3px;
        color: #333;
    }

    /* About Section */
    #about {
        padding: 10px 0 !important;
        background: transparent !important;
    }

    #about .grid {
        display: block !important;
    }

    #about .bg-white {
        background: transparent !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* Skills Section */
    #skills {
        padding: 10px 0 !important;
    }

    #skills .grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }

    #skills .bg-white {
        background: transparent !important;
        padding: 8px !important;
        border: 1px solid #ddd !important;
    }

    #skills .bg-blue-50 {
        display: none !important;
    }

    /* Projects Section */
    #projects {
        padding: 10px 0 !important;
        background: transparent !important;
    }

    #projects .grid {
        display: block !important;
    }

    .project-card {
        background: transparent !important;
        padding: 8px 0 !important;
        margin-bottom: 8px !important;
        border-bottom: 1px solid #ddd !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        page-break-inside: avoid;
    }

    .project-card:last-child {
        border-bottom: none !important;
    }

    .project-card .bg-blue-50 {
        display: none !important;
    }

    .project-card h3 {
        font-size: 11pt;
        margin-bottom: 3px;
    }

    .project-card p {
        font-size: 9pt;
        margin-bottom: 5px;
    }

    /* Tech Stack Badges */
    .project-card span {
        display: inline-block;
        background: transparent !important;
        border: 1px solid #999 !important;
        padding: 2px 6px !important;
        margin-right: 5px;
        margin-bottom: 3px;
        font-size: 8pt !important;
        color: #000 !important;
        border-radius: 3px;
    }

    /* Contact Section */
    #contact {
        padding: 10px 0 !important;
        page-break-inside: avoid;
    }

    #contact .bg-gradient-to-r {
        background: transparent !important;
        padding: 10px 0 !important;
    }

    #contact .bg-white {
        background: transparent !important;
        box-shadow: none !important;
    }

    #contact a {
        color: #000;
        font-weight: 600;
    }

    /* Links */
    a {
        color: #000;
        text-decoration: none;
    }

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

    a[href^="mailto"]::after,
    a[href^="#"]::after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100px !important;
        max-height: 100px !important;
        display: none !important;
        /* Hide images in print for cleaner CV */
    }

    /* Utility Classes */
    .flex,
    .flex-wrap {
        display: block !important;
    }

    .gap-2,
    .gap-4,
    .gap-6,
    .gap-8,
    .gap-12 {
        gap: 0 !important;
    }

    /* Page Breaks */
    .print-section {
        page-break-inside: avoid;
    }

    h2 {
        page-break-after: avoid;
    }

    /* Remove Padding/Margin from Containers */
    .max-w-6xl,
    .max-w-4xl {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Icons */
    svg {
        display: none !important;
    }

    /* Badges and Pills */
    .bg-blue-50,
    .bg-slate-100,
    .bg-slate-50 {
        background: transparent !important;
    }

    /* Remove rounded corners */
    .rounded-lg,
    .rounded-xl,
    .rounded-2xl,
    .rounded-full {
        border-radius: 0 !important;
    }

    /* Remove shadows */
    .shadow-sm,
    .shadow-md,
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
    }

    /* Ensure black text for print */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    li,
    span,
    div,
    a {
        color: #000 !important;
    }

    /* Print-Specific Formatting */
    .print-only {
        display: block !important;
    }

    /* Compact spacing */
    .px-6 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Professional CV Footer */
    main::after {
        content: "Generated from devm7md.xyz";
        display: block;
        text-align: center;
        font-size: 7pt;
        color: #999;
        margin-top: 20px;
        padding-top: 10px;
        border-top: 1px solid #ddd;
    }
}