:root {
    --bg-color:   #fbf8f4;
    --bg-color2:  #fcedd9;
    --text-color: #111111;
    --nav-color:  #5c5c5c;
    --link-color: #2ca887;

    --code-keyword-color: #2385b3;
    --code-comment-color: #478f10;
    --code-literal-color: #c92c7a;
    --code-type-color:    #19a882;

    /* Font Sizes */
    --date-size:   20px;
    --code-size:   18px;
    --mobile-size: 20px;
    --font-size:   22px;
    --h3-size:     24px;
    --h2-size:     30px;
    --h1-size:     40px;
    --title-size:  50px;
}
.dark-mode {
    --bg-color:   #1c2127;
    --bg-color2:  #2d353f;
    --text-color: #eeeeee;
    --nav-color:  #b3b3b3;
    --link-color: #34DFB1;

    --code-keyword-color: #569AB9;
    --code-comment-color: #6A9947;
    --code-literal-color: #d693b5;
    --code-type-color:    #4ec9b0;
}

@font-face { font-family: AtkinsonHyperlegible;      src: url(fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Regular.ttf) }
@font-face { font-family: AtkinsonHyperlegible_Bold; src: url(fonts/Atkinson_Hyperlegible/AtkinsonHyperlegible-Bold.ttf) }

@font-face { font-family: JuliaMono;      src: url(fonts/JuliaMono/JuliaMono-Regular.ttf) }
@font-face { font-family: JuliaMono_Bold; src: url(fonts/JuliaMono/JuliaMono-Bold.ttf) }

html {
    font-size: var(--font-size);
    line-height: 1.2rem;
    font-family: "AtkinsonHyperlegible", serif;
    word-wrap: break-word;
    scrollbar-gutter: stable both-edges;
}
body { 
    padding-top: 1%;
    width: 75%;
    margin-left:  auto;
    margin-right: auto;
    
    background-color: var(--bg-color);
    color: var(--text-color);
}
.color-blue { color: var(--link-color); }

/************* Blog style *************/
h1 {
    margin-bottom: 10;
    font-size: var(--h1-size);
    font-family: "AtkinsonHyperlegible_Bold";
    line-height: 2rem;
}
h2 {
    font-size: var(--h2-size);
    font-family: "AtkinsonHyperlegible_Bold";
    line-height: 2rem;
}
h3 {
    font-size: var(--h3-size);
    line-height: 1.5rem;
    margin-bottom: 0px;
    font-family: "AtkinsonHyperlegible_Bold";
}
b {
    font-weight: normal;
    font-family: "AtkinsonHyperlegible_Bold", serif;
}

li { margin-top: 10px; }

img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}
figcaption {
    text-align: center;
    font-size: var(--date-size);
    color: var(--nav-color);
    margin-top: 4px;
}

code {
    font-size: var(--code-size);
    background-color: var(--bg-color2);
    padding: 3px 4px;
    border-radius: 5px;
}
pre code {
    font-size: var(--code-size);
    font-family: "JuliaMono", serif;
    background-color: var(--bg-color2);

    display: block;
    overflow-x: auto;
    max-width: 100%;
    min-width: 100px;
    padding: 10px;
}
span.code-keyword { color: var(--code-keyword-color); }
span.code-comment { color: var(--code-comment-color); }
span.code-literal { color: var(--code-literal-color); }
span.code-type    { color: var(--code-type-color);    }

/* Title used at the very top. It's usually the name of the webpage. */
h1.title {
    margin-top: 50px;
    text-align: center;
    font-size: var(--title-size);
    margin-bottom: auto;
    line-height: 3rem;
    font-family: "AtkinsonHyperlegible";
}

/* 
    Used for blog entries.
    The subtitle is below the title of the post
        (which usually is a classless h1 header).
    The date is used below the subtitle with the
        release date of the post and the last
        modified time.
*/
h1.subtitle {
    font-size: var(--h3-size);
    margin-top: -25px;
    line-height: normal;
    color: var(--nav-color);
    font-family: "AtkinsonHyperlegible";
}
h1.date {
    font-size: var(--date-size);
    line-height: normal;
    margin-top: -10px;
    color: var(--nav-color);
    font-family: "AtkinsonHyperlegible";
    font-weight: lighter;
    font-style: italic;
    opacity: 80%;
}

/* Used for listing blog entires */
div.post {
    padding: 1px 15px;
    padding-bottom: 15px;
    margin: 15px;
    text-decoration: none;
    border-radius: 10px;

    background-color: var(--bg-color2);
}

/************* Links *************/
a {
    transition: color .2s ease-out;
}
a:link, a:visited {
    color: var(--link-color);
}
a:hover {
    color: var(--text-color);
}

/************* Grid Layout *************/
.grid-main { /* Whole page grid */
    display: grid;
    grid-gap: 10px;
    grid-template-areas: "website-text  sidebar"
                         "grid-contents sidebar"
                         "end-text      sidebar";
    grid-template-columns: 80% 20%;
}
.grid-contents { /* Projects grid */
    grid-area: grid-contents;
    display: grid;
    grid-gap: 15px;
    grid-template-areas: "a a";
    background-color: var(--bg-color);
    color: #444;
}
@media (max-width: 768px) { /* Grid for mobile screens */
    .grid-main {
        grid-template-columns: 100%;
        grid-template-rows: repeat(auto, 1fr);
        grid-template-areas:
        "website-text"
        "grid-contents"
        "end-text"
        "sidebar";
    }
    .grid-contents {
        grid-template-areas: "a";
    }
    body {
        width: 90%;
        font-size: var(--mobile-size);
    }
}

/************* Sidebar *************/
.sidebar {
    grid-area: sidebar;
    text-align: center;
    height: fit-content;
}
.footer { height: 40px; }
.social-media {
    float: right;
    padding-left: 10px;
}
.dark-light  {
    float: left;
    cursor: pointer;
    visibility: hidden;
}
.invert-image { filter: invert(1); }
a.nav-link {
    color: var(--nav-color);
    text-decoration: none;
}
a.nav-link:hover:not(a.nav-current) {
    color: var(--link-color);
    font-weight: bold;
}
a.nav-current {
    color: var(--text-color);
    font-weight: bold;
    cursor: default;
}

/************* Home Project Images *************/
.img-project {
    object-fit: cover;
    object-position: center;
    height: 100%;
    width: 100%;
    max-height: 250px;

    transition: filter .3s ease-out;
}
.img-project:hover { filter: brightness(75%); }
.p-project {
    margin-top:    5px;
    margin-bottom: 10px;
    margin-left:   20px;
    margin-right:  20px;
}
.item {
    background-color: var(--bg-color2);
    color: var(--text-color);
    height: fit-content;
}

/************* Starting and ending texts *************/
.website-text {
    grid-area: website-text;
    color: var(--text-color);
    padding: 20px;
}
.end-text {
    grid-area: end-text;
    color: var(--text-color);
    padding: 20px;
}
