*,
html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: Arial, Helvetica;
}

/* Dark Mode */
body.dark-mode {
    background-color: #121212;
    color: #FFFFFF;
}

body.dark-mode a {
    color: #6C2BD9;
}

body.dark-mode .animated-link::before, body.dark-mode .animated-link::after {
    border-top-color: #6C2BD9;
}

body.dark-mode h1, body.dark-mode h2 {
    color: #FFFF;
}

body.dark-mode #to-the-top-img-path,
body.dark-mode #scroll-to-project-img-path {
    fill: #FFFFFF;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 20px;
    background-color: #F5F6FA;
    color: #1A1A1A;
}

h1 {
    font-size: 1.6em;
    cursor: pointer;
    color: #8E5CF6;
}

h2 {
    font-size: 1.2em;
    color: #8E5CF6;
}

h4 {
    font-size: 0.8em;
}

a {
    text-decoration: none;
    font-weight: normal;
    color: #8E5CF6;
}

.animated-link {
    position: relative;
}

.animated-link::before, .animated-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    border-top-width: 2px;
    border-top-color: #8E5CF6;
}

.animated-link::before {
    width: 100%;
}

.animated-link::after {
    border-top-style: solid;
    width: 0;
    transition: width .4s ease;
}

.animated-link:hover::after {
    width: 100%;
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto auto auto;
}

/* Responsive */ 

@media (max-width: 1150px) {

    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    body {
        font-size: 18px;
    }

    h1 {
        font-size: 1.4em;
    }

    h2 {
        font-size: 1.1em;
    }

    h4 {
        font-size: 0.75em;
    }

    main {
        width: 95%;
        max-width: none;
    }
}

@media (max-width: 800px) {
    main {
        margin-top: 15%;
    }
}
