:root {
    --ctaColor: #008c83;
    --bgColor: #fffccf;
    --primary: #ffcd95;
    --secondary: #b97735;
    --accentuation: #a90000;
    --shadowColor: #59370e;
    --greyColor: #3e3e3e;
}

html {
    scroll-padding-top: 10em;
    scroll-behavior: smooth;
}

body {
    background-image: url("../Images/triangulated-image.png");
}

header {
    width: calc(100% + 20px);
    transform: rotate(1.5deg);
    border-bottom: 2px solid var(--accentuation);
    background-color: var(--bgColor);
    padding-top: 2em;
    margin-bottom: -1em;
    position: relative;
    top: -2em;


    & h1 {
        display: block;
        text-align: center;
        transform: rotate(-1.5deg);
        text-shadow: 1px 1px 2px var(--shadowColor);
        color: var(--accentuation);
        margin: auto;

        & a {
            margin-bottom: 10px;
            font-size: 1.5em;
            text-decoration: none;
        }

        &>* {
            display: inline-block;
        }

        & img {
            display: inline-block;
            position: relative;
            width: 50px;
            height: 50px;
            margin: -0.5em 0.5em;
            animation-name: levitationAnimation;
            animation-duration: 50s;
            animation-fill-mode: both;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in-out;

        }
    }
}

@keyframes levitationAnimation {
    0% {
        top: -2px;
        transform: rotate(-6deg);
    }

    5% {
        top: -3px;
    }

    10% {
        top: -2px;
    }

    15% {
        top: -3px;
        transform: rotate(6deg);
    }

    20% {
        top: -2px;
    }

    25% {
        top: -3px;
    }

    30% {
        top: -2px;
        transform: rotate(-6deg);
    }

    35% {
        top: -3px;
    }

    40% {
        top: -2px;
    }

    45% {
        top: -3px;
        transform: rotate(6deg);
    }

    50% {
        top: -2px;
    }

    55% {
        top: -3px;
    }

    60% {
        top: -2px;
    }

    65% {
        top: -3px;
        transform: rotate(-6deg);
    }

    70% {
        top: -2px;
    }

    75% {
        top: -3px;
        transform: rotate(6deg);
    }

    80% {
        top: -2px;
    }

    85% {
        top: -3px;
    }

    90% {
        top: -2px;
    }

    95% {
        top: -3px;
    }

    100% {
        top: -2px;
        transform: rotate(-6deg);
    }
}

.header-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bgColor);
    background: linear-gradient(0deg, rgba(249, 227, 255, 0) 2%, var(--primary) 22%);

}

p>a {
    font-size: 1em;

    &:hover {
        font-weight: inherit;
    }
}

a {
    color: var(--ctaColor);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1.3em;
    transition: color 0.2s, box-shadow 0.2s;

    img {
        position: relative;
        z-index: -10;
        transition: margin 0.2s;
        margin-left: 1em;
    }

    &:visited {
        color: #4c5d58;
    }

    &:hover {
        color: #b71e03;
        font-weight: bold;
        text-shadow: 0 0 1px var(--greyColor);

        & img {
            margin-left: 2em;
        }
    }
}

aside {
    padding: 1em;
    transform: rotate(1.5deg);
    border: 2px solid var(--shadowColor);
    width: calc(100% + 20px);
    left: -10px;
    background-color: var(--bgColor);

    & nav {

        & ul {
            display: flex;
            flex-direction: row;
            list-style: none;
            justify-content: space-evenly;

            & li {
                transform: rotate(-1.5deg);
                display: grid;
                text-align: center;

                &>a {
                    font-size: 1.2em;
                    text-decoration: none;

                    &:hover {
                        font-weight: bold;
                    }
                }
            }
        }
    }
}

.scroll-container {
    margin: 1em auto;
    scrollbar-width: thin;
    overflow: auto;
}

.scroll-content {
    display: flex;
    justify-content: center;
    margin: auto;
    padding: 0 3em;
    flex-wrap: wrap;
    scrollbar-color: var(--accentuation) var(--primary);
}

article {
    transform: rotate(1.5deg);
    position: relative;
    z-index: 10;

    & .scroll-content section {
        margin: 1em;
        flex: 1 0 20%;
        min-width: 400px;
        max-width: 600px;
        scroll-snap-align: center;
        max-height: 70vh;
        border-radius: 3px;
        box-shadow: 0px 0px 1px 0 var(--shadowColor) inset, 0px 0px 3px 1px var(--shadowColor);
        scroll-padding-top: 200px
    }

    & h2 {
        text-align: center;
    }

    & ul {
        padding: 0%;
        list-style: none;
    }


    img {
        border-radius: 5px;
        border: 1px solid orange;
        box-shadow: 0 0 5px 0 darkgoldenrod;
        height: auto;
        width: 150px;
        float: left;
        margin: 0 0.5em;
    }

    a img {
        height: 50px;
        width: 180px;
        object-fit: cover;
        object-position: top center;
    }

}

/* Reset de base */


h2 {
    color: var(--accentuation);
    text-shadow: 1px 1px 1px var(--greyColor);
    padding-bottom: 5px;
    margin-top: 30px;
    font-size: 1.8em;
}

h3 {
    text-shadow: 1px 1px 1px var(--greyColor);
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.3em;

    & .svg-inline--fa {
        width: 0.5em;
        vertical-align: -0.35em;
        margin-left: 0.2em;
    }
}

h1,
h2,
h3 {
    font-family: 'Roboto Mono', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

ul {
    list-style-type: none;
}

/*main style for section*/
section {
    border: 2px solid #333;
    margin: 0 0.6em;
    overflow: auto;
    background-color: var(--bgColor);
    transition: background 0.3s;

    & .section-content {
        transform: rotate(-1.5deg);
        margin: 2em;
    }

    & h2 {
        position: sticky;
        background: linear-gradient(0deg, rgba(156, 156, 156, 0) 0%, var(--bgColor) 30%);
        padding: 0.5em 0;
        top: -0.5em;
    }

    & p {
        line-height: 1.5em;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        padding-top: 1em;
    }

    &:target {
        background: #ffdfba;

        & h2 {
            background: linear-gradient(0deg, rgba(156, 156, 156, 0) 0%, #ffdfba 30%);
        }
    }
}


@media screen and (orientation: portrait) and (max-width:640px) {
    body {
        font-size: 10px;
        width: 100%;
    }

    aside nav ul {
        margin: 0;
        padding: 0;
        left: 0;
        font-size: 0.8em;
    }

    aside {
        width: calc(100% + 1em);
        position: relative;
        left: -0.5em;
    }

    header h1 img {
        animation-name: none;
        width: 1.5em;
        height: auto;
    }

    article {
        transform: rotate(0);
    }


    article .scroll-content {
        display: block;
        margin: 0.5em auto;
        padding: 0;

        & section {
            margin: 1em auto;
            width: 96%;
            min-width: 200px;
        }

        & .section-content {
            transform: rotate(0deg);
        }
    }
}