@import url('https://fonts.googleapis.com/css2?family=Genos:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Asap:ital,wdth,wght@0,75..125,100..900;1,75..125,100..900&family=Sansation:ital,wght@0,300;0,400;1,300&display=swap');

* {
    box-sizing: border-box;
}

:root, a, button {
    font-size: 14px;
    font-family: 'Genos', sans-serif;
    /*font-family: 'Lato', sans-serif;
    font-family: 'Exo 2';
    font-family: 'Philosopher';
    font-family: 'Genos';
    font-family: 'Alegreya Sans';*/
    font-weight: 350;
    letter-spacing: -0.05px;
}

.font-heavy:root, .font-heavy a, .font-heavy button {
    font-size: 10pt;
    font-family: 'Asap', sans-serif;
    font-weight: 300;
    font-variation-settings: 'wdth' 89;
    line-height: 1.4em;

    & h1, & h2, & h3, & h4, & h5, & h6,
    & .title{
        font-family: 'Sansation', sans-serif;
    }

    & .project {
        font-family: 'Sansation', sans-serif;
        margin-top: 1.5rem;

        &:first-of-type {
            margin-top: 1rem;
        }

        & .name {
            padding-top: 6px;
        }
        & .link a {
            font-size: 1em;
            font-family: 'Sansation', sans-serif;
        }
    }

    & h1.title {
        letter-spacing: -0.9px;
    }

    section h2 {
        font-size: 12pt;
    }

    & .description, & .section-content {
        font-family: 'Asap', sans-serif;
        line-height: 1.4em;
        font-variation-settings: 'wdth' 89;
    }
}

strong {
    font-weight: 500;
}

.nf {
    letter-spacing: normal;
}

body {
    --highlight-color: #095;
    --border-radius: 0.5cm;
    --default-bg: #fff;
    --text-color-rgb: 0, 51, 17;
    --page-border-top: 1cm;
    --page-border-bottom: 1.5cm;
    --page-border-left: 1.5cm;
    --page-border-right: 1.5cm;
    --info-bar-width: 6cm;
    background: #333;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: rgb(var(--text-color-rgb));
    align-items: center;
}

.page {
    --header-size: 1.8cm;
    margin: 0 0 1em;
    width: 21cm;
    height: 29.7cm;
    background: var(--highlight-color);
    box-shadow: #0007 1px 1px 5px;
    overflow: hidden;

    &:first-child {
        margin-top: 1em;
    }
}

.btn, button {
    background: #095;
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 2px 10px;
    border-radius: 3px;
    cursor: pointer;

    &[disabled] {
        color: #999;
        background: #ccc;
        cursor: default;
    }
}

header {
    background: var(--highlight-color);
    color: #fff;
    height: var(--header-size);
}

code {
    font-size: .9em;
}

a[href^=mailto] {
    color: inherit;
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

h1.title {
    margin: 0;
    padding: var(--page-border-top) var(--page-border-right) 12pt calc(var(--info-bar-width) + 1rem);
    font-weight: 300;
    font-size: 2.3em;
    height: 2.5cm;

    & small {
        font-size: .9em;
        color: #ccc;

        &::before {
            content: ': ';
        }
    }
}

.content {
    display: flex;

    & .inner-content {
        position: relative;
        padding: 1rem var(--page-border-right) var(--page-border-bottom) 1rem;
        flex-grow: 1;
        overflow: visible;
        max-width: 100%;
        max-height: calc(29.7cm - var(--header-size));
        z-index: 0;
        background: var(--default-bg);
        border-top-left-radius: var(--border-radius);

        &.no-sidebar {
            padding: 1.5rem calc(var(--page-border-right) + 1cm) var(--page-border-bottom) calc(var(--page-border-left) + 1cm);
            min-height: calc(29.7cm - var(--header-size));
            border-radius: 0;
        }
    }
}

.infobar {
    width: var(--info-bar-width);
    min-height: calc(29.7cm - 2.5cm);
    padding: 0 1.5rem 1.8cm .8cm;
    background: var(--highlight-color);
    color: #fff;
}

.image {
    margin-top: -1.5cm;
    height: calc(5.2cm - 2rem);
    width: calc(5.2cm - 2rem);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 0 10%;
    print-color-adjust: exact;
    border-radius: .5cm;
}

h6 {
    margin: 2rem 0 0.5em;
    font-size: 1em;

    &:not(:first-of-type) {
        border-top: #fff 1px solid;
        padding-top: 1em;
    }
}

.contact {
    line-height: 16px;
    font-size: 14px;

    & dl {
        margin: 0;
        display: flex;
        flex-flow: row wrap;
    }

    & dt, & dd {
        margin: 0;
        padding: 0.1rem 0;
    }
    & dt {
        font-size: 12px;
        flex: 0 0 1.5rem;
    }

    & dd {
        flex: 1 0 calc(100% - 1.5rem);
    }
}

.skill-set {
    & h5 {
        font-weight: 600;
        margin: 0.5em 0 0 0;
    }

    & .skill {
        background: #fff;
        color: #333;
        font-size: 13px;
        display: inline-block;
        padding: 1px 4pt 1pt;
        border-radius: 13px; /* should make pills */
        margin-top: 0.2em;
        font-weight: 400;
    }
}

.language {
    font-weight: 400;

    & .language-rating {
        display: flex;
        flex-flow: row nowrap;
        gap: 3px;
        margin-top: 2pt;

        & .reached, & .unreached {
            flex-grow: 1;
            height: 6px;
            border-radius: 3px;
            background: #0005;
        }

        & .reached {
            background: #fff
        }
    }
}

.description, .section-content {
    /*font: 300 12px "Exo 2", sans-serif;*/
    /*line-height: 1.4em;*/

    & p {
        margin: 0.3rem 0;
        text-align: justify;

        &:first-of-type {
            margin-top: 0;
        }

        &:last-child {
            margin-bottom: .5rem;
        }
    }

    & p:first-of-type {
        margin-top: 0;
    }

    & ul {
        padding: 0;
        margin: 0.3rem 0 0.5rem;
        list-style: none;

        & li {
            padding-left: .5rem;
            position: relative;

            &::before {
                content: "-";
                position: absolute;
                left: calc(0px - var(--timeline-padding) - 1px);
                top: -0.25em;
                font-size: 1.5em;
                font-weight: 900;
                color: var(--highlight-color);
            }
        }
    }
}

section {
    --timeline-distance: calc(.5rem + 5px);
    --timeline-width: 3px;
    --section-padding: calc(2rem + var(--timeline-width));
    --timeline-padding: calc(var(--section-padding) - var(--timeline-width) - var(--timeline-distance));
    --icon-size: 26px;

    & .timeline {
        margin-left: var(--timeline-distance);
        border-left: var(--highlight-color) var(--timeline-width) solid;
        padding-left: var(--timeline-padding);
        height: 29cm;

        & h2 {
            margin-left: calc(
                    0px -
                    var(--timeline-distance) -
                    var(--timeline-width) -
                    var(--timeline-padding)
            );
        }
    }

    & h2 {
        position: relative;
        font-size: 1.4em;
        text-transform: uppercase;
        margin: 2rem 0 0.5rem;

        & .nf {
            color: #fff;
            background: var(--highlight-color);
            padding: 5px;
            border-radius: 8px;
            width: var(--icon-size);
            height: var(--icon-size);
            margin-right: .5em;
            font-size: 0.8em;
            print-color-adjust: exact;
        }
    }

    &:first-of-type h2 {
        margin-top: 0;
    }

    & .section-content {
        padding-left: calc(2rem + 3px);
    }
}

.job {
    position: relative;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.1rem 1rem;
    margin: 1rem 0 0;

    &::before {
        content: "";
        display: block;
        position: absolute;
        left: calc(0px -
            var(--timeline-padding) -
            calc(11px - var(--timeline-width)) / 2 -
            var(--timeline-width)
        );
        top: 6px;
        height: 11px;
        width: 11px;
        border-radius: 6px;
        background: var(--highlight-color);
        print-color-adjust: exact;
    }

    &:first-of-type {
        margin-top: 0;
    }

    & .date {
        flex: 0 1 100%;
        margin-top: -4px;
    }

    & .title {
        flex: 1 0 10%;
        font-size: 120%;
        font-weight: 400;
        white-space: nowrap;
    }

    & .company {
        flex: 1 0 10%;
        color: #333C;
        font-weight: 400;
        font-size: 110%;
        text-align: right;
        white-space: nowrap;

        &::before {
            content: "@ ";
        }
    }

    & .description {
        flex: 0 1 100%;
    }
}

.project {
    border-top: #095 1px solid;
    margin: .5rem 0 0 2rem;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.1rem 1rem;

    &:first-of-type {
        margin-top: 1rem !important;
    }

    & .name {
        flex: 1 0 10%;
        font-weight: 600;
        font-size: 1.4em;
    }

    & .link {
        flex: 1 0 10%;
        text-align: right;
        font-weight: 400;

        & a {
            text-decoration: none;
            color: #333C;
            font-size: 1.1em;
        }
    }

    & .description {
        flex: 1 1 100%;
    }
}

.cv-default .description p:last-child {
    margin-bottom: 1rem;
}

.cv-default section h2 .nf {
    font-size: 15px;
}

.cv-default .project {
    border-top: #095 3px solid;
    margin: 1.9rem 0 1rem 2rem;
}

.cv-default .gaps-sm .project {
    margin-top: 1rem;
}

#keyboard-sketch {
    background: #fff;
    width: 17cm;
    z-index: -1;
    margin-top: -3rem;
    aspect-ratio: 1280 / 800;
    print-color-adjust: exact;
    position: absolute;

    & i {
        background: url('/assets/ergo2040v4-sketch-transparent.png') no-repeat center / cover;
        display: block;
        position: absolute;
        top: 0; bottom: 0;
        left: 0; right: 0;
    }
}

.dialog {
    display: none;
    position: fixed;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 24px;
    max-width: 400px;
    max-height: 50vh;
    overflow: auto;
    z-index: 10;

    .closeDialog {
        position: absolute;
        background: none;
        right: 0;
        top: 0;
        color: #555;
        border: none;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: color 0.2s;

        &:hover {
            color: #000;
        }
    }
}

#revealContactDialog {
    label {
        display: flex;
        gap: 8px;
        cursor: pointer;
    }

    button {
        float: right;

        &::after {
            content: '';
            display: block;
            clear: both;
        }
    }
}

@media print {
    body {
        background: var(--highlight-color);
    }
    .page {
        margin: 0 !important;
        height: auto;
        background: transparent;
        box-shadow: none;
        page-break-after: always;
    }
}

@media screen and (max-width: 21cm) {
    body {
        width: fit-content;
    }
    .page {
        height: auto;
        box-shadow: none;
        page-break-after: always;
    }
    .inner-content {
        background: transparent;
    }
}
