/* Layout */
body {
    margin: 0 auto;
    padding: 2rem;
    max-width: 650px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3 {
    font-weight: 500;
}

.date {
    color: #777;
    font-size: 0.9rem;
}

/* Links */
a {
    color: black;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

article a {
    color: #337AB6;
}

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

/* Header & nav */
header {
    margin-bottom: 2rem;
}

nav a {
    margin-right: 1rem;
}

/* Footer */
.footer {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #888;
}

/* Lists on index and list pages */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    margin-bottom: 0.25rem;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.post-title {
    flex: 1;
}

.post-date {
    margin-right: 1rem;
    color: #777;
    white-space: nowrap; /* Prevents wrapping */
}

/* Inline code */
code {
    /* background: #f0e9ff; */
    color: #c7254e;
    background: #f9f2f4;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: Menlo, Monaco, "Courier New", monospace;
    font-size: 0.95em;
}

/* Code blocks */
pre {
    background: #f5f5f5;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

pre code {
    background: none; /* Avoid double background inside <pre> */
    color: #f8f8f2;
    padding: 0;       /* Let <pre> handle the padding */
    font-size: 0.9em;
    line-height: 1.5;
}

blockquote {
    border-left: 4px solid #ccc;
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    background: #f9f9f9;
    color: #555;
}

blockquote p {
    margin: 0.6rem 0;
}

/* Responsive images */
img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 1rem 0;
}

header {
    position: relative;
}

/* GitHub link in top-right corner */
.github-link {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.9rem;
    text-decoration: none;
    color: #0066cc; /* or any accent color you picked */
    padding: 0.25rem 0.5rem;
}

.github-link:hover {
    text-decoration: underline;
}
