@font-face {
    font-family: "neue-haas-grotesk-display", sans-serif;
    src: url('https://use.typekit.net/tkk7lwt.css');
  }

* {
    margin: 0;
    text-align: center;
}

body {
    width: 100%;
    overflow-x: hidden;
    font-family: "neue-haas-grotesk-display", sans-serif;
    font-size: 16px;
}

main {
    margin: 1% 4%;
}

hr {
    border: 2px solid #000000;
}

a {
    text-decoration: none;
    color: #050505;
}

/* Navigation Bar Styling */

nav {
    height: 3em;
    padding: 2em 2em 0 2em;
}

nav h2 {
    float: left;
}

nav a {
    position: relative;
}

ul {
    list-style-type: none;
}

li {
    display: inline;
    float: right;
    padding-left: 2%;
    font-weight: 400;
    font-size: 1.25em;
}

.active {
    font-weight: 700;
}

/* Main Animation Content */

#lottie {
    height: 90%;
    width: 90%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 2em 0;
}

/* Project Cards for Home Page */

.title {
    padding: 5em 0 5em 0;
}

h1 {
    font-weight: 700;
    font-size: 5em;
    display: inline;
}

.title img {
    width: 3em;
    display: inline;
}

.card {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr repeat(2, 2fr);
    grid-template-rows: 1fr;
    padding: 5% 2%;
    transition : all 0.5s ease-out .25s;
}

.card h3 {
    grid-area: 1 / 1 / 2 / 2;
    justify-self: center;
    align-self: center;
    font-weight: 200;
    font-size: 8em;
    line-height: 101.5%;
}

.card img {
    grid-area: 1 / 2 / 2 / 3;
    justify-self: center;
    align-self: center;
}

.description {
    grid-area: 1 / 3 / 2 / 4;
    display: grid;
    grid-template-columns: 1.5fr;
    grid-template-rows: repeat(2, 1fr);
    align-content: stretch;    
    justify-content: stretch;
}

.card h2 {
    text-align: left;
    align-self: start;
    font-weight: 700;
    font-size: 4em;
    line-height: 101.5%;
}

.card p {
    text-align: left;
    align-self: center;
    font-weight: 400;
    font-size: 1.25em;
    line-height: 148.5%;
}

.viewmore {
    opacity: 0;
    display: none;
    transition : opacity 0.5s ease-out .1s;
}

/* Project Pages Styling */

.project {
    padding-bottom: 20%;
}

.project img {
    width: 85%;
    max-width: 1400px;
}

.project video {
    width: 85%;
    max-width: 1400px;
}

.otherwork {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    padding: 5% 5%;
}

.othertitle {
    font-size: 1.5em;
    padding-top: 5%;
}

.othertitle h3 {
    display: inline;
}

.othertitle img {
    width: 1em;
    display: inline;
}

.othercard {
    position: relative;
    max-width: 20.625em;
    max-height: 16.25em;
    width: 100%;
    overflow: hidden;
}

.othercard img {
    transform: scale(1);
    transition: all 0.6s ease;
}

.othercard img:hover {
    transform: scale(1.1);
}

/* About Me Styling */

.aboutme {
    margin: 0 auto;
    padding-bottom: 5em;
    max-width: 1500px;
}

.aboutme p {
    text-align: left;
    font-size: 2.5em;
    line-height: 148.5%;
    padding: .25em 1.5em 0 1.5em;
}

.bold {
    font-weight: 700;
}

/* Footer Styling */

footer {
    padding: 5% 0;
}

/* Media Queries */

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

    nav {
        height: 2em;
        padding-top: 1em;
    }

    nav h2 {
        font-size: 1em;
    }

    nav li {
        font-size: 1em;
    }

    #lottie {
        width: 50%;
    }

    .title {
        font-size: .5em;
    }

    .card {
        grid-template-columns: repeat(2, 1fr);
    }

    .card p {
        display: none;
    }

    .card h2 {
        display: none;
    }

    footer {
        padding: 20% 0;
        font-size: 1em;
    }
}

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

    nav {
        height: 2em;
    }

    nav h2 {
        font-size: .85em;
    }

    li {
        font-size: .75em;
        padding-left: 2em;
    }

    #lottie{
        width: 90%;
    }

    h1 {
        font-size: 2em;
    }

    .title {
        font-size: .6em;
        padding-bottom: .75em;
        padding-top: 2em;
    }

    .title img {
        width: 1.5em;
    }

    .work {
        padding-bottom: 2em;
    }

    .work hr {
        display: none;
    }

    .card h3 {
        display: none;
    }

    .card {
        display: block;
    }

    .othertitle {
        font-size: 1em;
    }

    .otherwork {
        gap: 1px;
    }

    .othercard {
        width: 45%;
    }

    .othercard img {
        width: 100%;
    }

    .aboutme {
        font-size: .5em;
    }

}

@media only screen and (min-width: 1200px) {

    nav a::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 4px;
        border-radius: 1px;
        background-color: #18272F;
        bottom: 0;
        left: 0;
        transform-origin: right;
        transform: scaleX(0);
        transition: transform .3s ease-in-out;
      }
      
      nav a:hover::before {
          transform-origin: left;
          transform: scaleX(1);
      }

    .card:hover {
        width: 120%;
        transform: translate(-10%, 0);
        grid-template-columns: 10% repeat(3, 25%);
        justify-content: stretch;   
        transition : all 0.5s ease-out;
    }

    .card:hover .viewmore {
        opacity: 1;
        display: grid;
        grid-template-rows: 2fr 1fr;
        justify-self: center;
        width: auto;
        padding-left: 5em;
    }

    .viewmore h2 {
        justify-self: center;
        grid-area: 1 / 4 / 2 / 5;
    }

    .viewmore img {
        justify-self: start;
        width: 15em;
        grid-area: 2 / 4 / 3 / 5;
    }

}
