/* GENERAL */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --Soft-orange: hsl(35, 77%, 62%);
    --Soft-red: hsl(5, 85%, 63%);
    --Off-white: hsl(36, 100%, 99%);
    --Grayish-blue: hsl(233, 8%, 79%);
    --Dark-grayish-blue: hsl(236, 13%, 42%);
    --Very-dark-blue: hsl(240, 100%, 5%);
}

body {
    margin: 0;
    font-size: 14px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 300;
}

@media (max-width: 700px) {
    .dark-bg {
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background-color: black;
        opacity: 0.5;
        transition: 0.4s ease;
    }
    
}

.container {
    display: grid;
    grid-template-areas: 
    "header header header"
    "img img side-bar"
    "main-blog main-blog side-bar"
    "article1 article2 article3";
    height: 800px;
    margin: 50px auto;
    gap: 20px;
    max-width: 75%;
}

img {
    object-fit: contain;
}

a {
    text-decoration: none;
    color: var(--Very-dark-blue);
}

a:hover {
    color: var(--Soft-orange);
}


/* HEADER */

header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

header img {
    width: 60px;
}

nav ul {
    display: flex;
    gap: 25px;
}

nav li {
    list-style: none;
}

@media (max-width: 700px) {
    
    .mobile-nav {
        position: fixed;
        top: 0;
        width: 70%;
        right: 0%;
        min-height: 100vh;
        background-color: white;
        display: block;
        z-index: 2;
        padding-top: 150px;
        animation: move 0.4s ease;
    }

    @keyframes move {
        0% {
            right: -100%;
        }
        100% {
            right: 0%;
        }
        
    }

    .mobile-nav ul {
        display: block;
        font-size: 1rem;
        font-weight: 400;
        text-align: left;
    }

    .mobile-nav ul li {
        width: fit-content;
        margin-bottom: 25px;
    }
}

/* HAM MENU */

.ham-menu {
    display: none;
}

@media (max-width: 700px) {
    .ham-menu {
        position: relative;
        display: block;
        width: 35px;
        cursor: pointer;
        appearance: none;
        outline: none;
        border: none;
        background: none;
        z-index: 3;
    }
    
    .ham-menu .bar, .ham-menu:after, .ham-menu:before {
        content: "";
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--Very-dark-blue);
        margin: 6px 0px;
        transition: 0.4s;
    }
    
    .ham-menu.is-active:before {
        transform: rotate(-45deg) translate(-9px, 5.5px);
    }
    
    .ham-menu.is-active:after {
        transform: rotate(45deg) translate(-7px, -4px);
    }
    
    .ham-menu.is-active .bar {
        opacity: 0;
    }
}


/* MAIN */

.main-img {
    grid-area: img;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-blog {
    grid-area: main-blog;
    margin: 5px 0 0 0;
    display: grid;
    grid-template-columns: 50% 50%;
}

.main-blog h2 {
    font-size: 3rem;
    margin: 0 30px 0 0;
    font-weight: 900;
    line-height: 3rem;
    grid-column: 1 / 2;
}

.main-blog a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 3px;
    background-color: var(--Soft-red);
    color: var(--Off-white);
    width: 170px;
    height: 45px;
}

.main-blog a:hover {
    background-color: var(--Very-dark-blue);
}

.blog-description {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    grid-column: 2 / 3;
}

.blog-description p {
    margin: 0;
}

/* ASIDE */

aside {
    grid-area: side-bar;
    padding: 20px;
    background-color: var(--Very-dark-blue);
    color: var(--Off-white);
}

aside h2 {
    font-size: 2rem;
    margin-top: 0;
    color: var(--Soft-orange);
}

aside h3 {
    margin: 0;
}

aside p {
    margin: 10px 0 0 0;
}

aside hr {
    margin: 20px 0;
}

aside a {
    color: var(--Off-white);
}

aside a:visited {
    color: var(--Off-white);
}

aside a:hover {
    color: var(--Soft-orange);
}



/* ARTICLES */

.article {
    margin-top: 35px;
    display: flex;
    align-items: start;
    gap: 20px;
}

.article img {
    width: 30%;
    height: 100%;
    object-fit: cover;
}

.article h2 {
    margin: 0;
}

.article h3, p {
    margin: 7px 0;
}

.article h2 {
    color: var(--Grayish-blue);
    font-size: 1.8rem;
    font-weight: 700;
}

.article-description {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article a:visited {
    color: var(--Very-dark-blue);
}

.article a:hover {
    color: var(--Soft-orange);
}

.article1 {
    grid-area: article1;
}

.article2 {
    grid-area: article2;
}

.article3 {
    grid-area: article3;
}

/* footer */

.attribution {
    grid-area: footer;
    grid-column: 1 / -1;
}

/* MEDIA QUERIES */

@media (max-width: 700px) {

    .container {
        grid-template-areas: 
        "header"
        "img"
        "main-blog"
        "side-bar"
        "article1"
        "article2"
        "article3"
        "footer";
        margin: 50px auto;
    }

    .main-blog {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .main-img {
        width: 100%;
        height: 300px;
    }

    .blog-description {
        gap: 20px;
    }

    nav {
        display: none;
    }
}
