/* Hermes Blog - Dark Theme (v1 style) */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2333;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --border: #30363d;
  --radius: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.7; min-height: 100vh;
}

/* Nav */
.navbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 20px; height: 56px;
}
.nav-brand { font-size: 18px; font-weight: 700; color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-admin { border: 1px solid var(--border); padding: 4px 12px; border-radius: var(--radius); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.show { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg-card); padding: 16px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.blog-layout { display: grid; grid-template-columns: 1fr 280px; gap: 30px; }
@media (max-width: 768px) { .blog-layout { grid-template-columns: 1fr; } }

/* Cards */
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  transition: border-color .2s;
}
.post-card:hover { border-color: var(--accent); }
.post-card h2 { font-size: 20px; margin-bottom: 8px; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }
.post-summary { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  display: inline-block; padding: 2px 10px;
  background: rgba(88,166,255,0.1); color: var(--accent);
  border-radius: 12px; font-size: 12px; text-decoration: none;
}
.tag:hover { background: rgba(88,166,255,0.2); }

/* Sidebar */
.widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.widget h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.widget ul { list-style: none; }
.widget ul li { margin-bottom: 8px; }
.widget ul li a { color: var(--text); text-decoration: none; font-size: 14px; }
.widget ul li a:hover { color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* Search */
.search-box { margin-bottom: 20px; }
.search-box form { display: flex; gap: 8px; }
.search-box input { flex: 1; padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.search-box button { padding: 8px 18px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 30px; }
.page-link { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--accent); text-decoration: none; }
.page-link:hover { background: var(--bg-hover); }
.page-info { color: var(--text-muted); font-size: 14px; }

/* Article */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-title { font-size: 28px; margin-bottom: 12px; }
.article-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.article-content { margin-top: 30px; font-size: 16px; line-height: 1.8; }
.article-content h1, .article-content h2, .article-content h3 { margin-top: 28px; margin-bottom: 12px; }
.article-content h1 { font-size: 24px; } .article-content h2 { font-size: 20px; } .article-content h3 { font-size: 18px; }
.article-content p { margin-bottom: 16px; }
.article-content code { background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-content pre { margin: 16px 0; border-radius: var(--radius); overflow-x: auto; }
.article-content pre code { background: none; padding: 0; }
.article-content blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--text-muted); margin: 16px 0; }
.article-content img { max-width: 100%; border-radius: var(--radius); }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 16px; }
.article-content a { color: var(--accent); }
.article-nav { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-back { color: var(--accent); text-decoration: none; }

/* TOC */
.toc { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.toc h3 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.toc ul { list-style: none; } .toc li { margin-bottom: 4px; }
.toc li a { color: var(--accent); text-decoration: none; font-size: 14px; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.admin-table th, .admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.admin-table tr:hover td { background: var(--bg-hover); }
.btn-sm { display: inline-block; padding: 4px 12px; font-size: 12px; border-radius: var(--radius); text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); }
.btn-sm:hover { background: var(--bg-hover); }
.btn-danger { color: #f85149; border-color: #f85149; }
.btn-danger:hover { background: rgba(248,81,73,0.1); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.form-group textarea { font-family: "SFMono-Regular", Consolas, monospace; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn { display: inline-block; padding: 10px 24px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-size: 14px; text-decoration: none; }
.btn:hover { opacity: 0.9; }
.btn-cancel { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.login-form { max-width: 400px; margin: 60px auto; text-align: center; }
.login-form h1 { margin-bottom: 30px; }

/* Archive */
.archive-year { font-size: 22px; color: var(--accent); margin-top: 30px; }
.archive-list { list-style: none; margin-left: 20px; border-left: 2px solid var(--border); padding-left: 20px; }
.archive-list li { margin-bottom: 12px; position: relative; }
.archive-list li::before { content: ""; position: absolute; left: -26px; top: 8px; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; }
.archive-date { color: var(--text-muted); font-size: 13px; margin-right: 12px; }
.archive-list a { color: var(--text); text-decoration: none; }
.archive-list a:hover { color: var(--accent); }

/* About */
.about-page { max-width: 700px; margin: 0 auto; }
.about-page h1 { margin-bottom: 20px; }
.social-links { margin-top: 24px; display: flex; gap: 12px; }
.social-link { padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--accent); text-decoration: none; font-size: 14px; }

/* Footer */
.footer { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px; }
.empty { text-align: center; padding: 60px; color: var(--text-muted); }
