:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c2129;
    --border: #30363d;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #58a6ff;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --glow-accent: rgba(88, 166, 255, 0.08);
    --code-bg: #1c2129;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(88, 166, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(57, 211, 83, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
}
.nav-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.4rem; }
.nav-brand:hover { text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.pixel-heart { width: 16px; height: 14px; image-rendering: pixelated; display: inline-block; }
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
}
.nav-brand .pixel-heart:nth-child(2) { animation: heartbeat 2s ease-in-out infinite; }

.wrap { max-width: 720px; margin: 0 auto; padding: 3rem 2rem 4rem; }

.post-header { margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
.post-header h1 {
    font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.post-header .subtitle { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.post-meta { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.post-meta .dot { opacity: 0.5; }

article h2 {
    font-size: 1.45rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem;
    letter-spacing: -0.01em; padding-left: 0.75rem; border-left: 3px solid var(--accent);
}
article h3 {
    font-size: 1.1rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.5rem;
    color: var(--text);
}
article p { margin-bottom: 1.1rem; color: #c9d1d9; }
article ul, article ol { margin: 0 0 1.1rem 1.25rem; color: #c9d1d9; }
article li { margin-bottom: 0.4rem; }
article li > ul, article li > ol { margin-top: 0.4rem; margin-bottom: 0.4rem; }
article strong { color: var(--text); font-weight: 600; }
article hr { border: none; border-top: 1px solid var(--border); margin: 2.25rem 0; }
article blockquote {
    border-left: 3px solid var(--border); padding: 0.25rem 0 0.25rem 1rem;
    color: var(--muted); margin: 1rem 0; font-style: italic;
}

article code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.85em; background: var(--code-bg); padding: 0.15rem 0.4rem;
    border-radius: 4px; color: #e6edf3; border: 1px solid var(--border);
}
article pre {
    background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 1rem 1.15rem; overflow-x: auto; margin: 0 0 1.25rem 0;
    font-size: 0.85rem; line-height: 1.55;
}
article pre code {
    background: none; padding: 0; border: none; border-radius: 0;
    font-size: inherit; color: #c9d1d9;
}

article table {
    width: 100%; border-collapse: collapse; margin: 0 0 1.5rem 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; font-size: 0.9rem;
}
article th, article td {
    padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left;
}
article th {
    background: var(--surface-hover); font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted);
}
article tr:last-child td { border-bottom: none; }
article td.num, article th.num { text-align: right; font-variant-numeric: tabular-nums; }

.post-footer {
    margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
    color: var(--muted); font-size: 0.9rem;
}
.post-footer a { color: var(--accent); }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 1.5rem; margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    display: block; color: inherit;
}
.post-card:hover {
    border-color: rgba(88, 166, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 30px var(--glow-accent);
    transform: translateY(-2px); text-decoration: none;
}
.post-card h2 {
    font-size: 1.25rem; font-weight: 700; margin: 0 0 0.4rem 0;
    padding: 0; border: none; color: var(--text);
}
.post-card .post-card-date { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.6rem; }
.post-card p { color: var(--muted); font-size: 0.95rem; margin: 0; line-height: 1.55; }

footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--muted); font-size: 0.8rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

@media (max-width: 600px) {
    .wrap { padding: 2rem 1.25rem 3rem; }
    .post-header h1 { font-size: 1.6rem; }
    .post-header .subtitle { font-size: 0.95rem; }
    article h2 { font-size: 1.2rem; }
    article h3 { font-size: 1rem; }
    article pre { font-size: 0.78rem; padding: 0.8rem; }
    article table { font-size: 0.8rem; display: block; overflow-x: auto; }
    nav { padding: 0.75rem 1.25rem; }
    .nav-brand { font-size: 1rem; }
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.8rem; }
}
