/**
 * Derek LeBlond Blog - Shared Styles
 * Black/white/blue aesthetic with responsive design
 */

/* ============================================
   Core Styles
   ============================================ */

body {
    color: white;
    background-color: black;
    font-family: sans-serif;
    padding: 10px;
    margin: 0 auto;
}

/* ============================================
   Typography
   ============================================ */

h1 {
    border-bottom: 5px solid blue;
    padding: 10px;
}

h2 {
    border-bottom: 2px solid blue;
    padding: 5px;
}

a {
    color: #6699ff;
}

a:hover {
    color: #99ccff;
}

.fst-italic {
    font-style: italic;
}

/* ============================================
   Navigation Links
   ============================================ */

.back-link,
.home-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 15px;
    background-color: blue;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.back-link:hover,
.home-link:hover {
    background-color: #0000cc;
    color: white;
}

.home-link {
    margin-right: 10px;
}

/* ============================================
   Layout - Blog Post Pages
   ============================================ */

.container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-content {
    flex: 3;
}

.blog-sidebar {
    flex: 1;
    min-width: 200px;
}

/* ============================================
   Layout - Index & Tags Pages
   ============================================ */

.blog-container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.blog-main {
    flex: 4;
    min-width: 0;
}

/* ============================================
   Blog List Items
   ============================================ */

.blog-item {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 5px;
}

.blog-item:hover {
    border-color: blue;
}

.blog-item h2 {
    margin-bottom: 5px;
}

.blog-item.hidden {
    display: none;
}

.date {
    color: #888;
    font-size: 0.9rem;
    margin: 5px 0;
}

/* ============================================
   Sidebar Components
   ============================================ */

.info-circle {
    background-color: #1a1a1a;
    border: 3px solid blue;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    text-align: center;
}

.info-circle p {
    margin: 5px 0;
}

.sidebar-heading {
    text-align: center;
    font-size: 1rem;
    color: white;
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

/* Font sizes */
.fs-4 {
    font-size: 1.5rem;
}

.fs-7 {
    font-size: 0.875rem;
}

/* ============================================
   Tags
   ============================================ */

.tags {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    margin: 5px 5px 0 0;
    padding: 3px 8px;
    background-color: #1a1a1a;
    border: 1px solid blue;
    border-radius: 3px;
    font-size: 0.85rem;
}

.tag-link {
    display: inline-block;
    margin: 5px 5px 5px 0;
    padding: 5px 10px;
    background-color: #1a1a1a;
    border: 1px solid blue;
    border-radius: 3px;
    color: #6699ff;
    text-decoration: none;
}

.tag-link:hover {
    background-color: blue;
    color: white;
}

.tag-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 5px;
}

.tag-section h2 {
    color: white;
    border-bottom: 2px solid blue;
    padding-bottom: 10px;
}

/* ============================================
   Tag Filtering (Tags Page)
   ============================================ */

.tag-filter {
    display: inline-block;
    margin: 10px 10px 10px 0;
    padding: 8px 15px;
    background-color: #1a1a1a;
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tag-filter:hover {
    border-color: blue;
}

.tag-filter.active {
    background-color: blue;
    border-color: blue;
}

.clear-filter {
    display: inline-block;
    margin: 10px 10px 10px 0;
    padding: 8px 15px;
    background-color: #333;
    border-radius: 5px;
    cursor: pointer;
}

.clear-filter:hover {
    background-color: #555;
}

.blog-list {
    margin: 30px 0;
}

.view-tags {
    margin: 20px 0;
}

/* ============================================
   Jupyter Notebook Wrapper Styles
   ============================================ */

.blog-wrapper {
    color: white;
    background-color: black;
    font-family: sans-serif;
    padding: 10px;
    margin: 0 auto;
}

.blog-nav {
    margin: 20px 0;
}

.jupyter-content {
    background-color: black;
    padding: 20px;
    border-radius: 5px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .blog-container {
        flex-direction: column;
    }

    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
}

/* ============================================
   Dark Theme for Jupyter Notebooks
   ============================================ */

/* Override Jupyter's layout colors for dark theme */
:root {
    --jp-layout-color0: #000000 !important;
    --jp-layout-color1: #1a1a1a !important;
    --jp-layout-color2: #2a2a2a !important;
    --jp-layout-color3: #3a3a3a !important;
    --jp-layout-color4: #4a4a4a !important;

    /* Override inverse layout colors */
    --jp-inverse-layout-color0: #ffffff !important;
    --jp-inverse-layout-color1: #f0f0f0 !important;
    --jp-inverse-layout-color2: #e0e0e0 !important;
    --jp-inverse-layout-color3: #d0d0d0 !important;
    --jp-inverse-layout-color4: #c0c0c0 !important;

    /* Blue accent to match blog theme */
    --jp-brand-color0: #0000ff !important;
    --jp-brand-color1: #0000cc !important;
    --jp-brand-color2: #6699ff !important;
    --jp-brand-color3: #99ccff !important;

    /* UI font colors for dark theme */
    --jp-ui-font-color0: #ffffff !important;
    --jp-ui-font-color1: #e0e0e0 !important;
    --jp-ui-font-color2: #c0c0c0 !important;
    --jp-ui-font-color3: #a0a0a0 !important;

    /* Content font colors */
    --jp-content-font-color0: #ffffff !important;
    --jp-content-font-color1: #e0e0e0 !important;
    --jp-content-font-color2: #c0c0c0 !important;
    --jp-content-font-color3: #a0a0a0 !important;

    /* Cell colors */
    --jp-cell-editor-background: #1a1a1a !important;
    --jp-cell-editor-border-color: #3a3a3a !important;
    --jp-cell-editor-active-background: #000000 !important;
    --jp-cell-editor-active-border-color: #0000ff !important;

    /* Border colors */
    --jp-border-color0: #3a3a3a !important;
    --jp-border-color1: #4a4a4a !important;
    --jp-border-color2: #5a5a5a !important;
    --jp-border-color3: #6a6a6a !important;

    /* Input colors */
    --jp-input-background: #1a1a1a !important;
    --jp-input-border-color: #3a3a3a !important;
}

/* Force dark background on body */
body.jp-Notebook {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Style all cells */
.jp-Cell {
    background-color: #000000 !important;
}

/* Markdown cells */
.jp-RenderedHTMLCommon {
    color: #ffffff !important;
}

/* Code cells */
.jp-CodeCell {
    background-color: #1a1a1a !important;
}

/* Output areas */
.jp-OutputArea {
    background-color: #000000 !important;
}

/* Links in notebook content */
.jp-RenderedHTMLCommon a {
    color: #6699ff !important;
}

.jp-RenderedHTMLCommon a:hover {
    color: #99ccff !important;
}

/* Headers in markdown */
.jp-RenderedHTMLCommon h1,
.jp-RenderedHTMLCommon h2,
.jp-RenderedHTMLCommon h3,
.jp-RenderedHTMLCommon h4,
.jp-RenderedHTMLCommon h5,
.jp-RenderedHTMLCommon h6 {
    color: #ffffff !important;
    border-bottom-color: #0000ff !important;
}

/* Tables */
.jp-RenderedHTMLCommon table {
    border-color: #3a3a3a !important;
}

.jp-RenderedHTMLCommon th,
.jp-RenderedHTMLCommon td {
    border-color: #3a3a3a !important;
    color: #ffffff !important;
}

/* Code blocks in markdown */
.jp-RenderedHTMLCommon code {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.jp-RenderedHTMLCommon pre {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid #3a3a3a !important;
}
