:root {
    --img-width: 220px;
    --finnish-blue: #4068ED;
    --content-padding: 6rem;
}

* {
    margin: 0;
    padding: 0;
}

.content > * {
    margin-bottom: 2rem;
}

body {
    font-family: Inter;
    display: grid;
    justify-items: center;
    background: #f2f2f2;
    margin-bottom: 8rem;
    line-height: 1.6;
    word-break: break-word;
}

p {
    text-align: justify;
}

a, em, h2, h3 {
    color: var(--finnish-blue);
}

em {
    font-style: unset;
    font-weight: bold;
}

h3 {
    font-size: 1rem;
}

ul {
    margin-left: 1rem;
    list-style-type: circle;
}

ul > li {
    margin-bottom: unset;
}

header { 
	display: grid;
    grid-template-columns: 16rem 1fr;
    grid-template-rows: 1fr 1fr;
    grid-row-gap: 4rem;
	color: var(--finnish-blue);
    background-image: url("flag.svg");
	background-size: cover;
	height: 24rem;
    width: 800px;
    margin-bottom: unset;
}

.header__title {
    grid-column-start: 2;
    grid-row-start: 1;
    justify-self: center;
    align-self: center;
    font-size: 3.5rem;
    font-weight: 900;
    font-style: italic;
    font-family: serif;
}

.header__metadata {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: end;
    grid-column-start: 2;
    grid-row-start: 2;
    padding-right: 2rem;
}

.header__desc {
    padding: 2rem 0 2rem 2rem;
    font-style: italic;
}

.header__author {
    font-size: 1rem;
}

.header__date {
    font-size: 0.75rem;
    font-weight: 400;
}

.finnish-blue {
    color: var(--finnish-blue);
}

.sep {
    background: url("fin-sep.svg");
    background-repeat: no-repeat;
    background-size: contain;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    margin-bottom: 2rem;
    height: 1.5rem;
    width: 1.5rem;
}

.content {
    background: white;
    padding: 4rem var(--content-padding) 1rem var(--content-padding);
    max-width: calc(800px - 2 * var(--content-padding));
    min-width: 600px;
}

figure {
    position: relative;
    width: 0;
}

.figure__left {
    left: calc(-1 * var(--img-width) - 4rem);
    float: left;
}

.figure__right {
    float: right;
    right: -4rem;
}

figure > img  {
    width: var(--img-width);
}

figcaption {
    font-style: italic;
    font-size: 0.75rem;
    width: var(--img-width);
}

@media only screen and (min-device-width: 320px) and (max-device-width: 667px) {
    :root {
        --img-width: 100%;
    }

    body {
        background: white;
    }

    header {
		grid-template-columns: 20rem 1fr;
		grid-template-rows: 13rem 7rem;
		grid-row-gap: 4rem;
		height: 30rem;
		width: 100%;
		margin-bottom: 8rem;
    }

    .header__title {
        font-size: 4.5rem;
    }

    .header__metadata, .header__author {
        font-size: 2rem;
    }

    .header__date {
        font-size: 1.75rem;
    }

    .content {
        max-width: unset;
        min-width: unset;
        padding: 2rem;
    }


    h2 {
        font-size: 4rem;
    }

    h3 {
        font-size: 3rem;
    }

    p, ul {
        font-size: 2.25rem;
    }

    ul {
        margin-left: 2.25rem;
    }

    .sep {
        width: 4rem;
        height: 4rem;
        margin-top: 4rem;
        margin-bottom: 4rem;
    }

    figure { 
        position: static; 
        width: unset;
        padding: 2rem 0;
    }

    figcaption {
        font-size: 2rem;
    }

    .figure__left, .figure__right {
        float: none;
    }
}
