:root { /* setting colour variables */
    --dark-bg: #15133C;
    --light-bg: #1A202C;
    --bright-bg: #EC994B;
    --light-accent: #F1EEE9;
}

* { /* setting global font-family and box-sizing */
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

html { /* setting scroll-behaviour and sizings */
    scroll-behavior: smooth;
    block-size: 100%;
    inline-size: 100%;
}

header { /* styling header */
    display: block;
    background-color: var(--dark-bg);
    color: white;
    padding: 20px;
    margin: auto auto;
    width: 100%;
}

header nav { /* setting up navbar */
    padding-top: 0.7em;
    float: right;
}

header nav ul { /* making nav elements float to the right */
    float: right;
    list-style: none;
}

nav ul li { /* ensuring all navbar options are inline */
    display: inline-flex;
}

header nav ul li a { /* styling navbar text */
    color: var(--light-accent);
    text-decoration: none;
    align-items: center;
    margin: 0 0.25em 0 1em;
    font-size: 1.5rem;
    position: relative;
}

nav ul li a::before { /* creating underline transition for hover */
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--light-accent);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out
}

nav ul li a:hover { /* adding text shine effect on hover and making cursor pointer type */
    cursor: pointer;
    text-shadow: 0 0 10px var(--light-accent), 0 0 30px var(--light-bg);
}

nav ul li a:hover::before { /* showing underline transition effect */
    visibility: visible;
    transform: scaleX(1);
}

body { /* setting background colour */
    background-color: var(--light-bg);
}

main { /* setting main section */
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

section ul { /* setting up list-style for sections */
    list-style-type:square;
    padding-left: 1em;
}

footer { /* setting up footer */
    padding: 10px 10px 0 0;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: var(--dark-bg);
    text-align: center;
}

footer p { /* styling footer text */
    color: var(--light-accent);
    font-size: 20px;
    margin: 0;
}

footer nav { /* hiding footer nav while not mobile sized */
    display: none;
}

footer nav ul { /* styling footer nav */
    float: right;
    list-style-type: none;
}

footer nav ul li { /* making nav items inline */
    display: inline-flex;
}

footer nav ul li a { /* styling footer nav text */
    color: var(--light-accent);
    text-decoration: none;
    align-items: center;
    position: relative;
    font-size: 1.25em;
    margin-left: 2em;
}

.name-logo { /* styling the name on the header to have a gradient background */
    display: inline-block;
    font-size: 2.5rem;
    cursor: default;
    background-image: linear-gradient(
        -225deg,
        var(--light-bg) 0%,
        #003e6e 3%,
        #a81458 5%,
        #44107a 29%,
        #ff0000 67%,
        #edc512 80%,
        var(--bright-bg) 100%
    );
    background-size: auto auto;
    background-clip: border-box;
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    animation: textclip 3.5s linear infinite;
}

.user-photo { /* sizing and placing user photo */
    position: relative;
    display: inline-flex;
    margin: 5px 0 0 0;
    border-radius: 50%;
    right: 30px;
}

.parallax-banner { /* creating parallax effect for image banner */
    background-image: url("../images/parallax.jpg");
    min-height: 10em;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-bottom: 2rem;
}

.content-headers { /* styling the sidebar header text */
    position: absolute;
    margin-left: 1%;
    padding: 20px;
    clear: both;
    float: left;
    text-align: right;
    width: 20%;
}

.content-headers h1 { /* styling the h1 text */
    font-size: 40px;
    color: var(--light-accent);
}

.main-content { /* styling the main content to be spaced nicely away from the content-headers */
    position: relative;
    width: 70%;
    display: inline-block;
    margin-left: 20.75%;
    font-size: 20px;
    flex-wrap: wrap;
    color: var(--light-accent);
    border-left: 5px solid var(--bright-bg);
    padding-left: 50px;
}

.main-content img,
.container img { /* setting transition speeds for images */
    transition: 0.3s;
}

.highlighted-project img { /* setting image size for highlighted project */
    width: 99.8%;
}

.highlighted-project:hover img { /* adding hover shine effect to highlighted project */
    box-shadow: 0 0 10px var(--bright-bg), 0 0 30px var(--bright-bg);
}

.highlighted-project a { /* removing text decoration from <a> tag */
    text-decoration: none;
}

.highlighted-project h3 { /* styling highlighted project title text */
    color: var(--light-accent);
    font-size: 30px;
    margin-bottom: 1%;
    text-align: center;
}

.container { /* setting up grid placement for smaller project images */
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    padding: 0;
    margin-left: 20.75%;
    margin-right: 4%;
    border-left: 5px solid var(--bright-bg);
}

.card { /* creating image card + title text */
    max-inline-size: 50%;
    margin: .75%;
    padding: 5%;
    flex: 1 1;
}

.card a { /* removing underline from <a> tag */
    text-decoration: none;
}

.card h3 { /* styling project title text */
    display: inline-block;
    cursor: pointer;
    color: var(--light-accent);
    font-size: 1.2em;
    margin-bottom: 5px;
}

.card img { /* setting image sizes and limits */
    width: 200%;
    max-height: 576px;
}

.card:hover img { /* adding hover shine effect to images */
    box-shadow: 0 0 10px var(--bright-bg), 0 0 30px var(--bright-bg);
}

#projects img { /* creating border around all images in projects section */
    border: 3px solid var(--bright-bg);
}

#contact .content-headers { /* styling contact content header to make border styling*/
    border-right: 5px solid var(--bright-bg);
}

#contact .main-content { /* styling contact content */
    top: 12px;
    border: none;
}

#contact ul { /* styling contact info to be inline */
    display: inline-flex;
    list-style-type: none;
    flex: 1 0 0;
}

#contact ul li { /* shifting nav items around */
    margin-right: 4%;
    position: relative;
    margin-bottom: 10px;
}

#contact ul li a { /* removing text-decoration from <a> tag, giving font colour and making cursor a pointer */
    color: var(--light-accent);
    text-decoration: none;
    cursor: pointer;
}

#contact ul li a::before { /* setting up underline animation */
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--light-accent);
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out
}

#contact ul li a:hover { /* setting up text shine animation */
    cursor: pointer;
    text-shadow: 0 0 10px var(--light-accent), 0 0 30px var(--light-bg);
}

#contact ul li a:hover::before { /* executing underline animation */
    visibility: visible;
    transform: scaleX(1);
}

@media screen and (max-width: 980px) { /* resizing page elements for mobile */
    nav {
        display: none;
    }

    header {
        text-align: center;
    }

    section ul {
        list-style-type: none;
        padding: 0;
    }

    footer nav {
        display: inline-flex;
    }

    footer p {
        float: left;
        padding-left: 30px;
    }

    footer nav ul {
        margin-left: 6.5rem;
    } 

    .user-photo {
        position: relative;
        display: inline-flex;
        margin: 5px 0 0 0;
        border-radius: 50%;
        right: 0;
        left: 0;
        padding: 0;
        justify-content: center;
        text-align: center;
    }

    .content-headers {
        position: relative;
        justify-content: center;
        float: none;
        text-align: center;
        width: 100%;
        border-bottom: 5px solid var(--bright-bg);
        border-right: none;
    }

    .main-content {
        width: 100%;
        margin: 15px 0 auto;
        text-align: center;
        float: none;
        border: none;
        padding: 0 20px 0 20px;
    } 

    .highlighted-project {
        padding-left: 0;
    }

    .highlighted-project h3 {
        position: relative;
        left: 3%;
        text-align:center;
    }
    
    .container {
        margin: 0;
        justify-content: center;
        border: none;
    }

    .card {
        width: 50%;
    }

    .card h3 {
        font-size: 1em;
    }

    #projects img {
        margin-left: 17px;
    }

    #contact .content-headers {
        border-right: none;
        width: 100%;
    }

    #contact ul {
        margin: 0;
        display: inline-block;
        float: none;
        left: 4px;
    }

    #contact ul li {
        margin-right: 0;
    }
}

@media screen and (max-width: 710px) { /* modifying navbar to remove copyright text and center navbar elements */
    footer {
        position: fixed;
    }
    
    footer p {
        display: none;
    }

    footer nav ul {
        position: relative;
        margin: 0 0 0 0;
    }

    footer nav ul li a {
        position: relative;
        margin: 0 20px 0 20px;
        padding: 0 0px 0 0px;
        text-align: center;
    }
}

@keyframes textclip { /* used for linear gradient animation */
    to {
        background-position: 200% center;
    }
}
