* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@page {
    size: A4;
    margin: 12mm;
}

:root {
    --paper: #ffffff;
    --text: #151515;
    --muted: #555555;
    --soft: #ffffff;
    --line: #d8c7c0;
    --accent: #9b7c73;
    --dark-accent: #465d5c;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(70, 93, 92, 0.25), transparent 35%),
        linear-gradient(135deg, #0b0f12, #182024);
    color: var(--text);
    line-height: 1.45;
}

.toolbar {
    width: 210mm;
    margin: 20px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 8px;
}

.btn {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid #2c363c;
    background: #141a1e;
    color: #dcd2cd;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:hover,
.btn.active {
    background: #1e262b;
    border-color: #9b7c73;
    color: #ffffff;
}

.btn.primary {
    background: #9b7c73;
    border-color: #9b7c73;
    color: #ffffff;
}

.btn.primary:hover {
    background: #866a62;
}

.cv-page {
    position: relative;
    overflow: hidden;
    width: 210mm;
    min-height: 297mm;
    margin: 18px auto 32px;
    padding: 15mm;
    background: var(--paper);
    color: var(--text);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.cv-bg-logo {
    position: absolute;
    right: -30mm;
    top: 40mm;
    width: 120mm;
    opacity: 0.05;
    filter: saturate(0.6) brightness(0.8);
    pointer-events: none;
    z-index: 0;
}

.cv-header,
.cv-grid {
    position: relative;
    z-index: 1;
}

.cv-header {
    display: grid;
    grid-template-columns: 34mm 1fr;
    gap: 18px;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--line);
}

.cv-photo {
    width: 32mm;
    height: 32mm;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: #f5f1ef;
}

.cv-kicker {
    margin-bottom: 4px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--accent);
    font-weight: 700;
}

.cv-header h1 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -1px;
    color: var(--text);
}

.cv-title {
    margin-top: 5px;
    font-size: 13.5px;
    color: var(--muted);
}

.cv-grid {
    display: grid;
    grid-template-columns: 54mm 1fr;
    gap: 11mm;
}

.cv-sidebar {
    padding-right: 8mm;
    border-right: 1px solid var(--line);
}

.cv-section,
.cv-block {
    margin-bottom: 22px;
}

.cv-section h2,
.cv-block h2 {
    margin-bottom: 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--accent);
    font-weight: 700;
}

.cv-section p,
.cv-block p {
    font-size: 12.5px;
    line-height: 1.5;
    color: #242424;
}

.cv-block p {
    margin-bottom: 5px;
    word-break: break-word;
}

.cv-item {
    margin-bottom: 13px;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.cv-item h3 {
    font-size: 13.5px;
    line-height: 1.25;
    color: var(--text);
    font-weight: 700;
}

.cv-item-header span {
    font-size: 11.7px;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 500;
}

.company {
    margin: 2px 0 5px;
    font-size: 12px;
    color: #000000;
    font-weight: 700;
}

ul {
    margin-left: 17px;
    margin-top: 5px;
}

li {
    margin-bottom: 4px;
    font-size: 12.2px;
    line-height: 1.45;
    color: #222222;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skills span {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #bbbbbb;
    border-radius: 999px;
    background: #ffffff;
    color: #333333;
    font-size: 11.5px;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

@media print {
     html, body {
        width: 210mm;
        height: 297mm;
    }   

    body {
        background: white;
    }

    .toolbar {
        display: none;
    }

    .cv-page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
        overflow: visible;
    }

    .cv-bg-logo {
        display: none;
    }

    a {
        color: #111111;
        text-decoration: none;
    }
}

@media screen and (max-width: 900px) {
    .toolbar {
        width: calc(100% - 24px);
        flex-direction: column;
        gap: 10px;
    }

    .cv-page {
        width: calc(100% - 24px);
        min-height: auto;
        padding: 22px;
        margin: 16px auto;
    }

    .cv-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cv-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cv-sidebar {
        padding-right: 0;
        border-right: none;
    }

    .cv-item-header {
        flex-direction: column;
        gap: 2px;
    }

    .cv-item-header span {
        white-space: normal;
    }
}