/*
Theme Name: wenlog500 (SaaS Slate Edition - Breadcrumbs)
Theme URI: http://wenlog.com/
Author: wenlog
Description: Premium SaaS editorial aesthetic with Slate Blue accents, paper backgrounds, byte size indicators, and breadcrumb navigation.
Version: 9.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-color: #f6f6f4;
  --text-main: #2b2b2b;
  --text-muted: #828282;
  --border-color: #e5e5e1;
  --border-strong: #2b2b2b;
  --hover-bg: #efefeb;
  --code-bg: #ecece8;
  --accent-color: #5b7485;
}

.dark-mode {
  --bg-color: #171717;
  --text-main: #d6d6d6;
  --text-muted: #7a7a7a;
  --border-color: #2e2e2e;
  --border-strong: #d6d6d6;
  --hover-bg: #222222;
  --code-bg: #1f1f1f;
  --accent-color: #7899af;
}

* { box-sizing: border-box; }
::selection { background-color: var(--accent-color); color: var(--bg-color); }

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.6; color: var(--text-main); background-color: var(--bg-color); font-size: 15px; -webkit-font-smoothing: antialiased; transition: background-color 0.3s ease, color 0.3s ease; margin: 0; padding: 40px 20px; overflow-y: scroll; }
.container { width: 100%; max-width: 800px; margin: 0 auto; padding: 0; }

/* ==========================================================================
   Header & Breadcrumbs
   ========================================================================== */
.sys-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--border-strong); padding-bottom: 24px; margin-bottom: 40px; }

.sys-title { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; display: flex; align-items: center; gap: 8px; }
.sys-title a.brand-root { color: var(--text-main); text-decoration: none; transition: color 0.2s ease; }
.sys-title a.brand-root:hover { color: var(--accent-color); }
.sys-title .path-separator { color: var(--border-color); font-weight: 400; }
.sys-title .current-path { color: var(--text-muted); font-weight: 500; }

.theme-toggle { background: transparent; border: none; cursor: pointer; color: var(--text-main); display: flex; align-items: center; padding: 0; transition: color 0.2s ease; }
.theme-toggle:hover { color: var(--accent-color); }
.theme-toggle svg { width: 18px; height: 18px; }
.sun-icon { display: none; }
.moon-icon { display: block; }
.dark-mode .sun-icon { display: block; }
.dark-mode .moon-icon { display: none; }

/* ==========================================================================
   Directory List (Terminal Style with Bytes)
   ========================================================================== */
.log-directory { border-top: 1px solid var(--border-color); }
.log-header-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 16px; padding: 12px 0; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid var(--border-color); }

.log-row { display: grid; grid-template-columns: 120px 1fr 60px; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-color); align-items: center; transition: background-color 0.2s ease; }
.log-row:hover { background-color: var(--hover-bg); cursor: crosshair; }

.col-author { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.author-tag { background-color: var(--text-main); color: var(--bg-color); padding: 2px 6px; border-radius: 2px; display: inline-block; transition: all 0.2s ease; }
.log-row:hover .author-tag { background-color: var(--accent-color); }

.col-title h2, .col-title h3 { font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.col-title a { color: var(--text-main); text-decoration: none; display: block; transition: color 0.2s ease; }
.log-row:hover .col-title a { color: var(--accent-color); }

.col-size { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-muted); text-align: right; transition: color 0.2s ease; }
.log-row:hover .col-size { color: var(--accent-color); }

/* ==========================================================================
   Single Post & Content
   ========================================================================== */
.log-entry { max-width: 680px; }
.log-header { border-bottom: 1px solid var(--border-color); padding-bottom: 24px; margin-bottom: 40px; }
.meta-bar { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 16px; }
.log-title { font-family: 'Inter', sans-serif; font-size: 32px; font-weight: 600; margin: 0; letter-spacing: -0.03em; line-height: 1.2; }

.log-content p { font-size: 15px; line-height: 1.7; margin: 0 0 24px 0; }
.log-content h2, .log-content h3, .log-content h4 { font-family: 'Inter', sans-serif; font-weight: 600; margin-top: 40px; margin-bottom: 16px; color: var(--text-main); }
.log-content a { color: var(--text-main); text-decoration: none; border-bottom: 1px solid var(--text-muted); transition: all 0.2s ease; }
.log-content a:hover { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.log-content img { max-width: 100%; height: auto; border: 1px solid var(--border-color); padding: 4px; margin: 24px 0; display: block; }

blockquote { font-family: 'JetBrains Mono', monospace; font-size: 13px; margin: 32px 0; padding: 16px 20px; color: var(--text-main); background: var(--hover-bg); border-left: 2px solid var(--accent-color); }
blockquote p { margin: 0 !important; }
pre, code { font-family: 'JetBrains Mono', Consolas, monospace !important; background-color: var(--code-bg) !important; color: var(--text-main) !important; font-size: 13px !important; border-radius: 0 !important; }
pre { padding: 16px !important; margin: 24px 0 !important; border: 1px solid var(--border-color) !important; overflow-x: auto !important; }
code { padding: 2px 4px !important; }

/* Pagination */
.pagination { display: flex; justify-content: flex-start; gap: 24px; margin-top: 60px; font-family: 'JetBrains Mono', monospace; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.pagination .page-numbers { color: var(--text-muted); text-decoration: none; border: none; transition: color 0.2s ease; padding: 0; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { color: var(--accent-color); background: transparent; }

/* Footer */
.sys-footer { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); text-transform: uppercase; display: flex; justify-content: space-between; border-top: 2px solid var(--border-strong); padding-top: 16px; margin-top: 80px; }

/* Mobile */
@media (max-width: 650px) {
    body { padding: 30px 16px; }
    .sys-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .theme-toggle { align-self: flex-end; margin-top: -34px; }
    .log-header-row { display: none; }
    .log-row { grid-template-columns: 1fr 60px; grid-template-rows: auto auto; padding: 16px 0; row-gap: 8px; column-gap: 12px; }
    .log-row .col-author { grid-column: 1 / 2; grid-row: 1 / 2; font-size: 10px; }
    .log-row .col-title { grid-column: 1 / 2; grid-row: 2 / 3; }
    .log-row .col-size { grid-column: 2 / 3; grid-row: 1 / 3; display: flex; align-items: center; justify-content: flex-end; }
    .sys-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.log-row { animation: fadeIn 0.4s ease-out backwards; }