html,
body {
    height: 100%;
    color: #003b70;
    --header-size: 22pt;
}

h1 {
    font-family: 'PT Serif', serif;
    font-size: var(--header-size);
}

a:link,
a:visited,
a:hover,
a:active {
    color: #003b70;
    text-decoration: none;
}

a:hover {
    color: #136CBC;
}

header a:hover {
    text-decoration: none;
}

article,
section {
    font-family: 'Raleway', sans-serif;
    font-size: 12pt;
    font-weight: 500;
}

/* app main grid container */
.app-container {
    margin: auto;
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 0;
    min-height: 100%;
}

section.home {
    padding-left: 20px;
    border-left: 1px solid #003b70;
    grid-area: content;
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
}

section.article {
    padding-left: 20px;
    padding-right: 20px;
    border-left: 1px solid #003b70;
    grid-area: content;
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
    align-self: start;
}

section.error {
    grid-area: content;
}

footer {
    font-family: 'PT Serif', serif;
    color: #fffffd;
    background-color: #003b70;
}

footer.main-footer {
    grid-area: footer;
    line-height: 70px;
}

footer .footer-lead {
    display: inline-block;
    width: 200px;
}

footer .sigma-logo {
    vertical-align: -10px;
}

footer .ericsson-logo {
    vertical-align: -4px;
    margin-left: 50px;
}

/* mobile */
@media only screen and (max-width: 779px) {
    .app-container {
        grid-template-columns: auto;
        grid-template-rows: auto auto auto 70px;
        grid-template-areas:
                "header"
                "nav"
                "content"
                "footer";
    }

    section.home {
        max-width: calc(100% - 40px);
        grid-template-columns: auto auto;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
                "bigimg bigimg"
                "article article"
                "smallimg1 smallimg2";
    }

    section.home > img {
        width: 100%;
    }

    section.article {
        grid-template-columns: auto;
        grid-template-rows: auto auto;
        grid-template-areas:
                "article"
                "sidebar";
    }

    section.article > .sidebar {
        display: none;
    }

    img.embedded-image {
        display: block;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 10px;
    }

    img.embedded-image.keep-small-right {
        max-width: 30%;
        float: right;
    }

    section.judge {
        width: calc(100% - 40px);
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
        float: left;
    }

    a.awardee {
        float: left;
        margin-right: 20px;
        grid-template-columns: 80px auto;
    }

    section.awardee {
        grid-template-columns: 80px auto;
    }

    a.awardee {
        width: auto;
        padding-left: 20px;
        padding-right: 20px;
    }

    section.awardees > .awardee > img.profile,
    section.profile> .awardee > img.profile {
        width: 80px;
        height: 80px;
        border-radius: 40px;
        align-self: center;
    }

    header,
    footer,
    nav {
        padding-left: 20px;
        padding-right: 20px;
    }

    header.main .title img {
        width: 55px;
    }

    footer .footer-lead {
        width: 140px;
    }

    footer .sigma-logo {
        vertical-align: -6px;
        width: 78px;
    }

    footer .ericsson-logo {
        width: 82px;
        margin-left: 10px;
        vertical-align: -1px;
    }

    section.profile {
        grid-template-columns: auto;
        grid-template-rows: auto auto;
        grid-template-areas:
                "profile"
                "sidebar";
    }

    section.awardee {
        margin-left: 20px;
        margin-right: 20px;
    }

    section.error {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* tablet */
@media only screen and (min-width: 780px) and (max-width: 1219px) {
    .app-container {
        grid-template-columns: auto 180px 580px auto;
        grid-template-rows: 170px auto 70px;
        grid-template-areas:
                ". header header ."
                ". nav content ."
                "footer footer footer footer";
    }

    section.home {
        grid-template-columns: 280px 280px;
        grid-template-rows: 370px 175px auto;
        grid-template-areas:
                "bigimg bigimg"
                "smallimg1 smallimg2"
                "article article";
    }

    section.article {
        grid-template-columns: 580px 380px;
        grid-template-rows: auto;
        grid-template-areas:
                "article"
                "sidebar";
    }

    section.article > .sidebar {
        display: none;
    }

    .footer-content {
        margin: auto;
        width: 780px;
    }

    img.embedded-image {
        max-width: 50%;
        float: right;
        margin-left: 20px;
        margin-bottom: 20px;
    }

    img.embedded-image.keep-small-right {
        max-width: 30%;
    }

    section.judge {
        width: 440px;
        margin-right: 20px;
        float: left;
    }

    a.awardee {
        float: left;
        width: 470px;
        margin-right: 20px;
        margin-left: 20px;
        grid-template-columns: 180px 270px;
    }

    section.awardee {
        grid-template-columns: 180px 380px;
    }

    section.awardees > .awardee > img.profile,
    section.profile> .awardee > img.profile {
        width: 180px;
        height: 180px;
        border-radius: 90px;
    }

    section.profile {
        grid-template-columns: 580px;
        grid-template-rows: auto auto;
        grid-template-areas:
                "profile"
                "sidebar";
    }

    nav ul.menu_level_1 > li {
        display: block;
    }
}

/* monitor */
@media only screen and (min-width: 1220px) {
    .app-container {
        grid-template-columns: auto 180px 980px auto;
        grid-template-rows: 170px auto 70px;
        grid-template-areas:
                ". header header  ."
                ". nav    content ."
                "footer footer footer footer";
    }

    section.home {
        grid-template-columns: 560px 280px;
        grid-template-rows: 175px 175px auto;
        grid-template-areas:
                "bigimg smallimg1"
                "bigimg smallimg2"
                "article article";
    }

    section.article {
        grid-template-columns: 580px 360px;
        grid-template-rows: auto;
        grid-template-areas:
                "article sidebar";
    }

    .footer-content {
        margin: auto;
        width: 1180px;
    }

    img.embedded-image {
        display: none;
    }

    section.judge {
        width: 440px;
        margin-right: 20px;
        float: left;
    }

    a.awardee {
        float: left;
        margin-right: 20px;
        grid-template-columns: 180px 270px;
        width: 470px;
    }

    section.awardee {
        grid-template-columns: 180px 380px;
    }

    section.awardees > .awardee > img.profile,
    section.profile> .awardee > img.profile {
        width: 180px;
        height: 180px;
        border-radius: 90px;
    }

    section.profile {
        grid-template-columns: 580px 380px;
        grid-template-rows: auto;
        grid-template-areas:
                "profile sidebar"
    }

    section.profile > aside.sidebar > img {
        margin-top: 340px;
    }

    nav ul.menu_level_1 > li {
        display: block;
    }
}

/* home page */
section.home > img.bimg {
    grid-area: bigimg;
}

section.home > img.simg1 {
    grid-area: smallimg1;
}

section.home > img.simg2 {
    grid-area: smallimg2;
}

section.home > article {
    grid-area: article;
}

/* the prize (article) */
section.article > article {
    grid-area: article;
}

section.article > .sidebar {
    grid-area: sidebar;
}

section.article > .sidebar > img {
    max-width: 100%;
}

/* judges */
section.judges {
    grid-area: content;
}

section.judge > img.profile {
    float: left;
    width: 80px;
    height: 80px;
    border-radius: 40px;
    margin-right: 20px;
    margin-bottom: 20px;
}

section.judge > .title {
    font-size: 18pt;
    font-weight: bold;
}

section.judge > .description {
    font-size: 12pt;
}

/* awardees */
section.awardees {
    grid-area: content;
}

section.awardees > .awardee > img.profile,
section.profile> .awardee > img.profile {
    grid-area: image;
}

/* awardee (profile) */
section.profile {
    grid-area: content;
    display: grid;
    grid-column-gap: 20px;
    grid-row-gap: 20px;
}

section.profile > aside.sidebar > img {
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

section.profile > aside.sidebar > .image-label {
    margin: 20px;
    font-size: 20pt;
    font-style: italic;
    font-weight: bold;
}

a.awardee,
section.awardee {
    display: grid;
    grid-column-gap: 20px;
    grid-template-rows: 60px 120px auto;
    grid-template-areas:
            "image year"
            "image name"
            "content content";
}

.awardee .year {
    grid-area: year;
    font-family: 'Raleway', sans-serif;
    font-size: 32pt;
    align-self: end;
}

.awardee .name {
    grid-area: name;
    font-family: 'PT Serif', serif;
    font-size: 34pt;
    line-height: 32pt;
    font-weight: bold;
}

.awardee > .description {
    grid-area: content;
}

/* common parts */

header.main {
    grid-area: header;
}

header .title {
    margin-top: 30px;
    font-size: 40pt;
    font-weight: bold;
}

header .description {
    max-width: 255px;
    font-size: 12pt;
    letter-spacing: 1.75pt;
}

header .description .granprize-logo {
    float: right;
}

nav.main {
    grid-area: nav;
}

nav ul {
    list-style: none;
    padding-left: 0;
}

nav li {
    font-family: 'PT Serif', serif;
}

nav li > ul {
    display: none;
}

nav > ul > li {
    padding-left: 5px;
    font-weight: 700;
    font-size: 16pt;
    line-height: 18pt;
}

nav > ul > li.current {
    border-left: 8px solid #003b70;
}

nav li.current > ul,
nav li.current_ancestor > ul {
    display: block;
}


nav ul.menu_level_1 {
    padding-left: 5px;
}

nav ul.menu_level_1 > li {
    font-size: 12pt;
    line-height: 16pt;
    padding-left: 15px;
    margin-bottom: 10px;
}

nav ul.menu_level_1 > li.current,
nav ul.menu_level_1 > li.current_ancestor {
    border-left: 8px solid #003b70;
    padding-left: 10px;
}
