/* Base styles */
body {
    margin: 0 auto;
    padding: 20px;
    max-width: 1200px;
    font-size: 18px;
    line-height: 1.6;
    color: #24292e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: #fff;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3 {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.4em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.5em; }

/* Code blocks */
pre, pre code, .language-python {
    background: #f5f5f5;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e1e1e1;
    margin: 1.5em 0;
    font-size: 14px;
    line-height: 1.5;
    font-family: Consolas, Monaco, "Courier New", monospace !important;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Ensure no decorations on code lines */
pre code *, pre * {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Remove any Prism.js line decorations */
.line-numbers-rows > span:before {
    content: "";
}

/* Override Prism.js default styles */
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
    background: #f8f5f1 !important;
    font-size: 10px;
    font-family: Consolas, Monaco, "Courier New", monospace !important;
}

.token {
    font-size: inherit !important;
    font-family: inherit !important;
}

/* Inline code */
code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 75%;
}

/* Syntax highlighting */
.comment { color: #6a737d; }
.string { color: #032f62; }

/* Quotes */
blockquote {
    margin: 2em 0;
    padding: 1em 2em;
    border-left: 4px solid #0366d6;
    background: #f8f5f1;
    font-style: italic;
}

/* Links */
a {
    color: #0366d6;
    text-decoration: underline;
}

a:hover {
    text-decoration: none;
}

/* Navigation */
.back-link {
    color: #555;
    text-decoration: none;
    font-size: 0.9em;
    margin-bottom: 3em;
    display: inline-block;
    border-bottom: 1px solid #ddd;
}

.back-link:hover {
    border-bottom-color: #555;
}

/* Blog meta */
.blog-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 2em;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

/* Mobile adjustments */
@media (max-width: 920px) {
    body {
        padding: 1.5rem;
        font-size: 16px;
    }

    pre {
        font-size: 13px;
        padding: 1em;
    }

    .diagram {
        max-width: 100%;
    }
}

/* Code blocks - Jupyter Style */
.code-example {
    background: #f5f5f5;
    padding: 1.5em 2em;
    border-radius: 4px;
    margin: 1.5em 0;
    font-size: 14px;
    line-height: 1.6;
    font-family: Consolas, Monaco, "Courier New", monospace;
    white-space: pre;
    overflow-x: auto;
    border: 1px solid #e1e1e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Python Syntax Highlighting - Jupyter Colors */
.code-example .keyword { color: #0033B3; }        /* def, return, import etc */
.code-example .function { color: #8B4513; }       /* function names - brown */
.code-example .operator { color: #000000; }       /* =, +, -, * etc */
.code-example .number { color: #1750EB; }         /* numbers */
.code-example .comment { color: #007400; }        /* comments */
.code-example .string { color: #067D17; }         /* strings */
.code-example .builtin { color: #325CC0; }        /* print, len etc */
.code-example .variable { color: #871094; }       /* variable names */

/* Input/Output Prompts - Jupyter Style */
.code-example .input-prompt:before {
    content: "In [1]:";
    color: #303F9F;
    padding-right: 0.5em;
    user-select: none;
}

/* Optional: Cell execution count */
.code-example.with-output:after {
    content: "";
    display: block;
    height: 1em;
}

/* Diagram styling */
.diagram-container {
    margin: 2em 0;
    text-align: center;
    width: 100%;
    overflow-x: hidden;
}

.diagram {
    max-width: 1100px;
    max-height: 500px;
    height: auto;
    border-radius: 8px;
    background: transparent;
    padding: 1em;
    object-fit: contain;
}

.diagram-caption {
    color: #666;
    font-size: 0.9em;
    margin-top: 1em;
    font-style: italic;
}

/* Note blocks */
.note-block {
    background: #fff8dc;
    border-left: 4px solid #f0ad4e;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 4px;
}

.note-block strong {
    color: #885d0f;
}

/* Trade-offs list */
.trade-offs {
    list-style: none;
    padding-left: 1em;
    margin: 1em 0;
}

.trade-offs .benefit {
    color: #2da44e;
    font-weight: 500;
}

.trade-offs .drawback {
    color: #cf222e;
    font-weight: 500;
}

/* Comparison table */
.comparison-table {
    display: flex;
    gap: 2em;
    margin: 1.5em 0;
    padding: 1.5em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.comparison-column {
    flex: 1;
}

.comparison-column h5 {
    margin: 0 0 1em 0;
    color: #495057;
    font-size: 1.1em;
}

.comparison-column ul {
    margin: 0;
    padding-left: 1.2em;
    color: #495057;
}

.comparison-result {
    text-align: center;
    margin-top: 1em;
    color: #495057;
}

/* Memory calculation styling */
.code-example .formula {
    color: #0550ae;
    font-weight: 500;
}

.code-example .component {
    color: #0a3069;
}

.code-example .calculation {
    color: #1a7f37;
}

.code-example .result {
    color: #cf222e;
    font-weight: 500;
}

/* Section break */
.section-break {
    border: 0;
    height: 1px;
    background: #e1e1e1;
    margin: 2em 0;
    width: 100%;
}

/* Quantization table */
.quantization-table {
    margin: 2em 0;
    overflow-x: auto;
}

.quantization-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quantization-table th,
.quantization-table td {
    padding: 0.8em 1.2em;
    text-align: left;
    border: 1px solid #e1e1e1;
}

.quantization-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.quantization-table td {
    font-family: Consolas, Monaco, "Courier New", monospace;
}

/* Process steps */
.process-steps {
    margin: 2em 0;
}

.process-steps .step {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.2em;
    margin-bottom: 1em;
}

.process-steps h5 {
    color: #0366d6;
    margin: 0 0 0.8em 0;
    font-size: 1.1em;
}

.process-steps ul {
    margin: 0;
    padding-left: 1.2em;
}

.process-steps li {
    color: #495057;
    margin-bottom: 0.5em;
}

/* Interaction section */
.interaction-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* Like button */
.like-button {
    background: none;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.like-button:hover {
    background: #f3f4f6;
}

.heart-icon {
    color: #e25555;
    margin-right: 4px;
}

/* Comment section */
.comment-section {
    margin-top: 2rem;
}

.comment-form {
    margin: 1rem 0 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.comment {
    padding: 1rem;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 14px;
}

.comment-date {
    color: #666;
}

.comment-body {
    font-size: 14px;
    line-height: 1.5;
}

/* Blog preview links */
.blog-link {
    text-decoration: none;
    color: #0366d6;
}

.blog-link:hover {
    color: #0246a2;
}

/* Newsletter signup */
.newsletter-signup {
    margin: 1.5rem 0;
    max-width: 400px;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
}

.newsletter-signup h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1em;
    color: #2c3e50;
}

.newsletter-signup p {
    margin: 0 0 1rem 0;
    font-size: 0.9em;
    color: #666;
}

.newsletter-signup form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-signup input[type="email"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
}

.newsletter-signup button {
    background: #0366d6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.newsletter-signup button:hover {
    background: #0246a2;
}

.code-output {
    background: #ffffff;
    padding: 1.5em 2em;
    border-radius: 4px;
    margin: -1.5em 0 1.5em;
    font-size: 14px;
    line-height: 1.6;
    font-family: Consolas, Monaco, "Courier New", monospace;
    white-space: pre;
    overflow-x: auto;
    border: 1px solid #e1e1e1;
    border-top: none;
    color: #1a1a1a;
}

/* Article content */
article {
    margin: 2em auto;
    padding: 0 4em;
} 