/* ============================================
   Article Typography & Side Navigation
   Deep Iron design system extension for long-form content
   ============================================ */

/* ── Layout Shell ─────────────────────────── */

.article-page {
    padding-top: 64px;
}

/* ── Magazine Cover Header ─────────────────── */

.article-header {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 5.5rem 2rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(80,232,192,0.06);
    background:
        radial-gradient(ellipse 70% 55% at 50% 100%, rgba(80,232,192,0.06) 0%, transparent 100%),
        linear-gradient(180deg, rgba(80,232,192,0.02) 0%, transparent 65%);
}

/* Dot-grid texture that fades downward */
.article-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(80,232,192,0.09) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 90% 100% at 50% 0%, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 90% 100% at 50% 0%, black 0%, transparent 80%);
    pointer-events: none;
}

.article-meta-header {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
}

.article-category-tag {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 0.25rem 0.875rem;
    border-radius: 99em;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-date,
.article-read-time {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.article-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.25rem, 5vw, 3.375rem);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 auto 1.5rem;
    max-width: 760px;
    color: var(--color-text);
    letter-spacing: -0.025em;
    position: relative;
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0 auto 2.5rem;
    max-width: 580px;
    position: relative;
}

.article-featured-img {
    display: block;
    max-width: 820px;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 14px;
    margin: 0 auto;
}

/* ── Body Wrapper ──────────────────────────── */

.article-body-wrap {
    padding-top: 3rem;
}


/* ── Inline Table of Contents ─────────────── */

.article-toc {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(80,232,192,0.025);
    border: 1px solid rgba(80,232,192,0.06);
    border-radius: 10px;
}

.article-toc-title {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc li {
    margin-bottom: 0.375rem;
}

.article-toc a {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.article-toc .toc-h3 {
    padding-left: 1rem;
    font-size: 0.8125rem;
}

/* Collapsible overflow for large TOCs */
.toc-overflow {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.toc-overflow.open {
    max-height: 1200px;
}

.toc-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: 0.75rem;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
    cursor: pointer;
    padding: 0;
    opacity: 0.65;
    transition: opacity 0.2s ease;
}

.toc-expand-btn:hover {
    opacity: 1;
}

.toc-expand-btn svg {
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.toc-expand-btn.expanded svg {
    transform: rotate(180deg);
}


/* ── Article Content Typography ───────────── */

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    color: var(--color-text-secondary);
    counter-reset: h2-counter;
}

/* Headings */
.article-content h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.625rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.3;
    margin: 3.75rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(80,232,192,0.06);
    letter-spacing: -0.01em;
    counter-increment: h2-counter;
}

/* Section number label above each H2 */
.article-content h2::before {
    content: counter(h2-counter, decimal-leading-zero) '.';
    display: block;
    font-size: 0.5625rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--color-primary);
    opacity: 0.5;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    line-height: 1.35;
    margin: 2.25rem 0 0.875rem;
}

.article-content h4 {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-text);
    margin: 1.75rem 0 0.625rem;
}

/* Paragraphs */
.article-content p {
    font-size: 1.0625rem;
    line-height: 1.85;
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
}

/* Lead paragraph (first paragraph after h2) */
.article-content h2 + p {
    font-size: 1.1rem;
}

/* Drop cap — editorial opening letter */
.article-content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.625em;
    line-height: 0.78;
    padding-right: 0.09em;
    padding-top: 0.05em;
    font-weight: 500;
    color: var(--color-primary);
    font-family: 'Inter', sans-serif;
}

/* Links */
.article-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(80,232,192,0.2);
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.article-content a:hover {
    opacity: 0.6;
    border-bottom-color: var(--color-primary);
}

/* Bold & Emphasis */
.article-content strong,
.article-content b {
    font-weight: 500;
    color: var(--color-text);
}

.article-content em,
.article-content i {
    font-style: italic;
    color: var(--color-text-secondary);
}


/* ── Lists ────────────────────────────────── */

.article-content ul,
.article-content ol {
    margin: 1.25rem 0 1.75rem;
    padding-left: 0;
    list-style: none;
}

.article-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.625rem;
    line-height: 1.75;
    font-size: 1.0625rem;
}

/* Unordered list markers */
.article-content ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.5;
}

/* Ordered list counters */
.article-content ol {
    counter-reset: article-ol;
}

.article-content ol > li {
    counter-increment: article-ol;
    padding-left: 2rem;
}

.article-content ol > li::before {
    content: counter(article-ol);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-primary);
    opacity: 0.6;
    width: 1.4em;
    text-align: right;
}

/* Nested lists */
.article-content li ul,
.article-content li ol {
    margin: 0.5rem 0 0.5rem;
}


/* ── Blockquotes ──────────────────────────── */

.article-content blockquote {
    position: relative;
    margin: 2.5rem 0;
    padding: 2rem 2.5rem 2rem 2.25rem;
    background: rgba(80,232,192,0.03);
    border-left: 2px solid rgba(80,232,192,0.35);
    border-radius: 0 12px 12px 0;
    overflow: hidden;
}

/* Large watermark quote mark */
.article-content blockquote::after {
    content: '\201C';
    position: absolute;
    bottom: -1.25rem;
    right: 1.25rem;
    font-size: 7rem;
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.07;
    font-family: Georgia, 'Times New Roman', serif;
    pointer-events: none;
}

.article-content blockquote p {
    margin-bottom: 0.875rem;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-text);
    font-style: italic;
}

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

.article-content blockquote cite,
.article-content blockquote footer {
    display: block;
    margin-top: 1rem;
    font-size: 0.8125rem;
    font-style: normal;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}


/* ── Code ─────────────────────────────────── */

.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    background: rgba(80,232,192,0.06);
    border-radius: 4px;
    color: var(--color-primary);
}

.article-content pre {
    margin: 1.75rem 0;
    padding: 1.5rem;
    background: #0e1315;
    border: 1px solid rgba(80,232,192,0.06);
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-content pre code {
    display: block;
    padding: 0;
    background: none;
    border-radius: 0;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.7;
}


/* ── Tables ───────────────────────────────── */

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    border: 1px solid rgba(80,232,192,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.article-content thead {
    background: rgba(80,232,192,0.04);
}

.article-content th {
    text-align: left;
    padding: 0.875rem 1.125rem;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(80,232,192,0.1);
}

.article-content td {
    padding: 0.75rem 1.125rem;
    border-bottom: 1px solid rgba(80,232,192,0.04);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.article-content tbody tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:hover {
    background: rgba(80,232,192,0.02);
}


/* ── Info Boxes / Callouts ────────────────── */

.article-content .info-box,
.article-content .callout,
.article-content .compound-card {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: rgba(80,232,192,0.025);
    border: 1px solid rgba(80,232,192,0.06);
    border-radius: 10px;
}

.article-content .info-box {
    border-left: 3px solid var(--color-primary);
    border-radius: 0 10px 10px 0;
}

.article-content .info-box h4,
.article-content .compound-card h4,
.article-content .callout h4 {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0 0 0.625rem;
}

.article-content .info-box p:last-child,
.article-content .compound-card p:last-child,
.article-content .callout p:last-child {
    margin-bottom: 0;
}

/* Warning callout */
.article-content .callout-warning {
    border-color: var(--color-warning);
}

.article-content .callout-warning h4 {
    color: var(--color-warning);
}


/* ── Images & Figures ─────────────────────── */

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.75rem 0;
}

.article-content figure {
    margin: 2rem 0;
}

.article-content figure img {
    margin-bottom: 0.625rem;
}

.article-content figcaption {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}


/* ── Horizontal Rules ─────────────────────── */

.article-content hr {
    border: none;
    height: 1px;
    background: rgba(80,232,192,0.08);
    margin: 3rem 0;
}


/* ── Tags ─────────────────────────────────── */

.article-tags {
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tag {
    background: rgba(80,232,192,0.06);
    color: var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 99em;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.article-tag:hover {
    background: rgba(80,232,192,0.12);
}


/* ── Footer ───────────────────────────────── */

.article-footer {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid rgba(80,232,192,0.06);
}

.author-bio {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: rgba(80,232,192,0.025);
    border: 1px solid rgba(80,232,192,0.06);
    border-radius: 10px;
}

.author-bio .author-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(80,232,192,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-bio .author-name {
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.author-bio .author-location {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.author-bio .author-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

.back-to-blog:hover {
    opacity: 0.6;
}


/* ── Loading / Error ──────────────────────── */

.article-loading {
    text-align: center;
    padding: 100px 20px;
    color: var(--color-text-muted);
}

.article-error {
    text-align: center;
    padding: 100px 20px;
}

.article-error h2 {
    color: var(--color-text);
    margin-bottom: 1rem;
}

.article-error p {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}


/* ============================================
   Side Navigation — Scroll Spy
   Fixed rail on desktop, progress bar on mobile
   ============================================ */

.article-sidenav {
    position: fixed;
    top: 100px;
    right: max(1.5rem, calc((100vw - 860px) / 2 - 192px));
    width: 176px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    scrollbar-width: none;
}

.article-sidenav::-webkit-scrollbar {
    display: none;
}

.article-sidenav.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Desktop toggle button */
.sidenav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(80,232,192,0.1);
    border-radius: 5px;
    background: rgba(18,24,26,0.6);
    cursor: pointer;
    padding: 0;
    margin-bottom: 10px;
    margin-left: 1px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sidenav-toggle:hover {
    background: rgba(30,38,40,0.9);
    border-color: rgba(80,232,192,0.2);
}

.sidenav-toggle svg {
    width: 12px;
    height: 12px;
    color: var(--color-text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.sidenav-toggle:hover svg {
    color: var(--color-primary);
}

/* Collapsed state — hide items, show expand hint */
.article-sidenav.collapsed .sidenav-rail,
.article-sidenav.collapsed .sidenav-items,
.article-sidenav.collapsed .sidenav-progress {
    display: none;
}

.article-sidenav.collapsed {
    width: auto;
}

.article-sidenav.collapsed .sidenav-toggle svg {
    transform: rotate(180deg);
}

/* Rail line */
.sidenav-rail {
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(80,232,192,0.08);
}

.sidenav-rail-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0%;
    background: var(--color-primary);
    opacity: 0.4;
    transition: height 0.15s ease-out;
}

/* Section items */
.sidenav-items {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.sidenav-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
}

.sidenav-item a {
    display: block;
    padding: 4px 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 156px;
}

.sidenav-item a:hover {
    color: var(--color-text-secondary);
}

/* Dot marker */
.sidenav-item::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(80,232,192,0.15);
    border: 1.5px solid rgba(80,232,192,0.12);
    transition: all 0.2s ease;
    z-index: 1;
}

/* Active state */
.sidenav-item.active::before {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(80,232,192,0.3);
}

.sidenav-item.active a {
    color: var(--color-primary);
    font-weight: 500;
}

/* H3 sub-items */
.sidenav-item.sidenav-sub {
    padding-left: 28px;
    margin-bottom: 4px;
}

.sidenav-item.sidenav-sub::before {
    left: 10px;
    width: 5px;
    height: 5px;
    top: 10px;
}

.sidenav-item.sidenav-sub a {
    font-size: 0.625rem;
    max-width: 120px;
}

/* Progress footer */
.sidenav-progress {
    margin-top: 12px;
    padding-left: 20px;
}

.sidenav-progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(80,232,192,0.08);
    border-radius: 1px;
    overflow: hidden;
}

.sidenav-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    border-radius: 1px;
    transition: width 0.15s ease-out;
}

.sidenav-progress-label {
    font-size: 0.5625rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* ── Mobile Progress Bar ──────────────────── */

.article-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 200;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-progress-bar.visible {
    opacity: 1;
}

.article-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    transition: width 0.1s ease-out;
}


/* ── Mobile Sidenav Trigger Tab ─────────────── */

.sidenav-trigger {
    display: none;
    position: fixed;
    right: 0;
    top: 33%;
    z-index: 90;
    width: 36px;
    height: 44px;
    background: rgba(18,24,26,0.9);
    border: 1px solid rgba(80,232,192,0.12);
    border-right: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.3s ease, background 0.2s ease;
    opacity: 0;
    pointer-events: none;
    padding: 0;
}

.sidenav-trigger.visible {
    opacity: 1;
    pointer-events: auto;
}

.sidenav-trigger:hover {
    background: rgba(30,38,40,0.95);
}

.sidenav-trigger svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    opacity: 0.7;
}

.sidenav-trigger.active svg {
    opacity: 1;
}

/* Mobile slide-out panel */
.sidenav-mobile-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    z-index: 85;
    background: rgba(18,24,26,0.95);
    border-left: 1px solid rgba(80,232,192,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 80px 1.25rem 2rem;
    scrollbar-width: none;
}

.sidenav-mobile-panel::-webkit-scrollbar {
    display: none;
}

.sidenav-mobile-panel.open {
    transform: translateX(0);
}

.sidenav-mobile-panel .sidenav-panel-header {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(80,232,192,0.06);
}

.sidenav-mobile-panel .sidenav-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidenav-mobile-panel .sidenav-item {
    padding-left: 16px;
    margin-bottom: 4px;
}

.sidenav-mobile-panel .sidenav-item a {
    display: block;
    padding: 6px 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: normal;
    max-width: none;
}

.sidenav-mobile-panel .sidenav-item a:hover {
    color: var(--color-primary);
}

.sidenav-mobile-panel .sidenav-item::before {
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
}

.sidenav-mobile-panel .sidenav-item.active::before {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(80,232,192,0.3);
}

.sidenav-mobile-panel .sidenav-item.active a {
    color: var(--color-primary);
    font-weight: 500;
}

.sidenav-mobile-panel .sidenav-item.sidenav-sub {
    padding-left: 28px;
}

.sidenav-mobile-panel .sidenav-item.sidenav-sub a {
    font-size: 0.75rem;
}

.sidenav-mobile-panel .sidenav-progress {
    margin-top: 1.25rem;
    padding-left: 16px;
}

/* Overlay behind panel */
.sidenav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 84;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidenav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}


/* ── Responsive ───────────────────────────── */

/* Side nav: desktop rail vs mobile trigger+panel */
@media (max-width: 1280px) {
    .article-sidenav {
        display: none;
    }

    .sidenav-trigger {
        display: flex;
    }

    .sidenav-mobile-panel,
    .sidenav-overlay {
        display: block;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 4rem 1.25rem 3rem;
    }

    .article-title {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
    }

    .article-excerpt {
        font-size: 1.0625rem;
    }

    /* Suppress drop cap on small screens to avoid layout issues */
    .article-content > p:first-of-type::first-letter {
        float: none;
        font-size: inherit;
        line-height: inherit;
        padding: 0;
        color: inherit;
    }

    .article-content h2 {
        font-size: 1.375rem;
        margin: 2.5rem 0 1rem;
    }

    .article-content h3 {
        font-size: 1.125rem;
    }

    .article-content p,
    .article-content li {
        font-size: 1rem;
    }

    .article-content table {
        font-size: 0.875rem;
    }

    .article-content th,
    .article-content td {
        padding: 0.625rem 0.75rem;
    }

    .author-bio {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 3.5rem 1rem 2.5rem;
    }

    .article-content {
        padding: 0 1rem;
    }

    .article-toc {
        padding: 1rem;
    }

    .article-tags {
        padding: 0 1rem;
    }

    .article-footer {
        padding: 1.5rem 1rem;
    }
}
