/* Global */

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
}

/* CSS variables */
:root {
    --blue: #4e59c0;
    --dark: #221c1e;
    --light: #f9ede3;
    --green: #1e6157;
    /*--yellow:;*/
  }

body {
    background: var(--blue);
    color: var(--blue);
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

/* Header & nav styles */

header {
    align-items: center;
    background: url(../images/hero.jpg) center 85px no-repeat;
    background-size: cover;
    display: flex;
    flex-direction:  row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1vw 3vw 12vw 0;
    position: relative;
}

header h1 {
    background: var(--light);
    color: #4e59c0;
    font-size: 2.5em;
    text-align: right;
    padding: 5px 10px;
    width: 30%;
}

nav {
    width: 70%;
}

nav ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

nav li {
    list-style: none;
}

nav a {
    color: var(--light); 
}

.subtitle {
    background: var(--light);
    box-shadow: 5px 5px 8px #888;
    color: #4e59c0;
    font-size: 1.5em;
    padding: 5px 10px;
    position: absolute;
    bottom: 15px;
    right: 30px;
}

/* Main styling */
main {
    background: var(--light);
}

main section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 3vw 4vw;
}

main section h2 {
    text-align: right;
    padding-right: 15px;
    width: 25%;
    font-size: 2em;
}

main section > div {
    border-left: 3px solid var(--blue);
}

/* About me */
#about-me-content {
    width: 75%;
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 20px;
}
#about-me img,
#about-me p {
    width: 33.3%;
    line-height: 150%;
}

#about-me img {
    box-shadow: 5px 5px 8px #888;
}

/* Work */
#work-grid {
    display: grid;
    grid-template-rows: 350px 250px 250px;
    grid-template-columns: 50% 50%;
    grid-template-areas: 
        "main-work main-work"
        "work2 work3"
        "work4 work5";
    width: 75%;
}

#about-me-content, #work-grid,
#contact-info {
    padding-left: 20px;
}

.work-grid-area {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    margin: 5px;
    cursor: pointer;
    display: grid;
    align-content: end;
    border: 3px solid var(--blue);
    text-decoration: none;
    position: relative;
}

.work-grid-area:hover {
    cursor: pointer;
    /*opacity: 1;*/
    transform: scale(1.05);
    transition: all 0.5s;
}

.work-grid-area::before {
    background-color: rgba(255,255,255,0.5);
    content: " ";
    z-index: 10;
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

.work-grid-area:hover::before {
    background-color: rgba(255,255,255,0);
}

.work-grid-area:visited {
    color: var(--blue);
}

#main-work {
    grid-area: main-work;
    background-image: url(../images/work-horiseon.png);
}

#work2 {
    grid-area: work2;
    background-image: url(../images/work-bally.png);    

}

#work3 {
    grid-area: work3;
    background-image: url(../images/work-vm.png);    
}

#work4 {
    grid-area: work4;
    background-image: url(../images/hero.jpg);
}

#work5 {
    grid-area: work5;
    background-image: url(../images/hero.jpg);
}

.heading {
    background: var(--light);
    box-shadow: 5px 5px 8px #888;
    padding: 10px 5px;
    position: absolute;
    z-index: 25;
    bottom: 10px;
    left: 0;
}

.heading h3 {
    font-size 1.75em;
}

.heading p {
    font-size: 11px;
}

/* Contact me */
#contact-info {
    align-items: center;
    column-gap: 30px;
    display: flex;
    flex-direction: row;
    padding: 10px 20px;
}

#contact-info a {
    color: var(--blue);
    font-size: 1.25em;
}

/* Footer */
footer {
    padding: 3vw;
    text-align: center;
    color:#f9ede3;
}


/* Media queries */

@media only screen and (max-width: 1000px) {
    header h1 {
        font-size: 2em;
        width: 30%;
    }

    nav {
        width: 70%;
    }
    #contact-info a {
        font-size: 1em;
    }
}
  
@media only screen and (max-width: 768px) {
    /* Header */
    
    header {
        align-items: center;
        align-content: center;
        background-position: center 104px;
        box-shadow: 2px 2px 8px #888;
        flex-direction: column;
        justify-content: center;
        padding-bottom: 5px;
    }

    header h1 {
        font-size: 1.75em;
        width: auto;
    }

    nav {
        margin: 20px 0;
        width: auto;
    }

    header .subtitle {
        bottom:auto;
        font-size: 0.75em;
        position: inherit;
        right: auto;
    }

    /* Main */

    main {
        padding-top: 2vw;
    }

    main section {
        align-items: center;
        flex-direction: column;
        padding: 0 20px 20px;
    }

    main section > div {
        border-left: none;
        border-top: 3px solid var(--blue)
    }

    main section h2 {
        text-align: center;
        margin: 0 0 10px;
        padding: 0;
        width: auto;
        font-size: 1.5em;
    }

    /* About me */

    #about-me-content {
        width: 100%;
        flex-direction: column;
        row-gap: 20px;
    }

    #about-me p {
        width: 100%;
    }

    #about-me img {
        width: 35%;
    }

    #about-me-content, #work-grid, #contact-info {
        padding-left: 0;
        padding-top: 20px;
    }

    /* Portfolio */
    #work-grid {
        grid-template-rows: 200px 100px 100px 100px 100px;
        grid-template-columns: 1fr;
        grid-template-areas: 
            "main-work"
            "work2"
            "work3"
            "work4"
            "work5";
        width: 100%;
    }

    .work-grid-area {
        margin: 0 15px 15px;
    }

    .heading h3 {
        font-size: 1.1em;
    }

    /* Contact me */

    #contact-info {
        flex-direction: column;
        font-size: 1em;
        row-gap: 20px;
        width: 100%;
        padding: 20px 0 10px;
    }

    #contact-info a {
        font-size: 1em;
    }
    
  }
  