:root{
  --bg:#fff; --text:#1b1b1b; --muted:#6f6f6f; --border:#e8e6e3;
  --max: 860px;      /* reading column width */
  --rail: 240px;     /* sidebar width */
  --gap: 56px;       /* space between rail and content */
  --pad: 28px;       /* page padding */
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text)}
body{
  font-family: ui-serif, "Iowan Old Style","Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size:19px; line-height:1.7; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

/* shell is a 2-column grid: sidebar + content */
.shell{
  padding:var(--pad);
  display:grid;
  grid-template-columns: var(--rail) 1fr;
  column-gap: var(--gap);
  align-items:start;
}

/* sidebar is NORMAL FLOW now (not fixed, not sticky) */
.sidebar{ position:static; width:100%; height:auto; overflow:visible; }
.sidebar-inner{ border-right:1px solid var(--border); padding-right:24px; }

.site-name{ font-weight:800; font-size:2rem; margin:0 0 .25rem; }
.site-name a{ color:inherit; text-decoration:none; }
.site-sub{ font-style:italic; color:var(--muted); margin:.2rem 0 1.2rem; }

.side-nav{ display:flex; flex-direction:column; gap:.35rem; margin:1.1rem 0 1.2rem; }
.side-nav a{ color:#3c3c3c; text-decoration:none; }
.side-nav a:hover{ color:var(--text); text-decoration:underline; text-underline-offset:3px; }

.side-links{ color:var(--muted); font-size:.95rem; }
.side-links .dot{ opacity:.6; padding:0 .35rem; }

/* content column: sticky footer via flex */
.content{
  max-width:var(--max);
  min-height:calc(100vh - (var(--pad)*2));
  display:flex; flex-direction:column;
}

h1,h2,h3{ font-weight:700; line-height:1.25; margin:0 0 .75rem; }
h1{ font-size:clamp(2.1rem, 3.2vw, 2.6rem); }
h2{ font-size:clamp(1.4rem, 2.2vw, 1.8rem); margin-top:1.6rem; }
p{ margin:.7rem 0 1rem; }
a{ color:inherit; text-decoration:underline; text-underline-offset:2px; }
a:hover{ text-decoration-thickness:2px; }
img{ max-width:100%; height:auto; border-radius:6px; }

/* sticky footer */
.site-footer{
  margin-top:auto;
  color:var(--muted);
  border-top:1px solid var(--border);
  padding-top:1rem;
  font-size:.95rem;
}

/* mobile: stack */
@media (max-width: 860px){
  .shell{ padding:22px 18px; display:block; }
  .sidebar{ margin-bottom:18px; }
  .sidebar-inner{ border-right:0; border-bottom:1px solid var(--border); padding:0 0 14px; }
  .content{ min-height:auto; display:block; }
}

/* --- tighten space below meta & before first section --- */
.post-meta{ margin-bottom:.55rem; }  /* was ~default 1rem */
.content > h2:first-of-type,
.content article h2:first-of-type{ margin-top:.95rem; } /* was 1.6rem */
