.post-full {
    position: relative;
}

.post-full .post-full-image {
    margin: 0 calc(50% - 50vw) -40vh;
    overflow: hidden;
}

.post-full .post-full-image img {
    display: block;
    width: 100%;
    height: 70vh;
    min-height: 360px;
    object-fit: cover;
}

@media (max-width: 800px) {
    .post-full .post-full-image {
        margin-bottom: -120px;
    }

    .post-full .post-full-image img {
        height: 380px;
        min-height: 0;
    }
}

.post-full-header {
    position: relative;
    padding: 24px 50px;
    background: var(--an-surface);
    border: 1px solid var(--an-border-strong);
    border-bottom: 0;
    border-radius: var(--an-radius) var(--an-radius) 0 0;
}

.post-full.no-image {
    padding-top: calc(var(--an-header-height) + 40px);
}

.post-full-meta {
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-full-meta-date {
    color: var(--an-accent);
}

.date-divider,
.post-full-meta .post-tag {
    color: var(--an-text-muted);
}

.post-full-meta .post-tag:hover {
    color: var(--an-secondary);
}

.post-full-title {
    margin-top: 10px;
    color: var(--an-text);
    font-family: var(--an-font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    line-height: 1.1;
}

.an-post-body {
    position: relative;
    margin-bottom: 48px;
    padding: 24px 50px 40px;
    background: var(--an-surface);
    border: 1px solid var(--an-border-strong);
    border-top: 0;
    border-radius: 0 0 var(--an-radius) var(--an-radius);
}

@media (max-width: 800px) {
    .post-full-header,
    .an-post-body {
        padding-inline: 18px;
    }
}

.post-content {
    min-height: 200px;
    color: var(--an-text-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.post-content > * + * {
    margin-top: 0.9em;
}

.post-content strong,
.post-content b {
    color: var(--an-text);
    font-weight: 700;
}

.post-content em {
    font-style: italic;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--an-font-display);
    font-weight: 500;
    line-height: 1.2;
}

.post-content h1 {
    margin-top: 1.6em;
    padding-bottom: 6px;
    color: var(--an-accent);
    border-bottom: 1px solid var(--an-accent-line);
    font-size: 2.4rem;
}

.post-content h2 {
    margin-top: 1.6em;
    color: var(--an-secondary);
    font-size: 1.7rem;
}

.post-content h3 {
    margin-top: 1.2em;
    color: var(--an-text);
    font-size: 1.25rem;
}

.post-content h4 {
    color: var(--an-text);
    font-size: 1.05rem;
}

.post-content ul,
.post-content ol {
    padding-left: 1.4em;
}

.post-content li + li {
    margin-top: 0.25em;
}

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

.post-content blockquote:not([class]) {
    padding: 0.6em 1.4em;
    color: var(--an-text-muted);
    background: var(--an-accent-soft);
    border-left: 3px solid var(--an-accent);
    border-radius: 0 var(--an-radius-sm) var(--an-radius-sm) 0;
    font-style: italic;
}

.post-content hr {
    position: relative;
    margin: 2.2em 0;
    border: 0;
    border-top: 1px solid var(--an-secondary-line);
}

.post-content hr::after {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 11px;
    height: 11px;
    content: "";
    background: var(--an-surface);
    border: 1px solid var(--an-accent);
    transform: translateX(-50%) rotate(45deg);
}

.post-content code {
    padding: 1px 6px;
    color: var(--an-accent);
    background: var(--an-surface-2);
    border-radius: 4px;
    font-family: var(--an-font-mono);
    font-size: 0.9em;
}

.post-content pre {
    padding: 16px;
    overflow-x: auto;
    background: var(--an-bg);
    border: 1px solid var(--an-border);
    border-radius: var(--an-radius-sm);
}

.post-content pre code {
    padding: 0;
    color: var(--an-text-body);
    background: none;
}

.post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.post-content th,
.post-content td {
    padding: 8px 12px;
    border: 1px solid var(--an-border);
}

.post-content th {
    color: var(--an-text);
    background: var(--an-surface-2);
}

.post-content img {
    height: auto;
    border-radius: var(--an-radius-sm);
}

.post-content figcaption {
    margin-top: 6px;
    color: var(--an-text-muted);
    font-size: 14px;
    text-align: center;
}

.post-content .kg-callout-card {
    border: 1px solid var(--an-border-strong);
    border-radius: var(--an-radius-sm);
}

.post-content .kg-width-wide {
    margin-inline: -30px;
}

.post-content .kg-width-full {
    margin-inline: -50px;
}

@media (max-width: 800px) {
    .post-content .kg-width-wide,
    .post-content .kg-width-full {
        margin-inline: -18px;
    }
}

.post-full-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--an-border);
    text-align: center;
}

.post-full-authors-label {
    display: block;
    color: var(--an-text-muted);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.post-full-authors-names {
    display: block;
    color: var(--an-text);
    font-family: var(--an-font-display);
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-full-footer .author-profile-image {
    width: 64px;
    height: 64px;
}

.post-full-footer .author-list-item + .author-list-item {
    margin-left: -14px;
}

.side-nav {
    position: fixed;
    top: calc(var(--an-header-height) + 28px);
    left: 20px;
    z-index: 20;
    width: 250px;
    max-height: calc(100vh - var(--an-header-height) - 48px);
    padding-right: 8px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    scrollbar-color: var(--an-border-strong) transparent;
    scrollbar-width: thin;
}

.side-nav.is-visible {
    opacity: 1;
    visibility: visible;
}

.side-nav h2 {
    margin-bottom: 6px;
    color: var(--an-accent);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-nav .nav {
    list-style: none;
}

.side-nav .nav li {
    margin-top: 14px;
    margin-left: 2px;
    padding-left: 10px;
    border-left: 2px solid var(--an-secondary);
    font-size: 13px;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
    transition: border-color var(--an-transition);
}

.side-nav .nav li a {
    display: block;
    color: var(--an-secondary);
}

.side-nav .nav li.sub {
    margin-top: 0;
    padding: 3px 0 3px 18px;
    border-left-color: var(--an-border-strong);
}

.side-nav .nav li.sub a {
    color: var(--an-text-muted);
}

.side-nav .nav li a:hover,
.side-nav .nav li.current a {
    color: var(--an-accent);
}

.side-nav .nav li.current {
    border-left-color: var(--an-accent);
}

.side-nav-toggle {
    display: none;
}

.post-template .site-main .inner,
.page-template .site-main .inner {
    max-width: 1040px;
}

.post-template .read-next,
.page-template .read-next {
    margin-inline: calc((1040px - var(--an-content-width)) / 2);
}

@media (max-width: 1240px) {
    .post-template .read-next,
    .page-template .read-next {
        margin-inline: 0;
    }
}

@media (max-width: 1640px) {
    .side-nav {
        width: calc((100vw - 1040px) / 2 - 32px);
    }
}

@media (max-width: 1500px) {
    .side-nav {
        display: none;
    }

    .side-nav.is-open {
        display: block;
        inset: 0;
        z-index: 1100;
        width: 100%;
        max-height: none;
        padding: 64px 20px 24px;
        background: var(--an-bg);
        border: 0;
        border-radius: 0;
    }

    .side-nav-toggle {
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        background: var(--an-surface);
        border: 1px solid var(--an-border-strong);
        border-radius: 50%;
        cursor: pointer;
    }

    .side-nav-toggle span {
        width: 18px;
        height: 2px;
        background: var(--an-accent);
        border-radius: 2px;
        transition: transform var(--an-transition), opacity var(--an-transition);
    }

    .side-nav-toggle.is-open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .side-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .side-nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}
