:root {
    --background-color: #000000;
    --border-color: #555;

    --white-color: #e4e4e4;
    --white-color-v1: #ebebeb;
    --grey-color: #e3e3e3;
    --grey-color-v1: #9c9c9c;
    --dark-grey-color: #545454;

    --dark-blue-color: #2a2dd1;
    --soft-dark-blue-color: #5152a8;
}

@font-face {
    font-family: "Roboto Light";
    src: url("../fonts/Roboto/Roboto-Light.ttf") format("truetype");
    font-weight: lighter;
}

@font-face {
    font-family: "Roboto Regular";
    src: url("../fonts/Roboto/Roboto-Regular.ttf") format("truetype");
    font-weight: normal;
}

body {
    margin: 0;
    font-family: Roboto Light;
    color: var(--white-color);

    background-image: url(../images/base_bw_small_dark.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--background-color);
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    height: 100vh;
}

.logo-container {
    position: relative;
    text-align: start;
    margin: auto auto 20px 16.5%;
}

.logo-container img {
    width: 150px;
    height: 60px;
}

.logo-container img:hover {
    filter: brightness(200%);
}

.content-main {
    display: grid;
    grid-template-columns: 65% repeat(auto-fill, 5%);
    width: 90%;
    margin: auto 10% auto 10%;
}

.intro {
    margin: auto 10% auto 20%;
}

.intro h1 {
    white-space: nowrap;
    font-size: 70px;
    color: var(--white-color);
    text-shadow: 2px 2px 2px var(--dark-blue-color);
}

.intro p {
    font-size: 32px;
}

.line {
    border-left: 3px solid var(--border-color);
    height: 90%;
    margin-top: auto;
}

.links {
    align-items: left;
    margin: auto;
    margin-left: 50%;
}

.links a {
    display: block;
    margin-top: 30%;
    font-size: 32px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--white-color-v1);
    text-shadow: 1px 1px 1px var(--dark-blue-color);
}

.links a:hover {
    filter: brightness(300%);
}

footer {
    position: relative;
    margin: auto;
    margin-bottom: 1%;

    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    color: var(--dark-grey-color);
}


/* ---------------------------------------------------------  projects page  --------- */

.projects-container {
    display: flex;
    flex-direction: column;
    margin: auto;
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: auto;
}

.projects-title {
    flex-grow: 1;
    margin-left: 16%;
}

.projects-title h1 {
    white-space: nowrap;
    font-size: 65px;
    color: var(--white-color);
}

.projects-logo-container {
    margin-right: 16%;
    margin-left: auto;
    margin-bottom: 50px;
}

.projects-content {
    align-items: start;
    margin: auto 16%;
}

.projects-content h1 {
    white-space: nowrap;
    margin-top: 0;
    font-size: 45px;
    color: var(--white-color);
}

.project {
    display: column;
    width: 100%;
    margin-top: 4vh;
    margin-bottom: 5vh;
}

.project a {
    margin: 0;
    font-size: 32px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--dark-blue-color);
    text-shadow: 1px 1px 1px var(--dark-grey-color);
}

.project a:hover {
    filter: brightness(140%);
}

.project p {
    margin: 0;
    font-size: 25px;
    color: var(--grey-color);
}

.project-header {
    display: column;
    width: 100%;
    padding-top: 3vh;
    padding-bottom: 3svh;
}

.project-header a {
    margin: 0;
    font-size: 32px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--white-color-v1);
    text-shadow: 1px 1px 1px var(--dark-blue-color);
}

.project-header a:hover {
    filter: brightness(300%);
}

.project-header p {
    margin: 0;
    font-size: 25px;
    color: var(--grey-color-v1);
}


/* ---------------------------------------------------------  cv page  --------- */


.cv-header {
    margin: auto;
}

.cv-sub-header {
    font-size: 35px;
    margin-top: 0;
    color: var(--grey-color-v1);
}

.cv-block {
    width: 100%;
    margin-bottom: 3%;
}

.cv-block .main-sub-header {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 3%;
}

.cv-block h2 {
    white-space: nowrap;
    margin-bottom: 1%;
    font-size: 28px;
    color: var(--white-color);
}

.cv-block-inner {
    display: flex;
    align-items: center;
}

.cv-block-inner p {
    font-size: 22px;
    margin-bottom: 4px;
}

.cv-block-inner .image-container img {
    width: 100%;
    height: auto;
}

.cv-block .light {
    font-style: normal;
    color: var(--white-color-v1);
}

.cv-block .plain {
    display: block;
    font-size: 22px;
    color: var(--grey-color-v1);
}

.cv-block .small-dark {
    font-size: 16px;
    color: var(--dark-grey-color);
}

.cv-block .plain a {
    text-decoration: none;
    white-space: nowrap;
    text-shadow: none;
    font-size: 22px;
    color: var(--soft-dark-blue-color);
}

.cv-block .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3%;
}

.cv-block .cv-line {
    display: inline-block;
    border: 1px solid;
    width: 100%;
    margin: 0 0 2.5% 2%;
    color: var(--border-color);
}


/* ---------------------------------------------------------  error page  --------- */

.error-page-intro {
    white-space: nowrap;
}

.error-page-intro a {
    white-space: nowrap;
    text-decoration: none;
    font-size: 30px;
    color: var(--white-color-v1);
    text-shadow: 2px 2px 2px var(--dark-blue-color);
}

.error-page-intro a:hover {
    filter: brightness(300%);
}

.error-page-intro p {
    white-space: nowrap;
    color: var(--grey-color);
}


/* ---------------------------------------------------------  mobile version  --------- */

@media screen and (max-width: 705px),
       screen and (max-height: 600px) {
    /* -----------------------------------------------------  home, links  --------- */
    .container {
        display: block;
        align-items: left;
        height: 100%;
        margin: 3vh 3vh;
    }

    .logo-container {
        margin: auto;
    }

    .content-main {
        display: block;
        grid-template-columns: none;
        height: 75vh;
        width: 100%;
        margin: auto;
    }

    .intro {
        margin: auto;
        transform: translateY(20%);
    }

    .intro h1 {
        font-size: 60px;
    }

    .intro p {
        font-size: 28px;
    }

    .line {
        display: none;
    }

    .links {
        margin: auto;
        transform: translateY(50%);
    }

    .links a {
        display: flex;
        font-size: 28px;

        margin: 1vh auto;
    }

    footer {
        margin: auto;
    }

    /* -----------------------------------------------------  cv, projects  --------- */

    .projects-container {
        margin: 3vh 3vh;
    }

    .projects-header {
        display: flex;
        flex-direction: column-reverse;
        align-items: start;
        margin: auto;
    }

    .projects-title {
        margin: auto 0;
    }

    .projects-title h1 {
        margin: 2vh auto;
        padding-bottom: 3vh;
        font-size: 60px;
        white-space: normal;
    }

    .projects-logo-container {
        margin: auto 0;
    }

    .projects-content {
        margin: auto;
    }

    .cv-block-inner {
        display: block;
    }
}

/* -----------------------------------------------------  collision  --------- */
/*
    The footer's behavior on small displays is uncertain in index.html and links.html,
    so it is temporarily turned off until the website is rebuilt.
*/

@media screen and (max-width: 400px),
       screen and (max-height: 700px) {

    .main-footer {
        display: none;
    }
}

/*
    Links in index.html and links.html collide with the intro paragraph block,
    so we manually increase the distance between them until the website is rebuilt.
*/

@media screen and (max-width: 365px) {

    .content-main .links {
        height: 35%;
    }
}

@media screen and (max-width: 200px) {
    .intro h1 {
        font-size: 40px;
    }

    .intro p {
        font-size: 18px;
    }

    .links a {
        font-size: 22px;
    }
}