/* Responsive overrides for mobile devices */
/* Mobile-first adjustments */
@media (max-width: 900px) {
  body{
    background-attachment: scroll;
  }
  /* reset margins and keep scrollbar space to avoid visual shift */
  html, body { padding: 0; margin: 0; scrollbar-gutter: stable both-edges; }
  /* Ensure page centers and no horizontal scroll; stack body children vertically */
  html, body { overflow-x: hidden; }
  body { display: flex; flex-direction: column; align-items: center; }
  main, .content{
    padding: 8px;
  }
  /* Force center the main content on mobile */
  .content{
    max-width: 420px;
    margin: 0 auto;
    box-sizing: border-box;
    padding-inline: 12px;
  }
  main{ width:100%; max-width:420px; margin:0 auto; }
  .info{ box-sizing: border-box; padding-inline: 12px; }
  .page{ margin: 0 auto; }
  /* stronger centering: ensure all top-level blocks share same centered width */
  main, .content, .page, .info, .sc1, .sc2, header.pagination, footer{
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-inline: 12px;
  }
  .page{width:100%;}
  .info, .sc1, .sc2{
    width: calc(100% - 32px);
    margin: 12px auto;
    border-radius: 16px;
    flex-direction: column;
    padding: 8px;
  }
  .img1{
    width: 110px;
    margin: 12px auto;
  }
  .sc1 img, .sc2 img{
    width: 100% !important;
    max-width: 100%;
    margin: 12px 0;
    border-radius: 8px;
  }
  .sc1 div, .sc2 div{
    width: 100%;
    margin: 8px 0;
  }
  .sc1{display:flex;flex-direction:column}
  .sc2{display:flex;flex-direction:column}
  /* center top info card content */
  .info{ align-items: center; text-align: center; }
  .info ul{ padding: 0; }
  .info ul li{ justify-content: center; }
  .content{flex-direction:column}
  .page{padding-bottom:80px}
}

@media (max-width: 600px) {
  .pagination{
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.92);
    padding: 6px 8px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 60;
  }
  .pagination label{
    margin: 0 6px;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 999px;
  }
  p{font-size:16px;line-height:1.45}
  h1{font-size:24px}
  h2{font-size:18px}
  .info ul li{font-size:16px}
}

/* Ensure images are responsive by default */
img{max-width:100%;height:auto;display:block}

/* Entry images used in posts/cards */
.entry-img{
  width: 40%;
  border-radius: 10%;
  margin: 20px 20px;
  border: 1px solid rgb(0,0,0);
}
.entry-img.large{
  width: 70%;
}

/* Link style moved from inline */
.github-link{
  color: rgba(0, 0, 0, 0.716);
  text-decoration: none;
}
.github-link:hover{ text-decoration: underline; }
