/* ==========================================================================
   1. CORE DESIGN SYSTEM: FONTS & COLOR THEMES
   ========================================================================== */

:root {
    --logbook-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --typewriter-font: "Courier New", Courier, Georgia, serif;
}

/* Light Theme Color Palette */
[data-theme="light"],
html:not([data-theme="dark"]) {
    --pico-background-color: #fdfbf7;
    --pico-primary: #c96f53;
    --pico-primary-background: #c96f53;
    --pico-primary-hover: #b05c43;
    --pico-primary-underline: rgba(201, 111, 83, 0.4);
    --pico-card-background-color: #f7f3ed;
    --pico-border-color: #e3dacd;
}

/* Dark Theme Color Palette */
[data-theme="dark"] {
    --pico-background-color: #120d0b;
    --pico-primary: #de886d;
    --pico-primary-background: #c96f53;
    --pico-primary-hover: #e59d87;
    --pico-primary-underline: rgba(222, 136, 109, 0.4);
    --pico-card-background-color: #1c1512;
    --pico-border-color: #2e231f;
}

/* ==========================================================================
   2. GLOBAL BASE TYPOGRAPHY
   ========================================================================== */

/* Main text elements designed to evoke a tactile journal feel */
body, p, li {
    font-family: var(--typewriter-font);
    line-height: 1.2;
    font-weight: 520;
}

/* ==========================================================================
   3. STRUCTURE & LAYOUT ARCHITECTURE
   ========================================================================== */

/* Centering top navigation and adding a clean, muted separation layer */
nav.container {
    justify-content: center;
    border-bottom: 1px solid var(--pico-border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 2.5rem;
}

nav.container ul li a {
    font-weight: 700;
    font-family: var(--logbook-mono);
}

/* Two-column responsive dashboard grid system */
@media (min-width: 992px) {
    .dashboard-grid {
        display: grid;
        grid-template-columns: 1fr 2.3fr;
        gap: 4rem;
        align-items: start;
    }
    .sidebar-sticky {
        position: sticky;
        top: 2rem;
    }
}

/* ==========================================================================
   4. SIDEBAR & JOURNAL NAVIGATION COMPONENTS
   ========================================================================== */

/* Personal logbook avatar/profile image presentation */
.journal-profile-img {
    width: 100%;
    height: auto;
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-border-color);
    margin-bottom: 1.5rem;
    filter: grayscale(40%);
}

.profile-header {
    margin-bottom: 1rem;
}

.about-title {
    font-weight: bold;
    font-family: var(--logbook-mono);
    margin-bottom: 0.3rem;
}

/* Unordered list reset for navigation wrappers */
.about-links, 
.journal-nav ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

/* Base states for sidebar interactive text links */
.about-links li a, 
.journal-nav ul li a {
    font-size: 0.9rem;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--pico-border-radius);
    color: var(--pico-secondary);
}

/* Navigational section group labels */
.journal-nav .nav-title {
    font-family: var(--logbook-mono);
    font-weight: bold;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pico-muted-color);
}

/* Active navigation tracking state link highlight */
.journal-nav ul li a[aria-current="page"] {
    background-color: var(--pico-primary-background);
    color: #fff !important;
    font-family: var(--logbook-mono);
}

/* ==========================================================================
   5. DYNAMIC MARKDOWN CONTENT RENDERING
   ========================================================================== */

/* Structured content title hierarchies parsed via marked.js */
#dynamic-content h1, 
#dynamic-content h2, 
#dynamic-content h3 {
    font-family: var(--logbook-mono);
    color: var(--pico-heading-color);
    margin-top: 2rem;
}

#dynamic-content h1 {
    font-size: 1.8rem;
    color: var(--pico-heading-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#dynamic-content h2 { font-size: 1.3rem; }
#dynamic-content h3 { font-size: 1.1rem; }

/* Data tables and metrics formatting with explicit typography lock */
#dynamic-content table, 
#dynamic-content th, 
#dynamic-content td {
    font-family: var(--logbook-mono) !important;
    font-size: 0.85rem;
    line-height: 1.3;
}

#dynamic-content table {
    margin-bottom: 2rem;
    border: 1px solid var(--pico-border-color);
}

#dynamic-content th {
    font-weight: bold;
    background-color: rgba(201, 111, 83, 0.05);
}

/* Rendered lists alignment */
#dynamic-content ul, 
#dynamic-content ol {
    padding-left: 1.2rem;
}

/* Highlighted foreign vocabulary keywords */
#dynamic-content li strong {
    color: var(--pico-primary);
    font-family: var(--logbook-mono);
    background-color: rgba(201, 111, 83, 0.05);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* Strategic quotes and tactical notes layout */
#dynamic-content blockquote {
    font-style: italic;
    border-left: 3px solid var(--pico-primary);
    padding: 0.5rem 1rem;
    background-color: rgba(201, 111, 83, 0.02);
    font-family: var(--logbook-mono);
    font-size: 0.9rem;
}

/* ==========================================================================
   6. GLOBAL FOOTER ELEMENT
   ========================================================================== */

.dashboard-footer {
    margin-top: 5rem;
    padding: 2rem 0;
    border-top: 1px solid var(--pico-border-color);
    text-align: center;
    font-family: var(--logbook-mono);
}