/* --- Base Reset & Typography --- */
:root {
    --bg-color: #fafafa;
    --text-color: #333333;
    --link-color: #005bb5;
    --border-color: #eaeaea;
}

/* Example of a post-specific override in your main CSS */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    
    /* Centers content on large screens, stays fluid on mobile */
    max-width: 700px; 
    margin-inline: auto;
    
    /* Sticky footer setup */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    /* Makes it feel like a native app by removing the blue tap flash */
    -webkit-tap-highlight-color: transparent; 
}

/* --- Header & Nav --- */
header {
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
}

nav { font-size: 1.1rem; }

nav a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 600;
    padding: 0 0.5rem; /* Spacing so they are easy to tap */
}

nav a:hover { text-decoration: underline; }

/* --- Main Content --- */
main { flex: 1; } /* Pushes the footer to the bottom */
h1, h2, h3 { line-height: 1.2; margin-top: 0; }
a { color: var(--link-color); }

/* --- Post List (Archive) --- */
.post-list { list-style: none; padding: 0; }
.post-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.post-meta { font-size: 0.85rem; color: #777; }
.post-link {
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    display: block;
    margin: 0.3rem 0;
}
.post-summary { margin: 0; color: #555; }

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #777;
}

/* --- Base styles for the injected content --- */
#post-content img { max-width: 100%; height: auto; border-radius: 6px; }
#post-content pre { background: #f4f4f4; padding: 1rem; overflow-x: auto; border-radius: 6px; font-size: 0.9rem; }

/* Example of a post-specific override */
article[id="post-being-a-jamaican-dev"] {
    border-left: 5px solid #00ff00;
    padding-left: 20px;
}