:root {
    /* Colors */
    --clr-neutral-50: hsl(0, 0%, 5%);
    --clr-neutral-100: hsl(0, 0%, 10%);
    --clr-neutral-200: hsl(0, 0%, 20%);
    --clr-neutral-300: hsl(0, 0%, 30%);
    --clr-neutral-400: hsl(0, 0%, 40%);
    --clr-neutral-500: hsl(0, 0%, 50%);
    --clr-neutral-600: hsl(0, 0%, 60%);
    --clr-neutral-700: hsl(0, 0%, 70%);
    --clr-neutral-800: hsl(0, 0%, 80%);
    --clr-neutral-900: hsl(0, 0%, 90%);
    --clr-green-500: hsl(100, 50%, 50%);
    --clr-orange-500: hsl(30, 70%, 50%);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    border: none;
    padding: 0;
}

body {
    background: var(--clr-neutral-50);
    font-size: 18px;
    line-height: 1.5em;
    font-family: "Fraunces", serif;
    color: var(--clr-neutral-900);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.5em;
}

p {
    margin-bottom: 1em;
}

ul {
    list-style: none;
}

li {
    position: relative;
    margin-top: 0.3em;
    padding-left: 1em;
    color: var(--clr-neutral-800);
}

li::before {
    content: "";
    position: absolute;
    top: 0.75em;
    left: 0;
    width: 0.5em;
    height: 1px;
    background: var(--clr-neutral-800);
}

img {
    display: block;
    max-width: 100%;
}

/* Global */
.link {
    color: var(--clr-neutral-800);
}

.nowrap {
    white-space: nowrap;
}

.highlighted {
    color: var(--clr-neutral-900);
}

.hr {
    margin: 2em 0;
    background: var(--clr-neutral-200);
    height: 1px;
}

.crypted-email::before {
    content: attr(data-username) "@" attr(data-domain) "." attr(data-gtld);
}

.crypted-phone-number::before {
    content: "+" attr(data-area-code) " " attr(data-number);
}

/* Header */
.header {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
}

.header__title {
    margin-bottom: 1em;
    font-size: 2.5em;
    color: var(--clr-orange-500);
}

.header__subtitle {
    display: block; 
    font-size: 0.5em;
    line-height: 1em;
    color: #ccc;
}

.header__introduction-paragraphs {
    color: var(--clr-neutral-600);
}

.header__portrait {
    width: 16rem;
    aspect-ratio: 1/1.4;
    object-fit: cover;
    object-position: bottom;
}

/* Main */
.main {
    margin-top: 4rem;
    padding: 3em 2em;
    background: var(--clr-neutral-100);
}

/* Resume */
.resume__title {
    margin-bottom: 0.5em;
    text-transform: uppercase;
    font-size: 2.2em;
    line-height: 1em;
    letter-spacing: 1rem;
    color: var(--clr-neutral-400);
}

/* Miscellaneous data */
.misc-data__key {
    display: inline-block;
}

.misc-data__left .misc-data__key {
    width: 5.6em;
}

.misc-data__right .misc-data__key {
    width: 6em;
}

.misc-data__value {
    color: var(--clr-neutral-800);
}

/* Work experience & education */
.work-experience__item, .education__item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.work-experience__title, .education__title {
    font-size: 1.5em;
    color: var(--clr-green-500);
}

.work-experience__period, .education__period {
    display: flex;
    gap: 0.5em;
    flex: 1 0 auto;
    font-size: 0.85em;
    line-height: 1.4em;
    font-style: italic;
    color: var(--clr-neutral-600);
}

.work-experience__item-title, .education__item-title {
    margin-bottom: 0.3em; 
    font-size: 1.1em;
}

/* Skills */
.skills__title {
    margin-bottom: 0.75em;
    font-size: 1.5em;
    color: var(--clr-green-500);
}

.skills__flex {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills__category {
    flex-basis: calc(50% - 1rem);
}

.skills__category-title {
    margin-bottom: 0.15em;
    font-size: 1.1em;
}

.skills__items {
    color: var(--clr-neutral-800);
}

/* Selected projects */
.selected-projects__title {
    margin-bottom: 0.75em;
    font-size: 1.5em;
    color: var(--clr-green-500);
}

/* Languages */
.languages__title {
    margin-bottom: 0.75em;
    font-size: 1.5em;
    color: var(--clr-green-500);
}

.languages__flex {
    display: flex;
    flex-direction: column;
    gap: 1rem 4rem;
}

.languages__language {
    font-weight: bold;
    font-size: 1.1em;
}

.languages__language-level {
    color: var(--clr-neutral-800);
}

/* Interests & hobbies */
.interests-and-hobbies__title {
    margin-bottom: 0.75em;
    font-size: 1.5em;
    color: var(--clr-green-500);
}

/* Footer */
.footer {
    margin: 6rem 0 3rem;
    text-align: center;
}

@media screen and (min-width: 640px) {
    /* Skills */
    .skills__flex {
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Languages */
    .languages__flex {
        flex-direction: row;
    }
}

@media screen and (min-width: 768px) {
    /* Header */
    .header__portrait {
        width: 20rem;
    }
}

@media screen and (min-width: 992px) {
    body {
        font-size: 20px;
    }

    .wrapper {
        margin: 0 auto;
        max-width: 70rem;
        padding: 0 2rem;
    }

    /* Header */
    .header {
        flex-direction: row;
        margin-top: 8rem;
        gap: 3em;
    }

    .header__title {
        font-size: 3em;
    }

    /* Main */
    .main {
        margin-top: 6rem;
        padding: 4em 3em;
    }

    /* Miscellaneous data */
    .misc-data__flex {
        display: flex;
        justify-content: space-around;
        gap: 1em;
    }

    .misc-data__title {
        text-align: center;
    }

    .resume__title {
        text-align: center;
        font-size: 2.6em;
    }

    /* Work experience & education */
    .work-experience__period, .education__period {
        max-width: 6em;
        margin-top: 0.3rem;
    }

    .work-experience__item, .education__item {
        flex-direction: row;
        gap: 1em;
    }

    /* Footer */
    .footer {
        margin: 8rem 0 4rem;
    }
}

@media screen and (max-width: 767px) {
    /* Header */
    .header__portrait {
        margin: 0 auto;
    }
}

@media screen and (max-width: 991px) {
    .header, .resume__title, .misc-data, .work-experience, .education, .skills, .selected-projects, .languages, .interests-and-hobbies, .footer {
        margin-left: auto;
        margin-right: auto;
        max-width: 40rem;
    }

    /* Header & footer */
    .header, .footer {
        padding: 0 2rem;
    }

    /* Miscellaneous data */
    .misc-data__right {
        margin-top: 1em;
    }
}
