/* Neomorphic Stylesheet */

body {
    margin: 0px;
    font-family: sans-serif;
}

h1 {
    text-align: center;
    padding-top: 48px;
}

a {
    text-decoration: none;
    color: #3f51b5;
}

a:hover {
    color: #2196F3;
}

a h1 {
    margin: 0px;
}

header {
    background-image: linear-gradient(#CDEDCF, #BDE8BF);
    box-shadow: 0 0px 15px rgba(102, 102, 102, 0.5);
}

footer {
    background-color: #fdfdfd;
    padding: 10px 15px;
    margin: 0px 16px 16px 0px;
    box-shadow: 0 0 10px rgba(102, 102, 102, 0.3);
    float: right;
}

header, footer, #headbar ul, #content, .article-index, pre {
    border-radius: 16px;
}

.yearmd::after {
    content: "·";
    color: black;
    margin-inline: 8px;
}

h1, h2, .yearmd {
    color: #616161;
}

h2 {
    padding-left: 8px;
}

header, #content, h2, h3, h4, .article-taglist, .article-img, .article-attach-right {
    margin: 16px;
}

p {
    margin: 24px 16px;
}

h3 {
    text-decoration: underline;
}

h3 a {
    color: black;
}

h3 a:hover {
    color: #333;
}

pre {
    overflow-x: scroll;
}

pre.wrap {
    white-space: pre-wrap;
}

#headbar {
    margin: 0;
    padding: 0;
    visibility: visible;
}

#headbar ul li {
    float: left;
}

#headbar ul li a {
    display: inline-block;
    padding: 14px 16px;
    color: white;
    text-align: center;
}

#headbar ul {
    background-color: rgba(97, 97, 97, 0.8);
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

#headbar ul li a.active {
    background-color: #607d8b;
}

#headbar ul li a:hover:not(.active) {
    background-color: #778899;
}

#content {
    border: 1px solid #eee;
    background-color: #FAFAFA;
    padding: 16px;
    box-shadow: 0px 0px 10px rgba(127, 127, 127, 0.2);
}

hr {
    border: 1px solid #eee;
    width: 100%;
    margin: 8px 0px;
}

.header-pfp {
    position: absolute;
    right: 16px;
    height: 96px;
    padding: 24px;
}

.article-img, .article-attach-right {
    float: right;
}

.article-attach-right {
    clear: both;
}

.article-index, pre {
    background: white;
    margin-bottom: 24px;
}

.article-index {
    padding: 8px;
    box-shadow: 0px 0px 10px rgba(192, 192, 192, 0.9);
}

pre {
    padding: 16px;
    box-shadow: 0px 0px 5px rgba(192, 192, 192, 0.4);
    margin-inline: 10px;
}

.article-taglist a {
    margin-right: 8px;
    display: inline-block;
}

.taglist {
    display: inline-block;
    padding: 16px;
    margin: 8px;
}

.button {
    display: inline-block;
    padding: 16px;
    margin-bottom: 8px;
}

.social {
    padding: 16px;
}

.social img {
    width: 32px;
    margin: 4px;
    margin-right: 16px;
}

.social div {
    display: inline-block;
}

.social div p {
    padding: 0px;
    margin: 0px;
}

.social div p.name {
    color: gray;
}

.social * {
    vertical-align: middle;
}

/*Media queries */
@media only screen and (max-width: 768px) {
    .article-attach-right {
        float: none;
    }
    h1 {
        padding-left: 26px;
        text-align: left;
    }
}

@media (prefers-color-scheme: dark) { /* Dark mode */
    body {
        background-color: #222;
        color: #eee;
    }

    #content {
        border: 1px solid #333;
        background-color: #000;
    }
    
    header {
        background-image: linear-gradient(#88A78A, #88A78A);
    }
    
    h1, h2, .yearmd {
        color: #ffffffcc;
    }
    
    a {
        text-decoration: none;
        color: #2196F3;
    }
    
    a:hover {
        color: #3f51b5;
    }
    
    footer {
        background-color: #222;
    }
    
    h3 a, .yearmd::after {
        color: #eee;
    }
    
    h3 a:hover {
        color: #ccc;
    }

    img {
        opacity: .75;
        transition: opacity .5s ease-in-out;
    }
    
    img:hover {
        opacity: 1;
    }
    
    hr {
        border-color: #333;
    }
    
    .article-index, pre {
        background: black;
        box-shadow: none;
        border: 1.5px solid rgba(127, 127, 127, 0.9);
    }

    .social p.name {
        color: white;
    }
}
