/* Print Styles for Portfolio */

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

@media print {
    /* Hide elements not needed for print */
    .d-print-none,
    header button,
    footer,
    .btn,
    .navbar-toggler,
    .social-icon,
    .social-links-container,
    .profile-image-container .profile-socials,
    .print-message,
    #profile .skill-category {
        display: none !important;
    }
    
    /* Remove red underline below name in print view */
    .card-title::after {
        display: none !important;
    }
    
    /* Ensure everything with print-visible class is shown */
    .print-visible {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
        opacity: 1 !important;
    }
    
    /* General Print Settings */
    body, body.is-printing, body.preparing-for-print {
        font-size: 9pt !important;
        line-height: 1.2 !important;
        background: #fff !important;
        color: #333 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-family: 'Arial', 'Helvetica', sans-serif !important;
    }
    
    /* Fix for blank space at end of document */
    html, body {
        height: auto !important;
    }
    
    /* Container that holds all main content */
    main.container {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Adjust main container for two-column layout */
    .container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Two-column layout for resume */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Force all sections to display */
    section {
        display: block !important;
        visibility: visible !important;
        overflow: visible !important;
        margin-bottom: 0.1cm !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }
    
    /* Modern card styling with subtle borders */
    .card {
        box-shadow: none !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        margin-bottom: 0.15cm !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
        background-color: #fff !important;
    }
    
    .card-header {
        background: #f8f9fa !important;
        color: #333 !important;
        border-bottom: 1px solid #eaeaea !important;
        padding: 0.1cm 0.2cm !important;
        margin-bottom: 0.05cm !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
        font-weight: 600 !important;
        letter-spacing: 0.02cm !important;
    }
    
    .card-header::before {
        display: none !important;
    }
    
    .card-body {
        padding: 0.1cm 0.2cm !important;
    }
    
    /* Override profile layout completely */
    #profile {
        position: relative !important;
        overflow: visible !important;
        width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0.1cm !important;
        padding: 0 !important;
    }
    
    #profile .row {
        position: static !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 2.5cm !important;
        background-color: #f9f9f9 !important;
        border-radius: 4px !important;
        padding: 0.12cm !important;
        margin: 0 !important;
    }
    
    /* Force image to right with absolute positioning */
    #profile .col-md-3,
    #profile div[class*="col-md-3"],
    #profile .profile-image-col {
        position: absolute !important;
        top: 0.12cm !important;
        right: 0.12cm !important;
        width: 2.2cm !important;
        max-width: 2.2cm !important;
        min-width: 2.2cm !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: right !important;
        float: right !important;
        z-index: 2 !important;
    }
    
    /* Force image container styling for right alignment */
    #profile .profile-image-container {
        position: relative !important;
        max-width: 2.2cm !important;
        max-height: 2.5cm !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 4px !important;
        overflow: hidden !important;
        float: right !important;
    }
    
    /* Force image styling */
    #profile .profile-img,
    #profile .col-md-3 img,
    #profile .profile-image-container img {
        position: relative !important;
        max-width: 2.2cm !important;
        width: 100% !important;
        height: auto !important;
        max-height: 2.5cm !important;
        object-fit: cover !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 4px !important;
        float: right !important;
    }
    
    /* Force content to left side of the image with absolute positioning */
    #profile .col-md-9,
    #profile div[class*="col-md-9"],
    #profile .profile-content-col {
        position: static !important;
        width: calc(100% - 2.5cm) !important;
        max-width: calc(100% - 2.5cm) !important;
        padding-right: 2.5cm !important;
        padding-left: 0 !important;
        margin: 0 !important;
        text-align: left !important;
        float: left !important;
    }
    
    /* Force card to take full width */
    #profile .card {
        margin: 0 !important;
        border: none !important;
        padding: 0 !important;
        background-color: transparent !important;
    }
    
    #profile .card-body {
        padding: 0 !important;
    }
    
    /* Tighten name and title */
    #profile .card-title,
    #profile h1,
    #profile .profile-name {
        font-size: 15pt !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        line-height: 1 !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        letter-spacing: 0.01cm !important;
        text-align: left !important;
    }
    
    #profile h4.text-muted,
    #profile .profile-title {
        font-size: 10pt !important;
        margin-top: 0 !important;
        margin-bottom: 0.03cm !important;
        line-height: 1 !important;
        color: #3498db !important;
        font-weight: 600 !important;
        text-align: left !important;
    }
    
    #profile .lead,
    #profile .profile-summary {
        font-size: 7pt !important;
        margin-top: 0 !important;
        margin-bottom: 0.05cm !important;
        line-height: 1 !important;
        color: #555 !important;
        max-width: 100% !important;
        display: block !important;
        overflow: hidden !important;
        text-align: left !important;
    }
    
    /* Ultra-efficient grid for contact details */
    .contact-info-grid,
    .profile-contacts {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.02cm !important;
        margin-top: 0.03cm !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .contact-item,
    .profile-contact-item {
        width: 32% !important;
        padding: 0.02cm 0 !important;
        background: none !important;
        margin-bottom: 0.01cm !important;
        display: flex !important;
        align-items: center !important;
        font-size: 7pt !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Skills section - modern badge layout */
    #skills .card-body {
        columns: 2 !important;
        column-gap: 0.15cm !important;
        padding: 0.05cm 0.1cm !important;
    }
    
    .skill-category {
        margin-bottom: 0.15cm !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    
    #skills h4 {
        font-size: 10pt !important;
        margin-top: 0.1cm !important;
        margin-bottom: 0.1cm !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        border-bottom: 1px solid #eaeaea !important;
        padding-bottom: 0.03cm !important;
    }
    
    .skill-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.08cm !important;
        padding: 0.05cm 0 !important;
    }
    
    /* Modern badge styling with subtle colors */
    #skills .badge {
        font-size: 7pt !important;
        padding: 0.05cm 0.1cm !important;
        margin: 0 !important;
        background-color: #f8f8f8 !important;
        color: #333 !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 50px !important;
        display: inline-block !important;
        line-height: 1.1 !important;
        font-weight: normal !important;
    }
    
    #skills .badge.bg-success {
        background-color: #e8f5e9 !important;
        border-color: #c8e6c9 !important;
        color: #1b5e20 !important;
    }
    
    #skills .badge.bg-primary {
        background-color: #e3f2fd !important;
        border-color: #bbdefb !important;
        color: #0d47a1 !important;
    }
    
    #skills .badge.bg-info {
        background-color: #e1f5fe !important;
        border-color: #b3e5fc !important;
        color: #01579b !important;
    }
    
    #skills .badge.bg-warning {
        background-color: #fff8e1 !important;
        border-color: #ffecb3 !important;
        color: #ff6f00 !important;
    }
    
    #skills .badge.bg-secondary {
        background-color: #eceff1 !important;
        border-color: #cfd8dc !important;
        color: #455a64 !important;
    }
    
    #skills .skill-category .col-md-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Modern timeline items with accent color */
    .timeline-item {
        padding-left: 0.4cm !important;
        margin-bottom: 0.15cm !important;
        border-left: 2px solid #3498db !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
        position: relative !important;
    }
    
    .timeline-item::before {
        content: '' !important;
        position: absolute !important;
        width: 10px !important;
        height: 10px !important;
        left: -6px !important;
        top: 0.15cm !important;
        background-color: #3498db !important;
        border-radius: 50% !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    .timeline-title {
        font-size: 10pt !important;
        margin-bottom: 0.05cm !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        line-height: 1.1 !important;
    }
    
    .timeline-subtitle {
        font-size: 9pt !important;
        font-weight: normal !important;
        color: #3498db !important;
        line-height: 1.1 !important;
    }
    
    .timeline-date, .timeline-location {
        font-size: 8pt !important;
        display: inline-block !important;
        margin-right: 0.2cm !important;
        color: #7f8c8d !important;
    }
    
    .timeline-content ul {
        margin: 0.05cm 0 !important;
        padding-left: 0.5cm !important;
    }
    
    .timeline-content li {
        font-size: 8pt !important;
        margin-bottom: 0.03cm !important;
        line-height: 1.2 !important;
        color: #555 !important;
    }
    
    /* Ensure all sections are shown and properly spaced */
    #profile, #experience, #education, #skills, #achievements, #projects {
        display: block !important;
        visibility: visible !important;
        margin-bottom: 0.25cm !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
        width: 100% !important;
    }
    
    /* Allow page breaks between major sections */
    #education, #experience, #skills, #achievements, #projects {
        page-break-before: auto !important;
        break-before: auto !important;
        page-break-after: auto !important;
        break-after: auto !important;
    }
    
    /* Ensure headers are visible */
    header {
        display: none !important;
    }
    
    .navbar-brand {
        color: #2c3e50 !important;
        font-size: 12pt !important;
        font-weight: 600 !important;
    }
    
    .navbar-nav {
        display: none !important;
    }
    
    /* Modern project cards */
    #projects .card-header {
        margin-bottom: 0.05cm !important;
        background-color: #f8f9fa !important;
        padding: 0.1cm 0.15cm !important;
        color: #2c3e50 !important;
    }
    
    #projects .card-body {
        padding: 0.1cm !important;
    }
    
    /* Space-optimized project cards with modern styling */
    #projects .project-card {
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        box-shadow: none !important;
        margin-bottom: 0.15cm !important;
        padding: 0.1cm !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background-color: #fff !important;
    }
    
    /* Tighter layout for projects */
    #projects .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 -0.05cm !important;
    }
    
    #projects .col-md-6, 
    #projects .col-lg-4 {
        display: inline-block !important;
        width: 50% !important;
        max-width: 50% !important;
        float: left !important;
        padding: 0 0.05cm !important;
        margin-bottom: 0.12cm !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    
    /* Compact project content layout */
    #projects .card-body {
        display: block !important;
        padding: 0.08cm !important;
        text-align: left !important;
        height: auto !important;
        min-height: 0 !important;
    }
    
    /* Modern project title styling */
    #projects h5.project-title {
        display: block !important;
        font-size: 9pt !important;
        font-weight: 600 !important;
        margin: 0 0 0.05cm 0 !important;
        padding: 0 !important;
        padding-bottom: 0.05cm !important;
        line-height: 1.2 !important;
        border-bottom: 1px dotted #e0e0e0 !important;
        color: #2c3e50 !important;
    }
    
    /* Hide space-consuming project icons to save space */
    #projects .project-icon {
        display: none !important;
    }
    
    /* Optimize any project images */
    #projects img {
        max-height: 0.8cm !important;
        max-width: 0.8cm !important;
        object-fit: contain !important;
        float: right !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #projects .project-description {
        display: block !important;
        font-size: 7.5pt !important;
        margin: 0.05cm 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        color: #555 !important;
    }
    
    /* Modern tag styling for projects */
    #projects .project-tags {
        margin: 0.05cm 0 0 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.05cm !important;
    }
    
    #projects .badge {
        font-size: 6.5pt !important;
        padding: 0.03cm 0.08cm !important;
        margin: 0 !important;
        border: 1px solid #e0e0e0 !important;
        background-color: #f8f8f8 !important;
        color: #555 !important;
        border-radius: 50px !important;
        display: inline-block !important;
        font-style: normal !important;
    }
    
    #projects .badge:after {
        content: "" !important;
    }
    
    /* Fix any element that might be causing page breaks */
    * {
        page-break-inside: auto !important;
        break-inside: auto !important;
    }
    
    /* Fix the last element to avoid extra space at the end */
    main > section:last-child {
        margin-bottom: 0 !important;
    }
    
    /* Modern typography improvements */
    h3 {
        font-size: 12pt !important;
        margin-bottom: 0.15cm !important;
        color: #2c3e50 !important;
        font-weight: 600 !important;
        letter-spacing: 0.02cm !important;
    }
    
    h4 {
        font-size: 10pt !important;
        margin-bottom: 0.1cm !important;
        color: #2c3e50 !important;
        font-weight: 600 !important;
    }
    
    p {
        margin-bottom: 0.1cm !important;
        color: #555 !important;
    }
    
    /* Fix any floating elements */
    .clearfix::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
    
    /* Hide About Me text but keep name visible */
    #profile .card-header,
    #profile .card-header h3,
    .about-me-title,
    .about-section-title {
        display: none !important;
    }
    
    /* If the about text is in a paragraph with a specific class */
    #profile .lead:first-of-type,
    #profile .about-me-description,
    #profile .about-text {
        margin-top: 0 !important;
    }
    
    /* Achievements section with subrow layout */
    #achievements .card-body {
        padding: 0.08cm !important;
    }
    
    /* First subrow heading for Achievements */
    #achievements .card-body::before {
        content: "Achievements" !important;
        display: block !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-bottom: 0.08cm !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
        width: 100% !important;
        clear: both !important;
    }
    
    /* Second subrow heading for Achievements */
    #achievements .card-body .achievement-divider {
        content: "Olympiads & Competitions" !important;
        display: block !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin: 0.15cm 0 0.08cm 0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
        width: 100% !important;
        clear: both !important;
    }
    
    #achievements .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 -0.05cm !important;
        flex-direction: row !important;
    }
    
    /* Force subrow layout for achievements */
    #achievements .achievement-item,
    #achievements .conference-item {
        width: 50% !important; /* 2 columns */
        max-width: 50% !important;
        float: left !important;
        padding: 0 0.05cm !important;
        margin-bottom: 0.08cm !important;
        box-sizing: border-box !important;
        flex: 0 0 50% !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        box-shadow: none !important;
        padding: 0.05cm !important;
        background-color: #fff !important;
        height: 3.0cm !important; /* Fixed height for subrow items */
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* First subrow items (first 2) */
    #achievements .achievement-item:nth-child(-n+2) {
        margin-bottom: 0.1cm !important;
    }
    
    /* Second subrow items (3rd and 4th) */
    #achievements .achievement-item:nth-child(n+3):nth-child(-n+4) {
        margin-top: 0.05cm !important;
    }
    
    /* Hide items beyond the first 4 */
    #achievements .achievement-item:nth-child(n+5),
    #achievements .conference-item:nth-child(n+5) {
        display: none !important;
    }
    
    #achievements h5, 
    #achievements h6, 
    #achievements .item-title {
        font-size: 9.5pt !important;
        margin-bottom: 0.03cm !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        line-height: 1.2 !important;
        border-bottom: 1px dotted #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
    }
    
    #achievements p, 
    #achievements .item-description {
        font-size: 8.5pt !important;
        margin-bottom: 0.03cm !important;
        color: #555 !important;
        line-height: 1.2 !important;
        max-height: 2.2cm !important; /* Limit content height */
        overflow: hidden !important;
    }
    
    #achievements .item-date {
        font-size: 7.5pt !important;
        color: #7f8c8d !important;
        font-style: italic !important;
        position: absolute !important;
        bottom: 0.05cm !important;
        left: 0.05cm !important;
    }
    
    /* Certificates section with subrow layout */
    #certificates .card-body {
        padding: 0.08cm !important;
        clear: both !important;
        margin-top: 0.15cm !important;
    }
    
    /* First subrow heading for Certificates */
    #certificates .card-body::before {
        content: "Technical Certifications" !important;
        display: block !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-bottom: 0.08cm !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
        width: 100% !important;
        clear: both !important;
    }
    
    /* Second subrow heading for Certificates */
    #certificates .card-body .certificate-divider {
        content: "Online Courses" !important;
        display: block !important;
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin: 0.15cm 0 0.08cm 0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
        width: 100% !important;
        clear: both !important;
    }
    
    #certificates .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 -0.05cm !important;
        flex-direction: row !important;
    }
    
    /* Force subrow layout for certificates */
    #certificates .certificate-item {
        width: 50% !important; /* 2 columns */
        max-width: 50% !important;
        float: left !important;
        padding: 0 0.05cm !important;
        margin-bottom: 0.08cm !important;
        box-sizing: border-box !important;
        flex: 0 0 50% !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        box-shadow: none !important;
        padding: 0.05cm !important;
        background-color: #fff !important;
        height: 3.0cm !important; /* Fixed height for subrow items */
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* First subrow items (first 2) */
    #certificates .certificate-item:nth-child(-n+2) {
        margin-bottom: 0.1cm !important;
    }
    
    /* Second subrow items (3rd and 4th) */
    #certificates .certificate-item:nth-child(n+3):nth-child(-n+4) {
        margin-top: 0.05cm !important;
    }
    
    /* Hide items beyond the first 4 */
    #certificates .certificate-item:nth-child(n+5) {
        display: none !important;
    }
    
    #certificates h5, 
    #certificates .certificate-title {
        font-size: 9.5pt !important;
        margin-bottom: 0.03cm !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        line-height: 1.2 !important;
        border-bottom: 1px dotted #e0e0e0 !important;
        padding-bottom: 0.03cm !important;
    }
    
    #certificates p, 
    #certificates .certificate-issuer {
        font-size: 8.5pt !important;
        margin-bottom: 0.03cm !important;
        color: #555 !important;
        line-height: 1.2 !important;
        max-height: 2.2cm !important; /* Limit content height */
        overflow: hidden !important;
    }
    
    #certificates .certificate-date {
        font-size: 7.5pt !important;
        font-style: italic !important;
        color: #7f8c8d !important;
        position: absolute !important;
        bottom: 0.05cm !important;
        left: 0.05cm !important;
    }
    
    /* Add divider styles for DOM insertion via JavaScript */
    .achievement-divider,
    .certificate-divider {
        display: block !important;
        width: 100% !important;
        clear: both !important;
        margin: 0.15cm 0 0.08cm 0 !important;
    }
    
    /* Fix for layout issues with floated elements */
    #achievements .row:after,
    #certificates .row:after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
    
    /* Force page break between sections if needed */
    #certificates {
        page-break-before: auto !important;
        break-before: auto !important;
        clear: both !important;
    }
    
    /* Ensure proper section ordering for print */
    #profile { order: 1 !important; }
    #experience { order: 2 !important; }
    #education { order: 3 !important; }
    #skills { order: 4 !important; }
    #projects { order: 5 !important; }
    #certificates { order: 6 !important; }
    #achievements { order: 7 !important; }
    
    /* Force flex display on the main container to respect order */
    .container .row .col-md-10 {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Modern badge styles for all sections */
    .badge {
        font-size: 8pt !important;
        padding: 0.08rem 0.15rem !important;
        margin: 0.03cm !important;
        border: 1px solid #e0e0e0 !important;
        background-color: #f8f9fa !important;
        color: #555 !important;
        border-radius: 50px !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        font-weight: normal !important;
    }
    
    /* Modern color scheme for badges */
    .badge.bg-primary {
        background-color: #e3f2fd !important;
        border-color: #bbdefb !important;
        color: #0d47a1 !important;
    }
    
    .badge.bg-secondary {
        background-color: #eceff1 !important;
        border-color: #cfd8dc !important;
        color: #455a64 !important;
    }
    
    .badge.bg-success {
        background-color: #e8f5e9 !important;
        border-color: #c8e6c9 !important;
        color: #1b5e20 !important;
    }
    
    .badge.bg-danger {
        background-color: #ffebee !important;
        border-color: #ffcdd2 !important;
        color: #b71c1c !important;
    }
    
    .badge.bg-warning {
        background-color: #fff8e1 !important;
        border-color: #ffecb3 !important;
        color: #ff6f00 !important;
    }
    
    .badge.bg-info {
        background-color: #e1f5fe !important;
        border-color: #b3e5fc !important;
        color: #01579b !important;
    }
    
    .badge.bg-dark {
        background-color: #eceff1 !important;
        border-color: #cfd8dc !important;
        color: #263238 !important;
    }
    
    /* Hobbies/interests section with icons */
    #hobbies .card-body {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-around !important;
        gap: 0.2cm !important;
    }
    
    .hobby-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 1.5cm !important;
        margin-bottom: 0.15cm !important;
    }
    
    .hobby-icon {
        background-color: #e3f2fd !important;
        color: #2980b9 !important;
        border-radius: 4px !important;
        width: 0.8cm !important;
        height: 0.8cm !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 0.05cm !important;
        font-size: 10pt !important;
    }
    
    .hobby-name {
        font-size: 7pt !important;
        text-align: center !important;
        color: #555 !important;
    }
    
    /* Modern section header with accent color line */
    .section-header {
        border-bottom: 2px solid #3498db !important;
        padding-bottom: 0.1cm !important;
        margin-bottom: 0.15cm !important;
    }
    
    /* Social section for links */
    .social-section {
        margin-top: 0.2cm !important;
    }
    
    .social-item {
        display: flex !important;
        align-items: center !important;
        margin-bottom: 0.08cm !important;
    }
    
    .social-icon {
        color: #3498db !important;
        margin-right: 0.1cm !important;
        font-size: 9pt !important;
    }
    
    .social-text {
        font-size: 8pt !important;
        color: #555 !important;
    }
    
    /* Add a condensed contact layout for print that places items inline */
    .contact-info-small {
        display: flex !important;
        flex-wrap: wrap !important;
        font-size: 7pt !important;
        color: #555 !important;
        margin-top: 0.03cm !important;
        margin-bottom: 0.03cm !important;
    }
    
    .contact-info-small .contact-item {
        margin-right: 0.15cm !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .contact-info-small .contact-icon {
        font-size: 7pt !important;
        margin-right: 0.05cm !important;
    }
    
    /* Create a compact summary option for very tight space requirements */
    .compact-summary {
        font-size: 7.5pt !important;
        line-height: 1.1 !important;
        max-height: 1.6cm !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #555 !important;
        margin-bottom: 0.05cm !important;
    }
    
    /* Ultra-compact profile option for minimal space usage */
    .ultra-compact-profile .profile-image-container {
        max-width: 1.8cm !important;
        max-height: 2.2cm !important;
        margin-left: 0.1cm !important;
    }
    
    .ultra-compact-profile .profile-img,
    .ultra-compact-profile .col-md-3 img {
        max-width: 1.8cm !important;
    }
    
    .ultra-compact-profile .col-md-3 {
        width: 1.8cm !important;
        max-width: 1.8cm !important;
        min-width: 1.8cm !important;
    }
    
    .ultra-compact-profile .col-md-9 {
        width: calc(100% - 2.1cm) !important;
        max-width: calc(100% - 2.1cm) !important;
    }
    
    .ultra-compact-profile .card-title {
        font-size: 13pt !important;
        margin-bottom: 0 !important;
        line-height: 1 !important;
    }
    
    .ultra-compact-profile h4.text-muted {
        font-size: 9pt !important;
        margin-bottom: 0.03cm !important;
        line-height: 1 !important;
    }
    
    /* Make entire profile more compact */
    #profile .row {
        padding: 0.12cm !important;
    }
    
    #profile {
        margin-bottom: 0.12cm !important;
    }
    
    /* Achievements & Certificates section overall styling */
    #achievements-certificates .card-header h3 {
        font-size: 12pt !important;
        font-weight: 700 !important;
        margin-bottom: 0.12cm !important;
        color: #2c3e50 !important;
    }
    
    /* Main section headers */
    #achievements-certificates h4 {
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-top: 0.15cm !important;
        margin-bottom: 0.1cm !important;
        padding-bottom: 0.03cm !important;
        border-bottom: 1px solid #e0e0e0 !important;
        width: 100% !important;
        clear: both !important;
    }
    
    /* Achievement items layout */
    #achievements-certificates .row {
        display: block !important;
        width: 100% !important;
        clear: both !important;
    }
    
    /* Achievement items - General styling */
    #achievements-certificates .achievement-item,
    #achievements-certificates .certificate-item,
    #achievements-certificates .conference-item {
        width: 50% !important;
        float: left !important;
        padding: 0 0.05cm !important;
        margin-bottom: 0.1cm !important;
        box-sizing: border-box !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        background-color: #fff !important;
        padding: 0.08cm !important;
        height: 3.5cm !important;
        overflow: hidden !important;
        position: relative !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    
    /* Clear after every second item */
    #achievements-certificates .achievement-item:nth-child(2n+1),
    #achievements-certificates .certificate-item:nth-child(2n+1),
    #achievements-certificates .conference-item:nth-child(2n+1) {
        clear: left !important;
    }
    
    /* Title styling */
    #achievements-certificates .achievement-item h5,
    #achievements-certificates .certificate-item h5,
    #achievements-certificates .conference-item h5,
    #achievements-certificates .item-title,
    #achievements-certificates .certificate-title {
        font-size: 10pt !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-top: 0 !important;
        margin-bottom: 0.05cm !important;
        padding-bottom: 0.05cm !important;
        border-bottom: 1px dotted #e0e0e0 !important;
        line-height: 1.2 !important;
    }
    
    /* Description styling */
    #achievements-certificates .achievement-item p,
    #achievements-certificates .certificate-item p,
    #achievements-certificates .conference-item p,
    #achievements-certificates .item-description,
    #achievements-certificates .certificate-issuer {
        font-size: 9pt !important;
        color: #555 !important;
        margin: 0.05cm 0 !important;
        padding: 0 !important;
        line-height: 1.2 !important;
        max-height: 2.5cm !important;
        overflow: hidden !important;
    }
    
    /* Date styling */
    #achievements-certificates .item-date,
    #achievements-certificates .certificate-date {
        font-size: 8pt !important;
        color: #7f8c8d !important;
        font-style: italic !important;
        position: absolute !important;
        bottom: 0.05cm !important;
        left: 0.08cm !important;
    }
    
    /* View links */
    #achievements-certificates .view-link {
        position: absolute !important;
        bottom: 0.05cm !important;
        right: 0.08cm !important;
        font-size: 8pt !important;
        color: #3498db !important;
    }
    
    /* Handle the specific sections */
    /* First subsection - Achievements */
    #achievements-certificates h4:first-of-type {
        margin-top: 0 !important;
    }
    
    #achievements-certificates h4:first-of-type + .achievement-item,
    #achievements-certificates h4:first-of-type + .achievement-item + .achievement-item,
    #achievements-certificates h4:first-of-type + .achievement-item + .achievement-item + .achievement-item,
    #achievements-certificates h4:first-of-type + .achievement-item + .achievement-item + .achievement-item + .achievement-item {
        display: block !important;
    }
    
    /* Certificates section */
    #achievements-certificates h4:nth-of-type(2) {
        margin-top: 0.3cm !important;
        clear: both !important;
    }
    
    #achievements-certificates h4:nth-of-type(2) + .certificate-item,
    #achievements-certificates h4:nth-of-type(2) + .certificate-item + .certificate-item,
    #achievements-certificates h4:nth-of-type(2) + .certificate-item + .certificate-item + .certificate-item,
    #achievements-certificates h4:nth-of-type(2) + .certificate-item + .certificate-item + .certificate-item + .certificate-item {
        display: block !important;
    }
    
    /* Hide excess items */
    #achievements-certificates .achievement-item:nth-of-type(n+7),
    #achievements-certificates .certificate-item:nth-of-type(n+7),
    #achievements-certificates .conference-item:nth-of-type(n+7) {
        display: none !important;
    }
    
    /* Clear floats after sections */
    #achievements-certificates h4 + div:after,
    #achievements-certificates .row:after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
} 