/*
Theme Name: Build5Nines Modern
Theme URI: https://build5nines.com
Author: Build5Nines
Author URI: https://build5nines.com
Description: A modern technical journal theme for Build5Nines — clean, editorial, article-first design for software developers.
Version: 1.0.70
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: build5nines-modern
Tags: blog, news, education, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --color-bg: #ffffff;
    --color-bg-soft: #f6f8fb;
    --color-text: #071225;
    --color-text-muted: #5f6b7a;
    --color-border: #e3e8ef;
    --color-primary: #0176C6; /* #145cff; */
    --color-primary-hover: #0044cc;
    --color-light-blue: #eef5ff;
    --color-navy: #0b1220;
    --color-navy-light: #1a2332;

    /* Typography */
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

    /* Sizing */
    --container-max: 1200px;
    --container-narrow: 800px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 72px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: 0.2s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg-soft);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text);
    line-height: 1.3;
    font-weight: 700;
}

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: var(--space-lg);
}

.site-logo img {
    height: 28px;
    width: auto;
}

.site-logo__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-logo__image {
    flex-shrink: 0;
}

.site-logo__text {
    display: inline-flex;
    align-items: baseline;
    font-family: "Segoe UI", "Segoe UI Variable", var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--color-text);
    white-space: nowrap;
    line-height: 1;
}

.site-logo__text-part {
    display: inline-block;
}

.site-logo__text-part--build,
.site-logo__text-part--nines {
    color: var(--color-text);
}

.site-logo__text-part--accent {
    color: var(--color-primary);
}

.site-logo a {
    display: flex;
    align-items: center;
}

.primary-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.primary-nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex: 1;
    justify-content: center;
}

.primary-nav a {
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}

.primary-nav a:hover,
.primary-nav a.active,
.primary-nav .current-menu-item > a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.primary-nav__menu > li {
    list-style: none;
    display: flex;
    align-items: center;
    position: relative;
}

.primary-nav .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

.primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    min-width: 220px;
    padding: var(--space-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
}

.primary-nav .sub-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: flex;
}

.primary-nav .sub-menu li {
    list-style: none;
    display: block;
    width: 100%;
}

.primary-nav .sub-menu a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-bottom: none;
    border-radius: 8px;
    color: var(--color-text);
}

.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu .current-menu-item > a {
    background: var(--color-bg-soft);
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.header-search-btn:hover {
    background: var(--color-bg-soft);
}

.header-search-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.btn-subscribe {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-subscribe:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 18px;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn-primary {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(20, 92, 255, 0.18);
}

.btn-primary:hover {
    color: #fff;
    box-shadow: 0 12px 22px rgba(20, 92, 255, 0.24);
    transform: translateY(-1px);
}

.btn-primary:focus-visible {
    outline: 2px solid rgba(20, 92, 255, 0.22);
    outline-offset: 2px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    color: var(--color-text);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Hero / Editor's Pick
   ========================================================================== */

.hero-section {
    padding: var(--space-2xl) 0 var(--space-xl);
    background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 100%);
}

/* Two-column outer grid: carousel (70%) + sidebar cards (30%) */
.hero-outer-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: var(--space-xl);
    align-items: start;
}

/* Sidebar stack of 3 category cards */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-self: stretch;
    justify-content: space-between;
}

.hero-sidebar-card {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    flex: 1;
    transition: box-shadow var(--transition);
}

.hero-sidebar-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.hero-sidebar-card__image {
    flex-shrink: 0;
    width: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: block;
    background: var(--color-light-blue);
    align-self: flex-start;
}

.hero-sidebar-card__image img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-sidebar-card__body {
    flex: 1;
    min-width: 0;
}

.hero-sidebar-card__cat {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
    text-decoration: none;
}

.hero-sidebar-card__cat:hover {
    text-decoration: underline;
}

.hero-sidebar-card__title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.35rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.hero-sidebar-card__title a {
    color: var(--color-text);
    text-decoration: none;
}

.hero-sidebar-card__title a:hover {
    color: var(--color-primary);
}

.hero-sidebar-card__meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    gap: var(--space-xs);
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}

.hero-carousel {
    position: relative;
    padding: var(--space-xl);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.hero-carousel__viewport {
    position: relative;
    z-index: 1;
}

.hero-carousel__slide {
    display: none;
}

.hero-carousel__slide.is-active {
    display: block;
    animation: hero-slide-in 0.45s ease;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.hero-content {
    padding-right: 0;
}

.hero-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.hero-category-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(7, 18, 37, 0.12);
}

.hero-category-label:hover {
    text-decoration: none;
}

.hero-title {
    font-size: 1.5em;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.hero-title a {
    color: inherit;
}

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

.hero-excerpt {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.hero-meta .separator {
    color: var(--color-border);
}

.hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(180deg, #eff4ff 0%, #dfeaff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.hero-image__link {
    display: block;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.hero-carousel__dot {
    appearance: none;
    border: none;
    width: 28px;
    height: 8px;
    border-radius: 9999px;
    background: rgba(20, 92, 255, 0.16);
    cursor: pointer;
    transition: width var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero-carousel__dot:hover {
    background: rgba(20, 92, 255, 0.28);
    transform: translateY(-1px);
}

.hero-carousel__dot.is-active {
    width: 56px;
    background: var(--color-primary);
    box-shadow: 0 8px 16px rgba(20, 92, 255, 0.24);
}

.hero-carousel__dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 92, 255, 0.18);
}

@keyframes hero-slide-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Explore Resources Strip
   ========================================================================== */

.resources-section {
    padding: var(--space-lg) 0 var(--space-xl);
    background: linear-gradient(180deg, rgba(246, 249, 255, 0.9) 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

.resources-section .section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.resource-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    min-height: 170px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.resource-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.resource-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.resource-card h3 a {
    color: var(--color-text);
}

.resource-card h3 a:hover {
    color: var(--color-primary);
}

.resource-card p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 32ch;
}

.resource-card-thumbs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    align-items: flex-end;
    flex-wrap: wrap;
}

.resource-card-thumbs img {
    width: 52px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

/* Books resource card: text left, covers right */
.resource-card--books {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

.resource-card__text {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.resource-card--books .resource-card__text p {
    margin-bottom: var(--space-md);
    max-width: 26ch;
}

.resource-card__covers {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-end;
    flex-shrink: 0;
}

.resource-card__cover-link {
    display: block;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

.resource-card__cover-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.resource-card__cover-link img {
    display: block;
    width: 80px;
    height: auto;
    object-fit: contain;
}

.resource-card__cover-link + .resource-card__cover-link {
    margin-bottom: 0;
    transform-origin: bottom center;
}

.resource-card-thumb-placeholder {
    width: 52px;
    height: 70px;
    background: linear-gradient(180deg, #eff4ff 0%, #e7eefb 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.resource-card-thumb-placeholder svg {
    width: 22px;
    height: 22px;
}

.resource-card-icons {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.resource-card-icons .icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg, #eff4ff 0%, #e8effd 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

/* Projects resource card: text left, GitHub icons right */
.resource-card--projects {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
}

.resource-card--projects .resource-card__text p {
    margin-bottom: var(--space-md);
    max-width: 26ch;
}

.resource-card__icons {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex-shrink: 0;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.resource-card__github-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(180deg, #eff4ff 0%, #e8effd 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.resource-card__github-icon:hover {
    background: var(--color-navy);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
    transform: translateY(-1px);
}

.resource-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

.resource-link:hover {
    color: var(--color-primary-hover);
}

.resource-link:hover {
    color: var(--color-primary-hover);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ==========================================================================
   Article Cards
   ========================================================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.article-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.article-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.article-card__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-navy);
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.article-card:hover .article-card__image img {
    transform: scale(1.03);
}

.article-card__body {
    padding: var(--space-lg);
}

.article-card__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    text-shadow: 0 1px 1px rgba(7, 18, 37, 0.12);
}

.article-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.article-card__title a {
    color: inherit;
}

.article-card__title a:hover {
    color: var(--color-primary);
}

.article-card__excerpt {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.article-card__meta .separator {
    color: var(--color-border);
}

/* ==========================================================================
   Latest Articles (List style)
   ========================================================================== */

/* Picks section slightly differentiated background */
.picks-section {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
}

.project-articles-section {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-soft);
    border-top: 1px solid var(--color-border);
}

.latest-section {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-soft);
}

.latest-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--space-2xl);
    min-width: 0;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.article-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    min-width: 0;
}

.article-row__content {
    min-width: 0;
    overflow: hidden;
}

.article-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.article-row__image {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-navy);
}

.article-row__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-row__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
    text-shadow: 0 1px 1px rgba(7, 18, 37, 0.12);
}

.article-row__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.article-row__title a {
    color: var(--color-text);
}

.article-row__title a:hover {
    color: var(--color-primary);
}

.article-row__excerpt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-row__meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Popular Topics Sidebar Widget
   ========================================================================== */

.sidebar-widget {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.sidebar-widget__title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.topics-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.topics-list li:last-child {
    border-bottom: none;
}

.topics-list a {
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 500;
}

.topics-list__link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.topics-list__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.topics-list__icon .category-hero__icon-mark,
.topics-list__icon .bootstrap-icon-mark {
    width: 14px;
    height: 14px;
}

.topics-list__icon svg {
    width: 14px;
    height: 14px;
}

.topics-list a:hover {
    color: var(--color-primary);
}

.topics-list a:hover .topics-list__icon {
    background: var(--color-light-blue);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.topics-list .count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.browse-link {
    display: block;
    margin-top: var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ==========================================================================
   Newsletter CTA
   ========================================================================== */

.newsletter-section {
    padding: var(--space-2xl) 0;
}

.newsletter-card {
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    background:
        linear-gradient(135deg, var(--color-navy) 0%, #1a2d52 100%) padding-box,
        linear-gradient(135deg, rgba(20, 92, 255, 0.3), rgba(20, 92, 255, 0.08)) border-box;
    padding: var(--space-2xl) var(--space-3xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.newsletter-icon {
    flex-shrink: 0;
}

.newsletter-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
}

.newsletter-content {
    flex: 1;
}

.newsletter-content h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: var(--space-xs);
}

.newsletter-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.newsletter-form input[type="email"] {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.875rem;
    min-width: 240px;
    font-family: var(--font-sans);
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .btn-subscribe {
    white-space: nowrap;
}

.newsletter-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-sm);
}

/* Hide email input + button once Mailchimp shows the success message */
#mc-embedded-subscribe-form:has(#mce-success-response:not([style*="display:none"])) #mce-EMAIL,
#mc-embedded-subscribe-form:has(#mce-success-response:not([style*="display:none"])) #mc-embedded-subscribe,
.mc-newsletter-form:has(.mc-success-response:not([style*="display:none"])) [data-mc-email],
.mc-newsletter-form:has(.mc-success-response:not([style*="display:none"])) [data-mc-btn] {
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--color-navy);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .site-logo img {
    height: 24px;
    margin-bottom: var(--space-md);
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: var(--space-md);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.social-links a:hover {
    color: #fff;
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Single Article
   ========================================================================== */

.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumbs a {
    color: var(--color-text-muted);
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumbs .separator {
    display: inline-block;
    margin: 0 var(--space-sm);
    color: var(--color-text-muted);
    font-weight: 600;
    line-height: 1;
}

.single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-2xl);
    padding-bottom: var(--space-3xl);
}

.article-main {
    min-width: 0;
    overflow: hidden;
}

.article-header {
    margin-bottom: var(--space-xl);
}

.article-header__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-shadow: 0 1px 1px rgba(7, 18, 37, 0.12);
}

.article-header__title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.article-header__title a {
    color: inherit;
}

.article-header__title a:hover {
    color: var(--color-primary);
}

.article-header__excerpt {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.article-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-lg);
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.98));
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.article-meta--editorial {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.article-meta__author {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.article-meta--editorial .article-meta__avatar--small {
    width: 36px;
    height: 36px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.article-meta__author-content {
    min-width: 0;
}

.article-meta__author-line {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 2px;
}

.article-meta__details-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.article-meta__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition), box-shadow var(--transition);
}

.share-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-bg-soft);
    box-shadow: 0 8px 20px rgba(20, 92, 255, 0.08);
}

.share-btn svg {
    flex-shrink: 0;
}

.article-meta--editorial .article-meta__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}

.share-btn--secondary {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

.share-btn--secondary:hover {
    background: var(--color-bg-soft);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.article-meta__avatar {
    border-radius: 50%;
}

.article-meta--editorial .article-meta__name:hover {
    color: var(--color-primary);
}

.article-meta__author-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    min-width: 0;
}

.article-meta__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.article-meta__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.article-meta__details {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.article-meta__author-content {
    min-width: 0;
}

.article-meta__label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.article-meta__author-line {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.article-meta__bio {
    max-width: 64ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.article-meta__bio p:last-child {
    margin-bottom: 0;
}

.article-meta__sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-sm);
}

.article-actions {
    display: flex;
    gap: var(--space-sm);
}

.article-meta .author-recognition-badges {
    margin-top: 0;
}

.article-meta .author-recognition-badges__image {
    max-height: 1.9em;
}

.article-actions button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}

.article-actions button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.bootstrap-icon-mark {
    display: inline-block;
    width: 0.95em;
    height: 0.95em;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: -0.12em;
}

.project-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1;
}

.project-stars__icon {
    color: #f5b301;
}

.project-stars__count {
    color: inherit;
}

.book-widget__author .project-stars {
    font-size: 0.78rem;
}

.single-project .project-stars {
    font-size: 0.85rem;
}

.project-github-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.project-github-badge:hover {
    color: var(--color-text);
}

.project-github-badge svg {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .article-meta {
        grid-template-columns: 1fr;
    }

    .article-meta--simple {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-meta__sidebar {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .article-meta {
        padding: var(--space-md);
    }

    .article-meta__author-card {
        align-items: flex-start;
    }

    .article-meta__avatar {
        width: 52px;
        height: 52px;
    }

    .article-meta__bio {
        font-size: 0.9rem;
    }

    .article-actions button {
        width: 100%;
        justify-content: center;
    }
}

.article-featured-image {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-xl);
    background: var(--color-navy);
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related Project inline card (below featured image) */
.related-project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 60%, #f5f0ff 100%);
    border: 1px solid rgba(20, 92, 255, 0.12);
    box-shadow: 0 2px 12px rgba(20, 92, 255, 0.07), inset 0 0 0 1px rgba(255,255,255,0.7);
}
.related-project-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.related-project-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    opacity: 0.75;
}
.related-project-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-project-card__stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}
.related-project-card__btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Article Content Typography */
.article-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
}

/* Article content links */
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: var(--color-primary-hover);
}

.article-content h2 {
    font-size: 1.5rem;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.article-content h3 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.article-content p {
    margin-bottom: var(--space-lg);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-lg);
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.article-content blockquote {
    position: relative;
    border: 1px solid #e2e8f0;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    background: #f8fafc;
    border-radius: var(--radius-md);
    font-style: normal;
    color: var(--color-text);
}

.article-content blockquote::before {
    content: 'Key Takeaway';
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding-left: 1.5rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232563eb' viewBox='0 0 16 16'%3E%3Cpath d='M2 6a6 6 0 1 1 10.174 4.31c-.203.196-.359.4-.453.619l-.762 1.769A.5.5 0 0 1 10.5 13h-5a.5.5 0 0 1-.46-.302l-.761-1.77a2 2 0 0 0-.453-.618A5.98 5.98 0 0 1 2 6m3 8.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1l-.224.447a1 1 0 0 1-.894.553H6.618a1 1 0 0 1-.894-.553L5.5 15a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E") no-repeat left center;
    background-size: 1.1rem 1.1rem;
}

.article-content blockquote > strong:first-child,
.article-content blockquote > p:first-child > strong:first-child {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.02em;
}

.article-content blockquote:has(> strong:first-child)::before,
.article-content blockquote:has(> p:first-child > strong:first-child)::before {
    content: none;
}

.article-content blockquote::after {
    content: none;
}

.article-content blockquote p {
    margin-bottom: var(--space-sm);
    line-height: 1.65;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
}

/* All code inherits mono font */
.article-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* Inline code pill — only outside pre / code-block wrappers */
.article-content :not(pre):not(.wp-block-code) > code {
    background: var(--color-bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.article-content pre {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: var(--radius-md);
    overflow-x: auto;
    position: relative;
    color: #1e1e1e;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Strip any rogue backgrounds from code blocks and all their children
   (covers Shiki/Prism token <span>s and any nested <code> elements) */
.article-content pre code,
.article-content pre code *,
.article-content .wp-block-code code,
.article-content .wp-block-code code * {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.article-content pre code {
    color: inherit !important;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-copy-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 4px 10px;
    background: rgba(30, 30, 30, 0.04);
    border: 1px solid rgba(30, 30, 30, 0.12);
    border-radius: var(--radius-sm);
    color: #1f4e79;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.code-copy-btn:hover {
    background: rgba(30, 30, 30, 0.08);
}

/* Key Takeaway Callout */
.callout-box {
    background: var(--color-light-blue);
    border: 1px solid #c8dcff;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.callout-box__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.callout-box__header svg {
    width: 18px;
    height: 18px;
}

.callout-box p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: 0;
}

/* ==========================================================================
   Article Sidebar
   ========================================================================== */

.article-sidebar {
    align-self: start;
}

/* Table of Contents */
.toc-widget {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.author-bio-widget {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.author-bio-widget__inner {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.author-bio-widget__avatar {
    flex-shrink: 0;
}

.author-bio-widget__avatar-img {
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    border: 2px solid #fff;
}

.author-bio-widget__content {
    min-width: 0;
    padding-top: 2px;
}

.author-bio-widget__label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.author-bio-widget__name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: var(--space-xs);
}

.author-bio-widget__name a {
    color: var(--color-text);
}

.author-bio-widget__name a:hover {
    color: var(--color-primary);
}

.author-bio-widget__bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.author-bio-widget__mvp-badge img {
    max-height: 2.5em;
    width: auto;
}

.toc-widget__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.toc-list li {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    min-width: 0;
    overflow: hidden;
}

.toc-list .toc-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    min-width: 16px;
}

.toc-list a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    padding: 4px 0;
    transition: color var(--transition);
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--color-primary);
}

/* Related articles sidebar */
.related-articles-widget .article-mini {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    min-width: 0;
    overflow: hidden;
}

.related-articles-widget .article-mini.article-mini--stacked {
    flex-direction: column;
}

.related-articles-widget .article-mini:last-child {
    border-bottom: none;
}

.related-articles-widget .article-mini__image {
    width: 64px;
    height: 42px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-navy);
}

.related-articles-widget .article-mini.article-mini--stacked .article-mini__image {
    width: 100%;
    height: 160px;
}

.related-articles-widget .article-mini__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-articles-widget .article-mini__title {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.related-articles-widget .article-mini__title:hover {
    color: var(--color-primary);
}

.related-articles-widget .article-mini__date {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Recommended Book Widget */
.book-widget {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.book-widget__cover {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.book-widget__cover--stacked {
    flex-direction: column;
}

.book-widget__image-link {
    display: block;
    flex: 0 0 96px;
    align-self: flex-start;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px;
}

.book-widget__cover--stacked .book-widget__image-link {
    flex: 0 0 auto;
    width: 100%;
}

.category-project-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.category-project-card .article-mini__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    padding: 6px;
    flex: 0 0 auto;
}

.category-project-card .article-mini__image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.category-project-card__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-project-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.category-project-card__title:hover {
    color: var(--color-primary);
}

.category-project-card__stars,
.category-project-card__excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.category-project-card__stars .project-stars {
    font-size: 0.82rem;
}

.book-widget__cover img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.book-widget__info h4 {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.book-widget__info h4 a {
    color: inherit;
}

.book-widget__info h4 a:hover {
    color: var(--color-primary);
}

.book-widget__author {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 6px;
}

.book-widget__label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.book-widget__subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.book-widget__info p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.book-widget__date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.book-widget .resource-link {
    display: block;
    margin-top: var(--space-sm);
}

/* ==========================================================================
   Book Archive + Single Book
   ========================================================================== */

.book-archive-hero {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.book-archive-hero__inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.book-archive-wrap {
    padding: var(--space-2xl) 0;
}

.book-archive-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.book-archive-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.book-archive-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.book-archive-row__image {
    display: block;
    align-self: start;
    max-width: 180px;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: var(--space-sm);
}

.book-archive-row__image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.book-archive-row__content {
    min-width: 0;
}

.book-archive-row__title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
}

.book-archive-row__title a {
    color: var(--color-text);
}

.book-archive-row__title a:hover {
    color: var(--color-primary);
}

.book-archive-row__subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
}

.book-archive-row__excerpt {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.book-archive-row__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.book-archive-row__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.book-archive-row__actions .btn-primary {
    display: inline-flex;
    align-items: center;
}

.single-book__hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: start;
    padding-bottom: var(--space-3xl);
}

.single-book__cover-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.single-book__cover {
    position: sticky;
    top: 96px;
    align-self: start;
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.single-book__cover-actions {
    margin-top: var(--space-md);
    display: flex;
    justify-content: center;
    width: 100%;
}

.single-book__cover-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.single-book__cta-arrow {
    font-size: 1rem;
    line-height: 1;
}

.single-book__cover img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.single-book__cover-placeholder {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-soft) 100%);
    border: 1px dashed var(--color-border);
}

.single-book__content {
    min-width: 0;
}

.single-book__title {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.single-book__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.single-book__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.single-book__actions {
    margin-bottom: var(--space-xl);
}

.single-book__summary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
}

.single-book__summary p {
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Category / Topic Archive
   ========================================================================== */

.category-hero {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.category-hero__inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.category-hero__icon {
    width: 80px;
    height: 80px;
    background: var(--color-bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.category-hero__icon svg,
.category-hero__icon-mark {
    width: 40px;
    height: 40px;
}

.category-hero__icon-mark {
    display: block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.category-hero__title {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

/* ==========================================================================
   Author Archive
   ========================================================================== */

.author-hero {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.author-hero__inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.author-hero__avatar {
    flex-shrink: 0;
}

.author-hero__avatar-img {
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.author-hero__content {
    min-width: 0;
}

.author-hero__title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.author-hero__bio {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    max-width: 70ch;
}

.author-hero__bio p {
    margin-bottom: var(--space-sm);
}

.author-hero__bio p:last-child {
    margin-bottom: 0;
}

.author-recognition-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.author-recognition-badges__image {
    display: block;
    width: auto;
    max-height: 4em;
    max-width: none;
    height: auto;
    object-fit: contain;
}

.author-hero__count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

.author-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-2xl);
    align-items: start;
}

.author-sidebar {
    align-self: start;
}

.author-books-widget {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.author-books-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.author-books-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.author-books-item__image {
    flex: 0 0 64px;
    width: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--color-bg-soft);
}

.author-books-item__image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.author-books-item__content {
    min-width: 0;
}

.author-books-item__title {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 4px;
}

.author-books-item__title a {
    color: var(--color-text);
}

.author-books-item__title a:hover {
    color: var(--color-primary);
}

.author-books-item__author {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.author-books-item__subtitle {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.author-books-widget__empty {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.author-tabs {
    margin-top: 0;
}

.author-books-panel {
    padding: 0;
}

.author-books-list--tab {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.author-books-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.author-books-row__image {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-bg-soft);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.author-books-row__image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.author-books-row__content {
    min-width: 0;
}

.author-books-row__title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: var(--space-xs);
}

.author-books-row__title a {
    color: var(--color-text);
}

.author-books-row__title a:hover {
    color: var(--color-primary);
}

.author-books-row__author {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.author-books-row__subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.author-books-row__meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.category-hero__description {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.category-hero__count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.category-tabs {
    display: flex;
    gap: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    padding: 0;
}

.category-tabs a {
    display: block;
    padding: var(--space-md) 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.category-tabs a:hover,
.category-tabs a.active {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
}

.category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--space-2xl);
    padding: var(--space-2xl) 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl) 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}

.pagination a {
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.pagination a:hover {
    background: var(--color-light-blue);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination .current {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
}

.pagination .dots {
    border: none;
    color: var(--color-text-muted);
}

.pagination .next,
.pagination .prev {
    font-weight: 600;
}

/* ==========================================================================
   Search Page
   ========================================================================== */

.search-header {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.search-header h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.search-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    background: var(--color-bg);
}

.search-form button {
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.search-form button:hover {
    background: var(--color-primary-hover);
}

.search-results {
    padding: var(--space-2xl) 0;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: var(--space-4xl) 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--color-border);
    margin-bottom: var(--space-md);
}

.error-404 h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.error-404 p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

/* ==========================================================================
   Standard Page
   ========================================================================== */

.single-article {
    background: var(--color-bg);
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.page-content {
    background: var(--color-bg);
    padding: var(--space-2xl) 0;
}

.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-2xl);
    align-items: start;
}

.page-main {
    min-width: 0;
}

.page-sidebar {
    align-self: start;
}

.page-content--sidebar .page-content__inner {
    padding: var(--space-2xl) 0;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: var(--space-lg);
}

.page-content .entry-content {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.page-content .entry-content p {
    margin-bottom: var(--space-lg);
}

.page-content .entry-content h2 {
    font-size: 1.5rem;
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.page-content .entry-content h3 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-section {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-2xl);
    margin-top: var(--space-2xl);
}

.comments-section h2 {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.comment {
    padding: var(--space-lg);
    background: var(--color-bg-soft);
    border-radius: var(--radius-md);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.comment-meta img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.comment-meta .author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-meta .date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.comment-content p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.comment-respond {
    margin-top: var(--space-xl);
}

.comment-respond h3 {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .submit {
    padding: 10px 24px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.comment-form .submit:hover {
    background: var(--color-primary-hover);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: var(--color-text);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Inline Newsletter Card (inside article)
   ========================================================================== */

.newsletter-card--inline {
    padding: var(--space-xl);
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
}

.newsletter-card--inline h3 {
    font-size: 1rem;
}

.newsletter-card--inline p {
    font-size: 0.85rem;
}

.newsletter-card--inline .newsletter-form {
    flex-direction: column;
    flex-shrink: 1;
    min-width: 180px;
}

.newsletter-card--inline .newsletter-form input[type="email"] {
    min-width: auto;
    width: 100%;
}

.newsletter-card--inline .newsletter-note {
    font-size: 0.7rem;
}

.newsletter-card--inline {
    background:
        linear-gradient(135deg, var(--color-navy) 0%, #1a2d52 100%) padding-box,
        linear-gradient(135deg, rgba(20, 92, 255, 0.22), rgba(20, 92, 255, 0.05)) border-box;
    color: #fff;
}

.newsletter-card--inline .newsletter-content h3,
.newsletter-card--inline .newsletter-content p,
.newsletter-card--inline .newsletter-note {
    color: rgba(255, 255, 255, 0.72);
}

.newsletter-card--inline .newsletter-icon svg {
    color: var(--color-primary);
}

/* Unified gradient-border card treatment */
.sidebar-widget,
.toc-widget,
.author-bio-widget,
.book-widget,
.article-featured-image,
.article-card--related {
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) padding-box,
        linear-gradient(135deg, rgba(20, 92, 255, 0.22), rgba(20, 92, 255, 0.05)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   WordPress Block Editor Styles
   ========================================================================== */

.article-content .wp-block-list {
    list-style: disc;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.article-content .wp-block-list li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.article-content .wp-block-heading {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.article-content .wp-block-code {
    margin: var(--space-xl) 0;
    padding: var(--space-lg);
    background: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: var(--radius-md);
    overflow-x: auto;
    position: relative;
    color: #1e1e1e;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content .wp-block-code code {
    color: inherit !important;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-xl) 0;
}

.article-content .wp-block-image {
    margin: var(--space-xl) 0;
}

.article-content .wp-block-image img {
    border-radius: var(--radius-sm);
    width: 100%;
    height: auto;
}

.article-content .wp-block-quote {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xl) 0;
    background: var(--color-light-blue);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--color-text-muted);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.article-content .wp-block-table {
    margin: var(--space-xl) 0;
    width: 100%;
    overflow-x: auto;
    display: block;
}

.article-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.article-content .wp-block-table th,
.article-content .wp-block-table td {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.article-content .wp-block-table th {
    background: var(--color-bg-soft);
    font-weight: 600;
}

/* Same Category Posts plugin related section */
.article-content h3:has(+ .wp-relatedposts),
.article-content .jp-relatedposts,
.article-content .wp-relatedposts {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.article-content .jp-relatedposts {
    display: none !important;
}

.article-related-section {
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-border);
}

.article-related-grid {
    margin-top: var(--space-lg);
}

.article-card--related {
    height: 100%;
}

.article-content .jp-relatedposts-headline {
    margin-bottom: var(--space-lg);
}

.article-content .jp-relatedposts-headline em {
    display: inline-block;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

.article-content .jp-relatedposts-items {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--space-lg) !important;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary) !important;
    box-shadow: var(--shadow-md) !important;
}

.article-content .jp-relatedposts-post-a {
    display: block;
    color: inherit;
    line-height: 0;
}

.article-content .jp-relatedposts-post-img {
    display: block;
    width: 100% !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > h4 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    padding: var(--space-md) var(--space-md) 0;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > h4 a {
    color: inherit;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > h4 a:hover {
    color: var(--color-primary);
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > time {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: var(--space-sm) var(--space-md) 0;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin-bottom: 0;
    padding: var(--space-sm) var(--space-md) 0;
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > p.jp-relatedposts-post-context {
    padding-bottom: var(--space-md);
}

.article-content .jp-relatedposts-items.jp-relatedposts-grid > .jp-relatedposts-post > *:last-child {
    padding-bottom: var(--space-md);
}

@media (max-width: 1024px) {
    .article-content .jp-relatedposts-items {
        grid-template-columns: 1fr !important;
    }

    .article-meta--editorial {
        flex-direction: column;
        align-items: flex-start;
    }

/* ==========================================================================
   WordPress Alignment Classes
   ========================================================================== */

    .article-sidebar {
        position: static;
    }

.alignwide {
    margin-left: -60px;
    margin-right: -60px;
    max-width: calc(100% + 120px);
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: var(--space-lg);
    margin-bottom: var(--space-md);
}

.alignright {
    float: right;
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

    .hero-sidebar {
        flex-direction: row;
        justify-content: stretch;
    }

    .hero-sidebar-card {
        flex: 1;
    }

    .hero-carousel {
        padding: var(--space-lg);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        min-height: 0;
    }

    .hero-content {
        padding-right: 0;
    }

    .book-archive-row,
    .single-book__hero {
        grid-template-columns: 1fr;
    }

    .single-book__cover {
        position: static;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .latest-layout,
    .single-layout,
    .category-layout {
        grid-template-columns: 1fr;
    }

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

    .author-books-row {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .author-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .article-sidebar {
        align-self: auto;
    }

    .page-sidebar {
        align-self: auto;
    }

    .alignwide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    :root {
        --space-2xl: 32px;
        --space-3xl: 48px;
        --space-4xl: 56px;
    }

    .primary-nav {
        display: none;
    }

    .primary-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-lg);
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .primary-nav.active .primary-nav__menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }

    .primary-nav.active .primary-nav__menu > li {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0;
    }

    .primary-nav.active .primary-nav__menu > li > a {
        width: 100%;
        padding: 12px 0;
    }

    .primary-nav.active .sub-menu {
        display: flex;
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: var(--space-xs);
        padding: 0 0 0 var(--space-md);
        border: none;
        border-left: 2px solid var(--color-border);
        border-radius: 0;
        box-shadow: none;
        gap: 0;
    }

    .primary-nav.active .sub-menu a {
        padding: 10px 0;
    }

    .primary-nav.active .menu-item-has-children > a::after {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-carousel {
        padding: var(--space-md);
        border-radius: 24px;
    }

    .hero-sidebar {
        flex-direction: column;
    }

    .hero-sidebar-card__image {
        width: 80px;
    }

    .hero-grid {
        gap: var(--space-lg);
    }

    .hero-dots {
        gap: 6px;
    }

    .hero-carousel__dot {
        width: 24px;
    }

    .hero-carousel__dot.is-active {
        width: 44px;
    }

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

    .article-row {
        grid-template-columns: 1fr;
    }

    .article-row__image {
        max-width: 200px;
    }

    .newsletter-card {
        flex-direction: column;
        padding: var(--space-xl);
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-form input[type="email"] {
        min-width: auto;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .header-inner {
        position: relative;
    }

    .article-header__title {
        font-size: 1.75rem;
    }

    .category-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .category-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-actions {
        margin-left: 0;
    }

    .author-tabs .container {
        display: flex;
        gap: var(--space-lg);
    }

    .author-books-row {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: var(--space-md);
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .article-header__title {
        font-size: 1.5rem;
    }

    .btn-subscribe {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}
