body {
    background: #2D2A32;
    margin: 0;
    position: relative;
    font-family: 'Open Sans', sans-serif;
    font-weight: 350;
    font-size: 18px;
}

/**
 Background related stuff
 */
.background {
    position: absolute;
    width: 100%;
    z-index: -1;
}

.bg-group {
    margin: 33px;
}

.bg-lozenge {
    visibility: visible;
    width: 100%;
    opacity: 0.38;
    padding-top: 31%;
    box-shadow: inset 0px 0px 0px 2px rgba(255, 255, 255, 0.4);
    border-radius: 15.5% / 50%;
    background-repeat: no-repeat;
    background-size: cover;
}

.cables {
    background-image: url("/img/red/cables.png");
}
.tools1 {
    background-image: url("/img/red/Tools.png");
}
.tools2 {
    background-image: url("/img/red/Tools 2.png");
}
.bagels {
    background-image: url("/img/red/Bagels.png");
}

/**
 Default Text Styles
 */

/* get rid of header boldness */
h1,h2,h3,h4,h5,h6 {
    font-weight: normal;
}

/* h1.name is my name and is in Quicksand */
h1.name {
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 55px;
}

h1 {
    font-weight: 500;
    font-size: 55px;
}

/* h2 and h3 are sub-titles and should be lowercased */
h2,h3 {
    text-transform: lowercase;
    font-weight: 400;
}
/* h2 is card titles, which are always in lowercase */
h2 {
    font-size: 36px;
}
h3 {
    font-size: 20px;
}
/* remember: h4-h6 are Open Sans not Quicksilver */
h4 {
    font-weight: 575;
    font-size: 18px;
}
h5 {
    font-weight: 400;
    font-size: 14px;
}
h6 {
    font-weight: 400;
    font-size: 10px;
}

/* code blocks use a slightly smaller default font (16px instead of 18) and they need
   a bit of extra space at the start
 */
code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-variation-settings: 'wght' 333;
    font-size: 16px;
}
pre, code {
    background-color: #fff;
}
.highlighter-rouge .highlight {
    background-color: #fff;
}

a {
    text-decoration: none;
    color: #6699CC;
    font-weight: 525;
}
a:visited {
    color: #A9A4A3;
}
a:hover {
    text-decoration: none;
    color: #5C7691;
}

/**
 Content layout, text & background colors, etc.
 */

/* Each row is a flexbox. I decided to use margins for the top of the row and padding for the edges. */
.row {
    display: flex;
    flex-direction: row;
    padding: 0 60px 0 60px;
    margin-top: 60px;
    align-items: start;
}

/* Every top level element in a row has a shadow. */
.row > * {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Every top level element has a minimum 33px spacing between them */
.row > * {
    margin-right: 33px;
}
.row > *:last-child {
    margin-right: 0;
}

/* Card border (note this is a 5px border) */
.dark,.light {
    border: solid 5px transparent;
    border-image: url('/img/red/Border Dark.png') 5 / 1 repeat;
}
/* Card background and primary text color */
.dark {
    background: #520A19;
    color: #D7C0C5;
}
.dark code {
    background-color: transparent;
}
.light {
    background: #FFFDF6;
    color: #37261E;
    border-image-source: url('/img/red/Border Light.png');
}

/* Card header text colors */
.dark h1, .dark h2, .dark h3 {
    color: #E6EEFF;
}
.light h1, .light h2, .light h3 {
    color: #657CA5;
}

/* "main" cards have special big padding */
.card-main {
    padding: 0 75px;
}

/* "small" cards have smaller fonts and less padding */
.card-small {
    padding: 0 30px;
    font-size: 14px;
    font-weight: 400;
}
.card-small h2 {
    margin-top: 10px;
}

/* if you use neither card-main nor card-small, you get no padding by default. */



/**
 Specific to 1st row
*/
#row1 {
    align-items: center;
    /* first row needs to kill the margin bc otherwise something weird happens with the background image */
    margin-top: 0;
    padding-top: 96px;
    justify-content: center;
}

/* namecard padding is special, and overrides normal card padding */
.namecard {
    padding: 16px 16px 32px 16px !important;
}

.namefield {
    margin-bottom: 0.5em;
}

.namefield h1, .namefield h6 {
    margin: 0;
}

.namefield h6 {
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #85535D;
    position: relative;
    margin: -8px 0 0 2px;
    padding-top: 2px;
}
.email {
    padding-left: 0.5em;
}

/**
  Specific to row2
 */
#row2 {
    margin-top: 111px;
    align-items: stretch;
}

#get-in-touch ul {
    list-style-type: square;
    list-style-position: inside;
    margin: 0;
    padding: 0;
}

/**
  Specific to row3 (recommendations)
  Recommendations itself is a horizontal flexbox.
 */
#row3 h2 {
    margin: 20% 0 0 0;
}
#row3 h6 {
    margin: 0;
    color: #867870;
}

#recommendations {
    display: flex;
    flex-direction: row;
    align-items: start;
    width: 100%;
}

#recommendations ul {
    margin-left: 100px;
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
}

#recommendations li {
    margin-bottom: 7px;
}

#recommendations a {
    display: flex;
    flex-direction: row;
    align-items: center;
}
#recommendations a > *:last-child {
    margin-left: 27px;
}

#recommendations img {
    width: 100px;
    height: 40px;
    border-radius: 20px;
}
#recommendations h4, #recommendations p {
    margin: 0;
}
#recommendations p {
    color: #7F7F7F;
    font-size: 10px;
    margin-top: 2px;
}

/**
  Specific to row4 (blog)
 */
#row4 {
    margin-bottom: 100px;
}

#row4 .card-main {
    flex: 2;
}

#row4 .card-small {
    flex: 1;
}

/* this overrides the 75px padding on cards by default.
    we need to sum the 21px (padding here) + 10px (border of ul) + 44px (li padding-left) = 75px
 */
#blogindex {
    padding-left: 21px;
}

/* padding here should also be 75px = 21px (padding of parent) + 54px (this) */
#blogindex h2 {
    margin: 10px 0 0 0;
    background-image: url("/img/red/Glob heading.png");
    background-size: 17px 16px;
    background-repeat: no-repeat;
    background-position: left 1px bottom 0;
    padding-left: 54px;
}
#blogindex h2 code {
    padding: 0;
}
#blogindex ul {
    padding: 18px 0 1.5em 0;
    margin: 0;
    list-style: none;
    border-style: solid;
    border-color: #FFFDF6;
    border-width: 0 0 0 10px;
    border-image-source: url("/img/red/Glob border.png");
    border-image-slice: 9 1 9 10;
    border-image-repeat: repeat;
}
#blogindex li {
    background-image: url("/img/red/Glob item.png");
    background-size: 35px 20px;
    background-repeat: no-repeat;
    background-position: left -1px top 2px;
    margin-bottom: 1.2em;
    padding-left: 44px;
}
#blogindex li:last-child {
    margin-bottom: 0;
}
#blogindex .index {
    margin: 2em 0;
}
#blogindex h4, #blogindex h5, #blogindex p {
    margin: 0;
}

/* a "subdate" is the subtitle+date horizontal row */
.subdate {
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: space-between;
    font-weight: 400;
}
.subdate p {
    font-size: 10px;
    color: #897E76;
}
.subdate .date {
    color: #B9B0AA;
}

/* padding here should also be 75px = 21px (padding of parent) + 54px (this) */
#blogindex .links {
    background-image: url("/img/red/Glob final.png");
    background-size: 35px 12px;
    background-repeat: no-repeat;
    background-position: left 9px top 0;
    padding-left: 54px;
    padding-bottom: 1em;
}
#blogindex .links a {
    text-decoration: underline;
}

/***************
 * BLOG STYLES *
 **************/
.site-header {
    border: none;
}
.site-title {
    display: none;
}

.site-nav {
    float: none;
}
.site-nav .trigger {
    text-align: center;
}
.site-nav {
    background: #403D46;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}
.site-nav a, .site-nav a:visited, .site-nav a:hover {
    color: #8c8a83;
}

/* same colors as .light */
article {
    background: #FFFDF6;
    color: #37261E;
    font-size: larger;

    padding: 1em;
    border-radius: 4px;
}
/* undo any header casing */
article h1, article h2, article h3, article h4, article h5, article h6 {
    text-transform: none;
}
article h1, article h2, article h3 {
    color: #657CA5;
    font-weight: 400;
}
article h1 {
    font-size: 36px;
}
.post-title {
    letter-spacing: inherit;
    font-size: 36px;
}
footer {
    display: none;
}

.imagegrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 1em;
    column-gap: 1em;
    row-gap: 1em;
}
.imagegrid img {
    width: 100%;
}
.imagegrid > * {
    align-self: center;
}

.lightbox {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #000000cc;
}
.lightbox button.close {
    position: absolute;
    top: 32px;
    right: 32px;
}
button.close {
    background: none;
    border: none;
    content: ' ';
    width: 32px;
    height: 32px;
    opacity: 0.3;
    cursor: pointer;
}
.close:hover {
  opacity: 1;
}
button.close:before, button.close:after {
  position: absolute;
  left: 15px;
  top: 0;
  content: ' ';
  height: 33px;
  width: 2px;
  background-color: #fff;
}
button.close:before {
  transform: rotate(45deg);
}
button.close:after {
  transform: rotate(-45deg);
}

img.lightboxable {
    cursor: pointer;
}

.lightbox-contents {
    width: 100%;
    height: 100%;
}
.lightbox-contents img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox.shown {
    display: block;
}

/**
 Responsive overrides for small screens
*/
@media only screen and (max-width: 1000px) {
    .background {
        position: fixed;
    }

    /* smaller name */
    h1 {
        font-size: 40px;
    }

    /* make rows into columns, kill margin/paddings on rows */
    .row {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
    }
    /* but the cards should still have a standard 16px margin */
    .row > * {
        margin: 16px;
    }
    .row > *:last-child {
        margin: 16px;
    }
    .card-main {
        padding: 0 30px;
    }
    /* row1 in particular changes its layout */
    #row1 {
        padding-top: 16px;
    }
    #row1 .namecard {
        display: flex;
        flex-direction: row;
        padding: 16px 16px 8px 16px !important;
    }
    #row1 .namefield:first-child {
        margin-right: 16px;
    }
    #row1 img {
        width: 66%;
    }
    /* recommendations no longer flexes horizontally,
       and its margins are normalized, but it does
       expand to fill the width
    */
    #recommendations {
        display: block;
        width: inherit;
    }
    #recommendations h2 {
        margin: 10px 0 0 0;
    }
    #recommendations ul {
        margin: 10px 0 0 0;
    }
    #recommendations ul {
        grid-template-columns: 1fr;
    }
}


hr {
    width: 30%;
    margin: 1.5em auto;
    opacity: 30%;
}

.footnotes {
    padding-top: 2em;
    font-size: smaller;
}