/**
 * Product Company Optimized CV Styles (1-Page)
 * Copyright (c) 2025 Kiran Badave
 * Licensed under the MIT License
 * https://github.com/kiran-badave/kiran-badave.github.io
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 15px;
    font-size: 10pt;
}

.cv-container {
    max-width: 210mm; /* A4 width */
    margin: 0 auto;
    background: white;
    padding: 15mm 18mm;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    min-height: 297mm; /* A4 height */
}

/* Header Section */
.cv-header {
    text-align: center;
    border-bottom: 2px solid #2563eb;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.name {
    font-size: 22pt;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.contact-bar {
    /* display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px; */
    font-size: 9pt;
    margin-bottom: 4px;
}

.contact-bar span {
    white-space: nowrap;
}

.contact-bar a {
    color: #2563eb;
    text-decoration: none;
}

.contact-bar a:hover {
    text-decoration: underline;
}

.location {
    font-size: 9pt;
    color: #666;
}

/* Professional Title */
.professional-title {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 8px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.professional-title h2 {
    font-size: 11pt;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Sections */
.cv-section {
    margin-bottom: 12px;
    page-break-inside: avoid;
}

.summary-section {
    margin-bottom: 10px;
}

.summary-section p {
    text-align: justify;
    line-height: 1.5;
    font-size: 9.5pt;
}

.section-title {
    font-size: 11pt;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    border-bottom: 1.5px solid #e5e7eb;
    padding-bottom: 3px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Experience */
.experience-item {
    margin-bottom: 10px;
    page-break-inside: avoid;
}

.exp-header {
    margin-bottom: 5px;
}

.company {
    font-size: 10.5pt;
    font-weight: 600;
    color: #1a1a1a;
}

.duration {
    font-size: 9pt;
    color: #666;
    font-style: italic;
    margin-left: 8px;
}

.impact-list {
    list-style: none;
    padding-left: 0;
    margin-top: 5px;
}

.impact-list li {
    padding-left: 15px;
    margin-bottom: 3px;
    position: relative;
    font-size: 9.5pt;
    line-height: 1.4;
}

.impact-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Compact Lists */
.compact-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 15px;
}

.compact-list li {
    padding-left: 15px;
    position: relative;
    font-size: 9.5pt;
    line-height: 1.4;
}

.compact-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.compact-list.highlights {
    grid-template-columns: 1fr;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px;
    font-size: 9.5pt;
}

.skills-grid div {
    line-height: 1.4;
}

/* Education */
.education-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 9.5pt;
}

/* Print Controls */
.print-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.print-btn, .back-btn, .switch-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.print-btn {
    background: #2563eb;
    color: white;
}

.print-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.switch-btn {
    background: #7c3aed;
    color: white;
}

.switch-btn:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.back-btn {
    background: #64748b;
    color: white;
}

.back-btn:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .cv-container {
        box-shadow: none;
        padding: 10mm 15mm;
        max-width: 100%;
        margin: 0;
    }

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

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

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

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

    /* Ensure single page */
    @page {
        size: A4;
        margin: 10mm;
    }

    /* Adjust font sizes for print */
    body {
        font-size: 9.5pt;
    }

    .name {
        font-size: 20pt;
    }

    .section-title {
        font-size: 10.5pt;
    }

    .impact-list li,
    .compact-list li,
    .skills-grid div {
        font-size: 9pt;
    }

    /* Maintain grid layouts in print */
    .skills-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 5px 15px !important;
    }

    .education-compact {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .compact-list {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px 15px !important;
    }

    .compact-list.highlights {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .cv-container {
        padding: 15px;
    }

    .contact-bar {
        flex-direction: column;
        gap: 6px;
    }

    .skills-grid,
    .compact-list,
    .education-compact {
        grid-template-columns: 1fr;
    }

    .print-controls {
        position: static;
        margin-top: 20px;
        flex-direction: column;
    }
}

