.metadata {
    display: flex;
    gap: 12px;
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    font-weight: 400;
    letter-spacing: 0.2px;
}

.metadata :not(:last-child)::after {
    content: "·";
    margin-right: 0.6rem;
    margin-left: 0.6rem;
    opacity: 0.6;
}

.post-container ul {
    list-style-type: disc;
}

.post-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.post-container {
    display: flex;
    flex-direction: column;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px;
}

.post-center {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0px;
}

.post-grid .post-container {
    grid-column: span 4;
}

.post-center .post-container {
    grid-column: 2 / span 4;
}

.post-grid .post-index {
    grid-column: span 2;
}

.post-container p {
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.7;
    color: var(--color-text);
    width: 100%;
    margin: auto;
    font-size: 1.125rem;
    font-weight: 400;
}

:root.dark-theme .post-content {
    color: rgba(255, 255, 255, 0.9);
}

.post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--color-text);
}

:root.dark-theme .post-content h1,
:root.dark-theme .post-content h2,
:root.dark-theme .post-content h3,
:root.dark-theme .post-content h4,
:root.dark-theme .post-content h5,
:root.dark-theme .post-content h6 {
    color: rgba(255, 255, 255, 0.95);
}

.post-content h1 {
    font-size: 2.5rem;
    margin-top: 4rem;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 3.5rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--color-border);
}

:root.dark-theme .post-content h2 {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
}

.post-content h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
}

.post-content h5 {
    font-size: 1.125rem;
    margin-top: 1.5rem;
}

.post-content h6 {
    font-size: 1rem;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.post-content p {
    margin: 1.5rem 0;
    line-height: 1.6;
    font-size: 17px;
    display: block;
}

.post-content strong {
    font-weight: bold;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    background: linear-gradient(transparent 80%, rgba(56, 110, 224, 0.1) 80%);
}

:root.dark-theme .post-content a, .metadata .categories a {
    color: var(--color-primary-light);
    background: linear-gradient(transparent 80%, rgba(107, 164, 255, 0.1) 80%);
}

.post-content a:hover {
    border-bottom-color: currentColor;
    background: linear-gradient(transparent 70%, rgba(56, 110, 224, 0.2) 70%);
}

:root.dark-theme .post-content a:hover, .metadata .categories a {
    background: linear-gradient(transparent 70%, rgba(107, 164, 255, 0.2) 70%);
}

.post-content blockquote {
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    font-size: var(--fs-base);
    position: relative;

    border-left: 4px solid var(--color-primary);
    background-color: rgba(56, 110, 224, 0.03);
    color: var(--color-text);
}

:root.dark-theme .post-content blockquote {
    border-left-color: var(--color-primary-light);
    background-color: rgba(107, 164, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
}

.post-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--color-primary);
    position: absolute;
    left: 1rem;
    top: -0.5rem;
    opacity: 0.3;
    font-family: Georgia, serif;
}

:root.dark-theme .post-content blockquote::before {
    color: var(--color-primary-light);
}

.post-content ul,
.post-content ol {
    padding-left: 2rem;
    margin: 1.5rem 0;
}

.post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.post-content ul li {
    position: relative;
}

.post-content ul li::marker {
    color: var(--color-text);
}

:root.dark-theme .post-content ul li::marker {
    color: var(--color-primary-light);
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

:root.dark-theme .post-content img {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.post-content img:hover {
    transform: scale(1.02);
}

.markdown-body code,
.post-content code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.2rem;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    font-size: 0.8rem;
    position: relative;
    overflow-x: auto;
    margin: 1.5rem 0;
    color: #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
}

:root.dark-theme .markdown-body code,
:root.dark-theme .post-content code {
    background-color: rgba(107, 164, 255, 0.1);
    color: var(--color-text);
    border-color: rgba(107, 164, 255, 0.2);
}

.markdown-body pre, .post-content pre {
    background: var(--color-bg);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    font-size: 1rem;
    position: relative;
    overflow-x: auto;
    margin: 1.5rem 0;
    color: var(--color-text-light);
    box-sizing: border-box;
    max-width: 100%;

    white-space: pre;
    word-break: normal;
    min-width: 0;
}


:root.dark-theme .markdown-body pre,
:root.dark-theme .post-content pre {
    background-color: #1a1a1a;
    border-color: var(--color-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.post-container .hl.lean.block {
    margin: 1rem 0;
    padding: 0;
    line-height: 1.5;
    overflow: auto;
}

.post-index ol {
  list-style: none;
  padding-left: 1.5em;
  counter-reset: section;
}

.post-index ol li {
    padding-bottom: 8px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.post-index h1 {
    font-weight: 700;
    padding-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
}

:root.dark-theme .post-index h1 {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.post-index ol {
    padding-left: 1rem;
    margin: 0;
}

.post-index li {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.post-index ol li::before {
    content: none;
}

.post-index li a {
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s ease;
    font-weight: 400;
    display: block;
    padding: 0.25rem 0;
    border-radius: 4px;
}

:root.dark-theme .post-index li a {
    color: rgba(255, 255, 255, 0.8);
}

.post-index li a:hover {
    color: var(--color-primary);
    background-color: rgba(56, 110, 224, 0.05);
    padding-left: 0.5rem;
}

:root.dark-theme .post-index li a:hover {
    color: var(--color-primary-light);
    background-color: rgba(107, 164, 255, 0.1);
}

.post-index li ol {
    margin-top: 12px;
    padding-left: 1rem;
}

.post-index {
    position: sticky;
    top: calc(var(--nav-height) + 3em);
    align-self: start;
    height: fit-content;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    max-height: calc(100vh - (var(--nav-height) * 2 + 1em));
    overflow: auto;
    box-sizing: border-box;
}

.fro .post-index {
    top: calc(var(--nav-height) + 6em);
    max-height: calc(100vh - (var(--nav-height) * 2 + 3em));
}

.post-container .lean.block {
    display: block !important;
}

.post-container code.hl.lean.block {
    padding: 2rem;
    background: #f8f9fa;
    margin: 2rem 0;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 1rem;
    border: 1px solid #e9ecef;
    overflow-x: auto;
}

:root.dark-theme .post-container code.hl.lean.block {
    background: #1a1a1a;
    border-color: #333;
}

.post-page {
    padding-top: 60px;
    width: 100%;
    padding-bottom: 60px;
}

.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
    margin: 3rem 0;
}

:root.dark-theme .post-content hr {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

::selection {
    background-color: rgba(18, 52, 124, 0.2);
    color: inherit;
}

:root.dark-theme ::selection {
    background-color: rgb(187 209 255 / 30%);
}

@media (max-width: 768px) {
    .post-grid .post-container {
        grid-column: span 6;
    }

    .post-grid .post-index {
        display: none;
    }

    .post-center .post-container {
        grid-column: span 8;
    }

    .post-content {
        font-size: 1.1rem;
    }

    .post-content h1 {
        font-size: 2rem;
    }

    .post-content h2 {
        font-size: 1.75rem;
    }

    .post-content h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .wrap {
        padding-top: 20px;
    }
}

@media (max-width: 768px) {
    .post-container h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin: 0px;
    }

    .metadata {
        flex-direction: column;
        gap: 8px;
    }
}

@media (min-width: 768px) {
    .post-container p {
        margin-bottom: 28px;
    }
}

.markdown-page .post-container {
    gap: 30px
}

/* Add these citation styles to your existing CSS */
.citations-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.citations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: citation-counter;
}

.citation-item {
    counter-increment: citation-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.citation-item::before {
    content: "[" counter(citation-counter) "]";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: var(--color-primary);
    min-width: 2.5rem;
}

.citation-ref {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    vertical-align: super;
    line-height: 0;
}