/* Homepage shell: floating left sidebar beside the editorial sections. Loaded after site.css, homepage only. */
.shell { --side-w: 248px; }

/* ---------- Sidebar ---------- */
.sidebar.nav {
  position: fixed; top: 16px; bottom: 16px; left: 16px; z-index: 20;
  display: flex; width: var(--side-w); min-height: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
  padding: 14px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg-2); box-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 24px 48px -28px rgb(0 0 0 / .7);
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 16px; }
.sidebar-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 20px; overflow-y: auto; }
.side-cta {
  display: flex; min-height: 44px; align-items: center; justify-content: space-between; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 10px; font-size: .875rem; font-weight: 600;
  transition: border-color .2s, background-color .2s, transform .3s var(--ease);
}
.side-cta svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.side-cta:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.side-cta:hover svg { transform: translateX(3px); }
.side-cta:active { transform: scale(.98); }
.side-label { margin: 0 0 6px 10px; color: var(--dim); font: 500 .6875rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.side-list { display: grid; gap: 2px; padding: 0; list-style: none; }
.side-list a {
  position: relative; display: flex; min-height: 38px; align-items: center; gap: 10px; padding: 0 10px; border-radius: 9px;
  color: var(--muted); font-size: .875rem; font-weight: 500; transition: color .2s, background-color .2s;
}
.side-list a:hover { background: rgb(255 255 255 / .045); color: var(--text); }
/* Current section (set by site.js while scrolling) */
.side-list a[aria-current] { background: rgb(255 255 255 / .06); color: var(--text); }
.side-list a[aria-current]::before { position: absolute; top: 9px; bottom: 9px; left: 0; width: 2px; border-radius: 2px; background: var(--accent); content: ''; }
.side-list svg, .side-icon { width: 16px; height: 16px; flex: none; }
.side-icon { border-radius: 4px; }
.side-meta { margin-left: auto; }
.side-count { margin-left: auto; color: var(--dim); font: 500 .75rem/1 var(--mono); }
.side-badge { margin-left: auto; padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .6875rem; font-weight: 600; }
.side-list .status-tag { margin-left: auto; font-size: .6875rem; }
.side-live { display: inline-flex; }
.side-live[hidden] { display: none; }
.side-foot { display: flex; justify-content: space-between; margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--line); color: var(--dim); font-size: .75rem; }
.side-foot a:hover { color: var(--text); }

/* ---------- Layout ---------- */
@media (min-width: 1024px) {
  body.shell { padding-left: calc(var(--side-w) + 32px); }
  .shell .menu-button { display: none; }
  .shell .hero { padding-top: clamp(40px, 6vw, 88px); }
}
/* The content column is ~280px narrower beside the sidebar: stack the hero and drop the category column sooner. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .shell .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .shell .project-row { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.4fr) 120px; }
  .shell .project-row .cat { display: none; }
}
@media (max-width: 1023px) {
  .sidebar.nav { position: sticky; inset: 0 0 auto; width: auto; padding: 10px var(--gutter); border-width: 0 0 1px; border-radius: 0; background: rgb(11 12 14 / .94); box-shadow: none; }
  .sidebar-top { padding: 0; }
  .shell .menu-button { display: grid; }
  .sidebar-panel {
    position: absolute; top: calc(100% + 8px); right: var(--gutter); left: var(--gutter); display: none; max-height: calc(100dvh - 90px);
    padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 48px -16px rgb(0 0 0 / .7);
  }
  .sidebar-panel.is-open { display: flex; animation: rise .3s var(--ease) both; }
  .side-list a { min-height: 44px; }
  .side-foot { margin-top: 4px; }
}
