﻿@import url('https://fonts.googleapis.com/css2?family=Outfit&family=Playfair+Display&display=swap');

* {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 16px;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    overflow-x: hidden;
}

.top-spacer {
    height: 50px;
    width: 100%;
}

#hero {
    height: calc(100vh - 50px);
    width: 100vw;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero .title {
    background-color: white;
    width: 50%;
    padding: 1rem;
}

nav {
    height: 50px;
    background-color: rebeccapurple;
    position: fixed;
    width: 100%;
    z-index: 1;
}

.code {
    background-color: #f5f2f0;
    color: rebeccapurple;
}

nav a {
    float: left;
    display: block;
    color: white;
    background-color: rebeccapurple;
    text-align: center;
    padding: 15px 1rem;
    text-decoration: none;
}

nav .nav-icon {
    display: none;
}

.dropdown {
    float: left;
    background-color: rebeccapurple;
}

.dropdown .dropbtn {
    outline: none;
    color: white;
    padding: 15px 1rem;
    background-color: rebeccapurple;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rebeccapurple;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    float: none;
    color: white;
    padding: 15px 1rem;
    text-decoration: none;
    display: block;
    text-align: left;
}

nav a:hover, .dropdown:hover .dropbtn {
    background-color: white;
    color: rebeccapurple;
}

.dropdown:hover .dropdown-content {
    display: block;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h1, h2, p {
    padding-bottom: 1rem;
}

small {
    font-size: 0.75rem;
    color: gray;
}

main {
    padding: 2rem 8rem;
}

footer {
    border-top: 1px solid gray;
    padding-top: 1rem;
}

footer h2 {
    font-family: 'Playfair Display', serif;
}

.tags {
    display: flex;
    padding-bottom: 1rem;
}

.tags p {
    padding-right: 0.5rem;
    background-color: rebeccapurple;
    border-radius: 20px;
    height: 1.5rem;
    text-align: center;
    padding-left: 0.5rem;
    margin-right: 0.5rem;
    color: white;
}

a {
    color: rebeccapurple;
    text-decoration: none; /* no underline */
}

.links a {
    padding: 2px;
    border-radius: 50%;
}

#home-main { 
    width: 100%;
    display: grid;
    grid-template-columns: calc(100% / 3) calc(100% / 3) calc(100% / 3);
    grid-template-rows: 0.5fr 2fr;
    background-color: rgba(0, 0, 0, 0.1); 
    min-height: calc(100vh - 50px);
}

#home-side {
    grid-column: 1;
    grid-row-start: 1;
    grid-row-end: 1;
    background-color: transparent; padding: 1rem;
}

#home-body {
    grid-row-start: 1;
    grid-row-end: 3;
    grid-column-start: 2;
    grid-column-end: 4;
    background-color: white;
    overflow: hidden;
}

#recent-posts {
    grid-row: 2;
    grid-column: 1;
    padding: 1rem;
}

/*
@media screen and (max-width: 900px) 
{
    main {
        padding: 1rem 2rem;
    }
    
    #home-main {
        grid-template-rows: auto auto auto;
    }

    #home-side {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 1;
    }

    #home-body {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 2;
    }

    #recent-posts {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 3;
    }
}
*/

@media screen and (max-width: 600px) {
    nav {
        background: transparent;
        top: 0;
    }


    .top-spacer {
        height: 0;
    }

    #hero {
        height: 100vh;
        overflow-wrap: break-word;
    }

    nav a, .dropdown .dropbtn {
        display: none;
        padding: 1rem;
    }

    nav a.nav-icon {
        display: block;
        float: right;
        background-color: transparent;
        /*border-radius: 50%;*/
        background-color: rebeccapurple;
        height: 50px;
        width: 50px;
        color: white;
    }

    /*
    nav.responsive { position: relative; }
    */

    nav.responsive a.nav-icon {
        position: absolute;
        top: 0;
        right: 0;
        color: white;
        background-color: transparent;
    }

    nav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    nav.responsive .dropdown {
        float: none;
    }

    nav.responsive .dropdown-content {position: relative;}

    nav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {

    #hero .title {
        background-color: white;
        width: 80%;
        padding: 1rem;
    }

    main {
        padding: 1rem 2rem;
    }

    #home-main {
        grid-template-rows: auto auto auto;
    }

    #home-side {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 1;
    }

    #home-body {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 2;
    }

    #recent-posts {
        grid-column-start: 1;
        grid-column-end: 4;
        grid-row: 3;
    }
}

ul, ol {
    padding-left: 2rem
}

.i {
    font-style: italic;
}

.bottom-nav {
    display: flex; 
    width: 100%;
    padding-bottom: 1rem;
}

#article-meta {
    display: flex;
    flex-direction: column;
}

#article-meta a, #article-meta small {
    padding-bottom: 0.5rem;
}

#article-meta:last-child {
    padding-bottom: 0;
}