:root {
    --snow0: #d8dee9;
    --snow1: #e5e9f0;
    --snow2: #eceff4;
    --nord0: #2e3440;
    --nord1: #3b4252;
    --nord2: #434c5e;
    --frost0: #5e81ac;
}

html[data-theme="dark"] body {
    background: linear-gradient(135deg, var(--nord0) 0%, var(--nord2) 70%);
}

html[data-theme="dark"] .container {
    box-shadow: 0 20px 45px rgba(15, 18, 24, 0.65);
}

html[data-theme="dark"] .left {
    background: linear-gradient(180deg, var(--nord1) 0%, var(--nord0) 80%);
}

html[data-theme="dark"] .right {
    background: linear-gradient(180deg, var(--nord2) 0%, var(--nord1) 90%);
    color: var(--snow0);
}

* {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Ubuntu", sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--snow2) 0%, var(--snow1) 70%);
}

.container {
    max-width: 1000px;
    min-height: 1000px;
    width: 100%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.left {
    flex: 30%;
    color: var(--snow0);
    background: linear-gradient(180deg, var(--nord0), var(--nord1) 75%);
    padding: 40px;
}

.right {
    flex: 70%;
    color: var(--nord2);
    background: linear-gradient(180deg, var(--snow2) 0%, var(--snow1) 80%);
    border-left: 1px solid transparent;
    padding: 40px;
    text-align: justify;
}

.icon {
    color: var(--frost0);
    vertical-align: middle;
    font-size: 18px;
    width: 30px;
    margin-right: 5px;
}

.action-buttons {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.pdf-button,
.theme-toggle {
    position: relative;
    width: 56px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nord1);
    color: var(--snow2);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(46, 52, 64, 0.25);
    opacity: 0.8;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.theme-toggle {
    width: 56px;
    height: 38px;
}

.pdf-button::after,
.theme-toggle::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    border: 2px solid transparent;
    pointer-events: none;
}

.pdf-button i,
.theme-toggle i {
    font-size: 18px;
}

.pdf-button:hover,
.pdf-button:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
    opacity: 1;
    background: var(--nord2);
}

html[data-theme="dark"] .pdf-button,
html[data-theme="dark"] .theme-toggle {
    background: var(--snow1);
    color: var(--nord0);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .pdf-button:hover,
html[data-theme="dark"] .pdf-button:focus-visible,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible {
    background: var(--snow0);
}

.personal {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--snow0);
    text-transform: uppercase;
    text-align: center;
}

.personal .avatar {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 15%;
    overflow: hidden;
    border: 3px solid var(--snow1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.personal .avatar img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personal .name {
    font-size: 1.5em;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4em;
}

.personal .title {
    font-size: 0.8em;
    font-weight: 300;
    margin-bottom: 20px;
}

.section {
    padding-top: 40px;
    padding-bottom: 40px;
    page-break-inside: avoid;
}

.heading {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    padding-bottom: 30px;
    position: relative;
}

.heading::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    background: currentColor;
    opacity: 0.6;
    margin-top: 8px;
}

.section ul {
    list-style: none;
    cursor: default;
}

.list-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-bottom: 20px;
}

.text-sm {
    font-size: 13px;
    line-height: 1.45;
}

.text-light {
    font-weight: 300;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.contact .text a {
    text-decoration: none;
    color: var(--snow0);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.contact .text a:hover {
    border-color: currentColor;
}

.education ul li {
    padding-bottom: 20px;
    line-height: 1.1em;
}

.education h5 {
    color: var(--frost0);
    font-weight: 300;
}

.education h4 {
    color: var(--snow0);
    font-weight: 500;
    font-size: 13px;
}

.languages ul li {
    padding-bottom: 20px;
    line-height: 1.1em;
}

.languages .text {
    font-weight: 500;
    font-size: 13px;
}

.languages .level {
    color: var(--frost0);
    font-size: 11px;
    font-weight: 300;
}

.right .heading {
    color: var(--frost0);
}

.intro {
    margin-bottom: 10px;
}

.timeline .company {
    padding-bottom: 40px;
}

.timeline .company-range {
    color: var(--frost0);
    font-weight: 300;
    display: inline-block;
    width: 100px;
}

.timeline .company-name {
    text-transform: uppercase;
    font-weight: 800;
}

.timeline .role-list {
    padding-top: 10px;
    margin-left: 15px;
    margin-top: 15px;
    border-left: 1px solid var(--frost0);
}

.timeline .role {
    padding-left: 40px;
    position: relative;
    break-inside: avoid;
    page-break-inside: avoid;
}

.timeline .role::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--frost0);
    box-shadow: 0 0 0 3px rgba(94, 129, 172, 0.2);
}

.timeline .role-range {
    color: var(--frost0);
    font-weight: 300;
    line-height: 1.3em;
}

.timeline .role-name {
    font-weight: 800;
    line-height: 1.3em;
}

.timeline .role-desc,
.timeline .skills {
    padding-left: 30px;
    padding-right: 30px;
    font-weight: 300;
    font-size: 12px;
    text-align: justify;
}

.timeline .role-desc {
    padding-top: 10px;
    margin-bottom: 6px;
}

.timeline .skills {
    padding-top: 10px;
    padding-bottom: 40px;
    margin: 0;
}

.project-list {
    padding-bottom: 20px;
}

.project {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-bottom: 20px;
    padding-top: 20px;
}

.project-title {
    display: block;
    flex: 0 0 135px;
    color: var(--frost0);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.project-title:hover {
    text-decoration: underline;
}

.project-desc {
    margin: 0;
    flex: 1;
    text-align: justify;
}

@media (max-width: 800px) {
    body {
        font-size: 14px;
    }
    .container {
        flex-direction: column;
        border-radius: 0;
    }
    .left,
    .right {
        padding: 28px;
    }
    .right {
        text-align: left;
    }
    .project {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-title {
        flex: 0 0 auto;
    }
    .project-desc {
        padding-top: 6px;
    }
}

@media print {
    .container {
        box-shadow: none;
        flex-direction: row;
        min-height: auto;
    }
    .right .section {
        break-inside: auto;
        page-break-inside: auto;
    }
    .timeline .company > h5 {
        break-after: avoid;
        page-break-after: avoid;
        padding-top: 30px;
    }
    .timeline .company:first-child > h5 {
        padding-top: 0;
    }
    .timeline .role {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .left .personal,
    .left .section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .project {
        flex-direction: row;
        align-items: center;
    }
    .project-title {
        flex: 0 0 135px;
    }
    .project-desc {
        padding-top: 0;
    }
    .pdf-button {
        display: none;
    }
    .theme-toggle {
        display: none;
    }
}
