/*-- Blog header --*/
#blog-header {
    font-family: var(--font-title, var(--font-mono));
    font-size: clamp(2em, 5vw, 4em);
    font-weight: 100;
    margin: 3rem 0 0.5em 0;
    color: var(--text);
}

/*-- Filter control --*/
#search-box {
    width: 100%;
    box-sizing: border-box;

    font-family: var(--font-mono);
    font-size: 1em;
    color: var(--text-dim);

    border-radius: clamp(10px, 1vw, 15px);

    padding: clamp(10px, 2vw, 15px);
    margin-bottom: 1em;

    transition: box-shadow 0.2s var(--ease-soft);
}

#search-box:focus {
    outline: none;
    box-shadow:
        inset 0 0 12px var(--glow),
        0 0 8px var(--glow);
}

.rss-row {
    display: flex;
    justify-content: flex-start;
    margin: 1rem 0 1rem 0;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
}

.rss-button svg {
    stroke: var(--text);
    fill: none;
    stroke-width: 2;
}

.rss-button {
    display: flex;
    align-items: center;
    gap: 0.4em;

    padding: 0.4em 0.8em;
    border-radius: 999px;

    text-decoration: none;
    color: var(--text-dim);

    transition: 0.3s var(--ease-soft);
}

.rss-button:hover {
    color: var(--text);
    filter: brightness(1.1);
}

/* select filter */

.custom-select {
  position: relative;
  z-index: 1000;
  cursor: pointer;
  border-radius: 10px;
  color: var(--text-dim);
  width: 10em;
}

.selected {
  padding: 0.7em 1em;
}

.filters {
    position: relative;
    z-index: 1000;
}

.options {
  position: absolute;
  width: 100%;
  margin-top: 0.3em;

  background: #172440;
  border: 1px solid var(--border);
  border-radius: 10px;

  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;

  transition: opacity 180ms cubic-bezier(.2,.8,.2,1),
  transform 180ms cubic-bezier(.2,.8,.2,1);
}

.custom-select.open .options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-select:hover {
  filter: brightness(1.2);
}

.custom-select.open .options {
  display: block;
}

.options div {
  padding: 0.5em 1em;
}

.options div:hover {
  background: rgba(255,255,255,0.05);
}

/*-- Blog list --*/
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-top: 1em;
}

/*-- Blog card --*/
.blog-card {
    position: relative;
    padding: clamp(15px, 2vw, 20px);
    border-radius: clamp(10px, 1vw, 15px);

    transition: transform 0.2s var(--ease-soft),
                filter 0.2s var(--ease-soft);

    color: inherit;
    text-decoration: none;
}

.blog-card:focus {
    outline: none;
    box-shadow:
        inset 0 0 12px var(--glow),
        0 0 8px var(--glow);
}

.blog-card:hover {
  filter: brightness(1.2);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/*-- Blog card text --*/
.blog-title {
    font-family: var(--font-title);
    font-size: clamp(1.2em, 2vw, 1.6em);
    color: var(--text);
    margin: 0 0 0.3em 0;
}

.blog-date {
    font-family: var(--font-title);
    font-size: 0.8em;
    color: var(--text-dimmer);
    margin: 0.1em 0 1em 0;
}

.blog-excerpt {
    font-family: var(--font-mono);
    color: var(--text-dim);
    font-size: 0.95em;
    line-height: 1.4;
    margin: 0 0 0.8em 0;
}

/*-- Tags --*/
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 1em;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75em;

    color: var(--text-dim);

    padding: 0.3em 0.7em;
    border-radius: 999px;

    /* reuse system */
    background: var(--surface-gradient);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 6px var(--glow);
}

/*-- Pagination --*/
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 1.5em;
    justify-content: center;
}

.page-btn:focus {
    outline: none;
    box-shadow:
        inset 0 0 12px var(--glow),
        0 0 8px var(--glow);
}

.page-btn {
    font-family: var(--font-mono);
    font-size: 0.9em;

    color: var(--text-dim);
    text-decoration: none;

    padding: 0.4em 0.9em;
    border-radius: 999px;

    background: var(--surface-gradient);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 5px var(--glow);

    transition: filter 0.2s var(--ease-soft),
                color 0.2s var(--ease-soft);
}

.page-btn:hover {
    cursor: pointer;
    filter: brightness(1.1);
    color: var(--text);
}

.page-btn.active {
    color: var(--text);
    filter: brightness(1.2);
}

.page-btn:first-child,
.page-btn:last-child {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/*-- Filter Wrapper --*/
.filters {
    position: relative;
}

/*-- Blogpage main body --*/

.post-content {
  margin: 1em 0 1em 0;
  line-height: 1.6;
}

.blog-image {
  margin: 1.5em 0;
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
}

figcaption {
    font-size:0.8em;
    color:var(--text-dimmer);
    margin-top: 0;
}