/* The Housing Bubble Blog - Static Site Stylesheet */
/* Inspired by the original 2006-2007 thehousingbubbleblog.com design */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg: #112233;
    --color-text: #cccccc;
    --color-text-light: #aabbcc;
    --color-main-bg: #eeeecc;
    --color-main-text: #333333;
    --color-link: #99ddbb;
    --color-link-visited: #779988;
    --color-link-hover: #ffffff;
    --color-main-link: #334477;
    --color-main-link-visited: #666666;
    --color-main-link-hover: #6688aa;
    --color-header-bg: #355577;
    --color-header-text: #ffffff;
    --color-header-desc: #aabbcc;
    --color-border: #bbbb99;
    --color-date: #558866;
    --color-post-footer-bg: #ffffff;
    --color-post-footer-text: #666666;
    --color-comment-author: #0066cc;
    --color-sidebar-bg: #223344;
    --color-sidebar-border: #334455;
    --color-footer-bg: #355577;
    --font-body: 'Trebuchet MS', Verdana, Arial, sans-serif;
    --font-heading: 'Trebuchet MS', Verdana, Arial, sans-serif;
    --max-width: 980px;
    --content-padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5em;
    color: var(--color-text);
    background: var(--color-bg);
    padding: 20px 10px;
    text-align: center;
}

a { color: var(--color-link); text-decoration: none; }
a:visited { color: var(--color-link-visited); }
a:hover { color: var(--color-link-hover); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: left;
}

/* --- Header --- */
.site-header {
    background: var(--color-header-bg);
    color: var(--color-header-text);
    padding: 0;
    margin-bottom: 15px;
    border-radius: 8px 8px 0 0;
}

.site-header .container {
    padding: 8px 15px;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 200%;
    line-height: 1.2em;
    margin: 0;
    padding: 10px 15px 5px;
}

.site-title a { color: var(--color-header-text); text-decoration: none; }
.site-title a:hover { text-decoration: none; color: var(--color-header-text); }

.site-tagline {
    font-size: 94%;
    line-height: 1.5em;
    color: var(--color-header-desc);
    padding: 5px 15px 10px;
    margin: 0;
    font-style: normal;
}

.site-nav {
    font-family: var(--font-heading);
    font-size: 85%;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-date);
    padding: 0 15px 8px;
}

.site-nav a {
    color: var(--color-link);
    margin-right: 1.5rem;
}

.site-nav a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* --- Main Content Area --- */
.content-wrap { display: flex; gap: 0; }

main {
    background: var(--color-main-bg);
    color: var(--color-main-text);
    padding: 10px 15px 15px;
    font-size: 97%;
    line-height: 1.5em;
    flex: 1;
    min-width: 0;
}

main a { color: var(--color-main-link); }
main a:visited { color: var(--color-main-link-visited); }
main a:hover { color: var(--color-main-link-hover); }

/* --- Posts --- */
.post, .post-summary {
    margin: 0.3em 0 25px;
    padding: 0 13px 25px;
    border-top: 1px dotted var(--color-border);
    border-bottom: 1px dotted var(--color-border);
}

.post-header { margin-bottom: 0; }

.post-title {
    font-family: var(--font-heading);
    font-size: 135%;
    line-height: 1.5em;
    margin: 0;
    padding: 2px 14px 2px 0;
    color: var(--color-main-text);
}

.post-title a { color: var(--color-main-text); text-decoration: none; }
.post-title a:hover { background-color: #ffffff; color: #000000; }

.post-date {
    font-size: 85%;
    line-height: 2em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-date);
    font-family: var(--font-heading);
    display: block;
    margin: 0 0 0.5em;
}

.post-category {
    font-size: 80%;
    color: var(--color-date);
    font-family: var(--font-heading);
    margin-left: 0.75rem;
}

.post-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    padding: 0;
}

.post-content p { margin: 0 0 0.75em; }
.post-content blockquote {
    border: 1px dashed #7eacd1;
    margin: 0.75em 0;
    padding: 5px 15px;
    background: #f2f9ff;
    font-size: 0.9em;
}

.post-content a { text-decoration: underline; }

.post-excerpt {
    color: var(--color-main-text);
    padding: 10px 0 1px;
}

.read-more {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* --- Post Footer (meta line) --- */
.post-footer-meta {
    background: var(--color-post-footer-bg);
    margin: 0;
    padding: 2px 14px 2px 0;
    border-top: 1px dotted var(--color-border);
    font-size: 100%;
    line-height: 1.5em;
    color: var(--color-post-footer-text);
}

/* --- Post Navigation --- */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 10px 0;
    font-family: var(--font-heading);
    font-size: 0.85rem;
}

.post-nav .prev, .post-nav .next {
    flex: 1;
    padding: 0.5rem;
}

.post-nav .next { text-align: right; }

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px 0;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    border-top: 1px dotted var(--color-border);
}

/* --- Comments --- */
.comments {
    margin: -25px 13px 0;
    border-left: 1px dotted #66aa77;
    border-right: 1px dotted #66aa77;
    border-bottom: 1px dotted #66aa77;
    padding: 20px 0 15px;
}

.comments h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0 0 10px;
    padding: 0 14px 2px;
    border-bottom: 1px dotted #66aa77;
    color: var(--color-main-text);
}

.comments-toggle {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    user-select: none;
    color: var(--color-main-text);
}

.comments-toggle:hover { color: var(--color-main-link-hover); }

.comments-arrow {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.comments-loading {
    color: var(--color-post-footer-text);
    font-style: italic;
}

.comment {
    padding: 0 0 0 20px;
    margin-bottom: 0;
}

.comment-reply {
    margin-left: 20px;
}

.comment-replies {
    margin-top: 0;
    padding-left: 0;
    border-left: none;
}

.comment-meta {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    margin-bottom: 0;
    padding: 0.5em 0 0;
    color: var(--color-comment-author);
}

.comment-author {
    color: var(--color-comment-author);
    font-weight: bold;
}

.comment-date {
    color: var(--color-post-footer-text);
    margin-left: 0.75rem;
    font-size: 0.9em;
}

.comment-body {
    font-size: 0.95rem;
    line-height: 1.5em;
    margin: 0 0 1.25em;
    padding: 0 0 0 0;
}

.comment-body p { margin: 0 0 0.5em; }

/* --- Archive --- */
.archive-year {
    margin-bottom: 2rem;
}

.archive-year h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-date);
    border-bottom: 1px dotted var(--color-border);
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem;
}

.archive-month {
    margin-bottom: 1rem;
    margin-left: 1rem;
}

.archive-month h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-date);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.archive-month ul {
    list-style: none;
    margin-left: 0.5rem;
}

.archive-month li {
    padding: 0.15rem 0 0.15rem 0;
    font-size: 0.95rem;
    border-bottom: 1px dotted var(--color-border);
    line-height: 1.4em;
}

.archive-month time {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-post-footer-text);
    display: inline-block;
    width: 2rem;
}

.post-count {
    font-weight: normal;
    font-size: 0.85em;
    color: var(--color-post-footer-text);
}

/* --- Sidebar --- */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    margin-top: 15px;
    font-size: 97%;
    line-height: 1.5em;
    color: var(--color-text-light);
}

.sidebar a { color: var(--color-link); }
.sidebar a:hover { color: var(--color-link-hover); }

.sidebar-profile {
    background: #558866;
    color: #ffffff;
    padding: 10px 12px;
    margin-bottom: 0;
}

.sidebar-profile .sidebar-title {
    font-size: 115%;
    color: #ffffff;
    margin-bottom: 0.3em;
    border-bottom: 1px dotted rgba(255,255,255,0.4);
    padding-bottom: 0.2em;
}

.sidebar-profile p { margin: 0.3em 0; font-size: 0.9em; }
.sidebar-profile a { color: #ffffff; text-decoration: underline; }
.sidebar-profile a:hover { color: #ccffdd; }

.sidebar-profile .donate-button {
    display: inline-block;
    background: #ffc439;
    color: #000000;
    padding: 4px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
}

.sidebar-profile .donate-button:hover { background: #ffdb7d; color: #000; }

.sidebar-profile .donate-note {
    font-size: 0.8em;
    color: rgba(255,255,255,0.8);
    margin-top: 0.3em;
}

.sidebar-box {
    background: var(--color-sidebar-bg);
    color: var(--color-text-light);
    padding: 10px 12px;
    margin-bottom: 0;
}

.sidebar-box .sidebar-title {
    font-size: 115%;
    color: var(--color-text-light);
    border-bottom: 1px dotted #445566;
    padding-bottom: 0.2em;
    margin-bottom: 0.3em;
}

.sidebar-box p { margin: 0.3em 0; font-size: 0.9em; }
.sidebar-box a { color: var(--color-link); }

/* --- Footer --- */
.site-footer {
    background: var(--color-footer-bg);
    margin-top: 0;
    padding: 8px 15px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--color-header-text);
    text-align: center;
    border-radius: 0 0 8px 8px;
}

.site-footer a { color: var(--color-header-text); }

/* --- Responsive --- */
@media (max-width: 600px) {
    body { font-size: 13px; padding: 10px 5px; }
    .site-title { font-size: 150%; }
    .post-title { font-size: 120%; }
    .comment-replies { padding-left: 10px; }
    .post-nav { flex-direction: column; }
    .content-wrap { flex-direction: column; }
    .sidebar { width: 100%; }
}
