/* Colors */
:root {
    --primary-text: #F3F0EC;
    --secondary-text: #CACACA;
    --primary: #C08EFF;
    --secondary: #C04EA8;
    --accent: #F6B1E8;
    --primary-background: #0C0C0E;
    --secondary-background: #20201E;
    --shadow: #30303E;
}

/* General */
* {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto Mono', monospace;

    background: var(--primary-background);
    color: var(--primary-text);
}

button {
    display: block;
    font-size: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    overflow: hidden;
    outline: none;
}

/* Navigation bar */
.top-navigationbar {
    background-color: var(--primary);
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    top: 0px;
    width: 100%;
    z-index: 10;
}

.top-navigationbar .hamburger {
    display: none;
}

.top-navigationbar .links {
    margin-right: 30px;

    display: flex;
    gap: 40px;
}

.top-navigationbar .links a {
    padding: 19px 0px;

    color: var(--primary-background);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.top-navigationbar .links a:hover {
    color: var(--secondary-text);
}

.top-navigationbar .links a.active {
    color: var(--primary-text);
}

.top-navigationbar .active {
    color: var(--primary-text);
}

.top-navigationbar .logo {
    margin: 15px 30px;
    margin-right: auto;

    text-decoration: none;
    color: var(--primary-background);
    font-size: 25px;
    font-weight: 600;
}

.side-navigationmenu {
    display: none;
}

.overlay {
    display: none;
}

/* Main content */
.main {
    display: block;
    margin-top: 128px;
}

/* Coming soon */
.coming-soon {
    margin-top: 64px;
    text-align: center;
}

/* Error page */
.error {
    margin-top: 64px;
    text-align: center;
}

.error-text {
    margin-top: 5px;
    font-weight: 500;
    font-size: 22px;
}

/* Blog */
.post-links {
    margin: 64px auto;
    width: max(480px, 45%);
}

.post-link {
    cursor: pointer;
}

.tag {
    display: inline-block;
    margin-top: 8px;

    font-size: 14px;
    font-weight: 550;

    padding: 3px 15px;
    border-radius: 7px;

    color: var(--primary-background);
    background-color: var(--secondary);
}

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

.title {
    display: inline-block;
    margin-top: 12px;
    margin-bottom: 4px;

    font-size: 26px;
    font-weight: 600;

    color: var(--primary-text);
}

.subtitle {
    display: inline-block;
    margin-bottom: 10px;

    font-size: 20px;
    font-weight: 500;

    color: var(--secondary-text);
}

.description {
    font-size: 18px;
    font-weight: 360;

    color: var(--secondary-text);
}

.post-link-padding {
    display: inline-block;
    margin-bottom: 42px;
}

/* Blog post */
.post {
    margin: 64px auto;
    width: max(480px, 70%);
    max-width: 70%;
}

.divider {
    margin-top: 14px;
    margin-bottom: 24px;

    border-radius: 1px;

    color: var(--primary);
}

.content {
    display: block;
    max-width: 100%;

    font-size: 18px;
    text-align: left;

    color: var(--primary-text);
}

/* Blog post content objects */
.content * {
    display: inline-block;
    overflow-wrap: break-word;
    word-break: break-word;
}

.content br {
    display: block;
    margin-top: 0em;
    margin-bottom: 0.8em;
}

.content h1 {
    display: block;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.content h2 {
    display: block;
    margin-top: 1.3em;
    margin-bottom: 0.5em;
}

.content h3 {
    display: block;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.content i {
    display: inline;
    color: var(--accent);
}

.content b {
    display: inline;
    color: var(--primary);
}

.content ul {
    display: block;
    list-style-position: inside;
    list-style-type: disc;
}

.content ul li {
    display: list-item;
    margin: 0.5em 1em 0.5em 2em;
    text-indent: -1em;
}

.content ol li {
    display: block;
}

.content a {
    display: inline;
}

.content a:link,
.content a:visited {
    color: var(--accent);
}

.content a:hover,
.content a:active {
    color: var(--secondary);
}

.content .section {
    display: block;
    margin: 20px auto;
    
    background-color: var(--secondary-background);
    border-radius: 10px;
    
    overflow-wrap: normal;
    word-wrap: normal;

    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
}

.content .section-text {
    margin: 1em;
    opacity: 0.8;
}

.content .section-text br {
    margin: 0;
    line-height: 0.25em;
}

.content .files {
    display: block;
    margin-top: 20px;
}

.content .files a {
    text-decoration: none;
}

.content .files br {
    margin: 0;
    line-height: 0;
}

.content .file {
    display: inline-block;
    padding: 15px 25px 15px 15px;
    margin-right: 20px;
    margin-bottom: 20px;

    background-color: var(--secondary);
    border-radius: 10px;
}

.content .file .file-title {
    font-size: 20px;
    color: var(--primary-text);
}

.content .file .file-name {
    font-size: 16px;
    color: var(--primary-text);
    opacity: 0.6;
}

.content img {
    display: block;
    margin: 30px auto 40px auto;
    z-index: 5;

    object-fit: contain;
    max-width: 75%;
    height: auto;

    border-radius: 20px;
    border: 2px solid var(--accent);
    filter: drop-shadow(5px 5px 10px var(--shadow));
}

.content .table-div {
    display: block;
    margin: 4% auto;
    width: fit-content;
    min-width: 75%;
    max-width: 100%;
    overflow-x: auto;
}

.content .table-div * {
    overflow-wrap: normal !important;
    word-wrap: normal !important;
    word-break: normal !important;
}

.content table {
    display: table;
    border-collapse: collapse;
    width: 100%;
}

.content thead{
    display: table-header-group;
}

.content tbody {
    display: table-row-group;
}

.content tfoot {
    display: table-footer-group;
}

.content tr {
    display: table-row;
}

.content tr:nth-child(even) {
    background-color: var(--secondary-background);
}

.content tr:hover {
    color: var(--primary-background);
    background-color: var(--primary);
}

.content td, .content th {
    display: table-cell;
    text-align: left;

    padding: 0.5em 1em;
}

.content .code {
    display: block;
    margin: 20px auto;
    padding: 1em 1em 1em 0.5em;
    background-color: rgb(26, 28, 31);

    font-size: 14px;
    letter-spacing: normal;

    width: calc(100% - 2em);
    max-width: 100% !important;
    white-space: preserve;
    text-wrap: nowrap;
    overflow-x: auto;
}

.content .code br{
    margin: 0;
    line-height: 0;
}

.content .code span {
    display: inline-block;
    padding: 0;
    line-height: 1em;
    margin: 0.3em 0;
}

.content .code .comment {
    display: inline;
    color: gray;
    font-style: italic; 
}
.content .code .keyword { 
    color: rgb(148, 103, 255); 
    font-weight: bold; 
}
.content .code .type {
    color: rgb(106, 111, 190);
}
.content .code .variable {
    color: rgb(255, 241, 255);
}
.content .code .operator {
    color: rgb(168, 202, 221);
}
.content .code .string {
    color: rgb(240, 211, 158);
}
.content .code .number {
    color: rgb(238, 148, 218);
}
.content .code .bracket {
    color: rgb(255, 255, 255);
}
.content .code .line-number {
    color: rgb(114, 114, 114);
    font-weight: bold;
    margin-right: 1em;
    margin-left: 0.5em;
}

/* Mobile */
@media screen and (max-width: 1024px) {
    /* Navigation bar */
    .top-navigationbar .links {
        display: none;
    }

    .top-navigationbar .hamburger {
        display: inline-block;
        padding: 10px 7px 10px 10px;
    }

    .top-navigationbar .logo {
        margin: 12px auto 12px 4%;

        font-size: 20px;
        font-weight: 700;
    }

    /* Mobile navigation menu */
    .side-navigationmenu {
        position: fixed;
        right: 0;
        top: 0;

        width: 205px;
        height: 100%;
        z-index: 100;

        background-color: var(--primary);
    }

    .side-navigationmenu .X {
        padding: 20px;

        display: block;
        align-self: baseline;
        justify-self: right;
    }

    .side-navigationmenu .links {
        display: inline-block;
        padding-bottom: 35px;

        align-self: flex-end;
        justify-self: right;

        text-align: right;
    }

    .side-navigationmenu .links a {
        display: inline-block;
        padding: 20px;

        color: var(--primary-background);
        text-decoration: none;
        font-size: 23px;
        font-weight: 500;
    }

    .side-navigationmenu .links a:hover {
        color: var(--secondary-text);
    }

    .side-navigationmenu .links a.active {
        color: var(--primary-text);
    }

    .side-navigationmenu .links .active {
        color: var(--primary-text);
    }

    .overlay {
        position: fixed;
        left: 0;
        top: 0;

        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);

        z-index: 50;
    }

    /* Main content */
    .main {
        margin-top: 82px;
    }

    /* Blog and Blog post */
    .post-links,
    .post {
        margin: 48px auto;
        width: 85%;
        max-width: 85%;
    }

    /* Blog post content objects */
    .content img {
        max-width: 100%;
    }
   
    .content .table-div {
        width: 100%;
    }

    .content .table-div table,
    .content .table-div thead,
    .content .table-div tbody,
    .content .table-div tfoot,
    .content .table-div th,
    .content .table-div td,
    .content .table-div tr { 
		display: block; 
	}

    .content thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .content tr {
        padding-top: 10px;
        padding-bottom: 10px;
        margin-bottom: 15px;
        overflow-x: auto;
    }

    .content td {
        border: none;
        position: relative;
        padding-left: 50%;
    }

    .content td:before {
        position: absolute;
        left: 1em;

        content: attr(data-label);
        font-weight: bold;
        color: var(--secondary-text);
    }

    .content tr:hover td:before {
        color: var(--primary-background);
        background-color: var(--primary);
    }

    /* Coming soon and Error page */
    .coming-soon,
    .error {
        margin-top: 128px;
        margin-right: auto;
        margin-left: auto;
        width: 85%;
    }
}
