/* =============================================================
   LANGUAGE SWITCHER
   ============================================================= */
.language-toggle {
    display: inline-block;
    padding: 8px 12px;
    font-size: 10pt;
    cursor: pointer;
    background-color: white;
    margin-bottom: 12px;
}

.language-toggle span {
    padding: 0 8px;
}

.language-toggle span.separator {
    color: #888;
}

.language-toggle .active {
    font-weight: bold;
    color: var(--blue);
}

.language-toggle .inactive {
    color: #666;
    cursor: pointer;
}

/* =============================================================
   REFERENCES
   ============================================================= */
ol.custom-counter {
    list-style-type: none;
    counter-reset: list-counter;
}

ol.custom-counter li {
    counter-increment: list-counter;
}

ol.custom-counter li::before {
    content: "[" counter(list-counter) "] ";
}

/* =============================================================
   IMAGES & FIGURES
   ============================================================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

figcaption {
    color: gray;
    font-style: italic;
    font-size: 9.5pt;
    margin-top: 0.5em;
}

/* =============================================================
   CODE BLOCKS
   ============================================================= */
code {
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.7em;
}

pre {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0px 15px;
    overflow-x: auto;
}

pre code {
    border: none;
    padding: 0;
}

/* =============================================================
   GITHUB GIST EMBEDS
   ============================================================= */
.gist-file .blob-num {
    border: none !important;
    background-color: transparent !important;
}

.gist-file {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
}

.gist-data {
    background-color: transparent !important;
    border-bottom: none !important;
}

.gist {
    margin-top: 15px !important;
}

/* Post header: tag chip + date above the title */
.blog-header + h2 {
    margin-top: 8px;
}

/* =============================================================
   SEARCH PAGE
   ============================================================= */
.search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 11pt;
    font-weight: 300;
    color: var(--ink);
    background: white;
    border: 1px solid var(--line);
    border-radius: 3px;
    margin: 8px 0 4px 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue);
}

.search-status {
    color: var(--mist);
    font-size: 10.5pt;
    min-height: 1.2em;
}

/* =============================================================
   TAGS
   ============================================================= */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-count {
    color: var(--mist);
}

.paper-link:hover .tag-count {
    color: white;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
