/* layout
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/*
- #fake-sidebar is present so that we can use both width:% and min-width on #sidebar
Without min-width, it would look ugly at a certain point
- Therefore #fake-sidebar and #sidebar have same width at any time
*/
#fake-sidebar, #sidebar {
width: 20%;
min-width: 240px;
}

#sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 2;
}

#flex-container {
display: flex;
/* Make sure height goes to bottom of screen even if small article, but allow it to expand vertically */
min-height: 100vh;
/* For child elements with position: absolute; Mostly #container-mask would otherwise be stuck at 100vh */
position: relative;
}

#container {
flex: 1;
}


/* background-colors
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#sidebar {
background-color: #484848;
}

body,#container {
background-color: #F8F8F8;
}


/* paddings
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.sidebar {
padding: 2rem;
}
#container {
padding: 2rem 4rem 0;
}

footer {
padding: 1rem;
}


/* sidebar
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.sidebar-about {
text-align: center;
margin-bottom: 15px;
}
.sidebar-about img {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}
.sidebar-about a{
color:#fff;
text-decoration: none;
}
.sidebar-tagline {
font-size: 4rem;
color: #1EAEDB;
text-shadow: 0px 0px 15px #0A0F10;
line-height: 1;
}

.sidebar-nav {
background-color: #1D1F21;
margin: 20px -20px;
padding: 20px;
}
.sidebar-nav-list {
margin: 20px 10%;
list-style-type: none;
}
a.sidebar-link {
color: #b5bd68;
font-size: 20px;
text-decoration: none;
transition: all 0.2s ease-in-out 0s;
}
a.sidebar-link:hover {
color: #ffa;
padding-left: 10px;
}
.sidebar-nav-item.nav-home {
margin-bottom: 40px;
}
.sidebar-nav-item.nav-home .genericon-home,
.sidebar-nav-item.nav-home a {
color: #1EAEDB;
}

.sidebar-nav-item .genericon {
color: #DE935F;
font-size: 22px;
margin-top: 4px;
margin-right: 10px;
transition: all 0.5s ease;
}
.sidebar-nav-item .genericon:hover{
transform: scale(1.5);
}

.sidebar-externals {
margin-top: 30px;
text-align: center;
font-size: 30px;
}
.sidebar-externals a {
font-size: 30px;
vertical-align: middle;
color: #b5bd68;
}
.sidebar-externals a:hover {
color: #ffa;
}

.sidebar hr {
margin: 2rem 0;
}

.sidebar-bottom {
position: absolute;
bottom: 0;
left: 0;
color: rgba(255,255,255,.5);
font-size: 16px;
margin: 2rem 4rem;
}
.sidebar-bottom p {
margin: 0;
display: inline-block;
}
.sidebar-bottom a {
text-decoration: none;
}


/* home
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.post-infos,
.footnote {
font-family: verdana,arial,helvetica,sans-serif;
color: #888;
font-size: x-small;
margin-bottom: 0;
}
.post-infos {
color: #AAA;
text-transform: uppercase;
letter-spacing: 0.1em;
border-bottom: 1px solid #EEE;
}

.post-header h2 {
font-family: Arial,sans-serif;
margin-top: 4px;
}

section.post {
margin-bottom: 30px;
}

.section {
width: 80%;
margin: auto;
font-size: 20px;
}

.section .posts {
list-style-type: disc;
}

.section .posts li {
overflow: auto;
}

.section .posts li a {
color:#369;
text-decoration: none;
}
.section .posts li a:hover {
text-decoration: underline;
}

.section time {
float: right;
color: #c9c9c9;
font-family: "Helvetica Neue", helvetica, "Open Sans", sans-serif;
text-shadow: 1px 1px #fff;
}


/* Responsive Design
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/*
- Layout switched when width<800px (mobile experience): sidebar at top
- A burger menu appear and we can use it to display menu at any vertical position
*/

#sidebar-menu, #sidebar-menu-checkbox {
display: none;
}

@media (max-width:800px) {
  #fake-sidebar, #sidebar {
    transition: all 0.5s;
  }
  #sidebar-menu {
    display: block;
  }
  #fake-sidebar {
    width: 0;
    min-width: 0;
  }
  #sidebar{
    position: relative;
    width: 100%;
  }
  #flex-container {
    /* sidebar kept at bottom in source to put content first, so we have to reverse */
    flex-direction: column-reverse;
    margin-left: 0;
  }
  .sidebar-tagline {
    display: none;
  }
  .sidebar-nav {
    padding: 2px;
  }
  .sidebar-nav-list {
    margin: 10px;
    text-align: center;
    display: flex;
    justify-content: space-around;
  }
  .sidebar-nav-item {
    display: inline-block;
  }
  .sidebar-nav-item,.sidebar-nav-item.nav-home {
    margin-bottom: 0;
  }
  .sidebar-externals {
    margin-top: 0;
  }
  #container {
    padding: 1rem;
  }
  .section {
    width: auto;
  }
}

@media (max-height:865px) {
  .sidebar-bottom {
    display: none;
  }
}
@media (max-width:1250px) {
  .sidebar-bottom {
    display: none;
  }
}

#sidebar-menu {
position: fixed;
top: 10px;
right: 10px;
z-index: 3;

/* Burger menu */
width: 24px;
height: 4px;
border-top: 12px double #000;
border-bottom: 4px solid #000;
cursor: pointer;
border-color: #c05b4d;
}

#container-mask {
display: none;
position: fixed;
width: 100%;
height: 100%;
opacity: 0.5;
background-color: #222;
z-index: 1;
}

/* Responsive layout when burger button is clicked */
#sidebar-menu-checkbox:checked ~ #sidebar {
position: fixed;
bottom: auto;
}
#sidebar-menu-checkbox:checked ~ #container-mask {
display: block;
}

/* Restore things in case resolution change after hiting #sidebar-menu */
@media (min-width:800px) {
  #sidebar-menu-checkbox:checked ~ #sidebar{
    position: relative;
  }
  #sidebar-menu-checkbox:checked ~ #container-mask {
    display: none;
  }
}

@media print {
  #sidebar, #fake-sidebar, #sidebar-menu {
    display: none;
  }
}


/* post
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.post {
font-family: proxima-nova,"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;
color: #484848;
font-size: 16px;
line-height: 25px;
text-align: justify;
}
.post .genericon {
vertical-align: middle;
}
.post ul {
padding-left: 30px;
}

.post a {
color: #c05b4d;
text-decoration: none;
}
.post a:hover {
color: #a5473a;
text-decoration: underline;
}

a.readmore {
color: #484848;
background-color: #C05B4D;
padding: 6px 20px;
}
a.readmore:hover {
color: #C05B4D;
background-color: #484848;
text-decoration: none;
}

.post h1 {
font-size: 23px;
letter-spacing:normal;
}

.post h2 {
font-size: 22px;
letter-spacing:normal;
}

.post h3 {
font-size: 21px;
letter-spacing:normal;
}

.post h4 {
font-size: 20px;
letter-spacing:normal;
}

.post h5 {
font-size: 19px;
letter-spacing: normal;
}

.post h6 {
font-size: 18px;
letter-spacing: normal;
}

#post-header h1 {
font-weight: bold;
}

/* TableOfContents
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.toc {
float: right;
width: 20%;
padding: 0 0 2rem 2rem;
border-left: 1px solid #eee;
font-size: 0.9rem;
}

.toc-label {
font-size: 1.5rem;
color: #aeaeae;
}

#TableOfContents {
padding-top: 1rem;
}
#TableOfContents a {
letter-spacing: 0.05rem;
text-transform: uppercase;
font-size: 0.85rem;
text-decoration: none;
line-height: 1.5rem;
}

/* footer
–––––––––––––––––––––––––––––––––––––––––––––––––– */

footer {
text-align: center;
}
.footnote a {
color: #888;
}
.footnote a:hover{
text-decoration: underline;
color:#369;
}

/* shortcodes
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.youtube-player {
border: 0;
}


/* 7-y
–––––––––––––––––––––––––––––––––––––––––––––––––– */
div.link-card {
  border: 1px solid black;
  background-color: #eeeeee;
  padding: 3px;
  width: 20%;
}