:root {
    --primary-color-dark: hsl(235, 31%, 14%);
    --primary-color: hsl(235, 25%, 19%);
    --primary-color-light: hsl(235, 25%, 29%);
    --accent-color: hsl(356, 57%, 36%);
    --text-color: hsl(240, 31%, 84%);
}

html {
    background-color: var(--primary-color);
    color: var(--text-color);
    font-family: sans-serif;
    font-size: 1em;
    line-height: 1.6;
}

body {
    margin: 0;
}

h1,
h2,
h3 {
    margin-bottom: 0;
}

h1 {
    font-size: 2rem;
}

h2 {
    border-bottom: 0.1rem solid var(--accent-color);
    margin-top: 3rem;
}

a {
    color: var(--accent-color);
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

img {
    max-width: 100%;
    display: block;
}

#layout-grid {
    display: grid;
    grid-gap: 3rem;
    grid-template-rows: min-content;
    grid-template-areas:
        "profile-picture"
        "title"
        "main"
        "aside"
        "contact-information"
    ;
}

.container {
    max-width: 72rem;
    margin-inline: auto;
    padding: 2rem;
}

main {
    grid-area: main;
}

aside {
    grid-area: aside;
}

#title {
    grid-area: title;
    align-self: center;
    text-align: center;
}

#profile-picture {
    grid-area: profile-picture;
    position: relative;
    max-width: 20em;
    margin-inline: auto;
    margin-block: 2rem;
    aspect-ratio: 1 / 1.2;
    display: grid;
    align-items: end;
    border-radius: 0 0 100vw 100vw;
    overflow: hidden;
    transition: transform 250ms ease-in-out;
}

#profile-picture:hover {
    transform: scale(1.1);
}

#profile-picture:hover .profile-picture__img {
    transform:
        scale(1.4) translateY(-5%);
}

.profile-picture__circle {
    position: absolute;
    inset: auto 0 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    border-radius: 50%;
    margin-inline: auto;
    background-color: var(--accent-color);
}

.profile-picture__img {
    position: relative;
    z-index: 2;
    transform: scale(1.2);
    transition: transform 250ms ease-in-out;
}


.lead {
    font-size: 120%;
    color: var(--accent-color);
}

.job,
.education {
    margin-bottom: 3rem;
}


.knowledge-topic {
    position: relative;
    background-color: var(--text-color);
}

.knowledge-topic:not(:first-child) {
    margin-top: 0.5rem;
}

.knowledge-topic__title {
    z-index: 2;
    position: relative;
    padding: 0 0.5rem;
    text-shadow: 0.1rem 0.1rem 0.1rem var(--accent-color);
}

.knowledge-topic__progress {
    position: absolute;
    top: 0;
    height: 100%;
    background-color: var(--accent-color);
}

@keyframes grow {
    from {
        width: 0;
    }
}

.knowledge-topic:hover .knowledge-topic__progress {
    animation: grow 0.5s ease-in-out;
}

.w100 {
    width: 100%;
}

.w95 {
    width: 95%;
}

.w90 {
    width: 90%;
}

.w85 {
    width: 85%;
}

.w80 {
    width: 80%;
}

.w75 {
    width: 75%;
}

.w70 {
    width: 70%;
}

.w65 {
    width: 65%;
}

.w60 {
    width: 60%;
}

.w55 {
    width: 55%;
}

.w50 {
    width: 50%;
}

.w45 {
    width: 45%;
}

.w40 {
    width: 40%;
}

.w35 {
    width: 35%;
}

.w30 {
    width: 30%;
}

.w25 {
    width: 25%;
}

.w20 {
    width: 20%;
}

.w15 {
    width: 15%;
}

.w10 {
    width: 10%;
}

.w5 {
    width: 5%;
}

footer {
    margin-top: 3rem;
    background-color: var(--primary-color-dark);
}

footer .container {
    display: grid;
    grid-template-areas:
        "adress vcard"
        "tel vcard"
        "mail vcard";
    column-gap: 1rem;
    padding-block: 3rem;
}

.adress {
    grid-area: adress;
}

.tel {
    grid-area: tel;
}

.mail {
    grid-area: mail;
}

.vcard {
    position: relative;
    grid-area: vcard;
    justify-self: right;
}

.vcard__tooltip {
    position: absolute;
    margin-top: -3rem;
    transform: translateX(-50%);
    width: max-content;
    background-color: var(--accent-color);
    padding: 0.5rem 1rem;
    animation: bounce 2s ease infinite;
    border-radius: 2rem;
}

.vcard__tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 3.2rem;
    margin-left: -1rem;
    border-width: 1rem;
    border-style: solid;
    border-color: var(--accent-color) transparent transparent transparent;
}

.vcard__qrcode {
    height: 9rem;

    path {
        fill: var(--text-color);
    }
}

.vcard:hover .vcard__tooltip {

    animation: wobble 2s ease infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%);
    }

    40% {
        transform: translateX(-50%) translateY(-1rem);
    }

    60% {
        transform: translateX(-50%) translateY(-0.5rem);
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: translateX(-50%);
    }

    15% {
        transform: translateX(-55%) rotate(-3deg);
    }

    30% {
        transform: translateX(-46%) rotate(2deg);
    }

    45% {
        transform: translateX(-52%) rotate(-1.5deg);
    }

    60% {
        transform: translateX(-48%) rotate(1deg);
    }

    75% {
        transform: translateX(-51%) rotate(-0.5deg);
    }

}


@media only screen and (min-width: 60em) {
    #layout-grid {
        grid-template-areas:
            "title profile-picture"
            "main aside"
        ;
    }

    #title {
        text-align: inherit;
    }

}

@media print {

    *,
    *::before,
    *::after {
        /* Black prints faster */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html,
    body,
    footer {
        background: #fff;
        color: var(--primary-color);
        font-size: 80%;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    section {
        page-break-inside: avoid;
    }

    footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        border-top: 0.1rem solid var(--primary-color);
    }

    footer .container {
        padding-block: 1rem;
    }


    #layout-grid {
        grid-template-areas:
            "title profile-picture"
            "main aside"
        ;
        row-gap: 0;
        grid-template-columns: 2.5fr 1fr;
    }

    .container {
        padding: 0;
    }

    #title {
        text-align: inherit;
    }

    #profile-picture {
        margin-block: 0;
        border: 0.1rem solid var(--accent-color)
    }

    .knowledge-topic {
        background-color: var(--primary-color);
    }

    .knowledge-topic,
    .knowledge-topic__progress {
        color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .knowledge-topic__title {
        color: white;
    }

    .vcard__tooltip {
        display: none;
    }

    .vcard__qrcode {
        height: 100%;
        width: 100%;
        aspect-ratio: 1;

        path {
            fill: var(--primary-color);
        }
    }

}