/* MACINTOSH SKIN 
Made by Victoria Drake
*/

@media (prefers-color-scheme: light) {
     :root {
        --color-bg: linear-gradient(0deg, #f470de, #9de6f9);
        --item-bg: #f5f5f5;
        --accent: #f21cf1;
    }
}

@media (prefers-color-scheme: dark) {
     :root {
        --color-bg: #24292e;
        --item-bg: #373f47;
        --accent: teal;
    }
}

:root {
    --shadow-shape: 5px 5px;
    --color-shadow: rgba(0, 0, 0, .2);
    --border-radius: 0;
    --mac-border: 2px solid black;
}

@font-face {
    font-family: Macintosh;
    src: url(/fonts/mac.ttf);
}

@font-face {
    font-family: JetBrains Mono;
    src: url(/fonts/JetBrainsMono-Regular.ttf);
}


:root {
    --background: #ffffff;
    --sidebar: #f5f5f5;
    --text: #222222;
    --muted: #777777;
    --border: #dddddd;
    --accent: #3157d5;

    --sidebar-width: 280px;
    --content-width: 850px;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

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

    font-family: Macintosh, -apple-system, BlinkMacSystemFont, monospace !important;
    font-size: 25px !important;
    background: var(--color-bg);

    line-height: 1.7;
}

.site-wrapper {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

.site-layout {
    display: grid;

    grid-template-columns:
        var(--sidebar-width)
        minmax(0, var(--content-width));

    flex: 1 1 auto;

    min-height: 0;

    max-width: 1250px;
    width: 100%;

    margin: 0 auto;
}


/* =========================
   Sidebar
   ========================= */

.sidebar {
    background: var(--sidebar);

    border-right: 1px solid var(--border);
}


.sidebar-inner {
    position: sticky;

    top: 0;

    height: 100%;

    padding: 40px 30px;

    display: flex;

    flex-direction: column;

    overflow-y: auto;
}

.site-logo {
    margin-bottom: 8px;
}


.site-logo a {
    color: var(--text);

    text-decoration: none;

    font-size: 2.0rem;

    font-weight: 700;
}


.site-description {
    margin-top: 0;

    margin-bottom: 35px;

    color: var(--muted);

    font-size: 18px;
}

.main-navigation {
    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-bottom: 35px;
}


.main-navigation a {
    display: block;

    padding: 8px 10px;

    color: var(--text);

    text-decoration: none;

    border-radius: 6px;

    font-size: 20px;
}


.main-navigation a:hover {
    background: #e8e8e8;

    color: var(--accent);
}

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


.sidebar-section h3 {
    margin-top: 0;

    margin-bottom: 10px;

    font-size: 0.8rem;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: var(--muted);
}

.category-list,
.sidebar-links {
    list-style: none;

    margin: 0;

    padding: 0;
}


.category-list li {
    margin-bottom: 3px;
}


.category-list a {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 5px 8px;

    color: var(--text);

    text-decoration: none;

    border-radius: 5px;

    font-size: 20px;
}


.category-list a:hover {
    background: #e8e8e8;

    color: var(--accent);
}


.category-count {
    color: var(--muted);

    font-size: 0.8rem;
}

.sidebar-links a {
    color: var(--text);

    text-decoration: none;

    font-size: 0.92rem;
}


.sidebar-links a:hover {
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;

    padding-top: 30px;

    color: var(--muted);

    font-size: 0.8rem;
}

.main-content {
    min-width: 0;
    min-height: 0;

    padding: 60px 70px;

    overflow: hidden;
}

.content-feed {
    min-width: 0;
    min-height: 0;

    height: 100%;
}

.page-header {
    margin-bottom: 50px;

    max-width: 750px;
}


.page-header h1 {
    margin-top: 0;

    margin-bottom: 15px;

    font-size: 2.6rem;

    line-height: 1.2;
}


.page-header p {
    color: var(--muted);

    font-size: 20px;
}

.latest-posts {
    max-width: 750px;
}


.section-header {
    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 10px;
}


.section-header h2 {
    font-size: 22px;
}


.section-header a {
    color: var(--accent);

    text-decoration: none;

    font-size: 18px;
}

.post-card {
    margin: 32px 0;

    background: #f7f7f7;

    border: 2px solid #333;

    box-shadow:
        4px 4px 0 #888;

}

.post-card-titlebar {
    position: relative;

    display: flex;

    align-items: center;

    min-height: 30px;

    padding: 4px 8px;

    border-bottom: 2px solid #333;

    background:
        repeating-linear-gradient(
            to bottom,
            #ffffff 0px,
            #ffffff 2px,
            #cfcfcf 2px,
            #cfcfcf 4px
        );

    color: #111;

    font-size: 22px;

    font-weight: bold;
}

.window-controls {
    display: flex;

    gap: 4px;

    margin-right: 9px;
}


.window-controls span {
    display: block;

    width: 10px;
    height: 10px;

    background: #d7d7d7;

    border: 1px solid #222;

    box-shadow:
        inset 1px 1px 0 #fff,
        inset -1px -1px 0 #777;
}


.post-card-title {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}

.post-card-body {
    padding: 20px 22px 18px;

    background: #fafafa;
}


.post-card-meta {
    margin-bottom: 12px;

    color: #555;

    font-size: 18px;

    line-height: 1.4;
}


.post-card-meta a {
    color: #7a3db8;

    text-decoration: none;

    font-weight: bold;
}


.post-card-meta a:hover {
    text-decoration: underline;
}


.meta-divider {
    margin: 0 5px;

    color: #777;
}

.post-card-content {
    margin: 0;

    font-size: 20px;

    line-height: 1.65;
}


.post-card-content p {
    margin: 0 0 16px;
}

.post-card-link {
    display: inline-block;

    padding: 3px 8px;

    border: 1px solid #555;

    background: #e5e5e5;

    color: #111;

    text-decoration: none;

    font-size: 15px;

    box-shadow:
        inset 1px 1px 0 #fff,
        inset -1px -1px 0 #888;
}


.post-card-link:hover {
    background: #d5d5d5;
}


.post-card-link:active {
    box-shadow:
        inset -1px -1px 0 #fff,
        inset 1px 1px 0 #888;
}

.post-page {
    height: 100vh;
    overflow: hidden;
}

.post-page .site-wrapper {
    height: 100vh;
    min-height: 0;

    overflow: hidden;
}

.post-page .site-layout {
    min-height: 0;
    overflow: hidden;
}

.post-page .main-content {
    min-height: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.post-page .content-feed {
    min-height: 0;
    height: 100%;

    display: flex;
    flex-direction: column;
}

.post-page .single-post {
    min-height: 0;
    height: 100%;

    display: flex;
    flex-direction: column;
}

.post-page .article-window {
    min-height: 0;

    flex: 1 1 auto;

    display: flex;
    flex-direction: column;
}

.post-page .article-paper {
    min-height: 0;

    flex: 1 1 auto;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 15px;
}

.article-window {
    border: 2px solid #333;

    background: #d5d5d5;

    box-shadow:
        5px 5px 0 #888;
}

.article-titlebar {
    display: flex;

    align-items: center;

    min-height: 32px;

    padding: 4px 9px;

    border-bottom: 2px solid #333;

    background:
        repeating-linear-gradient(
            to bottom,
            #ffffff 0px,
            #ffffff 2px,
            #cfcfcf 2px,
            #cfcfcf 4px
        );

    font-size: 22px;

    font-weight: bold;
}


.article-window-title {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.article-titlebar .window-controls {
    display: flex;

    gap: 4px;

    margin-right: 9px;
}


.article-titlebar .window-controls span {
    display: block;

    width: 10px;
    height: 10px;

    background: #d7d7d7;

    border: 1px solid #222;

    box-shadow:
        inset 1px 1px 0 #fff,
        inset -1px -1px 0 #777;
}

.article-paper {
    padding: 45px 55px;

    background: #ffffff;
}

.article-meta {
    margin-bottom: 14px;

    color: #666;

 font-family: JetBrains Mono;

    font-size: 12px;
}


.article-meta a {
    color: #6b3fa0;

    text-decoration: none;

    font-weight: bold;
}


.article-meta a:hover {
    text-decoration: underline;
}

.article-paper h1 {
    margin-top: 0;

    margin-bottom: 20px;

    color: #111;

    font-size: 2.4rem;

    line-height: 1.2;
}

.article-lead {
    margin-bottom: 35px;

    padding-bottom: 25px;

    border-bottom: 1px solid #ccc;

    color: #666;

    font-size: 1.1rem;

    line-height: 1.6;
}

.article-content {
    color: #222;

   font-family: JetBrains Mono;

    font-size: 1.08rem;

    line-height: 1.8;
}


.article-content h2 {
    margin-top: 45px;

    margin-bottom: 15px;

    color: #111;

   font-family: JetBrains Mono;

    font-size: 1.5rem;

    line-height: 1.3;
}


.article-content h3 {
    margin-top: 35px;

   font-family: JetBrains Mono;

    font-size: 1.2rem;
}


.article-content p {
    margin: 0 0 1.3em;
}


.article-content a {
    color: #3157d5;

    text-decoration: underline;
}


.article-content a:hover {
    color: #1d3795;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;

    padding-left: 30px;
}

.article-content img {
    display: block;

    max-width: 100%;

    height: auto;

    margin: 30px auto;

    border: 1px solid #aaa;
}

.article-content blockquote {
    margin: 30px 0;

    padding: 15px 20px;

    border-left: 4px solid #777;

    background: #f3f3f3;

    color: #555;
}


/* Code */

.article-content pre {
    overflow-x: auto;

    margin: 25px 0;

    padding: 18px;

    border: 1px solid #aaa;

    background: #eeeeee;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 0.9rem;

    line-height: 1.5;
}


.article-content code {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}


.article-content :not(pre) > code {
    padding: 2px 5px;

    background: #eeeeee;

    border: 1px solid #ddd;
}

.article-footer {
    margin-top: 50px;

    padding-top: 20px;

    border-top: 1px solid #ccc;

    color: #666;

    font-family: JetBrains Mono;

    font-size: 12px;
}


.article-footer a {
    margin-left: 8px;

    color: #6b3fa0;

    text-decoration: none;

    font-weight: bold;
}

.archive {
    max-width: 800px;
}

.archive-year {
    margin: 0 0 40px;
}

.archive-year h2 {
    margin: 0 0 20px;
    padding: 6px 10px;
    border: 2px solid #333;
    background:
        repeating-linear-gradient(
            to bottom,
            #ffffff 0px,
            #ffffff 2px,
            #cfcfcf 2px,
            #cfcfcf 4px
        );
    font-size: 22px;
}

.archive-month {
    margin: 0 0 25px 20px;
}

.archive-month h3 {
    margin: 0 0 8px;
    color: #555;
    font-family: JetBrains Mono, monospace;
    font-size: 14px;
}

.archive-posts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.archive-posts li {
    display: flex;
    gap: 15px;
    padding: 7px 0;
    border-bottom: 1px dotted #aaa;
    font-family: JetBrains Mono, monospace;
    font-size: 13px;
}

.archive-posts time {
    min-width: 50px;
    color: #777;
}

.archive-posts a {
    color: #3157d5;
    text-decoration: none;
}

.archive-posts a:hover {
    text-decoration: underline;
}

.category-list,
.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list > li {
    margin-bottom: 4px;
}

.category-toggle,
.category-link {
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 6px 0;
    text-decoration: none;
}

.category-toggle {
    border: 0;
    background: none;
    font: inherit;
    font-size: 20px;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.category-name {
    flex: 1;
}

.category-count {
    font-size: 0.8em;
    opacity: 0.6;
    margin-left: 8px;
}

.category-arrow {
    display: inline-block;
    width: 20px;
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.subcategory-list {
    display: none;
    margin-left: 18px;
}

.category-open > .subcategory-list {
    display: block;
}

.category-open > .category-toggle .category-arrow {
    transform: rotate(90deg);
}

.category-current {
    font-weight: 700;
}

.empty-section {
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    opacity: 0.9;
    border: 1px dashed currentColor;
    background-color: white;
    box-shadow: 5px 5px 0 #888;
}

.latest-posts {
    max-width: 750px;
}

.post-feed {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 15px;
}

/* MOBILE */

@media (max-width: 800px) {

    /* =========================
       Basic layout
       ========================= */

    html {
        scroll-behavior: smooth;
    }

    body {
        font-size: 18px !important;
        line-height: 1.55;
        overflow-x: hidden;
    }

    .site-wrapper {
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    .site-layout {
        display: block;
        width: 100%;
        max-width: none;
    }


    /* =========================
       Sidebar / Navigation
       ========================= */

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-inner {
        position: static;
        height: auto;
        max-height: none;
        padding: 15px 18px;
        overflow: visible;
    }

    .site-title {
        margin-bottom: 12px;
    }

    .site-title a {
        font-size: 24px;
    }


    /* =========================
       Main content
       ========================= */

    .main-content {
        width: 100%;
        min-width: 0;
        min-height: auto;
        padding: 25px 15px 40px;
        overflow: visible;
    }

    .content-feed {
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .post-page {
        height: auto;
        overflow: visible;
    }

    .post-page .site-wrapper {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .post-page .site-layout {
        min-height: auto;
        overflow: visible;
    }

    .post-page .main-content {
        display: block;
        min-height: auto;
        overflow: visible;
    }

    .post-page .content-feed {
        height: auto;
        min-height: auto;
        display: block;
    }

    .post-page .single-post {
        width: 100%;
        height: auto;
        min-height: auto;
        display: block;
    }

    .post-page .article-window {
        width: 100%;
        height: auto;
        min-height: auto;
        display: block;

        border-width: 2px;
        box-shadow: 3px 3px 0 #888;
    }

    .post-page .article-paper {
        height: auto;
        min-height: auto;

        overflow: visible;

        padding: 25px 20px;
    }


    /* =========================
       Article titlebar
       ========================= */

    .article-titlebar {
        min-height: 30px;
        padding: 4px 7px;
        font-size: 17px;
    }

    .article-window-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    /* =========================
       Article
       ========================= */

    .article-paper h1 {
        font-size: 28px;
        line-height: 1.2;
        margin-top: 18px;
        margin-bottom: 15px;
    }

    .article-paper h2 {
        font-size: 23px;
        line-height: 1.25;
    }

    .article-paper h3 {
        font-size: 20px;
        line-height: 1.3;
    }

    .article-paper p {
        margin: 0 0 18px;
    }

    .article-lead {
        font-size: 19px;
    }


    /* =========================
       Images
       ========================= */

    .article-content img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 20px auto;
    }


    /* =========================
       Code
       ========================= */

    .article-content pre {
        max-width: 100%;
        overflow-x: auto;
        padding: 12px;
        font-size: 14px;
        line-height: 1.45;
    }

    .article-content code {
        font-size: 0.9em;
    }


    /* =========================
       Tables
       ========================= */

    .article-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }


    /* =========================
       Homepage
       ========================= */

    .latest-posts {
        width: 100%;
        max-width: none;
    }

    .post-feed {
        max-height: 500px;
        padding-right: 8px;
    }


    /* =========================
       Footer
       ========================= */

    .site-footer {
        height: 36px;
        padding: 0 10px;
    }

    .footer-nav {
        gap: 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {

    body {
        font-size: 17px !important;
    }

    .main-content {
        padding: 18px 10px 30px;
    }

    .article-paper {
        padding: 20px 15px;
    }

    .article-paper h1 {
        font-size: 25px;
    }

    .article-titlebar {
        font-size: 15px;
    }

    .article-content pre {
        font-size: 13px;
    }

    .footer-nav {
        font-size: 12px;
        gap: 6px;
    }
}

/* =========================================
   Mobile Menu turned off on pc
   ========================================= */

.mobile-menu-bar {
    display: none;
}

.mobile-navigation {
    display: block;
}


/* =========================================
   Mobile
   ========================================= */

@media (max-width: 800px) {

    .sidebar-inner {
        padding: 12px 15px;
        height: auto;
    }

    /* title bar */

    .mobile-menu-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 46px;
    }

    .mobile-menu-bar .site-logo {
        margin: 0;
    }

    .mobile-menu-bar .site-logo a {
        font-size: 21px;
        font-weight: bold;
    }


    /* Hamburger */

    .mobile-menu-toggle {
        appearance: none;

        width: 40px;
        height: 34px;

        padding: 0;

        border: 2px solid #333;
        background: #d5d5d5;
        color: #222;

        font-family: inherit;
        font-size: 20px;
        line-height: 1;

        cursor: pointer;

        box-shadow: 2px 2px 0 #888;
    }

    .mobile-menu-toggle:active {
        transform: translate(2px, 2px);
        box-shadow: none;
    }


    /* menu closed */

    .mobile-navigation {
        display: none;
        padding-top: 15px;
    }


    /* menu opened */

    .mobile-navigation.is-open {
        display: block;
    }


    /* description */

    .mobile-navigation .site-description {
        margin: 0 0 15px;
        font-size: 15px;
        line-height: 1.4;
    }


    /* main nav */

    .mobile-navigation .main-navigation {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 20px;
    }

    .mobile-navigation .main-navigation a {
        display: block;
        padding: 7px 0;
    }


    /* Sections */

    .mobile-navigation .sidebar-section {
        margin-top: 10px;
    }


    /* Sidebar Footer */

    .mobile-navigation .sidebar-footer {
        margin-top: 25px;
        padding-top: 15px;
        border-top: 1px solid var(--border);
    }

}
