/* Global */
:root {
    --pastel-color-light-blue: #5294cf;
    --pastel-color-blue: #36669c;
    --pastel-color-dark-blue: #0a2e61;
    --pastel-color-light-orange: #ffb237;
    --pastel-color-orange: #ff9942;
    --pastel-color-dark-orange: #ff7b34;
    --pastel-color-red: #bf4d72;
    --pastel-color-green: #508637;
    --pastel-color-gray: #5a616e;
    --pastel-color-light-gray: #939090;
    --pastel-color-lime: #9377d6;
    --pastel-color-purple: #508637;
    --max-width: 1300px;
    --content-font-color: #fff;
}
/*
@font-face {
    font-family: roboto;
    src: url(./css/fonts/Roboto-Regular.ttf);
}

@font-face {
    font-family: roboto;
    src: url(./css/fonts/Roboto-Bold.ttf);
    font-weight: bold;
}

@font-face {
    font-family: roboto;
    src: url(./css/fonts/Roboto-Italic.ttf);
    font-style: italic;
}*/

/*@media (prefers-reduced-motion: no-preference) {
    .fade-in-effect > * {
        animation: 0.8s slide-in-from-bottom, 0.8s fade-in forwards;
    }
}*/

@keyframes slide-in-from-bottom {
    from {
        top: 50px;
        position: relative;
    }

    to {
        top: 0;
        position: relative;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        position: relative;
    }

    to {
        opacity: 1;
        position: relative;
    }
}

/* CSS Normalization */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
    font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;
    margin: 0;
    min-width: 320px;
}

img {
    max-width: 100%;
    max-height: 100%;
}

ul,
ol {
    list-style: none;
}

input,
button,
textarea,
select {
    font: inherit;
}

p, h1, h2 {
    color: var(--content-font-color);
}

p {
    font-size: 1.125rem;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 1.8rem;
}

/* Concepts visualised */
.subject {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 180px 50px;

    &:nth-child(2n) {
        background-color: var(--pastel-color-blue);
    }
    &:nth-child(3n) {
        background-color: var(--pastel-color-light-orange);
    }
    &:nth-child(4n) {
        background-color: var(--pastel-color-dark-blue);
    }
    &:nth-child(5n) {
        background-color: var(--pastel-color-gray);
    }
    &:nth-child(6n) {
        background-color: var(--pastel-color-light-orange);
    }
    &:nth-child(7n) {
        background-color: var(--pastel-color-orange);
    }
    &:nth-child(8n) {
        background-color: var(--pastel-color-light-blue);
    }
    &:nth-child(9n) {
        background-color: var(--pastel-color-dark-blue);
    }
    &:nth-child(10n) {
        background-color: var(--pastel-color-dark-orange);
    }
    &:nth-child(11n) {
        background-color: var(--pastel-color-red);
    }

    /*> * {
        opacity: 0;
    }*/

    &.first-page {
        background-color: var(--pastel-color-light-blue);
        min-height: 100vh;
        padding: 100px 50px;
        opacity: 1;

        & h1 {
            margin: 0;
        }

        & img {
            max-height: 400px;
        }
    }

    &.last-page {
        background-color: var(--pastel-color-light-gray);
        padding: 30px 50px;
    }  

    .subject__first-page-text-block {
        width: 100%;
        text-align: center;
    }

    .subject__first-page-visual-block {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .subject__last-page-text-block {
        width: 100%;
        text-align: center;
    }

    .subject__header h2{
        margin-top: 0;
    }

    .subject__summary {
        font-size: 1.6rem;
    }

    .subject__explanation p {
        &:first-of-type {
            margin-top: 0;
        }
        
        &:last-of-type {
            margin-bottom: 0;
        }
    }
    
    .subject__container {
        display: flex;
        max-width: var(--max-width);
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;

        > div:first-of-type {
            padding: 30px;
        }

        > div:last-of-type {
            padding: 30px;
        }
    }

    .subject__visual-block {
        width: 60%;
        display: flex;
        justify-content: center;
        align-items: center;
        max-height: 600px;
    }

    .subject__text-block {
        width: 40%;
    }

    .subject__chart {
        width: 100%;
    }

    .subject__text-block {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    &.subject__small-countries {
        & .subject__visual-block {
            flex-wrap: wrap;

            & div {
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                width: 33%;
            }

            & img {
                width: 80%;
            }
        }
    }

   /* &.subject__13x-smaller2 {
        & #russia-USA-comparison-chart {
        	max-width: 550px;
        }
    }*/

    &.subject__13x-smaller3 {
        & .subject__13x-smaller-smartphone {
        	height: 31px;
        }

        & .subject__13x-smaller-person {
        	height: 400px;
        }
    }

    &.subject__ethiopia {
        & .subject__ethiopia-outlines {
            max-width: 500px;
            width: 100%;
        }
    }

    /*&.subject__puerto-rico {
        & #puerto-rico-gdp-chart {
            max-width: 500px;
        }
    }*/
}

@media only screen and (max-width: 920px) {
    body .subject {
        > * {
            animation: none;
            opacity: 1;
        }

        .subject__container {
            .subject__visual-block,
            .subject__first-page-visual-block {
                width: 100%;
                padding-left: 0;
                padding-right: 0;
            }
        
            .subject__text-block,
            .subject__first-page-text-block {
                width: 100%;
                padding-left: 0;
                padding-right: 0;
            }
        }
    }

    h1,
    h2, 
    p {
        text-align: center;
    }
}


@media only screen and (max-width: 600px) { 
    .subject {
        padding: 120px 20px;
        
        .subject__summary {
            font-size: 1.4rem;
        }


        &.first-page {
            padding-left: 20px;
            padding-right: 20px;
        }
    }

    p {
        font-size: 1rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.4rem;
    }
}


/* Utility classes */






/* Project Styles */
/* 
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 42rem;
    margin: 0 auto 4rem auto;
}

.projects {
    margin: 2rem auto 4rem auto;
}

.projects__heading {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--main-color);
}

.project__heading {
    padding: 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--main-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    overflow: hidden;
    width: 700px;
}

.project-card__image-wrapper {
    height: 400px;
    overflow: hidden;
}

.project-card__image-wrapper img {
    width: 100%;
    height: auto;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    transition: transform 0.3s ease 0s;
}

.project-card__image-wrapper:hover img {
    transform: scale(1.05);
}

.project-card__body {
    padding: 1rem;
}

.project-card__title {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.project-card__title:hover {
    text-decoration: underline;
}

.project-card__tag {
    display: flex;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--main-color);
}

.project-card__summary {
    margin-bottom: 1rem;
    color: var(--slate-600);
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--main-color);
}

.project-card__link-icon {
    width: 20px;
    height: 20px;
}

.project-card__link:hover {
    text-decoration: underline;
} */