/* GitHub dark theme palette - matches other projects in workspace */
:root {
    --bg: #0d1117;
    --bg-elev: #161b22;
    --bg-hover: #21262d;
    --border: #30363d;
    --text: #c9d1d9;
    --text-dim: #8b949e;
    --text-bright: #f0f6fc;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --success: #3fb950;
    --warning: #d29922;
    --danger: #f85149;
    --code-bg: #161b22;
    --code-border: #30363d;
    --max-w: 900px;
    --nav-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(13, 17, 23, 0.85);
}

.header-inner {
    max-width: calc(var(--max-w) + var(--nav-w) + 80px);
    margin: 0 auto;
    padding: 0 24px;
}

header h1 {
    font-size: 22px;
    color: var(--text-bright);
    font-weight: 600;
}

.subtitle {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 4px;
}

nav#dateNav {
    position: fixed;
    left: 0;
    top: 90px;
    width: var(--nav-w);
    height: calc(100vh - 90px);
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg-elev);
    padding: 24px 0;
}

.nav-inner {
    padding: 0 12px;
}

.nav-label {
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px 8px;
    font-weight: 600;
}

#dateList {
    list-style: none;
}

#dateList li {
    border-radius: 6px;
    margin-bottom: 2px;
}

#dateList a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    transition: all 0.12s;
}

#dateList a:hover {
    background: var(--bg-hover);
    color: var(--text-bright);
}

#dateList a.active {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent);
    font-weight: 500;
}

main {
    margin-left: var(--nav-w);
    padding: 32px 24px 80px;
}

article#content {
    max-width: var(--max-w);
    margin: 0 auto;
}

.loading {
    color: var(--text-dim);
    text-align: center;
    padding: 60px 0;
    font-size: 14px;
}

/* Markdown content styles */
article h1 {
    font-size: 28px;
    color: var(--text-bright);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

article h2 {
    font-size: 20px;
    color: var(--text-bright);
    margin: 32px 0 12px;
    font-weight: 600;
}

article h3 {
    font-size: 16px;
    color: var(--text-bright);
    margin: 24px 0 8px;
    font-weight: 600;
}

article p {
    margin: 12px 0;
}

article ul, article ol {
    margin: 12px 0 12px 24px;
}

article li {
    margin: 4px 0;
}

article a {
    color: var(--accent);
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

article code {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: "SF Mono", Monaco, "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    color: #e6edf3;
}

article pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    padding: 14px 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 14px 0;
    font-size: 12.5px;
}

article pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

article blockquote {
    border-left: 3px solid var(--border);
    padding-left: 14px;
    margin: 14px 0;
    color: var(--text-dim);
}

article table {
    border-collapse: collapse;
    margin: 14px 0;
    width: 100%;
    font-size: 13.5px;
}

article th, article td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

article th {
    background: var(--bg-elev);
    font-weight: 600;
    color: var(--text-bright);
}

article hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 28px 0;
}

footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    margin-left: var(--nav-w);
    color: var(--text-dim);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-meta {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    nav#dateNav {
        position: static;
        width: 100%;
        height: auto;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    main, footer {
        margin-left: 0;
    }
    #dateList {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    #dateList li {
        margin-bottom: 0;
    }
}
