/* =========================================
   1. VARIABLES & THEME
   Change these colors to update the whole site
   ========================================= */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --accent-color: #0066cc;  /* Classic Link Blue */
    --border-color: #eaeaea;
    --code-bg: #f6f8fa;
    --max-width: 700px;       /* Optimization for reading width */
}

/* =========================================
   2. BASE TYPOGRAPHY
   ========================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* =========================================
   3. LAYOUT & NAVIGATION
   ========================================= */
/* The main container for all content */
main {
    max-width: var(--max-width);
    margin: 3rem auto;        /* Center vertically and horizontally */
    padding: 0 1.5rem;
}

/* Simple Top Navigation Bar */
nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

nav a {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
}

nav a:hover {
    color: var(--accent-color);
}

/* =========================================
   4. ARTICLE CONTENT STYLES
   ========================================= */
h1, h2, h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em; /* Tighten heading tracking for a pro look */
}

h1 {
    font-size: 2.25rem;
    line-height: 1.2;
    padding-bottom: 0.5rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem; /* Slightly larger text is easier to read */
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images should never break the layout */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

/* =========================================
   5. HOMEPAGE ARTICLE LIST (Flexbox)
   ========================================= */
.article-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.article-list li {
    border-bottom: 1px solid var(--border-color);
}

/* The clickable row */
.article-list a {
    display: flex;             /* Enable Flexbox */
    justify-content: space-between; /* Push items to edges */
    align-items: center;       /* Center vertically */
    padding: 1rem 0;           /* Top/Bottom padding for click area */
    color: var(--text-color);
    transition: color 0.2s ease;
}

.article-list a:hover {
    text-decoration: none;
    color: var(--accent-color);
}

.article-list .title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* The Date Pill */
.article-list .date {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: "Menlo", "Consolas", monospace; /* Technical font for data */
    background: var(--code-bg);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;       /* Prevent date from wrapping */
    margin-left: 1rem;         /* Space between title and date */
}

/* =========================================
   6. CODE BLOCKS (Fallbacks)
   PrismJS will override most of this
   ========================================= */
pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

code {
    font-family: "Menlo", "Monaco", "Consolas", monospace;
    font-size: 0.9em;
}


/* =========================================
   7. BLOCKQUOTES
   ========================================= */
blockquote {
    margin: 1.5rem 0;                  /* Vertical spacing */
    padding: 0.5rem 0 0.5rem 1.25rem;  /* Indent text from the border */
    border-left: 4px solid var(--accent-color); /* The blue vertical line */
    color: var(--text-light);          /* Slightly lighter text color */
    font-style: italic;                /* Distinct typography */
    background: transparent;           /* Keep it clean */
}

/* Optional: If a blockquote contains a paragraph, remove its default margins
   so the spacing looks tight and correct. */
blockquote p {
    margin: 0;
}