:root {
    --sidebar_width: 300px;
}
/* Reset */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background: var(--background1);
    font-family: var(--font_default);
    color:var(--text1);
    
}

article {
    margin: 24px;
    word-break: normal;
}

a {
    color: var(--accent);
    margin: 0;
    padding: 0;
    text-decoration: none;
    vertical-align: baseline;
}
a:hover {
    text-decoration: underline;
}


ul{
    list-style: none;
}

img {
    max-width:100%
}

.static {
    bottom: 16px;
    color: var(--text2);
    padding-bottom: 3px;
    font-size: 0.8em;
    border-top: 1px solid var(--borders);
    margin-left: 0px;
    margin-right: 16px;
    padding-left: 8px;
    margin-bottom: 16px;
    display: block;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Header */
.header{
    background-color: var(--background2);
    /*position: sticky; */
    top: 0;
    width: 100%;
    min-height: 4rem;
}

/* Logo */

.logo {
    display: inline-block;
    margin-top: 16px;
    margin-left: 24px;
    font-size: 2em;
    color:var(--text1);
    vertical-align: middle;
    padding: 0px;

    
}

.logo a {
    display: inline !important;
    color: var(--text1)  !important;
    padding-left: 0 !important;
}

.logo a:hover{
    text-decoration: none;
}

.clear {
    clear: both;
}


/* Nav menu */
.nav {
    position: sticky;
    background-color: var(--background2);
    padding-left: 8px;
    padding-right: 8px;
    /*max-height: 0;*/
    transition: max-height .1s ease-out;
    overflow-y: hidden;
}

.nav ul{
    margin-left: 16px;
    max-height: 0;
}


/* Menu Icon */

.hamb{
    cursor: pointer;
    position: relative;
    float: right;
    z-index: 99;
    padding: 32px 8px;
    right: 16px;
}


.hamb-line {
    background: var(--accent);
    display: block;
    height: 4px;
    position: relative;
    width: 24px;
    
}

.hamb-line::before,
.hamb-line::after{
    background: var(--accent);
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all .2s ease-out;
    width: 100%;
}

.hamb-line::before{
    top: 8px;
}

.hamb-line::after{
    top: -8px;
}




.accent {
    color: var(--accent);
}

.monospace {
    font-family: var(--font_monospace);
}


.side-menu {
    display: none;
}

/* Toggle menu icon */

.side-menu:checked ~ .menu{
    max-height: 100%;
}


.side-menu:checked ~ .hamb .hamb-line {
    background: transparent;
}

.side-menu:checked ~ .hamb .hamb-line::before {
    transform: rotate(-45deg);
    top:0;

}

.side-menu:checked ~ .hamb .hamb-line::after {
    transform: rotate(45deg);
    top:0;
}


/* Sub nav */
.subnav-content {
    background-color:  var(--background1);
    width: 100%;
    z-index: 1;
    padding: 20px 0 ;
    display: block;
  }
.subnav-content a {
    color: var(--text1);
    text-decoration: none;
    margin: 10px 0;
    padding: 30px;
}



.content_time {
    font-size: 0.8em;
    color: var(--text2);
    border-top: 1px solid var(--borders);
    width: 100%;
    margin: 8px 0px 8px 0px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    background-color: var(--borders);
}

h1, h2, h3, h4 {
    font-weight: 400;
}
h1, h2, h3, h4, h5 {
    color: var(--text1);
    padding-top: 8px;
    margin-bottom: 8px;
    max-width: 800px;
}

h1 {
    font-size: 48px;
    border-bottom: 1px solid var(--borders);
}
h2 {
    font-size: 36px;
    border-bottom: 1px solid var(--borders);
}
h3 {
    font-size: 24px;
}
h4 {
    font-size: 21px;
}
h5 {
    font-size: 18px;
}

li {
    line-height: 24px;
}
li ul, li ul {
    margin-left: 24px;
}
p, ul, ol {

    font-size: 16px;
    line-height: 24px;
    max-width: 800px;
}
pre {
    padding: 8px 8px;
    max-width: 784px;
    white-space: pre-wrap;
    background: var(--background2);
    border: 1px solid var(--background2);
    border-radius: 6px;
}
code {
    font-family: var(--font_code);
    line-height: 1.5;
    font-size: 13px;
    background: var(--background2);

}
aside {
    display: block;
    float: right;
    width: 390px;
}
blockquote {
    border-left:1px solid var(--accent);
    padding: 0 2em;
    margin-left:0;
    font-style:italic;
    /*max-width: 476px;*/
}
blockquote  cite {
    font-size:14px;
    line-height:20px;
    color:#bfbfbf;
}
blockquote cite:before {
    content: '\2014 \00A0';
}

blockquote p {  
    color: #666;
    max-width: 460px;
}
hr {
    width: 540px;
    text-align: left;
    margin: 0 auto 0 0;
    color: #999;
}

.nav_time {
    font-size: 0.8em;
    color: var(--text2);
}

main {
    padding: 16px;
    line-height: 1;
    border-top:    1px solid var(--borders);
}

main p {

    margin-bottom: 16px;

}

/* Responsiveness */

@media (min-width: 1024px) {

    .logo {
        
    }
    .nav{
        background: var(--background2);
        margin: 0;
        width: var(--sidebar_width);
        position: fixed;
        font-family: var(--font_sidebar);
        min-height: 100%;
        overscroll-behavior: contain;
        border-right: 1px solid var(--borders);
        border-bottom: none;
        overflow-y: scroll;
        padding-top: 16px;
    }

    /* Header */
    .header{
        position: sticky; 
        width: var(--sidebar_width);;
        border-right: 1px solid var(--borders);
        float: left;
    }

    main {
        margin-left: var(--sidebar_width);;
        border-top: none;
    }

    .static {
        position: absolute;
        bottom: 0px;
        border-top: none;
    }
    
    
    .hamb{
        display: none;
    }

    /* Sub nav */
    .subnav-content {
        padding: 20px 0 ;
        
        background-color:  var(--background1);
    }
    .subnav-content a {
        color: var(--text1);
    }
}


.menu_link{
    padding-left: 8px;
    padding-bottom: 8px;
    /*font-size: 0.9em;*/
    margin-left: 0px;
    line-height: 1;
}

.nav a{
    display: block;
    padding-top: 12px;
    text-decoration: none;
    color: var(--text1);
    transition: color 0.3s ease;
}



.nav div.category{
    display: block;
    padding-left: 8px;
    padding-bottom: 8px;
    padding-top: 8px;
    text-decoration: none;
    color: var(--text1);
    transition: color 0.3s ease;
    border-bottom: 1px solid var(--borders);
    font-size: 1.2em;
    margin-right: 16px;

}

.nav div.active {

    color: var(--accent);
   
    /*
    background-color:  var(--background1);
    margin-right: -1px;
    margin-top: 0x;
    border-right:  1px solid var(--borders);
   
    border-bottom: 1px solid var(--borders);
    border-top:    1px solid var(--borders);
    */
    
}

.nav div.inactive {
   
    

}

.nav div.active a{
    color: var(--accent);
}

.nav a:hover:not(.active) {
    color: var(--accent);
    text-decoration: none !important;
}

.nav a:hover {
    color: var(--accent);
    text-decoration: none !important;
}



.static a {
    color: var(--text2);
    transition: color 0.3s ease;
    display: block;
    padding-top: 8px;
}

.static a.active {
    color: var(--accent) !important;
}

.static a:hover {
    color: var(--accent);
    text-decoration: none !important;
}

/* Animtations */
.typewriter
{
    font-family: var(--font_logo);
	display: inline-block;
    animation: glitch 5s 5s infinite, glitch-2 5s 5s infinite;
}

.typewriter-text {
    overflow-x: hidden;
    display: inline-block;
  	letter-spacing: 2px;
    white-space: nowrap;
    box-sizing: border-box;
    border-right: 2px solid transparent;
    
}
.typewriter-animation {
    animation: typing 1s steps(11, end), cursor 0.5s step-end 2;
}

@keyframes typing {
    from { 
        width: 0%;
    }
    to { 
        width: 100%;
    }
}
@keyframes cursor {
    from, to { 
       border-color: transparent;
    }
    50% { 
        border-color:var(--accent); 
    }
}
@keyframes glitch {
    1%{
      transform: rotateX(10deg) skewX(90deg);
    }
    2%{
      transform: rotateX(0deg) skewX(0deg);
    }
  }

  @keyframes glitch-2 {
    1%{
      transform: rotateX(-30deg) skewX(70deg);
    }
    2%{
      transform: rotateX(0deg) skewX(0deg);
    }
  }
