:root {
    --bg-color: #F2E8C9;
    --text-color: #000;
    --accent-color: #666;
    --link-color: #000;
    --font-main: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    --spacing-unit: 1.5rem;
    --max-width: 680px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.3;
    font-size: 18px;
    font-weight:normal;
    text-shadow: 0 0 0.5px rgba(0,0,0,0.1);
    padding: 0 1rem;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/dither_it_michelangelo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06; /* Adjust translucency here */
    z-index: 0; /* Just below text, but above background color */
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;

    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 0;
}

/* Header */
.site-header {
    margin-bottom: 3rem;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    margin-left: 1.5rem;
    text-decoration: none;
    font-size: 1rem;
    text-transform: lowercase;
}

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

.site-title {
    font-weight: bold;
    font-size: 1.4rem;
    text-decoration: none;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1); /* Subtle divider */
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Inline code */
code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    background: rgba(0,0,0,0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Multi-line code blocks */
pre {
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem auto; /* Center the code block */
    border: 1px solid #333;
    max-width: 90%; /* Prevent it from being too wide on large screens */
}

/* Syntax highlighting simulation (since we don't have a library) */
pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
}

/* Images */
figure {
    margin: 2rem auto;
    text-align: center;
    max-width: 100%;
}

figure img {
    max-width: 600px; /* Constrain large screenshots */
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* For side-by-side images */
figure .image-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

figure .image-row img {
    max-width: 280px; /* Smaller for side-by-side */
    flex: 1;
    min-width: 200px;
}

figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: center;
}

.social-links a {
    color: var(--accent-color);
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block; /* Required for transform to work */
}

.social-links a:hover {
    color: var(--text-color);
    transform: translateY(-5px); /* Rise up effect */
}

.social-links img {
    opacity: 0.6; /* Matches the visual weight of #666 SVGs */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-links img:hover {
    opacity: 1;
}

.social-links svg, .social-links img {
    width: 24px;
    height: 24px;
}

/* Moodboard */
.moodboard {
    display: none;
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 4px;
    overflow: hidden;
}

.moodboard img {
    width: 100%;
    height: auto;
    display: block;
}

/* Typography & Sections */
h1, h2, h3 {
    font-weight: normal;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.5rem;
}

p {
    margin-bottom: 0.7rem;
}

.subtitle {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Lists */
ul {
    list-style: none;
    margin-bottom: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Thoughts List */
.post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.post-item:last-child {
    border-bottom: none;
}

.post-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-family: var(--font-mono);
    margin-right: 1rem;
    flex-shrink: 0;
}

.post-title {
    text-decoration: none;
    font-size: 1.1rem;
}

/* Article Styling */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.back-link:hover {
    text-decoration: underline;
    color: var(--text-color);
}

.article-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.article-meta {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    color: var(--accent-color);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

.article-content {
    font-size: 1.1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        font-size: 16px;
        padding: 0 1.25rem;
    }
    
    .container {
        padding: 1rem 0;
    }
    
    h1 {
        font-size: 1.6rem;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav {
        margin-top: 0.5rem;
    }

    nav a {
        margin-left: 0;
        margin-right: 1.5rem;
    }
}

/* Inline code */
p code, li code, blockquote code {
    background: rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.08);
    padding: 0.08rem 0.35rem;
    border-radius: 6px;
}

/* Code block container */
.code-block-wrapper {
    position: relative;
    margin: 2rem auto;
    max-width: 800px;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.copy-btn svg {
    display: block;
}

.copy-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #28c840;
    border-color: #28c840;
    color: #fff;
}

/* Multi-line code blocks */
pre {
    position: relative;
    margin: 0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    background: #1e1e1e;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

pre code {
    display: block;
    background: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    color: #d4d4d4;
}

/* Scrollbar styling */
pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}