:root {
    --main-color: #375d96ff;
    --tag-hover-color: rgb(241, 241, 241);
    --hp-offset: 20px;
    --hp-accent: rgb(31, 84, 231);
}

body {
    font-family: 'Source Sans Pro', "Droid Sans", Arial, sans-serif; 
    font-size: 1.4em; 
    color: rgb(68, 68, 68);
    padding-top: 20px;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* tables */
table {
    border-collapse: collapse;
}
td, th {
    border: 1px solid #999;
    padding: 0.5rem;
    text-align: left;
}

ul li {
    margin-bottom: 12px;
}

/* image */
img {
    border-radius: 10px;
    object-fit: cover;
}
.responsive {
    max-width: 100%;
    height: auto;
}
.img-margin {
    margin-top: 30px;
    margin-bottom: 30px;
}
.wrapper-center {
    text-align: center;
}
.chart-max {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}
/* links */
a, a:visited { 
    background:
           linear-gradient(
             to bottom, var(--main-color) 0%,
             var(--main-color) 100%
           );
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-size: 4px 1px;
    padding-bottom: 1px;
    color: #000;
    text-decoration: none;
    transition: background-size .2s;   
}

a:hover {
    background-size: 4px 5px;
}

i, em {
    /* color: rgb(132, 0, 255); */
    /* font-size: 0.8em; */
}

b, strong {
    /* color: rgb(132, 0, 255); */
}

/* code listings */
:not(pre) > code {
    display: inline-block;
    /* background: rgb(255, 230, 91); */
    background: rgb(255, 255, 232);
    padding: 2px;
    border-radius: 8px !important;
}

/* header */
.main-nav {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    position: fixed;
    right: 20px;
    top: 20px;
    background: white;
    box-shadow: 0 0 20px rgb(255, 255, 255);
    border-radius: 14px;
}

.main-nav a, .main-nav a:visited {
    padding-right: 10px;
    border: 0;
    background: transparent;
}

.main-nav a:hover {
    background-size: 4px 5px;
}

.home-link, .home-link:visited, .home-link:hover {
    display: block;
    background: transparent;
    text-align: center;
}

.home-header {
    color: black;
    font-size: 3em;
    display: block;
    background: transparent;
    margin-bottom: 0;
    margin-top: 100px;
    margin-bottom: 100px;
    text-align: center;
}

@media screen and (max-width: 950px) {
    .main-nav {
        position: absolute;
        top: 20px;
        right: 20px;
        background: white;
        text-align: center;
    }

    .main-nav .article-menu-opener:hover .article-menu-wrapper {
        visibility: hidden;
        opacity: 0;
    }

    .main-nav .books-menu-opener:hover .books-menu-wrapper {
        visibility: hidden;
        opacity: 0;
    }

    .home-link {
        display: none;
    }
}

/* footer */
footer {
    margin-top: 50px;
    display: block;
    /* background: #f7f7f7; */
    border-top: 2px solid rgb(212, 212, 212);
    padding-top: 30px;
    padding-bottom: 60px;
}

footer nav {
    display: flex;
    align-content: space-between;
}

footer nav > div {
    flex-grow: 1;
}

footer a, footer a:visited {
    border: 0;
    background-size: 0 0;
    padding-bottom: 0;
}

footer a:hover {
    padding-bottom: 0;
    background-size: 4px 5px;
}

.footer-link {
    display: inline-block;
    margin-bottom: 15px;
}

.footer-name {
    text-align: right;
}

.footer-name a {
    color:rgb(55, 54, 54);
}

.footer-book h3:first-of-type {
    margin-top: 0;
}

/* full bleed layout */
.wrapper {
    display: grid;
    grid-template-columns:
      1fr
      minmax(auto, calc(75ch - 40px))
      1fr;
    padding-left: 20px;
    padding-right: 20px;
}
.wrapper > * {
    grid-column: 2;
}
.full-bleed {
    width: 100%;
    grid-column: 1 / -1;
}

.wrapper-wide {
    display: grid;
    grid-template-columns:
      1fr
      minmax(auto, calc(90ch - 40px))
      1fr;
    padding-left: 20px;
    padding-right: 20px;
}
.wrapper-wide > * {
    grid-column: 2;
}

/* blog home */
.article-link a {
    font-size: 1.3em;
    background-size: 4px 0;
    transition: background-size .2s;
}

.article-link a:hover {
    background-size: 4px 5px;
}

/* article */
.wrapper h1 {
    color: black; 
    text-align: center;
    font-size: 3em;
}

h2, h3, h4 {
    color: var(--main-color);
}

/* article menu */
.article-menu-wrapper {
    visibility: hidden;
    position: absolute;
    left: -360px;
    transition: opacity 0.5s ease-out;
    opacity: 0;
    background: transparent;
}

.article-menu {
    display: flex;
    min-width: 500px;
    background: white;
    -moz-box-shadow:    0 3px 5px 1px rgb(228, 228, 228);
    -webkit-box-shadow: 0 3px 5px 1px rgb(228, 228, 228);
    box-shadow:         0 3px 5px 1px rgb(228, 228, 228);
    z-index: 10000;
    border-radius: 8px;
    margin-top: 20px;
    padding: 20px;
}

.article-menu-opener {
    display: inline-block;
    position: relative;
}

.article-menu-opener:hover .article-menu-wrapper {
    visibility: visible;
    opacity: 1;
}

.article-menu-group {
    flex-grow: 1;
    padding-left: 2px;
    padding-right: 20px;
}

.article-menu-group div {
    padding: 10px 5px 10px 5px;
}

.article-menu-group a, .article-menu-group a:visited {
    display: inline-block;
    background:
           linear-gradient(
             to right, var(--main-color) 0%,
             var(--main-color) 100%
           );
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-size: 4px 0;
    padding: 0;
    color: #000;
    text-decoration: none;
    transition: background-size .2s; 
}

.article-menu-group a:hover {
    background-size: 4px 4px;
}

/* books menu */
.books-menu-wrapper {
    visibility: hidden;
    position: absolute;
    left: -100px;
    transition: opacity 0.5s ease-out;
    opacity: 0;
    background: transparent;
}

.books-menu {
    display: flex;
    min-width: 300px;
    background: white;
    -moz-box-shadow:    0 3px 5px 1px rgb(228, 228, 228);
    -webkit-box-shadow: 0 3px 5px 1px rgb(228, 228, 228);
    box-shadow:         0 3px 5px 1px rgb(228, 228, 228);
    z-index: 10000;
    border-radius: 8px;
    margin-top: 20px;
    padding: 20px;
}

.books-menu-opener {
    display: inline-block;
    position: relative;
}

.books-menu-opener:hover .books-menu-wrapper {
    visibility: visible;
    opacity: 1;
}

.books-menu-group {
    flex-grow: 1;
    padding-left: 2px;
    padding-right: 20px;
}

.books-menu-group div {
    padding: 10px 5px 10px 5px;
}

.books-menu-group a, .books-menu-group a:visited {
    display: inline-block;
    background:
           linear-gradient(
             to right, var(--main-color) 0%,
             var(--main-color) 100%
           );
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-size: 4px 0;
    padding: 0;
    color: #000;
    text-decoration: none;
    transition: background-size .2s; 
}

.books-menu-group a:hover {
    background-size: 4px 4px;
}

/**/


.article-index {
    margin-bottom: 70px;
}

.tag-cloud {
    margin-bottom: 50px;
}

.tag-cloud a {
    font-size: 1.4em;
    display: inline-block;
    padding: 6px;
    border: 1px solid gray;
    border-radius: 5px;
    background:
           linear-gradient(
             to bottom, var(--tag-hover-color) 0%,
             var(--tag-hover-color) 100%
           );
    background-position: 0 100%;
    background-repeat: repeat-x;
    background-size: 4px 1px;
    margin-bottom: 5px;
}

.tag-cloud a:hover {
    background-size: 4px 100px;
}

.tag-cloud.tag-cloud-small a {
    font-size: 1em;
    padding: 6px;
}

.toc {
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgb(247, 246, 250);
    border-left: 2px solid rgb(230, 224, 250);
    margin-bottom: 20px;
}

.repo {
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgb(255, 250, 223);
    border-left: 2px solid rgb(248, 235, 174);
    margin-bottom: 20px;
}

.tip {
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgb(218, 229, 241);
    border-left: 2px solid rgb(200, 213, 228);
    margin-bottom: 20px;
    margin-top: 20px;
}

.book-ef-promo {
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    background-color: rgb(218, 229, 241);
    border-left: 2px solid rgb(200, 213, 228);
    margin-bottom: 20px;
    margin-top: 20px;
}

blockquote {
    background: rgb(247, 247, 247);
    padding: 20px;
    margin-left: 0;
    margin-right: 0;
}

/* homepage */

.homepage {
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    padding-top: 40px;
    padding-bottom: 240px;
    padding-left: var(--hp-offset);
}


.homepage a {
    background: none;
    font-weight: bold;
    display: inline-block;
}

.homepage a.mainlink {
    text-decoration: underline;
    text-decoration-style: double;
}

.homepage a.mainlink:hover {
    text-decoration: underline;
    text-decoration-style: double;
}

.homepage p {
    margin-top: 0;
    margin-bottom: 15px
}

.homepage h1 {
    font-size: 2em;
    padding-right: var(--hp-offset);
    margin-bottom: 0;
}
.homepage h2 {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-right: var(--hp-offset);
}
.homepage h2.softwareengineer {
    color: var(--hp-accent);
    padding-top: 0;
    padding-bottom: 40px;
}

.homepage .mainsection {
    padding-bottom: 30px;
}