/* Article Page Styles */
.article-container {
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 48px;
}

.article-header {
    margin-bottom: 64px;
    padding-bottom: 0;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 64px;
    align-items: start;
}

.header-left {
    max-width: 700px;
}

.article-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 32px;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: rgba(224, 64, 185, 0.1);
    color: #E040B9;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.tag.type-tag {
    background: #1a1a1a;
    color: white;
}

.article-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.article-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.article-meta {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.article-author + .read-time::before {
    content: "•";
    margin-right: 16px;
}

.featured-image {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #f3f4f6;
    margin-top: 32px;
}

.share-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.share-btn:hover {
    background: #f3f4f6;
    border-color: #E040B9;
    color: #E040B9;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.article-content {
    padding: 0;
    padding-top: 0;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #6b7280;
}

/* Reset and style Substack content */
.article-content h1,
.article-content .post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 24px 0;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 40px 0 16px 0;
}

.article-content h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 32px 0 12px 0;
}

.article-content h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 28px 0 16px 0;
}

.article-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 24px 0;
}

.article-content a {
    color: #E040B9;
    text-decoration: none;
    border-bottom: 1px solid rgba(224, 64, 185, 0.3);
    transition: all 0.2s;
}

.article-content a:hover {
    border-bottom-color: #E040B9;
}

.article-content img {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px auto;
    display: block;
}

.article-content ul,
.article-content ol {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 24px 0;
    padding-left: 32px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content blockquote {
    border-left: 4px solid #E040B9;
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #6b7280;
}

.article-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 16px;
}

.article-content pre {
    background: #1a1a1a;
    color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Substack-specific elements to hide */
.article-content .subscribe-widget,
.article-content .subscription-widget-wrap,
.article-content .paywall,
.article-content .pencraft,
.article-content button[class*="subscribe"],
.article-content div[class*="subscribe"] {
    display: none !important;
}

/* Article metadata */
.article-meta {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

/* Article Navigation */
.article-nav {
    position: fixed;
    right: 0;
    bottom: 24px !important;
    background: white;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 16px 12px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: right;
}

.article-nav.collapsed {
    right: -240px;
}

@keyframes navBounce {
    0%, 100% {
        right: -240px;
    }
    30% {
        right: 0;
    }
    75% {
        right: 0;
    }
}

.nav-toggle {
    position: absolute;
    left: -40px;
    top: 0;
    background: #821567;
    border: none;
    width: 40px;
    height: 80px;
    border-radius: 8px 0 0 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.nav-toggle:hover {
    background: #E040B9;
}

.nav-content {
    width: 220px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.back-link {
    font-weight: 500;
    margin-bottom: 20px;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #821567;
}

.nav-link.active {
    background: rgba(224, 64, 185, 0.1);
    color: #821567;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1100px) {
    .article-nav {
        display: none;
    }
}

@media (max-width: 1024px) {
    .header-content {
        grid-template-columns: 1fr 300px;
        gap: 40px;
    }

    .featured-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .article-container {
        margin-top: 80px;
        padding: 0 24px;
        max-width: 100%;
    }

    .header-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-header {
        margin-bottom: 32px;
    }

    .featured-image {
        height: 200px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-subtitle {
        font-size: 18px;
    }

    .article-content {
        padding-top: 0;
    }

    .article-content h1,
    .article-content .post-title {
        font-size: 28px;
    }

    .article-content h2 {
        font-size: 24px;
    }

    .article-content h3 {
        font-size: 22px;
    }

    .article-content h4 {
        font-size: 19px;
    }

    .article-content p,
    .article-content ul,
    .article-content ol {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .article-container {
        padding: 0 16px;
    }

    .article-title {
        font-size: 28px;
    }

    .article-content p,
    .article-content ul,
    .article-content ol {
        font-size: 15px;
    }
}
