/* Tech Interview — Single post enhancements: reading time, TOC, Up Next */

/* Reading-time chip on archive cards */
.ti-read-time {
    display: inline-block;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    color: #475569;
    background: #f1f5f9;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-right: 0.5rem;
    vertical-align: middle;
    font-weight: 500;
}
.ti-read-time-icon {
    margin-right: 0.15rem;
    opacity: 0.85;
}

/* Reading-time badge on single post (above content) */
.ti-post-meta-bar {
    margin: 0 0 1.25rem;
}
.ti-read-time-badge {
    display: inline-block;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.82rem;
    color: #475569;
    background: #f1f5f9;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

/* ============================================================
   Table of Contents
   ============================================================ */

.ti-toc {
    margin: 0 0 2rem;
    padding: 1.1rem 1.4rem;
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
}
.ti-toc-title {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
}
.ti-toc-list {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.5rem;
}
.ti-toc-list li {
    counter-increment: toc;
    margin: 0 0 0.35rem 0;
    font-size: 0.92rem;
    line-height: 1.45;
    break-inside: avoid;
    list-style: none;
}
.ti-toc-list li::before {
    content: counter(toc, decimal-leading-zero) ". ";
    color: #94a3b8;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 0.3rem;
}
.ti-toc-list a {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease;
}
.ti-toc-list a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* h2 anchor offset for sticky-header sites */
.entry-content h2[id] {
    scroll-margin-top: 80px;
}

@media (max-width: 720px) {
    .ti-toc-list { columns: 1; }
}

/* ============================================================
   Up Next related cards
   ============================================================ */

.ti-up-next {
    margin: 2.5rem 0 1rem;
    padding: 1.5rem 1.6rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border: 1px solid #e3e8ef;
    border-radius: 14px;
}
.ti-up-next-heading {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.9rem;
}
.ti-up-next-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}
.ti-up-next-card {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 0.95rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.ti-up-next-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15,23,42,0.08);
}
.ti-up-next-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    border: 1px solid #e2e8f0;
    object-fit: contain;
}
.ti-up-next-body {
    min-width: 0;
}
.ti-up-next-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 0.25rem;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ti-up-next-meta {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.74rem;
    color: #64748b;
}

@media (max-width: 880px) {
    .ti-up-next-grid {
        grid-template-columns: 1fr;
    }
}
