/* Basic Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #333;
    transition: background-color 0.3s, color 0.3s; /* For smooth transitions */
}

body.dark-mode {
    background-color: #222;
    color: #eee;
}

/* Container for Page Content */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Blog Post Container (Flex Layout) */
.blog-post-container {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

/* Sidebar Table of Contents */
.blog-toc {
    width: 25%;
    min-width: 200px;
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.blog-toc h3 {
    margin-bottom: 10px;
}

.blog-toc ul {
    list-style: none;
    padding-left: 0;
}

.blog-toc li {
    margin-bottom: 5px;
}

.blog-toc a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s;
    display: block; /* Make links clickable area larger*/
    padding: 5px 0;
}
.blog-toc a:hover {
    color:#0056b3; /* Link hover color */
}
/* Main Blog Content */
.blog-content {
    width: 75%;
}

.blog-content h1 {
    margin-bottom: 20px;
}

.blog-content h2,
.blog-content h3 {
    margin: 20px 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.blog-content p {
    margin-bottom: 15px;
}

.blog-content ul,
.blog-content ol {
    margin: 15px 0;
    padding-left: 20px;
}

.blog-content li {
    margin-bottom: 8px;
}
.blog-content pre {
    background-color: #f0f0f0; /* Code background color */
    padding: 15px;
    overflow-x: auto; /* Enable horizontal scrolling if code is too long */
    border-radius: 5px;
    margin: 10px 0;
}

.blog-content code {
    font-family: monospace; /* Use a monospace font for code */
    color: #333; /* Code text color */
}


/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-post-container {
        flex-direction: column; /* Stack on smaller screens */
    }
    .blog-toc, .blog-content {
        width: 100%;
        padding-right: 0; /* Remove right padding on smaller screen */
        border-right: none;
    }

    .blog-toc {
        border-bottom: 1px solid #eee; /* Add border to TOC on smaller screens */
        margin-bottom: 20px;
    }
    .container {
        width: 95%;
    }
}

img {
    width: 100%;
height: auto; /* Maintain aspect ratio */
max-width: 100vw; /* Ensure images do not exceed the view-width */
}
  