:root {
    --bg: #111111;
    --accent-bg: #181818;
    --text: #bbbbbb;
    --text-light: #888;
    --accent: #00ff41;
    --accent-hover: #00cc33;
    --accent-text: #111111;
    --border: #333;
    --code: #1a1a1a;
    --marked: #1a1a1a;
}

body {
    display: block;
    font-family: 'Space Mono', ui-monospace, monospace;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
    letter-spacing: -0.02em;
    background-color: var(--bg);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../images/background.jpg');
    background-repeat: repeat;
    filter: grayscale(100%) brightness(.5);
    z-index: -1;
}

body > * { grid-column: auto; }

.header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.header-logo {
    flex-shrink: 0;
}

.header-ascii {
    font-family: 'Space Mono', ui-monospace, monospace;
    font-size: 0.45rem;
    line-height: 1;
    color: var(--accent);
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    overflow: hidden;
    white-space: pre;
}

@media (max-width: 900px) {
    .header-ascii { display: none; }
}

h2 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    margin-top: 0;
}
h3 { font-size: 1.1rem; margin-top: 0; }

nav {
    background: #181818;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

nav a {
    color: var(--text-light);
    font-size: 1rem;
}

nav a:hover { color: var(--accent); }

.nav-sep { color: #444; margin: 0 0.6rem; }

.layout {
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
}

main {
    flex: 3;
    align-self: stretch;
    padding-top: 0;
}

aside {
    flex: 1;
    align-self: stretch;
    min-width: 0;
    font-size: 0.8rem;
    background: #181818;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 1.25rem;
    float: none;
    width: auto;
    margin-inline-start: 0;
}

.sidebar-widget { margin-bottom: 1.5rem; }
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget h2 { margin-bottom: 0.25rem; }
.widget-placeholder { color: #2a2a2a; margin: 0; }

.weather-temp {
    font-size: 1.75rem;
    color: var(--accent);
    margin: 0;
    line-height: 1.2;
}

.weather-detail {
    color: var(--text-light);
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.6;
}

.book-shelf { display: flex; flex-direction: column; gap: 0.75rem; }
.book-row { display: flex; gap: 1rem; align-items: center; }
.book-row img { width: 80px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); filter: grayscale(100%); transition: filter 0.3s; }
.book-row:hover img { filter: grayscale(0); }
.book-info .title { font-weight: bold; }
.book-info .title a { color: var(--text-light); transition: color 0.3s; }
.book-row:hover .book-info .title a { color: var(--accent); }
.book-info p { margin: 2px 0; font-size: 0.85rem; }
.rating { color: #555; }

.home-bubble {
    background: #181818;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.home-bubble h2 { margin-bottom: 0.5rem; }

.home-bubble ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.home-bubble li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.home-bubble li input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.home-bubble p:last-child { margin-bottom: 0; }

.currently-reading { margin: 0; }
.currently-reading h2 { margin-bottom: 0.5rem; }
.reading-thumbnails { display: flex; gap: 0.5rem; }
.reading-thumbnails a { display: block; }
.reading-thumbnails img { width: 60px; border-radius: 3px; display: block; }
.cache-notice { font-size: 0.75rem; color: #1a1a1a; margin-top: 1.5rem; }

.post-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-item {
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: border-left-color 0.15s;
}
.post-item:hover { border-left-color: var(--accent); }
.post-item h2 { margin-bottom: 0; }
.post-item h2 a { color: var(--accent); text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; }

.post-date { font-size: 0.8rem; color: #555; display: block; margin-bottom: 0.5rem; }
.post-excerpt { color: var(--text); opacity: 0.8; }

.post-preview { margin-top: 2rem; }
.post-preview h2 { margin-bottom: 0.75rem; }
.post-preview a { color: var(--accent); }

.post-row { display: flex; align-items: baseline; margin-bottom: 0.25rem; }
.post-row a { flex-shrink: 0; }
.post-row .dots {
    flex: 1;
    border-bottom: 1px dotted #444;
    margin: 0 0.5rem;
    min-width: 0.5rem;
}
.post-row-date { flex-shrink: 0; font-size: 0.8rem; color: #555; }
.post-preview > a { font-size: 0.85rem; }

.visitor-counter { margin-top: 3rem; font-size: 0.75rem; text-align: center; }
.visitor-label { color: var(--accent); }

.post-content h1 { font-size: 1.4rem; }
.post-content h2 { text-transform: none; letter-spacing: -0.03em; font-size: 1.2rem; }
.post-content h3 { font-size: 1.05rem; }
.post-content p { line-height: 1.9; }

.flash-msg { color: var(--accent); margin-bottom: 1rem; }

.pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.pagination a { color: var(--accent); }
.pag-disabled { color: var(--border); }
.pag-info { color: #555; }
.pagination.bottom { margin: 1.5rem 0 0 0; }

.guestbook-entries { display: flex; flex-direction: column; gap: 1.25rem; }
.guestbook-entry {
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: border-left-color 0.15s;
}
.guestbook-entry:hover { border-left-color: var(--accent); }

.entry-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.entry-meta strong { color: #ddd; }
.entry-meta a { color: var(--accent); }
.entry-date { font-size: 0.75rem; color: #555; white-space: nowrap; }
.entry-message { font-size: 0.85rem; color: #999; }

.guestbook-form input,
.guestbook-form textarea {
    font-family: 'Space Mono', ui-monospace, monospace;
}
.guestbook-form input:focus,
.guestbook-form textarea:focus {
    border-color: var(--accent);
}
.guestbook-form button {
    font-family: 'Space Mono', ui-monospace, monospace;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.guestbook-form button:hover { opacity: 0.85; }

.field-optional { color: #444; font-size: 0.7rem; }

@media (max-width: 700px) {
    .layout { flex-direction: column; }
    .entry-meta { flex-direction: column; }
}
