/* public/style.css */

/* --- Color & Font Definitions --- */
:root {
    --off-white: #f6f0ee;
    --dark-blue: #050f19;
    --midgrey: #bbbbbb;
    --secondary-accent: #738276;
    --slight-background: rgba(246, 240, 238, 0.07);
    --system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Base & Layout --- */
html {
    box-sizing: border-box;
    scrollbar-gutter: stable;
}

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent;}
::-webkit-scrollbar-thumb { background-color: var(--secondary-accent); border-radius: 999px; border: 3px solid transparent; }

* { scrollbar-width: thin; scrollbar-color: var(--secondary-accent) transparent; }

*, *:before, *:after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
    font-family: var(--system-font);
    background-color: var(--dark-blue);
    color: var(--off-white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 15px;
}
main {
    padding: 2rem 0;
    flex-grow: 1;
}

nav {
    padding: 0.5rem 0;
}

/* --- Shared Components (Header & Footer) --- */
header {
    padding: 1rem 0;
    border-bottom: 1px solid var(--secondary-accent);
}
header a {
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--off-white);
    text-decoration: none;  
}
footer {
    margin-top: auto; /* Pushes footer to the bottom of the viewport */
    padding: 3.5rem 3.5rem;
    border-top: 1px solid var(--secondary-accent);
    font-size: 0.85rem;
    color: var(--midgrey);
}
footer a {
    color: var(--midgrey);
    text-decoration: none;
}
footer.container {
    margin-top: 2rem; 
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
}

h1 {
  font-size: 1.8em;
}

a {
    color: var(--secondary-accent);
    text-decoration: underline dotted;
}

.post-meta {
    color: var(--secondary-accent);
    font-size: 0.9rem;
}

/* --- Index Page Specifics --- */
.page-title {
    font-size: 1.9rem;
    margin-bottom: 1rem;
    color: var(--secondary-accent);
    text-decoration: underline 1.5px dotted;
}
.post-desc {
    padding-left: 0.5rem;
    margin-left: 0.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 2;
    border-left: #738276 solid 1px;
    color: var(--midgrey);
}

blockquote { /* just a copy of post-desc */
    padding-left: 0.5rem;
    margin-left: 0.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 2;
    border-left: #738276 solid 1px;
    color: var(--midgrey);
}
.post-list {
    margin-bottom: 5rem;
}
.post-preview {
    margin-bottom: 2.5rem;
    line-height: 0.7;
}
.post-preview h2 {
    margin-top: 0;
    margin-bottom: 0;
}
.post-preview h2 a {
    color: var(--off-white);
    text-decoration: none;
}
.post-preview h2 a:hover {
    color: var(--secondary-accent);
}
.post-preview .post-meta {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* --- Blog Post Specifics --- */
.post-header h1 {
    font-size: 1.9rem;
    margin-bottom: 0;
    line-height: 1.1;
}
.post-header .post-meta {
    margin-bottom: 1rem;
}
.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
}
.post-content h2, .post-content h3 {
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--secondary-accent);
    padding-bottom: 0.3rem;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 1.5rem auto;
}
.post-content pre {
    background-color: var(--slight-background);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9em;
    border: 1px solid var(--off-white);
}
.post-content code {
    font-family: "SF Mono", "Consolas", "Liberation Mono", monospace;
}
/* Style for inline code */
.post-content p > code, .post-content li > code {
    background-color: var(--slight-background);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
    white-space: nowrap;
}
.post-comment {
    padding-left: 0.5rem;
    margin-left: 0.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 2;
    border-left: #738276 solid 1px;
    color: var(--midgrey);
}
.image-desc {
    text-align: center;
    font-size: 0.85em;
    margin-top: -1em;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    main {
        padding: 1.5rem 0;
    }
    .post-header h1 {
        font-size: 1.6rem;
    }
    .post-content {
        font-size: 1rem;
        line-height: 1.6;
    }
}