/* Sidebar - NO scrollbar, pills, no images */
/* Sidebar sections divide with a faded hr-style line (like the old zzo theme's .hr-fade)
   instead of their own background+border. The sidebar's own background/border are folded
   into the shared .container:not(.no-sidebar) panel (grid.css) so it and .main read as one
   unified box - see that rule. */
/* Top padding set to 12px (was 24px) so the gap to the avatar - 12px here plus the first
   card's own 16px padding, 28px total - matches --sidebar-indent's own 12px-past-the-card-
   edge inset (below), and .main's padding-left/-top (hero.css) is matched to that same
   28px, so the hero box and the avatar photo line up on both the top and the left. */
.sidebar{
  --sidebar-indent:12px; /* shared by .card h3, .author-info and .author-wrapper below, so
    the titles, the name/bio text, and the avatar all read off one number instead of each
    repeating (or, for the avatar, approximating via unrelated width/margin math) the same
    12px independently. */
  position:sticky; top:24px; align-self:start; display:flex; flex-direction:column; gap:0; padding:12px 0 24px;
}
.card{ position:relative; background:none; border:none; border-radius:0; padding:16px; }
.card + .card::before{
  content:"";
  position:absolute;
  top:0; left:16px; right:16px;
  height:1px;
  background:linear-gradient(90deg, transparent, color-mix(in oklab, var(--border) 30%, transparent) 50%, transparent);
}
.card h3{ font-size:calc(15px * var(--type-scale)); color:var(--foreground); font-family:var(--font); margin:0 0 12px; padding-left:var(--sidebar-indent); display:flex; align-items:center; gap:8px; font-weight:600; }

/* search posts */
.search-box{position:relative; }
.search-box input{ width:100%; background:var(--background); border:1px solid var(--border-soft); border-radius:0; padding:10px 14px 10px 40px; font-size:13px; color:var(--foreground); outline:none; font-family:var(--font); }
.search-box input::placeholder{ color:var(--muted-foreground); }
.search-box input:focus-visible{ border-color:var(--foreground); box-shadow:0 0 0 1px var(--foreground); }
.search-box button{ position:absolute; left:4px; top:4px; width:32px; height:32px; border:none; background:transparent; color:var(--foreground); border-radius:0; display:grid; place-items:center; cursor:pointer; }

.search-results{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  left:0; right:0;
  max-height:350px;
  overflow-y:auto;
  overscroll-behavior:contain;
  background:var(--bg-elev);
  border:1px solid var(--border);
  z-index:20;
  box-sizing:border-box;
}
/* static/js/search.js toggles this .open class instead of inline style.display, so the
   fade-in (@keyframes shared with layout/header.css's nav-dropdown-menu - same "restart on
   display:none -> displayed" trick, no other JS change needed) applies here too. */
.search-results.open{
  display:block;
  animation:navDropdownIn .18s ease;
}
.search-results::-webkit-scrollbar{ width: auto; }
.search-results{ scrollbar-width:auto; scrollbar-color:auto; } /* keep global bar */

@media(max-width:768px){
  .search-results{
    max-height:50vh;
    max-height:50dvh;
  }
}

.search-results a{ display:block; padding:10px 12px; font-size:13px; color:var(--foreground); border-bottom:1px solid var(--border); }
.search-results a:hover{ background:var(--bg-elev); }
.author-card{ text-align:left; }
/* Was a 90%-width/auto-margin wrapper - a percentage inset that only coincidentally lined
   up with .author-info's fixed 12px, and would drift out of sync if the card's own width
   ever changed. padding-left:var(--sidebar-indent) instead, same fixed value/mechanism as
   the title and info text, so all three are actually tied together, not just visually
   close by chance. */
.author-wrapper{margin:0; width:100%; height:100%; padding-left:var(--sidebar-indent);}
.author-avatar{ width:100%; max-width:240px; object-fit:cover; margin:0 0 1rem; display:block; border:0; background:var(--bg-elev); box-shadow:none; pointer-events:none; user-select:none; }
.author-info{ padding-left:var(--sidebar-indent); }
.author-name{ font-weight:700; font-size:calc(23px * var(--type-scale)); letter-spacing:-.01em; }
.author-alias,.author-location{display:grid;grid-template-columns:16px minmax(0,1fr);align-items:center;column-gap:6px;color:var(--muted-foreground);font-family:var(--mono);font-size:calc(13px * var(--type-scale));margin:3px 0}
.author-alias-icon,.author-location-icon{width:16px;height:16px;display:block}
.author-location-icon{display:grid;place-items:center;line-height:1}
.author-alias-value,.author-location-value{min-width:0;overflow-wrap:anywhere}
.author-role{ color:var(--muted-foreground); font-size:calc(11px * var(--type-scale)); font-family:var(--mono); letter-spacing:.02em; margin:3px 0 8px; }
.author-bio{ font-size:calc(13px * var(--type-scale)); color:var(--muted-foreground); line-height:1.5; }
.socials{ display:flex; justify-content:center; gap:14px; margin-top:12px; flex-wrap:wrap; }
.soc{ width:32px; height:32px; border-radius:999px; border:none; display:grid; place-items:center; background:transparent; color:var(--muted-foreground); font-size:11px; font-family:var(--mono); font-weight:600; }
.soc:hover{ color:var(--foreground); }
.soc svg{ width:24px; height:24px; }
/* The GitHub mark's own viewBox has almost no internal padding around the glyph, unlike
   the others (Discord/Telegram/Twitter), so at the same 24px box it reads visibly bigger/
   bolder than its siblings despite the identical width/height - sized down specifically to
   compensate. */
.soc-icon-github{ width:20px; height:20px; }
.recent-list{ list-style:disc; margin:0; padding-left:40px; display:flex; flex-direction:column; gap:6px; }
.post-mini{ padding:0; border-bottom:none; display:list-item; }
.post-mini:last-child{ border:none; }
.post-mini a{ font-size:calc(13px * var(--type-scale)); font-weight:500; line-height:1.35; color:var(--foreground); display:block; }
.post-mini a:hover{ color:var(--link-hover); text-decoration:underline; text-underline-offset:2px; }
.post-mini::marker{ color:var(--muted-foreground); }
/* Compact square badges align with the author info and sidebar headings. */
.cat-pills{display:flex;flex-wrap:wrap;gap:4px;padding-left:var(--sidebar-indent)}
.cat-pill{display:inline-flex;align-items:center;gap:5px;padding:2px 6px;font-size:calc(11px * var(--type-scale));line-height:1.5;font-weight:500;font-family:var(--font);color:var(--foreground);background:var(--category-pill-bg);border:1px solid transparent;border-radius:2px}
.cat-pill span{background:transparent;color:var(--muted-foreground);font-size:calc(10px * var(--type-scale));font-weight:400;padding:0;border-radius:0}
.cat-pill span::before{content:"|";margin-right:5px;opacity:.25}
.cat-pill:hover{background:var(--category-pill-hover-bg);color:var(--foreground)}
.cat-pill:hover span{background:transparent;color:var(--foreground)}
/* Tall sidebars scroll to their bottom before sticking; short ones stick near the top. */
.sidebar--with-pinned{top:var(--sidebar-sticky-top,24px)}
.sidebar-option-content{padding-left:var(--sidebar-indent)}
.sidebar-pinned-posts .sidebar-option-content{padding-left:calc(var(--sidebar-indent) + 8px)}
.sidebar-pinned-entries{display:grid;gap:14px;margin:0;padding-left:14px;list-style:square}
.sidebar-pinned-entry::marker{color:var(--muted-foreground);font-size:9px}
.sidebar-pinned-link{display:block;font-size:calc(13px * var(--type-scale));line-height:1.6;color:var(--foreground);font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.sidebar-pinned-link:hover{color:var(--link-hover)}
.sidebar-pinned-date{display:block;font:calc(10px * var(--type-scale))/1.5 var(--mono);color:var(--muted-foreground);
}
.sidebar-option-content a:focus-visible{outline:1px solid var(--foreground);outline-offset:3px}
