/* ===== Cillian & Shane's Blog ===== */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --muted: #888;
  --accent: #7c6af7;
  --accent-light: #a89cf8;
  --tag-bg: #1e1b3a;
  --font: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #fff; }

/* ===== Layout ===== */
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
header {
  border-bottom: 1px solid var(--border);
  padding: 28px 0 20px;
  margin-bottom: 48px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.site-title span { color: var(--accent-light); }
.site-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}
nav { display: flex; gap: 20px; font-size: 0.9rem; }
nav a { color: var(--muted); }
nav a:hover, nav a.active { color: var(--text); }

/* ===== Category Filter ===== */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.cat-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.cat-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Post List ===== */
.post-list { display: flex; flex-direction: column; gap: 0; }

.post-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.post-item:last-child { border-bottom: none; }

.post-date {
  min-width: 80px;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.post-body { flex: 1; }
.post-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  transition: color 0.15s;
}
.post-item:hover .post-title { color: var(--accent-light); }
.post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--accent-light);
}

/* ===== Article Page ===== */
.article-header { margin-bottom: 40px; }
.article-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.article-meta .tag { font-size: 0.75rem; }

.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: #d4d4d4;
}
.article-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 36px 0 14px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol {
  margin: 0 0 18px 24px;
}
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-style: italic;
}
.article-body code {
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent-light);
  font-family: 'Fira Code', 'Consolas', monospace;
}
.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: #c9d1d9;
}
.article-body strong { color: var(--text); }
.article-body a { border-bottom: 1px solid var(--accent); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 36px;
}
.back-link:hover { color: var(--text); }

/* ===== Highlight Box ===== */
.highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 18px 22px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}
.highlight strong { color: var(--accent-light); }

/* ===== Article Lead ===== */
.article-body .lead {
  font-size: 1.15em;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.7;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ===== Weekly ===== */
.weekly-list { display: flex; flex-direction: column; gap: 16px; }
.weekly-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.weekly-item:hover { border-color: var(--accent); }
.weekly-item h3 { font-size: 1rem; margin-bottom: 6px; }
.weekly-item p { font-size: 0.83rem; color: var(--muted); }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 64px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== Empty State ===== */
.empty { text-align: center; padding: 60px 0; color: var(--muted); font-size: 0.9rem; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .post-item { flex-direction: column; gap: 6px; }
  .post-date { min-width: unset; }
  .article-header h1 { font-size: 1.5rem; }
}
