/**
 * Template 1 - Professional Resume Template (PDF-Safe Version with Formatter Support)
 * 
 * IMPORTANT: This CSS uses ONLY PDF-safe features:
 * - Table-based layouts (no flexbox, no grid)
 * - CSS 2.1 properties only
 * - Fixed widths and simple positioning
 * - No CSS variables (formatter settings applied via inline styles in JS)
 * 
 * This ensures identical rendering in:
 * - Frontend preview
 * - PDF generation (Flying Saucer, OpenPDF, etc.)
 */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    margin: 0;
    padding: 0;
    color: #333333;
    background-color: #f5f5f5;
    line-height: 1.5;
}

dl,
ol,
ul {
    margin-bottom: 0;
}

table {
    border-collapse: collapse;
}

/* ==========================================================================
   MAIN RESUME CONTAINER - No Border
   ========================================================================== */
.resume-container {
    width: 900px;
    margin: 0 auto;
    background-color: #ffffff;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */
.sidebar-cell {
    width: 220px;
    vertical-align: top;
    padding: 30px 20px;
    border-right: 1px solid #dddddd;
    background-color: #ffffff;
    word-wrap: break-word;
    text-align: right;
    direction: rtl;
}

.sidebar-section,
.name-first,
.name-last,
.location-text {
    text-align: right;
}

.avatar {
    width: 100px;
    height: 100px;
    background-color: #f0f0f0;
    color: #17b890;
    text-align: center;
    font-size: 32pt;
    font-weight: bold;
    line-height: 70px;
    margin-bottom: 15px;
    margin-left: auto;
    margin-right: 0;
    overflow: hidden;
    border: 2px solid #17b890;
    border-radius: 4px;
}

.avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    display: block;
}

.name-first {
    font-size: 22pt;
    color: #17b890;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.name-last {
    font-size: 22pt;
    color: #333333;
    font-weight: bold;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    word-wrap: break-word;
}

.location-text {
    font-size: 9pt;
    color: #555555;
    margin: 5px 0 20px 0;
    word-wrap: break-word;
}

.sidebar-section {
    margin-bottom: 15px;
}

.sidebar-heading {
    display: block;
    font-size: 10pt;
    color: #333333;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: #17b890;
    padding-bottom: 4px;
    margin: 10px 0 8px 0;
    font-weight: 600;
}

.sidebar-text {
    font-size: 9pt;
    color: #555555;
    margin: 0;
    padding: 4px 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.sidebar-link {
    font-size: 8pt;
    color: #555555;
    text-decoration: none;
    display: block;
    padding: 4px 0;
    word-wrap: break-word;
}

.sidebar-link:hover {
    color: #17b890;
}

.cert-name {
    font-weight: 600;
    font-size: 9pt;
    margin: 0;
    padding: 2px 0;
    word-wrap: break-word;
}

.cert-meta {
    font-size: 8pt;
    color: #828282;
    margin: 0;
    padding: 2px 0 8px 0;
    word-wrap: break-word;
}

/* ==========================================================================
   CONTENT AREA STYLES
   ========================================================================== */
.content-cell {
    vertical-align: top;
    padding: 30px 40px;
    background-color: #ffffff;
    word-wrap: break-word;
}

.section-heading {
    display: block;
    font-size: 12pt;
    color: #333333;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: #17b890;
    padding-bottom: 6px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.section-spacing {
    height: 15px;
}

.summary-text {
    font-size: 10pt;
    line-height: 1.5;
    margin: 0;
    padding: 0 0 8px 0;
    word-wrap: break-word;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-table {
    width: 100%;
    margin-bottom: 10px;
}

.skill-cell {
    width: 50%;
    font-size: 9pt;
    padding: 2px 10px 2px 0;
    vertical-align: top;
    word-wrap: break-word;
}

/* ==========================================================================
   EXPERIENCE SECTION
   ========================================================================== */
.exp-item-spacing {
    height: 15px;
}

.job-title {
    font-weight: bold;
    font-size: 11pt;
    color: #333333;
    margin: 0;
    padding: 0 0 3px 0;
    word-wrap: break-word;
}

.job-location {
    font-size: 9pt;
    color: #555555;
    margin: 0;
    padding: 0 0 5px 0;
    word-wrap: break-word;
}

.company-date-table {
    width: 100%;
    margin-bottom: 2px;
}

.company-name {
    color: #555555;
    font-size: 10pt;
    text-align: left;
    word-wrap: break-word;
}

.date-range {
    font-size: 8pt;
    color: #828282;
    text-align: right;
    word-wrap: break-word;
    white-space: nowrap;
}

.project-name {
    font-size: 9pt;
    font-weight: 600;
    color: #333333;
    margin: 0;
    padding: 0px 0 2px 0;
    word-wrap: break-word;
}

.project-date {
    font-size: 8pt;
    color: #828282;
    margin: 0;
    padding: 0 0 5px 0;
    word-wrap: break-word;
}

.tech-tags {
    margin: 5px 0;
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f8f8f8;
    color: #000000;
    margin: 0 4px 4px 0;
    border-radius: 4px;
}

.responsibilities {
    margin: 5px 0 8px 10px;
    border-bottom: 1px solid #dddddd;
}

.responsibilities li {
    margin-bottom: 4px;
    list-style-type: disc;
    word-wrap: break-word;
}

/* ==========================================================================
   EDUCATION SECTION
   ========================================================================== */
.edu-item-spacing {
    height: 10px;
}

.degree-name {
    font-weight: bold;
    font-size: 11pt;
    color: #333333;
    margin: 0;
    padding: 0 0 3px 0;
    word-wrap: break-word;
}

.institution-name {
    color: #555555;
    font-size: 10pt;
    word-wrap: break-word;
}

/* ==========================================================================
   LANGUAGES SECTION (2-column grid using tables)
   ========================================================================== */
.lang-grid-table {
    width: 100%;
    margin-top: 10px;
}

.lang-cell {
    width: 50%;
    padding: 5px 5px 5px 0;
    vertical-align: top;
}

.lang-name {
    font-weight: bold;
    font-size: 9pt;
    margin: 0;
    padding: 0 0 6px 0;
    word-wrap: break-word;
}

.progress-bar {
    display: block;
    width: 100%;
    height: 6px;
    background-color: #dddddd;
    margin-bottom: 4px;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 6px;
    background-color: #17b890;
}

.lang-level {
    font-size: 8pt;
    color: #828282;
    margin: 0;
    word-wrap: break-word;
}

/* ==========================================================================
   CUSTOM SECTIONS
   ========================================================================== */
.custom-value {
    font-size: 9pt;
    color: #555555;
    /*    padding-bottom: 8px;px*/
    word-wrap: break-word;
}

/* ==========================================================================
   PRINT / PDF OPTIMIZATION
   ========================================================================== */
@media print {
    @page {
        margin: 0;
        size: auto;
    }

    html,
    body {
        height: auto;
        margin: 0;
        padding: 0;
        background-color: #ffffff;
    }

    .resume-container {
        margin: 0;
        box-shadow: none;
        width: 100%;
        border: none;
    }

    /* Avoid breaking inside sections if possible */
    .sidebar-section,
    .section-heading,
    .company-date-table {
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   MOBILE PREVIEW ADJUSTMENTS (FOR SCALED UI)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .resume-container {
        display: table !important;
        width: 100% !important;
        table-layout: auto !important;
        /* Allow natural balancing on small screens */
    }

    .resume-container>tbody>tr {
        display: table-row !important;
    }

    .sidebar-cell {
        display: table-cell !important;
        /* width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important; */
        padding: 20px 15px !important;
    }

    .content-cell {
        display: table-cell !important;
        padding: 20px 25px !important;
        width: auto !important;
        min-width: 0 !important;
    }

    /* Font Size Adjustments for Mobile Legibility */
    .name-first,
    .name-last {
        font-size: 18pt !important;
    }

    .section-heading {
        font-size: 10.5pt !important;
        margin-top: 10px !important;
        margin-bottom: 8px !important;
    }

    .summary-text,
    .job-title,
    .degree-name {
        font-size: 9pt !important;
    }

    .sidebar-text,
    .sidebar-heading,
    .lang-name,
    .cert-name {
        font-size: 8pt !important;
    }

    .avatar {
        width: 80px !important;
        height: 80px !important;
        line-height: 55px !important;
        font-size: 20pt !important;
    }

    .avatar img {
        width: 80px !important;
        height: 80px !important;
    }

    .tech-tag,
    .skill-tag {
        padding: 2px 6px !important;
        font-size: 7.5pt !important;
        margin: 0 2px 2px 0 !important;
    }
}