@font-face {
    font-family: 'Tabular';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Tabular-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Tabular';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/Tabular-SemiBold.woff2') format('woff2');
}

/* Prism.js GitHub Colors theme */
code[class*="language-"],
pre[class*="language-"] {
    color: #24292e;
    font-family: "Tabular", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    line-height: 1.5;
    tab-size: 4;
    hyphens: none;
}

pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
    background: #b3d4fc;
}

pre[class*="language-"] {
    padding: 20px;
    margin: 20px 0;
    overflow: auto;
    border-radius: 6px;
    background: #f5f5f5;
}

:not(pre) > code[class*="language-"] {
    padding: 2px 6px;
    border-radius: 3px;
    background: #f5f5f5;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6a737d;
}

.token.punctuation {
    color: #24292e;
}

.token.namespace {
    opacity: .7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
    color: #005cc5;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
    color: #032f62;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.token.variable,
.token.inserted {
    color: #22863a;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #d73a49;
}

.token.function,
.token.class-name {
    color: #6f42c1;
}

.token.regex,
.token.important {
    color: #e36209;
}

.token.important,
.token.bold {
    font-weight: bold;
}

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

.token.deleted {
    color: #b31d28;
    background-color: #ffeef0;
}

.token.inserted {
    color: #22863a;
    background-color: #f0fff4;
}

/* CSS Reset */
:root {
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent: #0070f3;
    --border: #e5e5e5;
    --background: #ffffff;
    --code-bg: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Tabular",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    font-size: 14px;
    font-weight: 400;
}

/* Layout (replaces Tailwind utilities) */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 64px 20px;
}

.header {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Typography */
.prose {
    max-width: none;
    font-family: "Tabular", sans-serif;
    font-size: 14px;
}

.prose h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
    color: var(--text-primary);
}

.prose h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 40px 0 16px 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.prose h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 32px 0 12px 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.prose p {
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.7;
}

.prose ul,
.prose ol {
    margin-bottom: 20px;
    padding-left: 20px;
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 8px;
    display: list-item;
}

.prose blockquote {
    border-left: 3px solid var(--border);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Code styles */
.prose code {
    font-family:
        "Tabular", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
        "Courier New", monospace;
    font-size: 12px;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 400;
}

.prose pre {
    background: var(--code-bg) !important;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 12px;
    line-height: 1.5;
}

.prose pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Image styles */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

/* Links */
.prose a {
    color: var(--accent);
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

/* Math styles */
.katex {
    font-size: 1em !important;
}

.katex-display {
    margin: 20px 0 !important;
}

/* Custom components */
.site-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

.site-description {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
}

/* Post list */
.post-list {
    list-style: none;
    padding: 8px;
    margin: 8px;
}

.post-list-item {
    margin-bottom: 3.2px;
    border-bottom: 1px solid var(--border);
}

.post-meta {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 400;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3.2px;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.post-title a:hover {
    color: var(--accent);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

/* Pagination */
.pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-top: 32px;
    padding: 8px;
    font-size: 14px;
}

.pagination-prev {
    justify-self: start;
}

.pagination-next {
    justify-self: end;
}

.pagination-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.pagination-link:hover {
    color: var(--text-primary);
}

.pagination-info {
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: center;
}

/* Back link */
.back-link {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 40px;
    display: inline-block;
    text-decoration: none;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Post/page content padding */
.post-content,
.page-content {
    padding: 8px;
    margin: 8px;
}

/* Navigation */
nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s ease;
}

nav a:hover {
    color: var(--text-primary);
}

nav a.active {
    color: var(--text-primary);
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        padding-top: 80px;
    }

    .header {
        margin-bottom: 80px;
    }
}

@media (max-width: 640px) {
    .prose h1 {
        font-size: 24px;
    }

    .prose h2 {
        font-size: 20px;
    }

    .site-title {
        font-size: 22px;
    }
}
