/* Blog: shared styles for archive + post pages.
   Color palette is intentionally aligned with index.html. */

:root{
  --bg:#0f1115;
  --card:#151823;
  --text:#e9e9ee;
  --muted:#b7b9c3;
  --link:#86a6ff;
  --border:#2a2f3b;
  --chip:#1a1e2a;
  --rule:#222633;
}

*{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  color: var(--text);
  line-height: 1.65;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(134,166,255,0.08) 0%, rgba(0,0,0,0) 60%),
    var(--bg);
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

.wrap{ max-width: 720px; margin: 0 auto; padding: 56px 22px 80px; }
.wrap-wide{ max-width: 900px; }

/* Card: visual container matching the bio's card aesthetic */
.card{
  background: rgba(21,24,35,0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
}
@media (max-width: 560px){
  .card{
    padding: 20px;
    border-radius: 14px;
  }
}

/* Masthead: compact identity block on non-bio pages */
.masthead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.masthead-identity{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.masthead-identity:hover{ text-decoration: none; }
.masthead-avatar{
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #0f1016;
  display: block;
}
.masthead-text{
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.masthead-name{
  font-size: 14px;
  font-weight: 660;
  color: var(--text);
  transition: color 0.15s ease;
}
.masthead-identity:hover .masthead-name{
  color: var(--link);
}
.masthead-role{
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.masthead-nav{
  font-size: 13px;
}
.masthead-nav a{
  color: var(--muted);
  transition: color 0.15s ease;
}
.masthead-nav a:hover{
  color: var(--link);
  text-decoration: none;
}
@media (max-width: 560px){
  .masthead{
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 14px;
  }
  .masthead-avatar{
    width: 32px;
    height: 32px;
  }
  .masthead-role{
    font-size: 11px;
  }
}

/* --- Section headings on archive page --- */
.section-title{
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px 0;
  font-weight: 600;
}

/* --- Series block: each series wrapped as its own panel --- */
.series-block{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 22px;
  background: rgba(10,11,16,0.25);
}
.series-block + .series-block{ margin-top: 20px; }
.series-block .section-title{ margin-bottom: 14px; }
.series-block .posts li:first-child{ border-top: none; padding-top: 4px; }
.series-block .posts li:last-child{ border-bottom: none; padding-bottom: 4px; }
@media (max-width: 560px){
  .series-block{ padding: 18px 16px; }
}

.intro{
  font-size: 17px;
  color: var(--text);
  margin: 0 0 40px 0;
}
.intro .lede{
  font-size: 28px;
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 14px 0;
  color: var(--text);
}
.intro p{ margin: 10px 0; color: var(--muted); line-height: 1.6; }

/* --- Archive list --- */
.posts{ list-style: none; padding: 0; margin: 0; }
.posts li{
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.posts li:last-child{ border-bottom: 1px solid var(--rule); }
.posts .post-date{
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.posts .post-title{
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
  line-height: 1.3;
}
.posts .post-title a{ color: var(--text); }
.posts .post-title a:hover{ color: var(--link); text-decoration: none; }
.posts .post-dek{
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.archive-empty{
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  color: var(--muted);
  font-size: 15px;
}

/* --- Post layout --- */
.post-header{ margin: 8px 0 32px 0; }
.post-title-h1{
  font-size: 36px;
  font-weight: 740;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 14px 0;
  color: var(--text);
}
.post-dateline{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.post-dateline .sep{ margin: 0 8px; color: var(--border); }

/* --- Post hero image (optional, per post) --- */
.post-hero{
  margin: 0 0 40px 0;
}
.post-hero img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}
@media (max-width: 560px){
  .post-hero{ margin-bottom: 28px; }
}

/* --- Post body typography --- */
.prose{
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
}
.prose > * + *{ margin-top: 1.1em; }
.prose p{ margin: 0; }
.prose h2{
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2em 0 0.4em 0;
  color: var(--text);
}
.prose h3{
  font-size: 18px;
  font-weight: 660;
  margin: 1.6em 0 0.3em 0;
  color: var(--text);
}
.prose ul, .prose ol{ padding-left: 1.4em; margin: 0; }
.prose li{ margin: 0.4em 0; }
.prose li > p{ margin: 0; }
.prose blockquote{
  margin: 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--link);
  color: var(--muted);
  font-style: italic;
}
.prose code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}
.prose pre{
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}
.prose pre code{
  background: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}
.prose hr{
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}
.prose strong{ color: var(--text); font-weight: 680; }
.prose em{ color: var(--text); }
.prose a{ border-bottom: 1px solid rgba(134,166,255,0.35); }
.prose a:hover{ border-bottom-color: var(--link); text-decoration: none; }

/* Pullable callout for emphasis (optional, used sparingly) */
.prose .callout{
  border: 1px solid var(--border);
  background: rgba(26,30,42,0.45);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text);
  font-size: 0.96em;
}

/* --- Post footer --- */
.post-footer{
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}
.post-footer .byline{ color: var(--muted); }
.post-footer .byline strong{ color: var(--text); font-weight: 640; }

/* --- Mobile --- */
@media (max-width: 560px){
  .wrap{ padding: 28px 18px 56px; }
  .topnav{ margin-bottom: 24px; }
  .intro .lede{ font-size: 24px; }
  .post-title-h1{ font-size: 28px; }
  .prose{ font-size: 17px; line-height: 1.65; }
  .prose h2{ font-size: 20px; }
  .prose h3{ font-size: 17px; }
  .posts .post-title{ font-size: 18px; }
}
