/* ============================================
   Tech Blog Styles
   ============================================ */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.blog-hero-content h1 {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.blog-hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin: 0;
}

/* Blog Container */
.blog-container {
    max-width: 1100px;
    padding-bottom: 60px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* Blog Card */
.blog-card-link {
    text-decoration: none !important;
    color: inherit !important;
}

.blog-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.blog-card-cover {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.05);
}

.blog-card-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(102, 126, 234, 0.4);
}

.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tags {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tag {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card-desc {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #adb5bd;
    font-size: 0.82rem;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f3f5;
}

.blog-card-meta time i {
    margin-right: 4px;
}

.blog-card-read {
    color: #667eea;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-read {
    transform: translateX(4px);
}

/* Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
}

.blog-empty-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.blog-empty h2 {
    color: #495057;
    margin-bottom: 10px;
}

.blog-empty p {
    color: #adb5bd;
}

/* ============================================
   Article Page Styles
   ============================================ */

.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

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

.btn-back {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.btn-back:hover {
    transform: translateX(-4px);
    color: #5a6fd6;
    text-decoration: none;
}

.btn-back i {
    margin-right: 6px;
}

.article-tags {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.35;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.article-date {
    color: #adb5bd;
    font-size: 0.9rem;
}

.article-date i {
    margin-right: 6px;
}

.article-cover {
    margin-bottom: 36px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-cover img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Body */
.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #333;
}

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f5;
    color: #1a1a2e;
}

.article-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body a {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: #5a6fd6;
}

.article-body strong {
    font-weight: 700;
    color: #1a1a2e;
}

.article-body code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e74c3c;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-body pre {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    margin: 24px 0;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-body pre code {
    background: none;
    color: #ccc;
    padding: 0;
    border-radius: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 4px solid #667eea;
    padding: 12px 20px;
    margin: 24px 0;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 0 8px 8px 0;
    color: #555;
}

.article-body .callout {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 24px 0;
    border: 1px solid #e9ecef;
}

.article-body .callout-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.article-body ul.article-list,
.article-body ol.article-list {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-body ul.article-list li,
.article-body ol.article-list li {
    margin-bottom: 8px;
}

.article-body hr {
    border: none;
    height: 1px;
    background: #e9ecef;
    margin: 40px 0;
}

.article-body figure.article-image {
    margin: 28px 0;
    text-align: center;
}

.article-body figure.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.article-body figure.article-image figcaption {
    margin-top: 10px;
    color: #adb5bd;
    font-size: 0.85rem;
}

.article-body .bookmark-link {
    display: block;
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 16px 0;
    transition: background 0.2s;
    word-break: break-all;
}

.article-body .bookmark-link:hover {
    background: #e9ecef;
    text-decoration: none;
}

/* Article Footer */
.article-footer {
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero-content h1 {
        font-size: 1.8rem;
    }

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

    .article-body {
        font-size: 1rem;
    }
}

/* ============================================
   Notion Table Styles
   ============================================ */

.article-body .table-responsive,
.article-body div[style*="overflow-x"] {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.article-body table,
.article-body .article-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.6;
}

.article-body table th,
.article-body .article-table th {
    background-color: #f1f5f9 !important;
    color: #1e293b;
    font-weight: 700;
    padding: 14px 18px !important;
    border: 1px solid #e2e8f0 !important;
    text-align: left;
}

.article-body table td,
.article-body .article-table td {
    background-color: #ffffff !important;
    color: #334155;
    padding: 12px 18px !important;
    border: 1px solid #e2e8f0 !important;
    vertical-align: top;
}

.article-body table tbody tr:nth-child(even) td,
.article-body .article-table tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
}

.article-body table tbody tr:hover td,
.article-body .article-table tbody tr:hover td {
    background-color: #eef2ff !important;
    transition: background-color 0.2s ease;
}

@media (max-width: 768px) {
    .article-body table th,
    .article-body table td,
    .article-body .article-table th,
    .article-body .article-table td {
        padding: 10px 12px !important;
        font-size: 0.88rem;
    }
}
