body {
    font-family: monospace;
    line-height: 1.5;
    background: #1e1e1e;
    color: #dcdccc;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
}

header,
footer,
nav,
section,
main {
    display: block;
    margin-bottom: 2em;
}

h1,
h2,
h3 {
    color: #faebf1;
    border-bottom: 1px solid #3f3f3f;
}

a {
    color: #8cd0d3;
    text-decoration: none;
}

a:visited {
    color: #dc8cc3;
}

a:hover {
    text-decoration: underline;
}

/* Profile Pic */
.profile-frame {
    float: right;
    border: 5px solid #3f3f3f;
    padding: 5px;
    background: #2b2b2b;
    margin-left: 20px;
    margin-bottom: 15px;
}

.profile-frame img {
    display: block;
    max-width: 200px;
    height: auto;
}

/* Cat Gallery */
.gallery {
    display: block;
    text-align: left;
    margin-right: -10px;
}

.gallery img {
    display: inline-block;
    width: 150px;
    height: auto;
    border: 1px solid #3f3f3f;
    margin-right: 10px;
    margin-bottom: 10px;
    vertical-align: top;
}

/* Lists */
li {
    margin-bottom: 0.8em;
}

/* Code */
pre {
    background: #2b2b2b;
    padding: 10px;
    border: 1px solid #3f3f3f;
    overflow: auto;
    color: #dcdccc;
    white-space: pre;
}

code {
    font-family: monospace;
    background: #2b2b2b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    text-align: left;
    color: #faebf1;
    border-bottom: 2px solid #3f3f3f;
    padding: 10px 5px;
}

td {
    padding: 8px 5px;
    border-bottom: 1px solid #3f3f3f;
}

/* 88x31 Buttons */
.buttons {
    margin-top: 20px;
    display: block;
}

.buttons a {
    text-decoration: none !important;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.buttons img {
    width: 88px;
    height: 31px;
    display: block;
}

nav a {
    margin-right: 15px;
    font-weight: bold;
    display: inline-block;
}

hr {
    height: 1px;
    border: 0;
    background-color: #3f3f3f;
    color: #3f3f3f;
}

/* Clearfix for the floated profile-frame */
.clearfix::after {
    content: "";
    clear: both;
    display: block;
}

/* Mobile & NetSurf Small Window Optimization */
@media screen and (max-width: 600px) {
    body {
        margin: 20px auto;
        font-size: 14px;
        padding: 0 12px;
    }

    .profile-frame {
        float: none;
        margin: 0 auto 20px auto;
        display: table;
    }

    .gallery {
        text-align: center;
        /* Center images only on mobile */
    }

    .gallery img {
        width: 40%;
        /* Approx 2 columns */
    }

    nav a {
        display: inline-block;
        margin-bottom: 10px;
    }
}