/* blog.practicalcoder.com — index/stream theme. Dark brand palette shared
   with practicalcoder.com. Chrome for article pages lives in chrome.css. */
:root {
  --bg: #0f172a;
  --bg-raised: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-faint: #64748b;
  --accent: #60a5fa;
  --accent2: #a78bfa;
  --chip-active: #3b82f6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

.site-header {
  border-bottom: 1px solid var(--border);
  height: 3em; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: nowrap;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.site-header .brand { font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; white-space: nowrap; }
.site-header .brand .brand-surface { font-weight: 400; color: var(--text-faint); font-size: 0.85rem; margin-left: 0.3rem; }
@keyframes playh {
  from { background-position: 0 0; }
  to { background-position: -24em 0; }
}
.mesh64 {
  width: 2em; height: 2em;
  background-image: url('/images/jpc_icon_crystal64x64x13x1.png');
  background-size: 26em 2em;
  animation: playh 3s steps(12) infinite alternate-reverse;
  display: inline-flex; margin-right: 0.2em; position: relative; top: 0.05em;
}
.site-header nav { display: flex; gap: 0.5rem; margin-left: auto; white-space: nowrap; overflow-x: auto; }
.site-header nav a { color: #fff; font-weight: 500; font-size: 0.875rem; padding: 0.5rem 0.75rem; border-radius: 0.375rem; transition: all .2s; }
.site-header nav a:hover { color: var(--accent); background: rgba(51,65,85,0.5); }
.site-header nav a.active { color: var(--accent); }

.wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }

.masthead h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
.masthead h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.masthead p { color: var(--text-dim); margin-top: 0.5rem; max-width: 34rem; }

.lens { margin-top: 1.75rem; }
.lens-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.5rem; }
.lens-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lens-list a {
  display: inline-block; padding: 0.3rem 0.8rem; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 0.82rem; color: var(--text-dim);
}
.lens-list a:hover { color: #fff; border-color: var(--accent); }
.lens-list a.active { background: var(--chip-active); border-color: var(--chip-active); color: #fff; }
.lens-count {
  display: inline-block; margin-left: 0.35rem; padding: 0 0.35rem;
  border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  background: rgba(96,165,250,0.15); color: var(--accent);
}
.lens-list a.active .lens-count { background: rgba(255,255,255,0.25); color: #fff; }
.lens-list a.lens-empty { opacity: 0.55; }
.lens-list a.lens-empty .lens-count { background: rgba(128,128,128,0.15); color: var(--text-faint); }

h2.sec {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  display: flex; align-items: baseline; gap: 0.75rem;
}
h2.sec::after { content: ''; flex: 1; height: 1px; background: var(--border); }
h2.sec .count { font-weight: 400; text-transform: none; letter-spacing: 0; }
h2.sec .sec-link { color: var(--text-dim); text-transform: none; letter-spacing: 0.02em; font-size: 0.95rem; }
h2.sec .sec-link:hover { color: var(--accent); }
.more-link {
  display: inline-block; margin-top: 0.6rem; font-size: 0.82rem;
  color: var(--accent);
}
.more-link:hover { color: #fff; }

.entry { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.entry:hover .entry-title { color: #fff; }
.entry-top { display: flex; gap: 1rem; align-items: flex-start; }
.entry-thumb {
  width: 3.25rem; height: 3.25rem; border-radius: 0.5rem; flex-shrink: 0;
  background: var(--bg-raised); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-faint); overflow: hidden;
}
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-body { min-width: 0; }
.entry-title { font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.35; transition: color .15s; }
.badge-new {
  display: inline-block; vertical-align: 0.15em; margin-left: 0.45rem;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: #0f172a; background: linear-gradient(90deg, var(--accent), var(--accent2));
  padding: 0.1rem 0.4rem; border-radius: 0.25rem;
}
.entry-hook { color: var(--text-dim); font-size: 0.92rem; margin-top: 0.2rem; }
.entry-hook .entry-meta { font-size: 0.8rem; color: var(--text-faint); white-space: normal; }
.entry-meta a { color: var(--text-dim); border-bottom: 1px dotted var(--border); }
.entry-meta a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.entry-title { font-size: 1.05rem; font-weight: 600; color: var(--text); line-height: 1.35; transition: color .15s; }

.index-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 58rem) {
  .index-layout { grid-template-columns: 1fr 15rem; gap: 2.5rem; }
  .wrap:has(.index-layout) { max-width: 64rem; }
}
.index-rail { position: sticky; top: 4.5rem; align-self: start; }
.rail-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.6rem; }
.index-rail .collection {
  display: block; padding: 0.55rem 0; border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0; background: none;
}
.index-rail .collection:last-of-type { border-bottom: 0; }
.index-rail .collection:hover .c-title { color: var(--accent); }
.index-rail .collection .c-title { transition: color .15s; }
.index-rail .subscribe { margin-top: 1.5rem; padding: 1rem; display: block; }
.index-rail .subscribe .s-sub, .index-rail .subscribe .rss { font-size: 0.78rem; }
.index-rail .subscribe form { margin-top: 0.7rem; }
.index-rail .subscribe input[type=email] { width: 100%; font-size: 0.82rem; }
.index-rail .subscribe button { width: 100%; margin-top: 0.5rem; }

.collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.collection {
  border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.9rem 1rem;
  background: var(--bg-raised);
}
.collection:hover { border-color: var(--accent); }
.collection .c-title { font-size: 0.9rem; font-weight: 600; }
.collection .c-count { font-size: 0.75rem; color: var(--text-faint); margin-top: 0.15rem; }

.subscribe {
  margin-top: 3rem; border: 1px solid var(--border); border-radius: 0.75rem;
  background: var(--bg-raised); padding: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; justify-content: space-between;
}
.subscribe .s-title { font-weight: 600; }
.subscribe .s-sub { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.15rem; }
.subscribe .rss { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.35rem; }
.subscribe .rss a { color: var(--accent); }
.subscribe form { display: flex; gap: 0.5rem; }
.subscribe input[type=email] {
  background: var(--bg); border: 1px solid var(--border); border-radius: 0.4rem;
  padding: 0.5rem 0.75rem; color: var(--text); font-size: 0.9rem; width: 15rem;
}
.subscribe button {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border: 0; border-radius: 0.4rem; color: #0f172a; font-weight: 700;
  padding: 0.5rem 1rem; font-size: 0.85rem; cursor: pointer;
}
.sub-ok { color: #86efac; font-size: 0.9rem; }
.sub-err { color: #fca5a5; font-size: 0.9rem; }

.back { margin-top: 2rem; font-size: 0.85rem; }
.back a { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 1.5rem 1.5rem;
  font-size: 0.78rem; color: var(--text-faint);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.site-footer .foot-brand { display: flex; flex-direction: column; gap: 0.2rem; }
.site-footer .brand-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.site-footer .brand-name em { font-style: normal; color: var(--accent); }
.site-footer .brand-description { color: var(--text-faint); max-width: 30rem; }
.site-footer .legal-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.site-footer .legal-links a { color: var(--text-dim); }
.site-footer .legal-links a:hover { color: var(--accent); }
.site-footer .copyright { color: var(--text-faint); }

@media (max-width: 40rem) {
  .masthead h1 { font-size: 1.7rem; }
  .entry-thumb { width: 2.5rem; height: 2.5rem; }
  .subscribe form { width: 100%; }
  .subscribe input[type=email] { flex: 1; width: auto; }
}
