:root {
  color-scheme: dark;
  --bg: #0f1115;
  --card: #1a1d24;
  --text: #f2f3f5;
  --muted: #9aa0ab;
  --accent: #ff7a45;
  --border: rgba(255, 255, 255, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.site-header a { text-decoration: none; }
.site-header .home { color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.site-header nav { display: flex; gap: 1rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--accent); }

main { max-width: 720px; margin: 0 auto; padding: 2rem 1rem 4rem; }
h1 { margin: 0 0 0.5rem; font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.intro, .empty { color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}
a.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.draft { border-color: var(--accent); color: var(--accent); }

.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
a.card {
  display: block;
  background: var(--card);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h2 { margin: 0.25rem 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; color: var(--muted); font-size: 0.85rem; }
.post header { margin-bottom: 1.5rem; }
.post .meta { margin-bottom: 0.5rem; }
.rating { color: var(--muted); margin: 0; }
.rating strong { color: var(--accent); }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; }
.post-body blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.post-body pre, .post-body code { background: var(--card); border-radius: 6px; }
.post-body code { padding: 0.1rem 0.3rem; }
.post-body pre { padding: 1rem; overflow-x: auto; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.5rem 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.listen a {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
}
.listen a:hover { border-color: var(--accent); }
/* Star ratings */
.stars { display: inline-flex; gap: 0.1em; font-size: 1.25rem; line-height: 1; letter-spacing: 0; }
.rating.small .stars { font-size: 0.95rem; }
.star.full { color: var(--accent); }
.star.empty { color: rgba(255, 255, 255, 0.18); }
.star.half {
  background: linear-gradient(90deg, var(--accent) 50%, rgba(255, 255, 255, 0.18) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card .rating.small { margin: 0.15rem 0 0.35rem; }

/* Cover images */
.post header.has-cover { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; align-items: center; }
.cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
@media (max-width: 520px) {
  .post header.has-cover { grid-template-columns: 1fr; }
  .post header.has-cover .cover { max-width: 280px; }
}
a.card.has-thumb { display: flex; gap: 1rem; align-items: center; }
.thumb { flex: 0 0 72px; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

.back { margin-top: 2.5rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--accent); }
