:root {
    --primary: #1e3a5f;
    --accent: #2563eb;
    --accent-light: #dbeafe;
    --sidebar-bg: #f1f5f9;
    --text-main: #334155;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}
body {
    background-color: #e2e8f0;
    color: var(--text-main);
    line-height: 1.6;
    padding: 30px 15px;
}
.container {
    max-width: 950px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.action-bar {
    text-align: right;
    padding: 12px 20px 0;
}
.btn-print {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-print:hover {
    background-color: var(--accent);
}
.resume-wrapper {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100%;
}
/* ===== SIDEBAR ===== */
.sidebar {
    background-color: var(--sidebar-bg);
    padding: 28px 22px;
}
.sidebar-header {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border);
}
.profile-img {
    width: 115px;
    height: 115px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
    margin: 0 auto 12px;
    display: block;
}
.full-name {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}
.job-title-sidebar {
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.sidebar-section {
    margin-bottom: 20px;
}
.sidebar-h2 {
    color: var(--primary);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 6px;
    margin-bottom: 10px;
    font-weight: 700;
}
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-main);
    word-break: break-all;
}
.contact-icon {
    font-size: 13px;
    flex-shrink: 0;
}
.skills-group {
    margin-bottom: 10px;
}
.skills-group strong {
    display: block;
    font-size: 10.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    font-weight: 600;
}
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.badge {
    background-color: var(--white);
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 500;
    padding: 2.5px 7px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.edu-item {
    font-size: 11.5px;
}
.edu-degree {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.4;
}
.edu-faculty {
    color: var(--text-main);
    margin-bottom: 1px;
}
.edu-university {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 2px;
}
.edu-period {
    color: var(--text-secondary);
    font-size: 10.5px;
}
.lang-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11.5px;
    margin-bottom: 4px;
}
.lang-name {
    color: var(--text-main);
    font-weight: 500;
}
.lang-level {
    color: var(--text-secondary);
    font-size: 10.5px;
}
.military-text {
    font-size: 11.5px;
    color: var(--text-main);
    line-height: 1.5;
}
/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 30px 32px;
}
.main-section {
    margin-bottom: 22px;
}
.main-section:last-child {
    margin-bottom: 0;
}
.main-h2 {
    color: var(--primary);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-left: 4px solid var(--accent);
    padding-left: 10px;
    margin-bottom: 12px;
    font-weight: 700;
}
.summary-text {
    font-size: 13px;
    line-height: 1.7;
    /* text-align: justify; */
    text-align: left;
    text-justify: inter-word;
    word-break: break-word;
    color: var(--text-main);
}
.competencies-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}
.competency-item {
    font-size: 12.5px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}
.competency-item .bullet {
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}
.timeline-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}
.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 2px;
}
.job-title {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.4;
}
.job-period {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.job-company {
    font-size: 12.5px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}
.job-details {
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-main);
    line-height: 1.55;
}
.job-details li {
    margin-bottom: 3px;
}
.dev-list {
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-main);
    line-height: 1.55;
}
.dev-list li {
    margin-bottom: 3px;
}
.page-footer {
    text-align: center;
    padding: 12px 20px;
    font-size: 11px;
    color: #94a3b8;
    border-top: 1px solid var(--border);
    background-color: var(--white);
}
@media (max-width: 768px) {
    .resume-wrapper {
        grid-template-columns: 1fr;
    }
    .competencies-list {
        grid-template-columns: 1fr;
    }
    .sidebar {
        padding: 22px 20px;
    }
    .main-content {
        padding: 22px 20px;
    }
}
/* ===== PRINT ===== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    @page {
        size: A4;
        margin: 0;
    }
    html, body {
        background: var(--white) !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 11px;
        line-height: 1.45;
    }
    .container {
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    .action-bar,
    .page-footer {
        display: none !important;
    }
    .resume-wrapper {
        grid-template-columns: 250px 1fr !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }
    .sidebar,
    .main-content {
        break-inside: auto !important;
        page-break-inside: auto !important;
    }
    .sidebar {
        padding: 18px 16px !important;
    }
    .sidebar-header {
        margin-bottom: 14px !important;
        padding-bottom: 12px !important;
    }
    .profile-img {
        width: 75px !important;
        height: 75px !important;
        border-width: 2px !important;
        box-shadow: none !important;
        margin-bottom: 8px !important;
    }
    .full-name {
        font-size: 15px !important;
    }
    .job-title-sidebar {
        font-size: 10px !important;
        letter-spacing: 0.5px !important;
    }
    .sidebar-section {
        margin-bottom: 12px !important;
    }
    .sidebar-h2 {
        font-size: 10.5px !important;
        padding-bottom: 4px !important;
        margin-bottom: 7px !important;
        border-bottom-width: 1.5px !important;
    }
    .contact-item {
        font-size: 9.5px !important;
        gap: 5px !important;
    }
    .contact-icon {
        font-size: 10px !important;
    }
    .skills-group {
        margin-bottom: 7px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    .skills-group strong {
        font-size: 9px !important;
        margin-bottom: 3px !important;
    }
    .badge {
        font-size: 9px !important;
        padding: 1.5px 5px !important;
    }
    .edu-item {
        font-size: 9.5px !important;
    }
    .edu-period {
        font-size: 9px !important;
    }
    .lang-item {
        font-size: 9.5px !important;
        margin-bottom: 3px !important;
    }
    .lang-level {
        font-size: 9px !important;
    }
    .military-text {
        font-size: 9.5px !important;
    }
    .main-content {
        padding: 20px 22px !important;
    }
    .main-section {
        margin-bottom: 14px !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }
    .main-h2 {
        font-size: 12.5px !important;
        margin-bottom: 8px !important;
        padding-left: 8px !important;
        border-left-width: 3px !important;
        break-after: avoid !important;
        break-inside: avoid !important;
        page-break-after: avoid !important;
    }
    .summary-text {
        font-size: 11.5px !important;
        line-height: 1.6 !important;
    }
    .competencies-list {
        gap: 4px 14px !important;
    }
    .competency-item {
        font-size: 11px !important;
        gap: 5px !important;
    }
    .timeline-item {
        margin-bottom: 10px !important;
        padding-bottom: 8px !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
    .job-title {
        font-size: 12px !important;
    }
    .job-period {
        font-size: 9.5px !important;
    }
    .job-company {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }
    .job-details {
        font-size: 11px !important;
        padding-left: 14px !important;
        line-height: 1.5 !important;
    }
    .job-details li {
        margin-bottom: 2px !important;
    }
    .dev-list {
        font-size: 11px !important;
        padding-left: 14px !important;
        line-height: 1.5 !important;
    }
    .dev-list li {
        margin-bottom: 2px !important;
    }
    p, li {
        orphans: 3 !important;
        widows: 3 !important;
    }
    img {
        break-inside: avoid !important;
    }
}
