/* Enhanced Typography Styles */

/* Google Fonts Import - Inter for body, Poppins for headings */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

/* Base Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: -0.01em;
}

/* Headings with Poppins */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

/* Blog Post Specific Typography */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.75rem;
    line-height: 1.85;
}

.post-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.post-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

/* Drop Cap - First letter styling */
.post-content > p:first-of-type::first-letter,
.drop-cap::first-letter {
    float: left;
    font-size: 4.5rem;
    line-height: 0.85;
    font-weight: 800;
    font-family: 'Poppins', serif;
    color: var(--primary-color);
    margin: 0.1rem 0.15rem 0 0;
    padding: 0.25rem 0.15rem 0 0;
}

/* Pull Quotes */
.pull-quote,
blockquote.pull-quote {
    position: relative;
    margin: 3rem 0;
    padding: 2rem 2rem 2rem 3rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.6;
    font-style: italic;
    color: var(--text-dark);
    background: var(--bg-light);
    border-left: 5px solid var(--primary-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
    transition: all 0.3s ease;
}

.pull-quote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 4rem;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.pull-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    color: var(--text-medium);
}

/* Regular Blockquotes */
blockquote:not(.pull-quote) {
    margin: 2rem 0;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    font-style: italic;
    color: var(--text-medium);
    transition: all 0.3s ease;
}

blockquote:not(.pull-quote) p:last-child {
    margin-bottom: 0;
}

/* Code Typography */
code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 0.2rem 0.4rem;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}

pre code {
    display: block;
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

/* Lists with better spacing */
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    line-height: 1.9;
}

.post-content li {
    margin-bottom: 0.75rem;
}

.post-content li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

/* Links with better styling */
.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.post-content a:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Lead Paragraph - Intro text */
.lead,
.post-content .lead {
    font-size: 1.35rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Small Caps for emphasis */
.small-caps {
    font-variant: small-caps;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Reading Stats */
.reading-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-medium);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reading-time::before {
    content: '📖';
    font-size: 1.2rem;
}

/* Emphasis and Strong */
em {
    font-style: italic;
    color: var(--text-dark);
}

strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Horizontal Rules */
hr {
    margin: 3rem 0;
    border: none;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

/* Text Selection */
::selection {
    background: var(--primary-200);
    color: var(--text-dark);
}

[data-theme="dark"] ::selection {
    background: var(--primary-800);
    color: white;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    
    .post-content {
        font-size: 1.0625rem;
    }
    
    .pull-quote {
        font-size: 1.25rem;
        padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    }
    
    .post-content > p:first-of-type::first-letter,
    .drop-cap::first-letter {
        font-size: 3.5rem;
    }
}
