body {
    margin: 0.5% 10%;
}
/* Header layout */
header {
    margin-bottom: 2em;
    text-align: center;
}
.nav-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4em;
}
.nav-button {
    font-size: 1.2em;
    text-decoration: none;
    padding: 1em 1.5em;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

h1 {
    text-align: center;
    font-family: 'Merriweather', serif;
}
h1 a {
    text-decoration: none;
}
h4 {
    font-family: 'Merriweather', serif;
}
p, h1, ol, ul {
    margin: 2% 10%;
}
p, ol, ul {
    text-align: justify;
    font-size: 1.3em;
}
p, a, i, ol, ul {
    font-family: 'Lato', sans-serif;
}
.email {
    font-size: 1.2em;
}
.about_me {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.about_me img {
    width: 25%;
    height: auto;
    border-radius: 7px;
    margin-right: 2em;
}
.about_me_text {
    width: 55%;
}
.about_me_text h1 {
    text-align: left;
}

/* Footer layout */
footer {
    text-align: center;
    margin-top: 5em;
}
.picture_box_footer {
    display: block;
    margin: auto;
}
.picture_box_footer img {
    width: 3%;
    height: auto;
    display: inline-block;
    opacity: 80%;
}
.picture_box_footer img:hover {
    opacity: 100%;
}

@media (prefers-color-scheme: light) {
    body {
        background-color: white;
    }
    h1, p, i, ol, ul, h4, .email {
        color: black;
    }
    .email:hover {
        color: rgb(48, 48, 48);
    }
    a {
        color: #1a0dab;
    }
    a:hover {
        color: #0d0080;
    }
    .nav-button {
        background-color: whitesmoke;
        color: black;
    }
    .nav-button:hover {
        background-color: lightgray;
        color: black;
    }
    .dark {
        display: none;
    }
}
@media (prefers-color-scheme: dark) {
    body {
        background-color: #181818;
    }
    h1, p, i, ol, ul, h4, .email {
        color: #e0e0e0;
    }
    .email:hover {
        color: white;
    }
    a {
        color: #8ab4f8;
    }
    a:hover {
        color: #a2c0ff;
    }
    .nav-button {
        background-color: #1f1f1f;
        color: #e0e0e0;
    }
    .nav-button:hover {
        background-color: #333;
        color: #e0e0e0;
    }
    .light {
        display: none;
    }
}

@media only screen and (max-device-width: 550px) {
    body {
        margin: 0.5% 3%;
    }
    p, h1, ol, ul {
        margin: 3%;
    }
    p, ol, ul {
        text-align: justify;
        font-size: 1.2em;
    }
    .about_me {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .about_me img {
        width: 70%;
        height: auto;
        border-radius: 7px;
        margin-right: 0;
    }
    .about_me_text {
        width: 100%;
    }
    .about_me_text h1 {
        text-align: justify;
    }
    .picture_box_footer img {
        width: 14%;
        opacity: 100%;
    }
}

@media (min-width: 551px) and (max-width: 1000px) {
    body {
        margin: 0.5%;
    }
    p, h1, ol, ul {
        margin: 3%;
    }
    p, ol, ul {
        text-align: justify;
        font-size: 1.2em;
    }
    .about_me {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .about_me img {
        width: 50%;
        height: auto;
        border-radius: 7px;
        margin-right: 0;
    }
    .about_me_text {
        width: 95%;
    }
    .about_me_text h1 {
        text-align: justify;
    }
    .picture_box_footer img {
        width: 6%;
        opacity: 100%;
    }
}
@media (min-width: 1001px) and (max-width: 1280px) {
    body {
        margin: 0.5%;
    }
    p, h1, ol, ul {
        margin: 3%;
    }
    p, ol, ul {
        text-align: justify;
        font-size: 1.2em;
    }
}
@media (min-width: 730px) and (max-width: 789px) {
    .nav-bar {
        gap: 0.2em;
    }
    .nav-button {
        padding: 1em 0.35em;
    }
}
@media (min-width: 790px) and (max-width: 920px) {
    .nav-button {
        padding: 1em 0.55em;
    }
}
@media (min-width: 921px) and (max-width: 1024px) {
    .nav-button {
        padding: 1em 1em;
    }
}