:root {
    --bg-color: #D1D8BE; /* Light grayish-green */
    --text-color: #819A91; /* Dark sage green */
    --accent-color: #819A91; /* Dark sage green */
    --container-bg: #EEEFE0; /* Lightest off-white */
    --border-color: #A7C1A8; /* Soft green */
    --nav-bg: #EEEFE0;; /* Soft green */
}

/* General Styles */
body {
    margin: 0;
    font-family: 'Lora', serif; /* Classic serif font for body text */
    background-color: #ffffff; /* Fallback color */
    background-image: url("images/contour.png");
    background-size: cover; /* Scales the image to cover the entire area */
    background-repeat: no-repeat; /* Prevents the image from tiling */
    background-position: center; /* Centers the image */
    background-attachment: fixed; /* Keeps the background stationary on scroll */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    box-sizing: border-box;
}

/* Layout container */
.site-layout {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0,0,0,0.1);
}

/* Shared styles for headings */
h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Mono', monospace; 
    font-weight: 600;
}

/* Left Navigation Bar */
#left-bar {
    width: 245px;
    background-color: var(--nav-bg);
    border-right: 1px dashed var(--border-color); /* Dashed border */
    padding: 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

#left-bar h2 {
    color: var(--accent-color);
}

#left-bar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

#left-bar ul li a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 0.75rem 0;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    transition: all 0.2s ease;
}

#left-bar ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Main Content Area */
#main-content {
    flex-grow: 1;
    background-color: var(--bg-color);
    padding: 2rem 2.5rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Status Bar */
#status-bar {
    position: relative; 
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px; 
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    margin-left: 1rem; 
}

#status-bar::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Positions the tail below the box */
    left: 40px;    /* Positions the tail from the left */
    width: 0;
    height: 0;
    
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--border-color);
}
/* Lower Content Layout */
.content-wrapper {
    display: flex;
    gap: 2rem;
}

.content-box {
    flex: 1;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color); 
    padding: 1.5rem;
    box-shadow: 3px 3px 0px var(--nav-bg); 
}

.content-box h3 {
    margin-top: 0;
    color: var(--accent-color);
}

/* Blog Post Specific Styles */
.blog-post {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border-color); 
}
.blog-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.blog-post a,
#whats-new-section a{
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: wavy;
}
/* Media Log Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px dashed var(--border-color); 
}
th {
    font-family: 'IBM Plex Mono', monospace;
}

.table-container {
    width : 100%;
    overflow-x: auto;
}

/* Footer Styles */
footer.page-footer {
    margin-top: 3rem;
    border-top: 1px dashed var(--border-color); 
    padding-top: 1.5rem;
    font-size: 0.85em;
    color: var(--text-color);
    opacity: 0.7;
}

footer.page-footer p {
    margin: 0.25rem 0;
}
/* Styles for the full blog post content */
.blog-content {
    max-width: 800px; 
    margin: 0 auto; 
}

.blog-content h1 {
    color: var(--accent-color);
}

.blog-content .meta {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Make all images responsive */
.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Styles for image captions */
.blog-content figure {
    margin: 2rem 0;
    padding: 0;
}

.blog-content figcaption {
    font-size: 0.9em;
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
    margin-top: 0.5rem;
}

/* Responsive container for videos */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Style for the "Back to Blog" link */
.back-link {
    display: inline-block;
    margin-top: 3rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}

/* Sets a fixed height for the content boxes on the homepage */
#welcome-section,
#whats-new-section {
    height: 150px; 
}

#whats-new-section {
    overflow-y: auto; 
}

/* --- Custom Scrollbar Styles --- */

html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--nav-bg);
}

::-webkit-scrollbar {
    width: 10px; /* Width of the entire scrollbar */
}

::-webkit-scrollbar-track {
    background: var(--nav-bg); /* Color of the tracking area */
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent-color); /* Color of the scroll thumb */
    border-radius: 20px; /* Roundness of the scroll thumb */
    border: 2px solid var(--nav-bg); /* Creates padding around the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color); /* Color of the thumb on hover */
}

.heading-gif {
    height: 1.1em; 
    width: auto; 
    vertical-align: middle; 
    margin-left: 8px; 
}
body, #left-bar, #main-content, .content-box, #status-bar, .theme-switch-wrapper span {
    transition: background-color 0.3s ease, color 0.3s ease;
}
#status-bar::after {
    transition: border-top-color 0.3s ease;
}
::-webkit-scrollbar-thumb {
    transition: background-color 0.3s ease;
}

body.dark-mode {
    --bg-color: #2E3532;      /* Dark Slate Gray for main content bg */
    --text-color: #BCC4A7;    /* Lighter sage for text */
    --accent-color: #A7C1A8;  /* Keep accent a bit brighter */
    --container-bg: #3A4640;  /* Dark gray-green for boxes */
    --border-color: #50625B;  /* Muted dark green for borders */
    --nav-bg: #3A4640;        /* Same as container bg */

    background-color: #1c211e;
    background-image: none; /* Hides the light-themed GIF */
}


/* Wrapper for the list item in the nav */
.theme-switch-li {
    margin-top: auto; /* Pushes toggle to the bottom of the nav */
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    margin-top: 1.5rem;
}

/* Flex container for the switch and its label */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch-wrapper span {
    margin-left: 12px;
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
}

/* The switch housing */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0; 
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider track */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #A7C1A8; /* Soft green for the track */
    transition: 0.3s;
    border-radius: 24px;
}

/* The slider knob */
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

#mobile-header, #hamburger-menu, #overlay {
    display: none;
}

@media (max-width: 800px) {
    /* Adjust body padding for smaller screens */
    body {
        padding: 0;
    }

    .site-layout {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        flex-direction: column; 
        box-shadow: none;
        border: none;
    }

    #mobile-header {
        display: flex; 
        align-items: center;
        justify-content: space-between; 
        padding: 1rem 1.5rem;
        background-color: var(--nav-bg);
        border-bottom: 1px dashed var(--border-color);
        position: sticky; 
        top: 0;
        z-index: 1001; 
    }
    #mobile-header h2 {
        margin: 0;
        color: var(--accent-color);
        font-size: 1.2em;
    }

    #hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002; 
    }
    #hamburger-menu span {
        width: 100%;
        height: 3px;
        background-color: var(--accent-color);
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    #left-bar {
        position: fixed; 
        top: 0;
        left: 0;
        height: 100%;
        width: 250px;
        z-index: 1000;
        transform: translateX(-100%); 
        transition: transform 0.3s ease-in-out;
        padding-top:5rem;
        overflow-y: auto; 
    }
    #left-bar.nav-open {
        transform: translateX(0);
    }
    #left-bar h2 {
        display:none;
    }

    #overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999; 
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    body.nav-open-body #overlay {
        opacity: 1;
        visibility: visible;
    }
    body.nav-open-body {
        overflow: hidden;
    }

    #main-content {
        padding: 1.5rem;
    }
    .content-wrapper {
        flex-direction: column; 
    }
    #welcome-section, #whats-new-section {
        height: auto; 
    }
}
.contact-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.contact-link:hover {
    opacity: 0.8;
}
@media (max-width: 800px) {
    /* --- Media Log Table Fix for Mobile --- */
    /* Prevents the rating stars from wrapping on narrow screens */
    #main-content table td:last-child,
    #main-content table th:last-child {
        white-space: nowrap;
    }
}
