/* -------- Reset-ish & base -------- */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji",
               "Segoe UI Emoji";
  line-height: 1.6;
  color: #222;
  background: #fff;
}

/* Links */
a { color: #1b4faa; text-decoration: underline; }
a:hover { text-decoration: none; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem 1rem; background:#ff0; }

/* -------- Container & banner -------- */
#container { padding: 0 1rem; }
#container-inner { max-width: 1100px; margin: 0 auto; }

#banner { padding: 1.5rem 0 1rem; border-bottom: 1px solid #e6e6e6; }
#banner-header { margin: 0 0 .25rem; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.2; }
#banner-header a { text-decoration: none; color: #1b4faa; }
#banner-header a:hover { text-decoration: underline; }
#banner-description { margin: 0; color: #333; font-weight: 600; }

/* -------- Three-column shell (legacy IDs) -------- */
#pagebody { padding: 1rem 0 2rem; }
#pagebody-inner { display: grid; grid-template-columns: 220px 1fr 260px; gap: 1.25rem; }

/* Left sidebar */
#alpha, #alpha-inner { width: 100%; }
#alpha .module, .module-typelist, .module-photo, .module-email, .module-categories {
  background: #fafafa; border: 1px solid #eee;  margin-bottom: 1rem;
}
.module-header { margin: 0; padding: .6rem .8rem; font-size: 1rem; background: #f1f5fb; border-bottom: 1px solid #e8eef9; color: #1b4faa; }
.module-content { padding: .75rem .8rem; }
.module-list { list-style: none; margin: 0; padding: 0; }
.module-list li { margin: .35rem 0; }
.module-list a { text-decoration: none; }
.module-list a:hover { text-decoration: underline; }

/* Main column */
#beta-inner { min-width: 0; }
#content { font-size: 1.05rem; }
.entry, .entry-inner { width: 100%; }
.entry-header { margin: 0 0 .5rem; }
.entry-body img, .module-photo img, img { max-width: 100%; height: auto; }

/* Right sidebar */
#gamma .module, #gamma .module-typelist, #gamma .module-categories {
  background: #fafafa; border: 1px solid #eee;  margin-bottom: 1rem;
}

/* Headings & typographic polish */
h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2rem); }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.4rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.25rem); }
p { margin: .7rem 0; }
hr { border: 0; border-top: 1px dashed #ddd; margin: 1rem 0; }

/* Entry meta (if you add) */
.entry-meta { color: #666; font-size: .95rem; }

/* Code blocks */
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
pre { padding: .75rem; background: #f7f7f7; border: 1px solid #eee; overflow: auto; }

/* Footer spacing */
.site-footer { margin-top: 2rem; padding: 1rem 0; color: #666; border-top: 1px solid #eee; }

/* -------- Search box improved spacing -------- */
#site-search {
  margin-top: 1.5rem;
  padding: 0 0.0rem;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#site-search input[type="search"] {
  width: 100%;
  padding: 0px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* -------- Responsive -------- */
@media (max-width: 980px) {
  #pagebody-inner { grid-template-columns: 1fr; }
  #alpha, #gamma { order: 2; }
  #beta { order: 1; }

  /* Sticky left sidebar photo on top */
  #alpha .module-photo {
    position: sticky;
    top: 0;
    z-index: 10100;
    background: #fafafa;
    padding: 0.5rem 0;
  }

  /* Sticky search bar below the photo */
  #site-search {
    position: sticky;
    top: 4.5rem; /* adjust if photo module height changes */
    z-index: 10000;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
}

#index-list a, #search-results a { display:block; }
#search-results div:hover { background:#f7faff; }

