/* Resume of Zoltán Szabó - layout and theme */

:root {
    --bg: #eef2f5;
    --card: #ffffff;
    --text: #1d2833;
    --muted: #5b6875;
    --line: #dae2e9;
    --accent: #1f6aa5;
    --accent-soft: #e6f0f7;
    --accent-text: #185787;
    --side-bg: #1c3549;
    --side-text: #e7eef3;
    --side-muted: #a2b6c6;
    --side-line: rgba(255, 255, 255, 0.12);
    --radius: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1116;
        --card: #111b23;
        --text: #e2e8f2;
        --muted: #97a4b8;
        --line: #22323f;
        --accent: #5aa6dc;
        --accent-soft: #16303f;
        --accent-text: #a3cdec;
        --side-bg: #0f212e;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

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

h1, h2, h3, p, ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

.icon {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Page frame */

.page {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 1120px;
    margin: 40px auto;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 12px 40px rgba(16, 32, 48, 0.08);
    overflow: hidden;
}

/* Sidebar */

.sidebar {
    background: var(--side-bg);
    color: var(--side-text);
    padding: 40px 30px;
}

.profile {
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--side-line);
}

.photo {
    display: block;
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.18);
}

.name {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.role {
    margin-top: 8px;
    color: var(--side-muted);
    font-size: 15px;
    line-height: 1.4;
}

.side-block {
    padding-top: 26px;
}

.side-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--side-muted);
    margin-bottom: 14px;
}

.contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.contact .icon {
    color: var(--side-muted);
}

.contact a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.side-item {
    margin-bottom: 14px;
    font-size: 14px;
}

.side-item strong {
    display: block;
    font-weight: 500;
}

.side-item span {
    display: block;
    color: var(--side-muted);
    font-size: 13px;
}

.side-item a {
    color: var(--side-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.side-list li {
    font-size: 14px;
    margin-bottom: 6px;
}

.side-list span {
    color: var(--side-muted);
}

/* Main column */

.main {
    padding: 44px 52px 48px;
    min-width: 0;
}

.section + .section {
    margin-top: 40px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.summary {
    font-size: 15.5px;
    color: var(--text);
}

/* Experience timeline */

.job {
    position: relative;
    padding: 0 0 30px 26px;
    border-left: 2px solid var(--line);
}

.job:last-child {
    padding-bottom: 0;
}

.job::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--accent);
}

.job-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
}

.job-title {
    font-size: 17px;
    font-weight: 700;
}

.job-time {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.job-company {
    color: var(--accent-text);
    font-weight: 500;
    font-size: 14px;
    margin-top: 2px;
}

.duties {
    margin-top: 10px;
}

.duties li,
.projects li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 4px;
}

.duties li::before,
.projects li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.68em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
}

.projects-label {
    margin: 14px 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.projects li {
    margin-bottom: 7px;
}

.project {
    font-weight: 500;
}

.project a {
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
}

.project a:hover {
    text-decoration-color: var(--accent);
}

.project-note {
    color: var(--muted);
}

.tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: 4px;
    vertical-align: 1px;
}

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}

/* Skills */

.skills {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 20px;
    align-items: baseline;
}

.skills dt {
    font-weight: 500;
    font-size: 14px;
    color: var(--muted);
}

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

.footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: -20px 0 32px;
}

/* Small screens */

@media screen and (max-width: 860px) {
    .page {
        grid-template-columns: 1fr;
        margin: 0;
        border-radius: 0;
    }

    .sidebar {
        padding: 32px 20px;
    }

    .contact,
    .side-columns {
        max-width: 420px;
        margin: 0 auto;
    }

    .main {
        padding: 32px 20px 40px;
    }

    .skills {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .skills dd {
        margin-bottom: 12px;
    }

    .footer {
        margin: 20px 0 28px;
    }
}

/* Print and "Save as PDF" */

@media print {
    @page {
        size: A4;
        margin: 12mm 12mm 14mm;
    }

    :root {
        --text: #1d2833;
        --muted: #55626e;
        --line: #d3dce4;
        --accent: #1f6aa5;
        --accent-soft: #ffffff;
        --accent-text: #185787;
    }

    body {
        background: #ffffff;
        font-size: 9pt;
        line-height: 1.4;
    }

    /* The sidebar becomes a header, so the content gets the full page width */
    .page {
        display: block;
        margin: 0;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .sidebar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0 7mm;
        background: #edf3f7;
        color: var(--text);
        padding: 6mm 7mm;
        border-radius: 3mm;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .profile {
        display: contents;
    }

    .photo {
        grid-row: 1;
        grid-column: 1;
        width: 26mm;
        height: 26mm;
        margin: 0;
        border-color: #ffffff;
    }

    .name,
    .role {
        grid-column: 2;
        text-align: left;
    }

    .name {
        grid-row: 1;
        align-self: start;
        margin-top: 4mm;
        font-size: 20pt;
    }

    .role {
        grid-row: 1;
        align-self: end;
        margin-bottom: 4mm;
        font-size: 10.5pt;
    }

    .contact-block {
        grid-row: 1;
        grid-column: 3;
        padding-top: 0;
    }

    .contact li {
        margin-bottom: 1.2mm;
        font-size: 8.5pt;
        overflow-wrap: normal;
    }

    .side-columns {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1.3fr 1.3fr 0.8fr 1fr;
        gap: 0 6mm;
        margin-top: 4mm;
        padding-top: 1mm;
        border-top: 1px solid var(--line);
    }

    .side-block {
        padding-top: 3mm;
    }

    .side-title {
        margin-bottom: 1.5mm;
        font-size: 7.5pt;
    }

    .side-item,
    .side-list li {
        margin-bottom: 1.5mm;
        font-size: 8.5pt;
    }

    .side-item span {
        font-size: 8pt;
    }

    .role,
    .side-title,
    .contact .icon,
    .side-item span,
    .side-item a,
    .side-list span {
        color: var(--muted);
    }

    .main {
        padding: 6mm 0 0 1.5mm;
    }

    .skills dt {
        font-size: 9pt;
    }

    .section + .section {
        margin-top: 6mm;
    }

    .section-title {
        margin-bottom: 3mm;
        font-size: 8.5pt;
    }

    .summary {
        font-size: 9.5pt;
    }

    .job {
        padding-bottom: 4mm;
    }

    .job-title {
        font-size: 11pt;
    }

    .job-time,
    .job-company {
        font-size: 8.5pt;
    }

    .duties {
        margin-top: 1.5mm;
    }

    .duties li,
    .projects li {
        margin-bottom: 0.6mm;
    }

    .projects-label {
        margin: 2.5mm 0 1.5mm;
        font-size: 7.5pt;
    }

    .duties li,
    .projects li,
    .job-head,
    .skills dt,
    .skills dd {
        break-inside: avoid;
    }

    .tag {
        border: 1px solid var(--line);
        font-size: 8pt;
        padding: 0 5px;
    }

    .skills {
        grid-template-columns: 40mm 1fr;
        gap: 2.5mm 4mm;
    }

    .footer {
        display: none;
    }
}
