/* Shared styles for index and about pages */
body.index, body.about {
  height: 100%; min-height: 0;
}
:is(.index, .about) .container {
  height: 100%; min-height: 0;
  width: 100%; max-width: 750px;
}
footer { margin-top: 0; padding-top: 0; }

@media (min-width: 768px) {
  body { padding: 0 0 0 40px; }
  .container { padding-top: 15px; }
  .back-link, .about-link { top: 15px; }
}

/* Index page */
.index h1 { margin: 0 0 1em 0; font-size: 18px; padding-right: 4em; }
.index ul { list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto; min-height: 0; width: 100%; }
.index li { margin-bottom: 0.2em; }
.index li .date { font-size: 16px; margin: 0; display: block; }
.index .links { margin: 0; }

@media (min-width: 400px) {
  .index h1 { font-size: 22px; }
}
@media (min-width: 500px) {
  .index li {
    display: flex; justify-content: space-between;
    gap: 1em; flex-wrap: wrap;
  }
  .index li .date { display: inline; }
}
@media (min-width: 768px) {
  .index h1 { padding-right: 0; }
  .index li .date { font-size: 17px; }
}

/* Tags filter */
.tags-filter {
  display: flex; flex-wrap: wrap;
  gap: 0.4em; margin-bottom: 1em;
}
.tag-btn {
  font-family: inherit; font-size: 14px;
  background: none; border: 1px solid var(--color-border);
  color: var(--color-text-muted); padding: 0.15em 0.5em;
  cursor: pointer; transition: all 0.15s;
}
@media (hover: hover) {
  .tag-btn:hover { color: #222; border-color: #222; }
}
.tag-btn.active {
  color: #222; border-color: #222;
  background: var(--color-code-bg);
}

/* Per-post tags */
.post-tags { display: none; }
@media (min-width: 768px) {
  .post-tags {
    display: inline; font-size: 13px;
    margin-left: auto; flex-shrink: 0;
  }
  .post-tag {
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 0 0.35em; margin-left: 0.2em;
    font-size: 12px;
  }
  .index li .date { flex-shrink: 0; }
}

@media (min-width: 1200px) {
  body { padding: 0 15px; }
}

/* About page */
.about-content {
  display: flex;
  flex-direction: column-reverse;
}
.about-content img {
  margin-bottom: 1em;
  border-radius: 0;
  width: 100px;
  height: 100px;
}
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    gap: 2em;
  }
  .about-content img {
    align-self: flex-start;
    margin-top: 2em;
    margin-bottom: 0;
    width: 150px;
    height: 150px;
  }
}
.about p { line-height: 1.2; margin: 0 0 1em 0; }
.about .footer-section { margin-top: auto; }
.about pre {
  white-space: pre-wrap; overflow-wrap: break-word;
  width: 100%; margin: 0 0 2em 0;
}
