html {
    scroll-behavior: smooth;
}

::selection {
    background: #b3d4fc;
    color: #000;
}

/* ——— Navigation ——— */

.article-nav {
    margin-bottom: 30px;
}

.article-nav a {
    color: #999;
    text-decoration: none;
    font-size: 0.88em;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.article-nav a:hover {
    color: #000;
}

/* ——— Article Header ——— */

.article-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 2px solid #111;
}

.article-header h1 {
    font-size: 1.85em;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.article-meta {
    color: #777;
    font-size: 0.88em;
    font-style: italic;
}

.article-meta a {
    color: #777;
    text-decoration: none;
    border-bottom: 1px dotted #aaa;
}

.article-meta a:hover {
    color: #333;
}

/* ——— Article Body ——— */

.article-body > p:first-child::first-letter {
    font-size: 3.5em;
    float: left;
    line-height: 0.78;
    margin-right: 10px;
    margin-top: 5px;
    color: #000;
    font-weight: bold;
    font-family: Georgia, "Times New Roman", serif;
}

.article-body p {
    margin-bottom: 18px;
}

/* ——— Inline Code ——— */

code {
    font-family: "SF Mono", "Fira Code", "JetBrains Mono",
                 Menlo, Monaco, "Courier New", monospace;
    font-size: 0.82em;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e5e5e5;
    word-break: break-word;
}

/* ——— Code Blocks ——— */

pre {
    background: #0d1117;
    color: #c9d1d9;
    padding: 20px 24px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: "SF Mono", "Fira Code", "JetBrains Mono",
                 Menlo, Monaco, "Courier New", monospace;
    font-size: 0.82em;
    line-height: 1.7;
    margin: 28px 0;
    border: 1px solid #21262d;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* ——— Figures & Images ——— */

figure {
    margin: 35px 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

figure img:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

figcaption {
    margin-top: 14px;
    font-family: "SF Mono", "Fira Code", Menlo, Monaco,
                 "Courier New", monospace;
    font-size: 0.76em;
    color: #999;
    font-style: italic;
    letter-spacing: 0.03em;
}

/* ——— Section Divider ——— */

.divider {
    text-align: center;
    margin: 55px 0;
    position: relative;
    height: 20px;
    line-height: 20px;
}

.divider::before {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    top: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
}

.divider span {
    background: #fff;
    position: relative;
    padding: 0 18px;
    color: #c0c0c0;
    font-size: 0.9em;
}

/* ——— PS Notes ——— */

.ps-notes {
    margin-top: 10px;
}

.ps-notes .note {
    background-color: #fafafa;
    border-left: 3px solid #ccc;
    padding: 15px 20px;
    margin: 20px 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.65;
}

.ps-notes .note code {
    font-size: 0.85em;
}

.ps-notes figure {
    margin: 22px 0 10px 0;
}

/* ——— Article Footer ——— */

.article-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.85em;
    color: #bbb;
}

.article-footer a {
    color: #999;
    text-decoration: none;
    border-bottom: 1px dotted #ccc;
}

.article-footer a:hover {
    color: #333;
}

/* ——— Responsive ——— */

@media (max-width: 480px) {
    .article-body > p:first-child::first-letter {
        font-size: inherit;
        float: none;
        margin: 0;
    }

    .article-header h1 {
        font-size: 1.45em;
    }

    figure img {
        border-radius: 4px;
    }
}

.refka {
    color: lightslategray !important;
    cursor: help !important;
    text-decoration: underline !important;
}