:root {
    --accent: #185fa5;
    --text-primary: #1f1f1d;
    --text-secondary: #5f5e5a;
    --text-muted: #8a8880;
    --paper: #ffffff;
    --page-bg: #f1efe8;
    --border: #e6e4dc;
    --border-strong: #cfcdc3;
    --track: #f1efe8;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.page {
    position: relative;
    max-width: 820px;
    margin: 32px auto;
}

.lang-switch {
    position: absolute;
    top: -24px;
    right: 4px;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.flag {
    height: 13px;
    width: auto;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

.cv {
    background: var(--paper);
    border: 0.5px solid var(--border);
    border-radius: 12px;
    padding: 40px 44px;
}

.cv-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    border-bottom: 0.5px solid var(--border);
    padding-bottom: 20px;
}

.cv-id {
    flex: 1;
}

.cv-id h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
}

.role {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--accent);
}

.contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
}

.contact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
}

.contact svg {
    color: var(--accent);
    flex-shrink: 0;
}

a.contact:hover {
    color: var(--accent);
}

.photo {
    flex-shrink: 0;
    width: 96px;
    height: 112px;
    border-radius: 8px;
    border: 1px dashed var(--border-strong);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
}

.photo-img {
    flex-shrink: 0;
    height: 112px;
    width: auto;
    display: block;
    border-radius: 8px;
    border: 0.5px solid var(--border);
}

.photo span {
    font-size: 11px;
}

.summary {
    margin: 18px 0 22px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.cv-body {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
}

h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
}

h2 svg {
    color: var(--accent);
}

.cv-main section + section,
.cv-side section + section {
    margin-top: 22px;
}

.timeline {
    margin-left: 4px;
    padding-left: 18px;
    border-left: 1.5px solid var(--border-strong);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.entry {
    position: relative;
}

.dot {
    position: absolute;
    left: -23.5px;
    top: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
}

.entry.minor .dot {
    top: 4px;
    width: 7px;
    height: 7px;
    background: var(--border-strong);
}

.period {
    font-size: 11px;
    color: var(--text-muted);
}

.org {
    font-weight: 600;
}

.entry-role {
    font-size: 12px;
    color: var(--accent);
}

.entry-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.skill {
    margin-bottom: 9px;
}

.skill-name {
    margin-bottom: 3px;
    font-size: 12px;
}

.bar {
    height: 6px;
    background: var(--track);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.bar > span {
    display: block;
    height: 100%;
    background: var(--accent);
}

.familiar {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.tools {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.tools div {
    margin-bottom: 2px;
}

.familiar b,
.tool-label {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .cv {
        padding: 28px 22px;
    }
    .cv-header {
        flex-direction: column-reverse;
    }
    .cv-body {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@page {
    size: A4;
    margin: 14mm;
}

@media print {
    body {
        background: #fff;
    }
    .page {
        max-width: none;
        margin: 0;
    }
    .lang-switch {
        display: none;
    }
    .cv {
        border: none;
        border-radius: 0;
        padding: 0;
    }
    .contact {
        color: var(--text-secondary);
    }
}