/* Modern Blog Typography & Layout */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* Base Typography */
.prose {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: #cbd5e1; /* slate-300 */
    max-width: 65ch;
    margin: 0 auto; /* Centered by default */
}

/* Headings */
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #f8fafc; /* slate-50 */
    font-weight: 700;
    letter-spacing: -0.025em;
    position: relative;
}

.prose h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* Intro Block */
.intro-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.intro-block p {
    margin-bottom: 0;
}

/* Content Sections (Bento-like) */
.content-block {
    margin-bottom: 4rem;
    position: relative;
}

/* H2 Styling */
.prose h2 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid #D4AF37; /* Gold accent */
}

.prose h2::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #D4AF37;
    border-radius: 50%;
    margin-right: 1rem;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.prose h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #e2e8f0;
    padding-left: 1rem;
    border-left: 3px solid rgba(255, 255, 255, 0.2);
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.prose strong {
    color: #D4AF37; /* Gold highlight */
    font-weight: 600;
}

.prose a {
    color: #60a5fa; /* blue-400 */
    text-decoration: none;
    border-bottom: 1px dashed rgba(96, 165, 250, 0.4);
    transition: all 0.2s ease;
}

.prose a:hover {
    color: #93c5fd;
    border-bottom-style: solid;
}

/* Grid Lists (The requested feature) */
/* Targets ULs and OLs that have at least 4 items for a grid view */
@media (min-width: 768px) {
    .content-block ul:has(li:nth-child(4)), 
    .content-block ol:has(li:nth-child(4)) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding-left: 0;
    }

    .content-block ul:has(li:nth-child(4)) li, 
    .content-block ol:has(li:nth-child(4)) li {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1.5rem;
        border-radius: 12px;
        margin-bottom: 0;
        list-style: none; /* Hide bullets in grid mode */
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .content-block ul:has(li:nth-child(4)) li:hover, 
    .content-block ol:has(li:nth-child(4)) li:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(212, 175, 55, 0.3);
    }
    
    /* Re-add markers inside the card if needed, or use bold text */
    .content-block ul:has(li:nth-child(4)) li strong {
        display: block;
        margin-bottom: 0.5rem;
        font-size: 1.1em;
        color: #f8fafc;
    }
}

/* Standard Lists */
.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.prose ul > li::marker {
    color: #D4AF37;
}

.prose ol > li::marker {
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}

/* Blockquotes */
.prose blockquote {
    border-left: none;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0,0,0,0));
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    font-style: italic;
    color: #e2e8f0;
    margin: 3rem 0;
    position: relative;
    text-align: center;
}

.prose blockquote::before {
    content: '“';
    font-size: 4rem;
    color: #D4AF37;
    line-height: 0;
    vertical-align: -20px;
    margin-right: 10px;
    opacity: 0.5;
}

/* Code Blocks */
.prose pre {
    background: #0f172a; /* slate-900 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #e2e8f0;
}

.prose :not(pre) > code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: #D4AF37;
}

/* Images */
.prose img {
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 3rem 0;
    width: 100%;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0,0,0,0.2);
}

.prose th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 600;
    text-align: left;
    padding: 1.2rem;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prose td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
}

.prose tr:last-child td {
    border-bottom: none;
}

.prose tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Custom Grid/Card for Article */
.article-card {
    /* Transparent container now, letting sections breathe */
    background: transparent;
    padding: 0; 
}

/* Apply Glass card only to sections if desired, or keep clean */
/* Let's try a clean look where sections are separated blocks */

@media (min-width: 768px) {
    .prose h1 {
        font-size: 3.5rem;
    }
}

/* Divider */
.prose hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
}
