/* Blog Post Styles - Off-White & Blue Theme */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

body {
    background-color: var(--bg-primary);
}

/* Navigation - Tightened and Color Matched */
nav {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0.5rem; /* Reduced bottom padding */
    animation: fadeIn 0.4s ease-out;
}

nav a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    font-family: 'JetBrains Mono', monospace;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

nav a:hover {
    color: var(--text-secondary);
    background-color: var(--hover-bg); /* Replaced gold with soft blue */
}

/* Article Container */
article {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem; /* Tighter padding */
    background-color: var(--bg-secondary);
    border-radius: 8px; /* Optional: adds a soft modern touch */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Very subtle depth */
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

/* Article Title & Meta */
article h1 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--accent);
    margin-bottom: 0.5rem; /* Reduced from 1rem */
    letter-spacing: -0.03em;
}

article > p:first-of-type {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 1.5rem; /* Pulls the content up */
}

/* Paragraphs - Improved Readability */
article p {
    font-size: 1.1rem;
    line-height: 1.7; /* Slightly tighter than 1.8 for better eye tracking */
    color: var(--text-primary);
    margin-bottom: 1.25rem; /* Reduced distance between blocks */
}

/* Headings - Reduced Top Margins */
article h2 {
    font-size: 1.85rem;
    font-weight: 600;
    margin-top: 2rem; /* Reduced from 3rem */
    margin-bottom: 0.75rem; /* Reduced from 1.25rem */
    color: var(--accent);
}

article h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Blockquotes - Blue Themed */
article blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--text-secondary);
    background-color: var(--hover-bg);
    color: var(--text-primary);
    font-style: italic;
    font-size: 1.05rem;
}

/* Code Blocks */
article pre {
    background-color: #1e293b; /* Match Slate Blue */
    color: #f8fafc;
    padding: 1.25rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

/* Upvote Section - Rounded Blue Button */
article + div {
    max-width: 680px;
    margin: 2rem auto;
    text-align: center;
}

.upvote-btn {
    border-radius: 50px; /* Pill shape */
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.6rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    transition: var(--transition);
}

.upvote-btn:hover {
    background-color: #2563eb;
    color: white;
    border-color: var(--upvote-active);
}

.upvote-btn.voted{
    background-color: #2563eb;
    color:white;
}


/* Tighten Lists */
article li {
    margin-bottom: 0.4rem; /* Reduced from 0.75rem */
    line-height: 1.7;
}

