/* ==========================================================
   BLOG LIST PAGE (blog.html)
   ========================================================== */

/* ----- Search Bar ----- */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
}
.search input {
  all: unset;
  color: var(--ink);
  width: 100%;
}

/* ----- Layout Grid ----- */
main {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding-top: 24px;
}
@media (max-width: 900px) {
  main { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ----- Sidebar Archive ----- */
.sidebar {
  position: sticky;
  top: 12px;
  height: fit-content;
}

.archive {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.archive h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.6px;
  color: var(--muted);
}

/* ----- Month Accordions ----- */
.month {
  border-bottom: 1px solid var(--line);
}
.month:last-child {
  border-bottom: none;
}
.month summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
}
.month summary::-webkit-details-marker { display: none; }
.month ul {
  margin: 0;
  padding: 0 0 12px 0;
  list-style: none;
}
.month li a {
  display: block;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 14px;
}
.month li a:hover {
  background: #1d1d1d;
  color: var(--ink);
}

/* ----- Posts Grid ----- */
.posts {
  display: grid;
  gap: 16px;
}
.month-label {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.6px;
}

/* ----- Post Card ----- */
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #111;
  border-bottom: 1px solid var(--line);
}
.meta {
  padding: 14px 14px 16px;
}
.meta .title {
  font-size: 18px;
  font-weight: 700;
  margin: 2px 0 6px;
}
.meta .excerpt {
  color: #e6e6e6;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 8px;
}
.stats {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.stat {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.dot {
  width: 4px;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  display: inline-block;
}
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #191919;
  padding: 4px 8px;
  border-radius: 999px;
}

/* ----- Filters + Tips ----- */
.pill {
  display: inline-flex;
  gap: 6px;
  padding: 6px 10px;
  background: #191919;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.hit {
  background: #191919;
  border: 1px dashed var(--line);
  padding: 8px 10px;
  border-radius: 10px;
}

/* ==========================================================
   SHARE: Outside Right Vertical Bar on Each Card
   ========================================================== */

.share {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.share a, .share button {
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}
.share a:hover, .share button:hover {
  background: var(--brand);
  color: #000;
}

/* circular buttons */
.share--circle a, .share--circle button {
  width: 36px; height: 36px; border-radius: 50%;
  padding: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1;
}

/* toast message */
.copy-toast {
  position: fixed;
  right: 24px; bottom: 24px;
  background: #111; color: #fff;
  padding: 10px 12px; border-radius: 8px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  z-index: 9999;
}
.copy-toast.show { opacity: 1; transform: translateY(0); }

/* vertical share outside each card */
.posts { --share-offset: 56px; }
.posts .post-card {
  position: relative;
  overflow: visible;
  z-index: 1;
}
.posts .share--outside-right {
  position: absolute;
  top: 12px;
  right: calc(-1 * var(--share-offset));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* mobile fallback: inside card */
@media (max-width: 900px) {
  .posts .share--outside-right {
    right: 12px;
    flex-direction: row;
    background: rgba(0,0,0,0.5);
    padding: 6px;
    border-radius: 12px;
  }
}