:root {
    /* Color variables for the website */
    --main-background-color: #3a3a3a;
    --secondary-background-color: #00c7e6;
    --accent-color: #8008c3;
    --accent-color2: #888888;
    --text-color: #c1c1c1;
    --text-color2: #1c1c1c;
    font-size: 10px;
}

* {
    color: var(--text-color);
    padding: 0;
    margin: 0;
    /* border: #fff solid 0.2px; */
    font-family: Helvetica, sans-serif;
}

html {
    background-color: var(--main-background-color);
    scroll-behavior: smooth;
    /* overflow-x: hidden; */
}

.nav {
    position: fixed;
    top: 0;
    width: 100%;
    left: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    background-color: var(--accent-color);
    list-style-type: none;
    z-index: 1;
}

.nav-link {
    display: block;
    padding: 2rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
}

.nav-link:last-of-type {
    margin-right: 2rem;
}

.nav-link:hover {
    color: var(--accent-color2);
}

a {
    text-decoration: none;
}

.scroll-link { /* This allows jumping to a particular section without overshooting it */
    position: absolute;
    visibility: hidden;
    margin-top: -5em;
}

.welcome-section {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    height: 100vh;
}

h1 {
    margin: 0;
    font-size: 6rem;
    text-transform: capitalize;
}

.welcome-section h3 {
    color: var(--accent-color);
    row-gap: 1rem;
    font-size: 4rem;
    text-transform: lowercase;
    font-style: italic;
}

.pipe {
    font-style: normal;
}

.chevron {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    font-size: 4rem;
    transition: .2s ease-in-out 0ms;
}

.chevron:hover {
    transform: scale(1.2);
}

.projects {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
    background-color: var(--secondary-background-color);
    max-width: 100%;
    padding: 1rem;
    margin: 0;
}

.projects h1 {
    color: var(--text-color2);
    margin: 4rem 0;
    text-transform: capitalize;
    text-decoration: underline;
}

.project-tiles {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 6rem;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    margin-bottom: 6rem;
    justify-content: space-around;
    align-items: center;
}

.project-tile {
    margin: auto;
    max-width: 400px;
    transition: transform .2s ease-in-out 0ms;
    border-radius: 1rem;
    background-color: var(--main-background-color);
}

.project-tile img {
    width: 100%;
    max-height: 100%;
    border-radius: 1rem 1rem 0 0;
}

.project-tile .caption {
    font-size: 2rem;
    width: 100%;
    max-height: 100%;
}

.project-tile:hover {
    transform: scale(101%);
}

section.contact {
    background-color: var(--main-background-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 4rem 1.5rem 4rem;

}

.social {
    display: flex;
    flex-direction: row;
    padding: 2rem 0;
}

.profile-link {
    display: flex;
    align-content: center;
    font-size: 5rem;
    margin: 0 2rem;
}

.contact hr {
    width: 65vw;
    margin: 1.5rem 0 0 0;
}

.footer {
    text-align: center;
    font-size: 2rem;
    padding: 1rem;
    margin-bottom: 2rem;
}

.contact-link {
    color: var(--secondary-background-color);
}

#freecodecamp {
    color: var(--accent-color2);
}

.footer-pipe-horizontal {
    display: none;
}

.footer br {
    display: none;
}

@media (max-width: 540px) { /* media query to optimise website for mobile */

    .nav {
        position: fixed;
        top: 0;
        width: 100%;
        left: 0;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        background-color: var(--accent-color);
        list-style-type: none;
    }

    .nav-link {
        display: block;
        padding: 2rem;
        font-size: 2rem;
        font-weight: bold;
        color: var(--text-color);
    }

    .nav-link:last-of-type {
        margin: auto;
    }

    h1 {
        font-size: 3rem;
    }

    h1.content {
        margin-top: -10vh;
    }

    .welcome-section h3 {
        font-size: 2rem;
    }

    section.contact {
        font-size: 1rem !important;
    }

    h1.portfolio {
        font-size: 2.5rem;
    }

    .chevron {
        font-size: 2rem;
    }

    .footer-pipe {
        display: none;
    }

    .footer br {
        display: inline;
    }

    .footer-pipe-horizontal {
        display: block;
        margin: 2rem auto;
        width: 65vw;
    }

    .nav-link:last-of-type {
        margin-right: 0rem;
    }
}