/* css enhancements for gathym */

body {
    background: #fafafa;
    color: #222;
    font-size: 18px;
    line-height: 1.7;
    font-family: "Droid Sans", sans-serif;
}

/* Centered, calm header */
#header {
    padding: 20px 0 20px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

#title h1 {
    font-size: 2.4rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.site-description {
    margin-top: 6px;
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Main content readability */
.prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 0;
}

.prose h1, .prose h2, .prose h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose p {
    margin-bottom: 1.2rem;
}

/* Footer */
#footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.footer-text {
    color: #888;
    font-size: 0.9rem;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.post-nav a {
    text-decoration: none;
    color: var(--link-color);
}

.post-nav a:hover {
    text-decoration: underline;
}

.post-nav .index {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-nav .spacer {
    width: 120px; /* keeps Index centered when prev/next missing */
}

.back-to-top {
    text-align: center;
    margin-top: 1.5rem;
}

.back-to-top a {
    font-size: 0.85rem;
    opacity: 0.7;
    text-decoration: none;
}

.back-to-top a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Links */
a {
    color: #005bbb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Post list styling (homepage) */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 0.6rem;
}

ul li a {
    font-size: 1.1rem;
}

/* Dark mode */
body.dark {
    background: #111;
    color: #ddd;
}

body.dark a {
    color: #9ecbff;
}

body.dark #header,
body.dark #footer {
    border-color: #333;
}

/* Dark mode: headings, title, description = white */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark #title h1,
body.dark #title a,
body.dark .site-description {
    color: #ffffff !important;
}

/* Dark mode: body text = soft gray */
body.dark {
    color: #cccccc !important;
}

code {
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.95em;
}

/* Dark mode for inline code */
body.dark code {
    background: #222 !important;
    color: #ffdd88 !important;
}

/* Dark mode for code blocks */
body.dark pre {
    background: #222 !important;
    color: #eee !important;
}

/* Remove green header background and shrink height */
#header {
    background: none !important;
    padding: 20px 0 !important;
    border-bottom: 1px solid #eee;
}

/* Align title, description, and toggle */
#title {
    width: 100%;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
}

#title a {
    display: flex !important;
    flex-direction: column !important;
}

/* Light mode header text colors */
#title h1,
#title a,
.site-description {
    color: #222 !important;
}

/* Typography */
#title h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.site-description {
    margin: 0;
    font-size: 1rem;
    color: #666;
}

/* Dark mode toggle styling */
#dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

#dark-mode-toggle:hover {
    background: rgba(0,0,0,0.05);
}

body.dark #dark-mode-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.post-nav {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.post-nav a {
    color: #005bbb;
}

body.dark .post-nav {
    border-color: #333;
}
