/**
 * Techmagnate-inspired blog hub & article pages
 */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---- Hero ---- */
.tm-blog-hero {
    position: relative;
    padding: 56px 0 48px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1220 0%, #152238 45%, #1e3a5f 100%);
    color: #fff;
}

.tm-blog-hero--compact {
    padding: 36px 0 28px;
}

.tm-blog-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 40%, rgba(32, 114, 243, 0.25), transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(0, 196, 167, 0.15), transparent 40%);
    pointer-events: none;
    overflow: hidden;
}

.tm-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: tmOrbFloat 12s ease-in-out infinite;
}

.tm-orb--1 { width: 280px; height: 280px; background: #2072f3; top: -10%; left: 10%; }
.tm-orb--2 { width: 200px; height: 200px; background: #00c4a7; top: 30%; right: 15%; animation-delay: -4s; }
.tm-orb--3 { width: 160px; height: 160px; background: #7c3aed; bottom: 10%; left: 40%; animation-delay: -8s; }

@keyframes tmOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -15px) scale(1.05); }
    66% { transform: translate(-15px, 10px) scale(0.95); }
}

.tm-hero-ticker {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tm-hero-ticker-track {
    display: flex;
    gap: 40px;
    animation: tmTicker 28s linear infinite;
    white-space: nowrap;
}

.tm-hero-ticker-track span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
}

.tm-hero-ticker-track span::before {
    content: '●';
    margin-right: 40px;
    color: #00c4a7;
    font-size: 8px;
    vertical-align: middle;
}

@keyframes tmTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.tm-gradient-text {
    background: linear-gradient(135deg, #93c5fd, #00c4a7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tm-btn-glow {
    box-shadow: 0 4px 24px rgba(32, 114, 243, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tm-btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(32, 114, 243, 0.55);
}

.tm-float { animation: tmFloat 5s ease-in-out infinite; }
.tm-float--delay { animation-delay: -1.5s; }
.tm-float--delay2 { animation-delay: -3s; }

@keyframes tmFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.tm-hero-ring {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 2px dashed rgba(32, 114, 243, 0.25);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: tmSpin 20s linear infinite;
}

@keyframes tmSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll reveal */
.tm-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.tm-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tm-blog-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.tm-blog-hero--compact .tm-blog-hero-inner {
    grid-template-columns: 1fr;
}

.tm-blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
    color: #93c5fd;
}

.tm-blog-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 640px;
}

.tm-blog-hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 24px;
}

.tm-blog-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tm-btn-ghost {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

.tm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.tm-blog-hero-visual {
    position: relative;
    min-height: 220px;
}

.tm-hero-stat {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

.tm-hero-stat i {
    color: #2072f3;
    font-size: 18px;
    margin-bottom: 4px;
}

.tm-hero-stat strong {
    font-size: 18px;
    font-family: var(--font-heading);
}

.tm-hero-stat span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.tm-hero-stat--1 { top: 10%; left: 5%; }
.tm-hero-stat--2 { top: 35%; right: 5%; }
.tm-hero-stat--3 { bottom: 8%; left: 25%; }

/* ---- Toolbar ---- */
.tm-blog-toolbar {
    background: #fff;
    border-bottom: 1px solid #e8edf3;
    padding: 16px 0 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.tm-blog-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tm-blog-toolbar .detail-breadcrumb {
    margin: 0;
}

.tm-blog-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 6px 6px 14px;
    min-width: min(320px, 100%);
    flex: 0 1 360px;
}

.tm-blog-search i {
    color: #94a3b8;
    font-size: 14px;
}

.tm-blog-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #0f172a;
    min-width: 0;
}

.tm-blog-search-btn {
    background: #2072f3;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tm-blog-search-btn:hover {
    background: #1557c7;
}

.tm-blog-cats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tm-blog-cats-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

.tm-blog-cats-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.tm-blog-cats-scroll::-webkit-scrollbar { display: none; }

.tm-cat-chip {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tm-cat-chip:hover,
.tm-cat-chip.is-active {
    background: #eff6ff;
    color: #2072f3;
    border-color: #bfdbfe;
}

/* ---- Layout ---- */
.tm-blog-page {
    padding: 40px 0 64px;
    background: #f8fafc;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(32, 114, 243, 0.04), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(0, 196, 167, 0.04), transparent 40%);
}

.tm-blog-search.is-focused {
    border-color: #2072f3;
    box-shadow: 0 0 0 4px rgba(32, 114, 243, 0.12);
    background: #fff;
}

.tm-blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: start;
}

.tm-blog-main {
    min-width: 0;
}

.tm-blog-section {
    margin-bottom: 40px;
}

.tm-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tm-section-head h2 {
    font-size: 22px;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tm-section-head h2 i { color: #f59e0b; font-size: 18px; }

.tm-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cat-accent, #2072f3);
    box-shadow: 0 0 12px var(--cat-accent, #2072f3);
    flex-shrink: 0;
}

.tm-blog-cat-block {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8edf3;
    padding: 24px 24px 8px;
    border-left: 4px solid var(--cat-accent, #2072f3);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.tm-view-all {
    font-size: 13px;
    font-weight: 700;
    color: #2072f3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tm-view-all:hover { color: #1557c7; }

.tm-result-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* ---- Cards grid ---- */
.tm-blog-grid {
    display: grid;
    gap: 24px;
}

.tm-blog-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.tm-blog-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8edf3;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
    display: flex;
    flex-direction: column;
    position: relative;
    will-change: transform;
}

.tm-blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cat-accent, #2072f3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s;
    z-index: 2;
}

.tm-blog-card:hover::before { transform: scaleX(1); }

.tm-blog-card:hover {
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.12);
}

.tm-blog-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e0e7ff, #ecfdf5);
}

.tm-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.tm-blog-card:hover .tm-card-shine { transform: translateX(100%); }

.tm-card-read-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tm-blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.tm-blog-card:hover .tm-blog-card-media img {
    transform: scale(1.05);
}

.tm-blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #94a3b8;
}

.tm-blog-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tm-blog-card-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cat-accent, #2072f3);
    background: color-mix(in srgb, var(--cat-accent, #2072f3) 12%, white);
    padding: 4px 10px;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 10px;
    width: fit-content;
}

.tm-blog-card-cat:hover { text-decoration: underline; }

.tm-blog-card-title {
    font-size: 17px;
    line-height: 1.4;
    margin: 0 0 10px;
}

.tm-blog-card-title a {
    color: #0f172a;
    text-decoration: none;
}

.tm-blog-card-title a:hover { color: #2072f3; }

.tm-blog-card-excerpt {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tm-blog-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.tm-blog-card-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--cat-accent, #2072f3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.tm-blog-card-link:hover { gap: 8px; }

/* Featured card — premium */
.tm-featured-pill {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
}

.tm-featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e8edf3;
    box-shadow: 0 16px 56px rgba(15, 23, 42, 0.1);
    transition: transform 0.35s, box-shadow 0.35s;
    will-change: transform;
}

.tm-featured-card:hover {
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

.tm-featured-media {
    position: relative;
    display: block;
    min-height: 320px;
    overflow: hidden;
}

.tm-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tm-featured-card:hover .tm-featured-media img {
    transform: scale(1.06);
}

.tm-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.1), rgba(32,114,243,0.2));
}

.tm-featured-body {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tm-featured-body h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    line-height: 1.3;
    margin: 0 0 14px;
}

.tm-featured-body h3 a {
    color: #0f172a;
    text-decoration: none;
}

.tm-featured-body h3 a:hover { color: var(--cat-accent, #2072f3); }

.tm-featured-body p {
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 18px;
    font-size: 15px;
}

.tm-featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 22px;
}

.tm-featured-meta i { color: var(--cat-accent, #2072f3); margin-right: 4px; }

/* Remove old featured card styles */
.tm-blog-card--featured { display: none; }

/* Mini card (sidebar popular) */
.tm-blog-card--mini {
    flex-direction: row;
    border: none;
    border-radius: 10px;
    box-shadow: none;
    background: #f8fafc;
    margin-bottom: 10px;
}

.tm-blog-card--mini:hover {
    transform: none;
    box-shadow: none;
    background: #eff6ff;
}

.tm-blog-card--mini .tm-blog-card-media {
    flex: 0 0 72px;
    aspect-ratio: 1;
    border-radius: 8px;
    margin: 8px 0 8px 8px;
}

.tm-blog-card--mini .tm-blog-card-body {
    padding: 10px 12px 10px 10px;
}

.tm-blog-card--mini .tm-blog-card-title {
    font-size: 13px;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tm-blog-card--mini .tm-blog-card-foot {
    border: none;
    padding: 0;
    font-size: 11px;
}

.tm-sidebar-popular .tm-blog-card--mini:last-child {
    margin-bottom: 0;
}

/* ---- Sidebar ---- */
.tm-blog-sidebar {
    position: sticky;
    top: 90px;
}

.tm-sidebar-widget {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.tm-sidebar-title {
    font-size: 15px;
    color: #0f172a;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2072f3;
    display: inline-block;
}

.tm-sidebar-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-sidebar-cats a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s;
}

.tm-sidebar-cats a:hover,
.tm-sidebar-cats a.is-active {
    background: #eff6ff;
    color: #2072f3;
}

.tm-sidebar-cats i {
    font-size: 10px;
    opacity: 0.6;
}

.tm-sidebar-cta {
    background: linear-gradient(145deg, #0f172a, #1e3a5f);
    color: #fff;
    text-align: center;
    border: none;
}

.tm-sidebar-cta h3 {
    color: #fff;
    font-size: 17px;
    margin-bottom: 8px;
}

.tm-sidebar-cta p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
    line-height: 1.5;
}

.tm-sidebar-cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(32, 114, 243, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 18px;
    color: #93c5fd;
}

.tm-sidebar-cta .btn { margin-bottom: 8px; }

.tm-sidebar-newsletter {
    background: linear-gradient(145deg, #eff6ff, #f0fdf4);
    border-color: #bfdbfe;
    text-align: center;
}

.tm-newsletter-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2072f3;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(32, 114, 243, 0.15);
}

.tm-sidebar-newsletter h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #0f172a;
}

.tm-sidebar-newsletter p {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.5;
}

.tm-newsletter-form {
    display: flex;
    gap: 6px;
}

.tm-newsletter-form input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    min-width: 0;
}

.tm-newsletter-form input:focus {
    border-color: #2072f3;
    box-shadow: 0 0 0 3px rgba(32, 114, 243, 0.12);
}

.tm-newsletter-form button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #2072f3;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.tm-newsletter-form button:hover { background: #1557c7; }

.tm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.15s;
}

.tm-sidebar-link:hover {
    background: #f1f5f9;
    color: #2072f3;
}

.tm-sidebar-link i {
    color: #2072f3;
    width: 18px;
}

/* ---- Pagination ---- */
.tm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.tm-page-num,
.tm-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.tm-page-num:hover,
.tm-page-btn:hover {
    border-color: #2072f3;
    color: #2072f3;
}

.tm-page-num.is-active {
    background: #2072f3;
    border-color: #2072f3;
    color: #fff;
}

.tm-page-dots {
    color: #94a3b8;
    padding: 0 4px;
}

.tm-page-summary {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

/* ---- Empty state ---- */
.tm-blog-empty {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
}

.tm-blog-empty i {
    font-size: 40px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.tm-blog-empty h3 {
    margin-bottom: 8px;
}

.tm-blog-empty p {
    color: #64748b;
    margin-bottom: 20px;
}

/* ---- Category intro ---- */
.tm-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2072f3;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.tm-cat-desc {
    font-size: 15px;
    color: #64748b;
    margin-top: 8px;
    max-width: 640px;
    line-height: 1.6;
}

/* ============================================
   ARTICLE (single post) page
   ============================================ */
.tm-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(15, 23, 42, 0.06);
    z-index: 9999;
}

.tm-read-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--cat-accent, #2072f3), #00c4a7);
    transition: width 0.1s linear;
    box-shadow: 0 0 12px var(--cat-accent, #2072f3);
}

.tm-article-hero--cinematic {
    position: relative;
    padding: 48px 0 56px;
    overflow: hidden;
    border-bottom: none;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
}

.tm-article-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    filter: blur(2px);
}

.tm-article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.55) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.tm-article-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.tm-article-hero--cinematic .detail-breadcrumb a,
.tm-article-hero--cinematic .detail-breadcrumb span {
    color: rgba(255, 255, 255, 0.7);
}

.tm-article-hero--cinematic .detail-breadcrumb a:hover { color: #fff; }

.tm-article-hero--cinematic .detail-breadcrumb li.active span { color: #fff; }

.tm-article-hero--cinematic .tm-article-cat {
    background: color-mix(in srgb, var(--cat-accent, #2072f3) 30%, transparent);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tm-article-hero--cinematic .tm-article-title {
    color: #fff;
    max-width: 900px;
}

.tm-article-hero--cinematic .tm-article-deck {
    color: rgba(255, 255, 255, 0.8);
}

.tm-article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tm-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.tm-meta-pill i { color: #93c5fd; }

.tm-share-trigger {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.tm-article-cover--framed {
    margin-top: -40px;
    padding-bottom: 0;
    background: transparent;
    position: relative;
    z-index: 3;
}

.tm-cover-frame {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
    border: 4px solid #fff;
}

.tm-cover-frame img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.tm-article-hero {
    padding: 32px 0 24px;
    background: #fff;
    border-bottom: 1px solid #e8edf3;
}

.tm-article-hero .detail-breadcrumb {
    margin-bottom: 16px;
}

.tm-article-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2072f3;
    background: #eff6ff;
    padding: 6px 14px;
    border-radius: 50px;
    text-decoration: none;
    margin-bottom: 14px;
}

.tm-article-cat:hover {
    background: #dbeafe;
}

.tm-article-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 12px;
    max-width: 820px;
}

.tm-article-deck {
    font-size: 18px;
    color: #64748b;
    line-height: 1.65;
    max-width: 720px;
    margin-bottom: 18px;
}

.tm-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.tm-article-meta i {
    color: #2072f3;
    margin-right: 6px;
}

.tm-article-cover {
    background: #0f172a;
    padding: 0;
}

.tm-article-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.tm-article-page {
    padding: 32px 0 56px;
    background: #fff;
}

.tm-blog-layout--article {
    grid-template-columns: 1fr 280px;
}

.tm-article-main {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8edf3;
    padding: 32px 36px 36px;
    min-width: 0;
    box-shadow: 0 8px 40px rgba(15, 23, 42, 0.06);
}

.tm-article-content h2 {
    scroll-margin-top: 100px;
    position: relative;
    padding-left: 16px;
}

.tm-article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #2072f3, #00c4a7);
}

.tm-tag {
    font-size: 12px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    color: #64748b;
    transition: all 0.2s;
}

.tm-tag:hover {
    border-color: #bfdbfe;
    color: #2072f3;
    background: #eff6ff;
}

.tm-share-btns a {
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.tm-share-btns a:hover {
    transform: translateY(-3px) scale(1.05);
}

.tm-blog-related {
    padding: 56px 0 64px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.tm-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tm-tag {
    font-size: 12px;
    padding: 5px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    color: #64748b;
}

.tm-article-body-wrap {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

.tm-article-toc {
    position: sticky;
    top: 100px;
}

.tm-article-toc .blog-toc {
    margin: 0;
}

.tm-article-content {
    font-size: 16px;
    line-height: 1.85;
    color: #334155;
}

.tm-article-content h2 {
    font-size: 24px;
    color: #0f172a;
    margin: 36px 0 14px;
    padding-top: 8px;
}

.tm-article-content h3 {
    font-size: 20px;
    color: #0f172a;
    margin: 28px 0 12px;
}

.tm-article-content p {
    margin-bottom: 18px;
}

.tm-article-content ul,
.tm-article-content ol {
    margin: 12px 0 20px 24px;
}

.tm-article-content li {
    margin-bottom: 8px;
}

.tm-article-content a {
    color: #2072f3;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tm-article-content img {
    border-radius: 12px;
    margin: 24px 0;
}

.tm-article-share {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e8edf3;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tm-article-share-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tm-share-btns {
    display: flex;
    gap: 8px;
}

.tm-share-btns a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}

.tm-share-btns a:hover {
    background: #2072f3;
    color: #fff;
}

.tm-article-author-box {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.tm-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2072f3, #00c4a7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.tm-article-author-box strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 4px;
}

.tm-article-author-box p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

.tm-article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e8edf3;
}

.tm-blog-related {
    padding: 48px 0 56px;
    background: #fff;
    border-top: 1px solid #e8edf3;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .tm-blog-layout,
    .tm-blog-layout--article {
        grid-template-columns: 1fr;
    }

    .tm-blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tm-sidebar-widget { margin-bottom: 0; }

    .tm-blog-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .tm-blog-card--featured { display: none; }

    .tm-featured-card {
        grid-template-columns: 1fr;
    }

    .tm-featured-media { min-height: 220px; }

    .tm-featured-body { padding: 24px 20px; }

    .tm-article-body-wrap {
        grid-template-columns: 1fr;
    }

    .tm-article-toc {
        position: static;
        order: -1;
    }
}

/* ---- Clean article hero (single column layout) ---- */
.tm-article-hero--clean {
    position: relative;
    padding: 36px 0 32px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #e8edf3;
    overflow: hidden;
}

.tm-article-hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(32, 114, 243, 0.06), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 196, 167, 0.05), transparent 40%);
    pointer-events: none;
}

.tm-article-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: center;
}

.tm-article-hero-text .detail-breadcrumb {
    margin-bottom: 14px;
}

.tm-article-hero--clean .tm-article-cat {
    background: color-mix(in srgb, var(--cat-accent, #2072f3) 12%, white);
    color: var(--cat-accent, #2072f3);
    border: 1px solid color-mix(in srgb, var(--cat-accent, #2072f3) 25%, transparent);
}

.tm-article-hero--clean .tm-article-title {
    color: #0f172a;
    font-size: clamp(1.65rem, 3.5vw, 2.35rem);
    line-height: 1.22;
    margin-bottom: 12px;
    max-width: none;
}

.tm-article-hero--clean .tm-article-deck {
    color: #64748b;
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 0;
    max-width: 640px;
}

.tm-article-meta-bar--light .tm-meta-pill {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.tm-article-meta-bar--light .tm-meta-pill i {
    color: var(--cat-accent, #2072f3);
}

.tm-meta-pill--btn {
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.tm-meta-pill--btn:hover {
    border-color: var(--cat-accent, #2072f3);
    color: var(--cat-accent, #2072f3);
}

.tm-article-visual-frame {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
    border: 1px solid #e8edf3;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
}

.tm-article-visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tm-article-hero-visual--placeholder .tm-article-visual-frame {
    aspect-ratio: 4 / 3;
    max-height: 260px;
    box-shadow: 0 8px 32px rgba(32, 114, 243, 0.12);
    border-color: color-mix(in srgb, var(--cat-accent, #2072f3) 20%, #e2e8f0);
}

.tm-article-hero-visual--placeholder .tm-article-visual-frame img {
    object-fit: contain;
    padding: 12px;
    background: linear-gradient(145deg, #eff6ff, #f0fdf4);
}

.tm-read-progress {
    top: 0;
}

@media (max-width: 992px) {
    .tm-article-hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tm-article-hero-visual {
        order: -1;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    .tm-article-hero--clean {
        padding: 28px 0 24px;
    }
}

@media (max-width: 768px) {
    .tm-blog-hero-inner {
        grid-template-columns: 1fr;
    }

    .tm-blog-hero-visual {
        display: none;
    }

    .tm-blog-toolbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .tm-blog-search {
        flex: 1;
        min-width: 0;
    }

    .tm-blog-grid--3 {
        grid-template-columns: 1fr;
    }

    .tm-blog-sidebar {
        grid-template-columns: 1fr;
    }

    .tm-article-main {
        padding: 20px 18px 24px;
    }

    .tm-article-title {
        font-size: 1.5rem;
    }

    .tm-article-hero--cinematic {
        padding: 32px 0 40px;
        min-height: auto;
    }

    .tm-article-cover--framed {
        margin-top: -20px;
    }

    .tm-cover-frame {
        border-width: 2px;
        border-radius: 14px;
    }
}
