/* Back to Top (mobile-only) for blog pages – subtle bottom bar sitting in flow */
.back-to-top-mobile {
    display: none;
    height: 28px;
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--accent-strong);
    color: #0b1222;
    font-weight: 700;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 916px) {
    .back-to-top-mobile { display: inline-flex; }
}
html,
body {
    margin: 0;
    padding: 0;
    --accent: #F6AE2D;
    --accent-strong: #F26419;
    background: linear-gradient(180deg, #0b1222 0%, #0a0f1b 50%, #0b1222 100%);
    color: #e2e8f0;
    font-family: Perpetua, Baskerville, Big Caslon, Palatino Linotype, Palatino, URW Palladio L, Nimbus Roman No9 L, serif;
    line-height: 1.7;
}

/* Page container */
article {
    width: 60%;
    margin: 0 auto;
    padding-top: 80px;
    padding-bottom: 80px;
    padding-left: 50px;
    padding-right: 50px;
    animation: fadeIn 2.5s ease, slideDown 1.5s ease;
    color: #e2e8f0;
    line-height: 1.7;
    background: linear-gradient(145deg, rgba(20, 28, 50, 0.85) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(246, 174, 45, 0.25);
    border-radius: 18px;
    box-sizing: border-box;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Title */
article h1 {
    color: var(--accent);
    font-size: 4.5em;
    text-shadow: -3px -2px #F26419;
    margin-bottom: 60px;
}

article h2,
article h3 {
    color: var(--accent);
}

article h2 {
    text-align: center;
}

.article-metadata {
    margin-bottom: 30px;
}

.article-author,
.article-date,
.article-edited {
    margin: 5px 0;
    color: #a0aec0;
    font-size: 1em;
}

.article-author {
    font-weight: 600;
    color: #cbd5e1;
}

.article-edited {
    font-size: 0.95em;
}

/* Paragraphs */
article p {
    font-size: 1.2em;
    margin-bottom: 32px;
    text-align: justify;
    color: #e2e8f0;
}

/* Links */
article a {
    color: #F6AE2D;
    text-decoration: none;
    border-bottom: 1px solid rgba(246, 174, 45, 0.4);
    transition: all 200ms ease;
}

article a:hover {
    color: #F26419;
    border-bottom-color: #F26419;
}

hr {
    margin-bottom: 30px;
    border-color: rgba(246, 174, 45, 0.25);
}

/* Mobile responsiveness */
@media (max-width: 916px) {
    article {
        width: 100%;
        padding-top: 100px;
        padding-bottom: 120px;
        margin: 0px;
    }

    article h1 {
        font-size: 2.8em;
    }

    article p {
        font-size: 1.05em;
    }
}

.video-container {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.video-container iframe {
    max-width: 100%;
}

.back-to-blog {
    display: inline-block;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: rgba(246, 174, 45, 0.1);
    color: var(--accent);
    text-decoration: none;
    border: 2px solid var(--accent);
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 200ms ease, color 200ms ease;
}

.back-to-blog:hover {
    background: var(--accent);
    color: #0b1222;
    border-bottom-color: var(--accent);
}

.article-links {
    display: flex;
    gap: 10px;
    align-items: center;
    /* Ensure all link buttons share a consistent baseline */
    line-height: 0;
    margin-bottom: 20px;
    margin-top: 15px;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
    padding: 10px;
    border: 2px solid var(--accent);
    border-radius: 24px;
    text-decoration: none;
    transition: all 200ms ease;
    background: rgba(246, 174, 45, 0.1);
    vertical-align: middle;
}

.link-button:hover {
    background: var(--accent);
    transform: scale(1.05);
}

.link-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    object-position: center;
}

.link-icon-emoji {
    font-size: 24px;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.blog-post-preview {
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(246, 174, 45, 0.25);
}

.blog-post-preview:last-child {
    border-bottom: none;
}

.blog-post-preview h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-post-preview h2 a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: none;
}

.blog-post-preview h2 a:hover {
    color: var(--accent-strong);
}

.blog-date {
    color: #a0aec0;
    font-size: 0.95em;
    margin-bottom: 15px;
    font-style: italic;
}

.badge-updated {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 8px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
    font-size: 0.85em;
}

.article-stats {
    margin: 6px 0 0;
    color: #cbd5e1;
    font-size: 0.95em;
}

.retry-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(246, 174, 45, 0.12);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.retry-button:hover {
    background: var(--accent);
    color: #0b1222;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 200ms ease;
}

.read-more:hover {
    border-bottom-color: var(--accent-strong);
}
