/* ------------------------------------------- */
/* 1. Base Styles and Typography */
/* ------------------------------------------- */

:root {
    --color-primary: #007bff; /* A nice tech blue */
    --color-text: #333;
    --color-background: #f8f9fa;
    --color-code-bg: #e9ecef;
    --color-border: #dee2e6;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-code: "SF Mono", "Consolas", "Roboto Mono", monospace;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--color-text);
    background-color: #fff;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

/* Headings: Ensure they stand out */
h1, h2, h3 {
    color: #212529;
    margin-top: 1.5em;
}

/* ------------------------------------------- */
/* 2. Layout Structure */
/* ------------------------------------------- */

/* Main wrapper for the sidebar and content */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0;
}

/* 2A. Header/Navigation */
header {
    background-color: var(--color-text);
    background-color: #333;
    color: #fff;
    width: 100%;
}

#site-header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 120px;
}

#header-title a {
    font-size: 36px;
    color: #fff;
    text-decoration: none;
    padding: 0 1rem;
    cursor: pointer;
    font-family: var(--font-stack);
    font-weight: bold;
}


#logo-panel {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

#logo-panel img {
    margin-left: 4px;
    margin-right: 4px;
}

/* 2B. Sidebar */
.sidebar {
    width: 250px;
    padding: 10px;
    flex-shrink: 0; /* Prevents sidebar from shrinking */
    border-right: 1px solid var(--color-border);
    margin-top: 50px;
}

nav li {
    list-style: none;
    padding: 0;
}
.nav-list {
    list-style: none;
    padding: 0;
}

.nav-item a {
    display: block;
    padding: 8px 0;
    color: var(--color-text);
    text-decoration: none;
}
.nav-item a:hover {
    color: var(--color-primary);
}

nav a {
    color: #333;
}

/* 2C. Main Content Area */
.content {
    flex-grow: 1; /* Takes up all remaining space */
    padding: 20px 40px;
    min-width: 0; /* Allows content to shrink */
}

/* ------------------------------------------- */
/* 3. Code & Developer Readability */
/* ------------------------------------------- */

/* Inline code styling */
p code, li code {
    font-family: var(--font-code);
    font-size: 0.95em;
    background-color: var(--color-code-bg);
    padding: 2px 4px;
    border-radius: 3px;
    color: #c92222; /* A dark red for visibility */
}

/* Code Blocks (Markdown fenced blocks) */
pre {
    background-color: var(--color-code-bg);
    border: 1px solid var(--color-border);
    padding: 1rem;
    overflow-x: auto; /* Essential for long code lines */
    border-radius: 4px;
}
pre code {
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.4;
    color: #000;
}

.highlight {
  display: inline-block; /* 1. Shrink-wrap to content width */
  max-width: 100%;       /* 2. Prevent overflow if code is too long for parent */
  overflow-x: auto;      /* 3. Add horizontal scroll if code overflows */
}