body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

/*@view-transition {
    navigation: auto;
}

::view-transition-group(page-content) {
    animation-duration: 500ms;
    animation-timing-function: ease-in;
}

::view-transition-old(page-content) {
    animation-name: slide-out;
}

::view-transition-new(page-content) {
    animation-name: slide-in;
}

@keyframes slide-out {
    to {
        translate: -100vw;
    }
}

@keyframes slide-in {
    from {
        translate: 100vw;
    }
}

main {
    view-transition-name: page-content;
}*/

.MainContentContainer {
    margin-left: 3em;
    margin-right: 3em;
}

header {
    /* position: sticky; */
    top: 0px;
    z-index: 99999;
    /* background-color: black; */
}

footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-content: space-around;
}

.post-date {
    font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
    font-size: 0.6em;
}

code {
    background-color: rgba(10, 10, 10, 0.75);
    color: rgba(200, 200, 200, 1);
    padding: 0.5em;
    padding-top: 0.1em;
    padding-bottom: 0.1em;
    padding-left: 0.5em;
    padding-right: 0.5em;
    border-radius: 5px;
}

pre code {
    color: white;
    background-color: transparent;
}

.postWrapper code {
    background-color: rgba(20, 20, 20, 1);
    border-color: rgba(10, 80, 30, 1);
    border-style: solid;
    border-width: 0.2px;
    font-weight: 100;
    font-family: Arial, Helvetica, sans-serif;
    padding: 0.5em;
    margin: 1em;
    line-height: 2em;
}

.postWrapper .code-block-wrapper pre code {
    border-width: 0em;
    border-style: none;
}

.mainMenu {
    position: relative;
    top: -30px;
    background-color: rgba(10, 80, 30, 1);
    border: 2px solid black;
    border-radius: 10px;
}

.mainMenu ul {
    display: flex;
    flex-wrap: wrap;
    margin-left: 0;
    padding-inline-start: 0;
    justify-content: space-evenly;
    list-style-type: none;
    /* border: 2px solid blue; */
}

.mainMenu ul li {
    background-color: rgba(5, 50, 20, 1);
    color: rgb(250, 250, 250);
    font-weight: 600;
    font-size: 1.3em;
    border: 1px solid black;
    padding: 0.5em 2em;
    border-radius: 20px;
    margin-top: 3px;
    margin-bottom: 3px;
    box-shadow: 2px 2px 5px black;
}

.mainMenu ul li:hover {
    background-color: black;
    color: rgb(200, 200, 200);
    border: 1px solid black;
    box-shadow: 0 0 0;
}

.mainMenu ul li a {
    color: rgb(200, 200, 200);
}

.mainMenu ul li a:hover {
    color: rgb(20, 255, 255);
}

.article-like-list {
    background-color: rgba(230, 255, 230, 1);
    color: black;
    margin: 1em;
    padding-right: 3px;
    padding-left: 5px;
    padding-bottom: 3px;
    padding-top: 0px;
    border-radius: 15px;
}

.article {
    background-color: rgba(230, 255, 230, 1);
    color: black;
    margin: 3em;
    padding: 0.4em 1em;
    border-radius: 15px;
}

.article pre {
    background-color: rgba(0, 90, 0, 1);
    padding: 0.5em;
    box-shadow: 5px 5px 5px rgba(0, 90, 0, 0.7);
    border-radius: 5px;
}

.learningNav-container-narrow {
    display: none;
}
.learningNav-container {
    position: relative;
    float: right;
    top: 0;
    left: 0;
}

@media (max-width: 650px) {
    .learningNav-container {
        display: none;
        flex-direction: column;
        align-items: center;
        /*justify-content: center;*/
        position: relative;
        float: right;
        top: 0;
        left: 0;
        /*height: 5px;*/
    }
    .learningNav-container-narrow {
        display: flex;
        flex-direction: column;
        align-items: center;
        /*justify-content: center;*/
        position: relative;
        float: right;
        top: 0;
        left: 0;
        /*height: 5px;*/
    }
    .article pre {
        background-color: rgba(0, 90, 0, 1);
        padding: 0;
        box-shadow: 5px 5px 5px rgba(0, 90, 0, 0.7);
        border-radius: 5px;
    }
    .article {
        background-color: rgba(230, 255, 230, 1);
        color: black;
        margin: 0;
        padding: 0.4em 1em;
        border-radius: 15px;
    }
}

.learningNav {
    top: 5px;
    right: 10px;
    background-color: rgba(230, 255, 230, 1);
    border-radius: 10px;
    padding-right: 0.5em;
    padding-bottom: 1.2em;
    border: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 5px 5px 5px rgba(0, 90, 0, 0.7);
}

.learningNav ul {
    list-style-type: none;
    padding-left: 0.5em;
}

.learningNav ul > li {
    display: flex;
}

.learningNav a {
    color: rgba(230, 255, 230, 1);
    background-color: rgba(10, 80, 30, 1);
    margin-top: 0.3em;
    padding: 3px 9px;
    border-radius: 5px;
    width: 100%;
    text-decoration: none;
    box-shadow: 3px 3px 3px black;
}

.learningNav h3 {
    color: rgba(10, 100, 30, 1);
    padding-left: 5em;
}

.learningNav a:hover {
    box-shadow: none;
    background-color: rgba(10, 100, 30, 1);
}

.header-jstoday {
    font:
        112.5%/1.45em georgia,
        serif;
    font-weight: 400;
    word-wrap: break-word;
    font-kerning: normal;
    font-feature-settings: "kern", "liga", "clig", "calt";
    font-family: "Arvo, sans-serif";
    color: black;
    box-sizing: inherit;
    background-color: rgb(0, 0, 0);
    text-align: center;
    text-shadow: rgb(255, 255, 255) 0px 0px 10px;
    font-size: 5vw;
    white-space: nowrap;
    width: 100%;
    height: 60%;

    h1 {
        font-size: 2em;
    }
}

.postWrapper {
    background-color: rgba(5, 5, 100, 0.25);
    margin: 2em 1em;
    padding: 5px 1em;
}

.post-breadcrumb-button {
    background-color: green;
    border-radius: 10px;
    margin-right: 2em;
}

.posts-breadcumbs-menu {
    display: flex;
}

.works-cited {
    font-size: 0.8em;
}

/* Style for h3 headers in posts to make them stand out */
.article h3 {
    background-color: rgba(10, 80, 30, 0.8);
    color: rgba(255, 255, 255, 1);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 20px 0 15px 0;
    /*border-left: 4px solid rgba(10, 100, 30, 1);*/
    /*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);*/
}

.article h3 a {
    color: rgba(255, 255, 255, 1);
    /*text-decoration: none;*/
}

.article h3 a:hover {
    color: rgba(20, 255, 255, 1);
    text-decoration: underline;
}

.postWrapper h3 {
    background-color: rgba(10, 80, 30, 0.8);
    color: rgba(255, 255, 255, 1);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 20px 0 15px 0;
    /*border-left: 4px solid rgba(10, 100, 30, 1);*/
    /*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);*/
}

.postWrapper h3 a {
    color: rgba(255, 255, 255, 1);
    /*text-decoration: none;*/
}

.postWrapper h3 a:hover {
    color: rgba(20, 255, 255, 1);
    text-decoration: underline;
}

/* Section Navigation Sidebar - Compact Version */
.content-wrapper {
    display: flex;
    gap: 1.5em;
    margin-top: 2em;
}

.section-nav {
    min-width: 200px;
    max-width: 220px;
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1em;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    flex-shrink: 0;
}

.section-nav h3 {
    margin-top: 0;
    margin-bottom: 0.8em;
    color: #4caf50;
    font-size: 1em;
    border-bottom: 2px solid rgba(76, 175, 80, 0.3);
    padding-bottom: 0.4em;
}

.tutorial-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-list li {
    margin-bottom: 0.3em;
}

.tutorial-list li a {
    display: flex;
    align-items: flex-start;
    gap: 0.4em;
    padding: 0.4em 0.5em;
    color: rgba(200, 200, 200, 0.9);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.85em;
    line-height: 1.3;
}

.tutorial-list li a:hover {
    background-color: rgba(76, 175, 80, 0.1);
    color: white;
}

.tutorial-list li.current a {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    font-weight: bold;
}

.tutorial-number {
    color: #4caf50;
    font-weight: bold;
    min-width: 1.5em;
    flex-shrink: 0;
}

.tutorial-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tutorial-duration {
    font-size: 0.75em;
    color: rgba(150, 150, 150, 0.8);
    white-space: nowrap;
    display: none;
}

.tutorial-list li.current .tutorial-duration,
.tutorial-list li a:hover .tutorial-duration {
    display: block;
}

.article {
    flex: 1;
    min-width: 0;
}

/* Mobile responsive */
@media (max-width: 968px) {
    .content-wrapper {
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

    .section-nav {
        position: static;
        max-width: 100%;
        min-width: 0;
        width: 100%;
        max-height: none;
        margin-bottom: 2em;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .tutorial-list {
        max-height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .tutorial-list li a {
        font-size: 0.9em;
        padding: 0.5em;
    }

    .tutorial-duration {
        display: block;
    }

    .article {
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow-x: hidden;
    }
}

/* Tablet - narrower sidebar */
@media (max-width: 1200px) and (min-width: 969px) {
    .section-nav {
        min-width: 180px;
        max-width: 200px;
    }

    .tutorial-list li a {
        font-size: 0.8em;
    }
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
}

.content-wrapper {
    box-sizing: border-box;
}

.section-nav,
.article,
.tutorial-list {
    box-sizing: border-box;
}

/* Previous/Next Navigation */
.prev-next-nav {
    margin-top: 4em;
    padding-top: 2em;
    border-top: 2px solid rgba(10, 80, 30, 0.5);
}

.prev-next-container {
    display: flex;
    justify-content: space-between;
    gap: 2em;
    align-items: stretch;
}

.prev-link,
.next-link {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.5em;
    background-color: rgba(10, 80, 30, 1);
    border: 1px solid rgba(10, 80, 30, 1);
    border-radius: 10px;
    text-decoration: none;
    color: rgb(200, 200, 200);
    transition: all 0.3s ease;
    flex: 1;
    max-width: 45%;
}

.prev-link:hover,
.next-link:hover {
    background-color: rgba(10, 80, 30, 1);
    border-color: rgba(20, 255, 255, 0.5);
    color: rgb(20, 255, 255);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.nav-arrow {
    font-size: 1.5em;
    font-weight: bold;
    color: rgba(10, 80, 30, 1);
}

.prev-link:hover .nav-arrow,
.next-link:hover .nav-arrow {
    color: rgb(20, 255, 255);
}

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

.nav-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(150, 150, 150, 1);
    font-weight: 600;
}

.nav-title {
    font-size: 1em;
    font-weight: 500;
    color: rgb(200, 200, 200);
}

.prev-link:hover .nav-title,
.next-link:hover .nav-title {
    color: rgb(20, 255, 255);
}

.next-link {
    text-align: right;
}

.nav-spacer {
    flex: 1;
    max-width: 45%;
}

/* Mobile responsiveness for prev/next nav */
@media (max-width: 768px) {
    .prev-next-container {
        flex-direction: column;
        gap: 1em;
    }

    .prev-link,
    .next-link {
        max-width: 100%;
    }

    .next-link {
        text-align: left;
        flex-direction: row-reverse;
    }
}

/* Code block copy button */
.code-block-wrapper {
    position: relative;
    margin: 1em 0;
}

.code-block-wrapper pre {
    margin: 0;
}

.code-block-wrapper .line {
    line-height: 2em;
}

.code-block-wrapper pre {
    border: 2px solid var(--bg-secondary);
    font-family: "Courier New", Courier, monospace;
}

.code-block-wrapper pre .line {
    border: none;
}

.copy-code-button {
    position: absolute;
    top: 0.5em;
    right: 0.5em;
    padding: 0.4em 0.8em;
    font-size: 0.75em;
    font-weight: 600;
    color: rgba(200, 200, 200, 1);
    background-color: rgba(10, 80, 30, 0.8);
    border: 1px solid rgba(10, 80, 30, 1);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-code-button:hover {
    background-color: rgba(10, 80, 30, 1);
    color: rgb(20, 255, 255);
    border-color: rgba(20, 255, 255, 0.5);
}

.copy-code-button.copied {
    background-color: rgba(10, 100, 40, 1);
    color: rgb(100, 255, 100);
    border-color: rgba(100, 255, 100, 0.5);
}

.copy-code-button:active {
    transform: scale(0.95);
}

/* Theme Toggle - CSS Variables for Dark/Light themes */
:root {
    --bg-primary: #000000;
    --bg-secondary: rgba(10, 80, 30, 1);
    --bg-secondary-light: rgba(10, 80, 30, 0.3);
    --bg-code: rgba(10, 10, 10, 0.75);
    --bg-code-inline: rgba(20, 20, 20, 1);
    --text-primary: rgba(255, 255, 255, 1);
    --text-secondary: rgba(200, 200, 200, 1);
    --table-bg-primary: rgba(0, 0, 0, 1);
    --table-bg-secondary: rgba(185, 200, 185, 1);
    --text-muted: rgba(150, 150, 150, 1);
    --accent-primary: rgba(10, 80, 30, 1);
    --accent-hover: rgb(20, 255, 255);
    --border-color: rgba(10, 80, 30, 1);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: rgba(200, 230, 200, 1);
    --bg-secondary-light: rgba(200, 230, 200, 0.3);
    --bg-code: rgba(240, 240, 240, 1);
    --bg-code-inline: rgba(230, 230, 230, 1);
    --text-primary: rgba(0, 0, 0, 1);
    --table-bg-primary: rgba(0, 0, 0, 1);
    --table-bg-secondary: rgba(185, 200, 185, 1);
    --text-secondary: rgba(40, 40, 40, 1);
    --text-muted: rgba(100, 100, 100, 1);
    --accent-primary: rgba(10, 120, 50, 1);
    --accent-hover: rgb(10, 100, 200);
    --border-color: rgba(10, 120, 50, 1);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Theme toggle button */
/* currently hiddenhidden  */
.theme-toggle {
    position: fixed;
    bottom: 2em;
    right: 2em;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: flex;
    display: none;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 1em;
        right: 1em;
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
}

/* Progress tracking */
.progress-tracking {
    margin: 1.5em 0;
    padding: 1em;
    background-color: var(--bg-secondary-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.progress-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.progress-label {
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5em;
    transition: color 0.3s ease;
}

.progress-label:hover {
    color: var(--accent-hover);
}

.progress-label.completed {
    animation: completePulse 0.6s ease;
}

@keyframes completePulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Progress indicators in navigation */
.tutorial-list a.completed {
    background-color: var(--bg-secondary-light);
    border-left: 3px solid var(--accent-primary);
}

.nav-checkmark {
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 0.3em;
}

[data-theme="light"] .nav-checkmark {
    color: var(--accent-primary);
}

/* Table Styles - Matching the green theme */
table {
    width: 90%;
    margin-left: 2em !important;
    border-collapse: collapse;
    margin: 1.5em 0;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Table headers */
th {
    background-color: var(--accent-primary);
    color: var(--text-primary);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* Table cells */
td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(10, 80, 30, 0.2);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.4;
}

/* Alternating row colors */
tbody tr:nth-child(even) {
    background-color: var(--bg-secondary-light);
}

tbody tr:nth-child(odd) {
    background-color: var(--table-bg-secondary);
}

/* Row hover effects */
tbody tr:hover {
    background-color: rgba(10, 80, 30, 0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Code in tables */
table code {
    background-color: var(--bg-code-inline);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--border-color);
}

/* Bold text in tables */
table strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* Links in tables */
table a {
    color: var(--accent-hover);
    text-decoration: none;
    font-weight: 500;
}

table a:hover {
    text-decoration: underline;
    color: var(--accent-primary);
}

/* Special styling for first column (often contains labels) */
td:first-child {
    font-weight: 600;
    color: var(--accent-primary);
    background-color: rgba(10, 80, 30, 0.05);
}

/* Table wrapper for responsive design */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* Responsive table design */
@media (max-width: 768px) {
    table {
        font-size: 0.85em;
        margin: 1em 0;
    }

    th,
    td {
        padding: 8px 10px;
    }

    th {
        font-size: 0.85em;
    }

    /* Stack table content vertically on very small screens */
    @media (max-width: 480px) {
        table,
        thead,
        tbody,
        th,
        td,
        tr {
            display: block;
        }

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

        tr {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            margin-bottom: 10px;
            padding: 10px;
            background-color: var(--bg-secondary-light);
        }

        td {
            border: none;
            border-bottom: 1px solid var(--border-color);
            position: relative;
            padding-left: 50% !important;
            padding-top: 10px;
            padding-bottom: 10px;
        }

        td:before {
            content: attr(data-label) ": ";
            position: absolute;
            left: 6px;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: 600;
            color: var(--accent-primary);
        }

        td:last-child {
            border-bottom: none;
        }
    }
}

/* Special table variants */
.compact-table {
    font-size: 0.9em;
}

.compact-table th,
.compact-table td {
    padding: 6px 10px;
}

/* Summary/comparison tables */
.summary-table {
    border: 3px solid var(--accent-primary);
    background: linear-gradient(
        135deg,
        var(--bg-primary) 0%,
        var(--bg-secondary-light) 100%
    );
}

.summary-table th {
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        rgba(10, 100, 30, 1) 100%
    );
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Tables in article and postWrapper contexts */
.article table,
.postWrapper table {
    background-color: rgba(230, 255, 230, 0.95);
    color: rgba(0, 0, 0, 0.9);
}

.article th,
.postWrapper th {
    background-color: rgba(10, 80, 30, 1);
    color: rgba(255, 255, 255, 1);
}

.article td,
.postWrapper td {
    color: rgba(0, 0, 0, 0.85);
}

.article tbody tr:nth-child(even),
.postWrapper tbody tr:nth-child(even) {
    background-color: rgba(200, 230, 200, 0.3);
}

.article tbody tr:hover,
.postWrapper tbody tr:hover {
    background-color: rgba(10, 80, 30, 0.15);
}

.article td:first-child,
.postWrapper td:first-child {
    background-color: rgba(10, 80, 30, 0.1);
    color: rgba(10, 80, 30, 1);
}

/* Light theme adjustments for tables */
[data-theme="light"] table {
    background-color: #ffffff;
    border-color: var(--accent-primary);
}

[data-theme="light"] th {
    background-color: var(--accent-primary);
    color: #ffffff;
}

[data-theme="light"] td {
    color: var(--text-primary);
}

[data-theme="light"] tbody tr:nth-child(even) {
    background-color: rgba(200, 230, 200, 0.2);
}

[data-theme="light"] tbody tr:hover {
    background-color: rgba(10, 120, 50, 0.1);
}

[data-theme="light"] td:first-child {
    background-color: rgba(10, 120, 50, 0.05);
    color: var(--accent-primary);
}
