@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0f1115;
    --bg-card: rgba(25, 28, 35, 0.6);
    --bg-card-hover: rgba(35, 38, 45, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 255, 255, 0.15);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --accent-secondary: #8b5cf6;

    --glass-blur: blur(12px);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.1);
    --border-glow: rgba(59, 130, 246, 0.3);

    --text-primary: #0f1115;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --accent-primary: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.5);
    --accent-secondary: #7c3aed;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.8);
}

[data-theme="light"] footer {
    background: rgba(248, 250, 252, 0.9);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--bg-card);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.04), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.04), transparent 25%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #60a5fa;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    color: white;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.3rem;
    outline: none;
    font-size: 0.9rem;
    width: 140px;
    transition: width 0.3s ease;
}

.search-input:focus {
    width: 200px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--accent-primary);
}

/* Main Layout */
.main-wrapper {
    margin-top: 80px;
    /* offset navbar */
    min-height: calc(100vh - 160px);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

/* Blog Listing Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.blog-title a {
    color: var(--text-primary);
}

.blog-title a:hover {
    color: var(--accent-primary);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

/* Two-Sidebar Layout */
.two-sidebar-layout {
    display: grid;
    grid-template-columns: 60px 1fr 300px;
    gap: 2.5rem;
    position: relative;
}

.sidebar-left {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-content {
    min-width: 0;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.sidebar-right {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Left Sidebar specific */
.toc-nav {
    margin-bottom: 2rem;
}

.toc-nav ul {
    list-style: none;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.toc-nav a:hover {
    color: var(--accent-primary);
}

.reading-progress-container {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    /* updated via JS */
}

/* Article Styling */
.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-body h1 {
    font-size: 2.25rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.article-body hr {
    margin: 3rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
    opacity: 0.6;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body li p {
    margin-bottom: 0;
    display: inline;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.article-body iframe,
.article-body video {
    max-width: 100%;
    width: 100%;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    aspect-ratio: 16 / 9;
}

.article-body figure {
    margin: 2.5rem 0;
}

.article-body figure img {
    margin: 0;
}

.article-body figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-style: italic;
}

.article-body del, 
.article-body s {
    text-decoration: line-through;
    opacity: 0.8;
}

.article-body sup, 
.article-body sub {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.article-body sup { top: -0.5em; }
.article-body sub { bottom: -0.25em; }

.article-body ul ul,
.article-body ul ol,
.article-body ol ul,
.article-body ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.article-body ul ul,
.article-body ol ul {
    list-style-type: circle;
}

.article-body h3 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body h4 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body ul {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    list-style: none;
}

.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body ul li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
}

.article-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

.article-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    overflow-x: auto;
    display: table;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.article-body table th,
.article-body table td {
    padding: 1.5rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: top;
}

.article-body table th > *:last-child,
.article-body table td > *:last-child {
    margin-bottom: 0 !important;
}

.article-body table th:not(:last-child),
.article-body table td:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.article-body table th {
    color: var(--text-primary);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .article-body table th {
    background: rgba(255, 255, 255, 0.05);
}

.article-body table th:first-child {
    border-top-left-radius: 12px;
}

.article-body table th:last-child {
    border-top-right-radius: 12px;
}

.article-body table tr:last-child td {
    border-bottom: none;
}

.article-body table tr {
    transition: background-color 0.2s ease;
}

.article-body table tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .article-body table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.article-body pre {
    background: #111827;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: #10b981;
    color: #fff;
}

.article-body code {
    background: rgba(236, 72, 153, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9em;
    color: #ec4899;
    font-weight: 500;
}

[data-theme="light"] .article-body code {
    background: rgba(236, 72, 153, 0.05);
    color: #db2777;
}

.article-body pre code,
[data-theme="light"] .article-body pre code {
    background: transparent;
    padding: 0;
    color: #ffffff;
    border: none;
    font-weight: normal;
}

.article-body blockquote {
    border-left: 4px solid var(--accent-primary);
    margin: 2.5rem 0;
    font-style: italic;
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    font-size: 1.25rem;
    line-height: 1.7;
    position: relative;
}

.article-body blockquote::before {
    content: "“";
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 4rem;
    color: var(--accent-glow);
    font-family: serif;
    opacity: 0.3;
}

.article-body blockquote > *:last-child {
    margin-bottom: 0 !important;
}

.article-body a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding-bottom: 2px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.article-body a:hover {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
}

/* Right Sidebar specific */
.widget {
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.promo-widget {
    background: linear-gradient(135deg, rgba(35, 38, 45, 0.9), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .promo-widget {
    background: linear-gradient(135deg, rgba(240, 245, 255, 0.9), rgba(59, 130, 246, 0.1));
    border-color: rgba(59, 130, 246, 0.3);
}

/* Footer */
footer {
    background: rgba(15, 17, 21, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .two-sidebar-layout {
        grid-template-columns: 1fr 300px;
    }

    .sidebar-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .two-sidebar-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-right {
        display: none;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 2rem;
    }
}

/* Scroll Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Pagination Styles */
nav[role="navigation"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

nav[role="navigation"] svg {
    width: 1.25rem;
    height: 1.25rem;
}

nav[role="navigation"] a,
nav[role="navigation"] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    margin: 0 0.1rem;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

nav[role="navigation"] a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-color: rgba(59, 130, 246, 0.3);
}

nav[role="navigation"] span[aria-current="page"] span {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.hidden.sm\:flex-1.sm\:flex.sm\:items-center.sm\:justify-between {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hidden.sm\:flex-1.sm\:flex.sm\:items-center.sm\:justify-between>div {
    margin-bottom: 0.5rem;
}

/* Katen Inspired Layout */
.katen-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .katen-layout {
        grid-template-columns: 1fr;
    }
}

.katen-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .katen-hero {
        grid-template-columns: 1fr;
    }
}

.katen-featured-post {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    background-size: cover;
    background-position: center;
}

.katen-featured-post::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 17, 21, 0.9) 0%, rgba(15, 17, 21, 0.2) 50%, transparent 100%);
    z-index: 1;
}

.katen-featured-content {
    position: relative;
    z-index: 2;
    color: white;
}

.katen-featured-content .blog-category {
    background: var(--accent-primary);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.katen-featured-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.katen-featured-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    gap: 1rem;
}

.katen-list-post {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.katen-list-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.katen-list-post-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.katen-list-post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.katen-list-post-content .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.katen-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    display: inline-block;
    position: relative;
}

.katen-section-title::after {
    content: '〰';
    position: absolute;
    bottom: -15px;
    left: 0;
    color: var(--accent-primary);
    font-size: 1.5rem;
    line-height: 1;
}

.katen-editors-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .katen-editors-pick {
        grid-template-columns: 1fr;
    }
}

.katen-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.katen-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.katen-card-img-wrap {
    overflow: hidden;
    position: relative;
    display: block;
    border-radius: 12px;
    padding-top: 60%;
}

.katen-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.katen-card:hover .katen-card-img-wrap img {
    transform: scale(1.08);
}

.katen-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    z-index: 2;
}

.katen-card-body {
    padding: 1.5rem;
}

.katen-card-title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.katen-trending-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .katen-trending-grid {
        grid-template-columns: 1fr;
    }
}

.katen-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.katen-widget-title {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.katen-widget-title::after {
    content: '〰';
    display: block;
    color: var(--accent-primary);
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 0.2rem;
}

.katen-popular-post {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.katen-popular-number {
    width: 30px;
    height: 30px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.katen-popular-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.katen-topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.katen-topic-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-secondary);
}

.katen-topic-item:last-child {
    border-bottom: none;
}

/* Newsletter Slide-in Popup */
.newsletter-popup {
    position: fixed;
    bottom: -400px;
    left: 2rem;
    width: 350px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.newsletter-popup.show {
    bottom: 2rem;
}

.newsletter-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

.newsletter-popup-close:hover {
    color: var(--accent-primary);
}

/* Floating Action Bar */
.floating-action-bar {
    padding: 1.5rem 0.5rem;
    border-radius: 40px;
    width: 60px;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.floating-share-btn {
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s ease;
    text-decoration: none;
}

.floating-share-btn:hover {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
}

/* Responsive Navbar */
.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
}

.nav-search-container {
    margin-left: auto;
    margin-right: 1.5rem;
}

.latest-post-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.latest-post-img {
    flex: 0 0 40%;
    padding-top: 0;
    min-height: 200px;
    margin: 1rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
}

.latest-post-img img {
    height: 100%;
    position: absolute;
    inset: 0;
    width: 100%;
    object-fit: cover;
}

.latest-post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 1rem;
}

.latest-post-body .blog-meta {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.latest-post-body .category-link {
    color: var(--accent-primary);
}

.latest-post-body .katen-card-title {
    font-size: 1.3rem;
}

.latest-post-body .post-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.trending-list-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .trending-list-grid {
        grid-template-columns: 1fr;
    }

    .katen-list-post {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .katen-list-post>a {
        width: 100%;
    }

    .katen-list-post-img {
        width: 100%;
        height: 180px;
        border-radius: 8px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .latest-post-card {
        flex-direction: column;
    }

    .latest-post-img {
        flex: 0 0 100%;
        margin: 0;
        border-radius: 12px 12px 0 0;
        min-height: 220px;
    }

    .latest-post-body {
        padding: 1.5rem;
    }

    .nav-container {
        flex-wrap: wrap;
        /* padding: 1rem; */
        justify-content: flex-start;
    }

    .nav-logo {
        margin-right: auto;
    }

    .nav-links {
        display: none;
        position: static;
        transform: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid var(--border-color);
        order: 3;
    }

    .nav-search-container {
        display: none;
        width: 100%;
        margin: 1rem 0 0 0;
        order: 4;
    }

    .nav-container.active .nav-links,
    .nav-container.active .nav-search-container {
        display: flex;
    }
}

@media (max-width: 600px) {
    .meta-separator {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem;
    }
}

::selection {
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
}

.article-body strong,
.article-body b {
    color: var(--text-primary);
    font-weight: 700;
}

.article-body>p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-primary);
    opacity: 0.9;
}
/* Grid Layout from Editor */
.article-body .grid-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: var(--cols, 1fr);
    margin-bottom: 1.5rem;
}
.article-body .grid-layout-col {
    grid-column: var(--col-span, span 1 / span 1);
    background: rgba(0,0,0,0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .article-body .grid-layout-col {
    background: rgba(255,255,255,0.02);
}
@media (max-width: 768px) {
    .article-body .grid-layout {
        grid-template-columns: 1fr !important;
    }
    .article-body .grid-layout-col {
        grid-column: 1 / -1 !important;
    }
}

/* Accordion/Details from Editor */
.article-body details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.article-body summary {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.15rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    background: rgba(0,0,0,0.02);
    border-bottom: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease;
    color: var(--text-primary);
}
.article-body summary:hover {
    background: rgba(0,0,0,0.04);
    color: var(--accent-primary);
}
[data-theme="dark"] .article-body summary {
    background: rgba(255,255,255,0.02);
}
[data-theme="dark"] .article-body summary:hover {
    background: rgba(255,255,255,0.05);
}
.article-body details[open] summary {
    border-bottom-color: var(--border-color);
}
.article-body details > div[data-type="detailsContent"] {
    padding: 1.5rem;
    background: transparent;
}

/* Block Components Styles (Tailwind Fallbacks) */
/* Button Block */
.inline-block { display: inline-block; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.rounded-lg { border-radius: 0.5rem; }
.font-bold { font-weight: 700; }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.text-white, .article-body a.text-white { color: #fff !important; }
.article-body a.inline-block { border-bottom: none !important; }

.bg-green-600 { background-color: #16a34a; }
.hover\:bg-green-700:hover { background-color: #15803d; }
.bg-red-600 { background-color: #dc2626; }
.hover\:bg-red-700:hover { background-color: #b91c1c; }
.bg-blue-600 { background-color: #2563eb; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.bg-slate-800 { background-color: #1e293b; }
.hover\:bg-slate-900:hover { background-color: #0f172a; }
.bg-primary-600 { background-color: var(--accent-primary, #3b82f6); }
.hover\:bg-primary-700:hover { background-color: var(--accent-hover, #2563eb); }

/* Notice Block */
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.p-6 { padding: 1.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.border { border-width: 1px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.article-body .prose > *:last-child { margin-bottom: 0 !important; }

.bg-slate-100 { background-color: #f1f5f9; }
.text-slate-800 { color: #1e293b; }
.border-slate-200 { border-color: #e2e8f0; }

.bg-primary-50 { background-color: rgba(59, 130, 246, 0.1); }
.text-primary-900 { color: #1e3a8a; }
.border-primary-200 { border-color: rgba(59, 130, 246, 0.3); }

.bg-emerald-50 { background-color: #ecfdf5; }
.text-emerald-900 { color: #064e3b; }
.border-emerald-200 { border-color: #a7f3d0; }

.bg-amber-50 { background-color: #fffbeb; }
.text-amber-900 { color: #78350f; }
.border-amber-200 { border-color: #fde68a; }

.bg-rose-50 { background-color: #fff1f2; }
.text-rose-900 { color: #881337; }
.border-rose-200 { border-color: #fecdd3; }
