/* ─── Blog layout ─── */

.blog-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.blog-header__logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.blog-header__logo {
  height: 20px;
  width: auto;
  flex-shrink: 0;
  margin-right: 0.3rem;
}

.blog-header__home {
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease;
}

.blog-header__home:hover {
  color: var(--accent);
}

.blog-header__sep {
  color: var(--muted);
  opacity: 0.3;
}

.blog-header__section {
  color: var(--muted);
}

.blog-header__spacer {
  flex: 1;
}

.blog-header__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 180ms ease, background 180ms ease;
}

.blog-header__theme:hover {
  color: var(--ink);
  background: rgba(128, 128, 128, 0.1);
}

.blog-header__theme-icon--dark { display: none; }
[data-theme="dark"] .blog-header__theme-icon--light { display: none; }
[data-theme="dark"] .blog-header__theme-icon--dark { display: block; }

/* ─── Blog index ─── */

.blog-index {
  max-width: 620px;
  margin: 0 auto;
  padding: 6vh 2rem 6rem;
}

.blog-index__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 3rem;
}

/* ─── Blog entries ─── */

.blog-entries {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-entry {
  display: block;
  text-decoration: none;
  padding: 1.4rem 1.6rem;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 200ms ease, background 200ms ease;
}

.blog-entry:hover {
  border-color: var(--accent);
  background: var(--surface-solid);
}

.blog-entry__date {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 0.4rem;
}

.blog-entry__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.blog-entry__excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Blog post ─── */

.blog-post {
  max-width: 620px;
  margin: 0 auto;
  padding: 6vh 2rem 6rem;
}

.blog-post__back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 160ms ease;
}

.blog-post__back:hover {
  color: var(--ink);
}

.blog-post__date {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 0.8rem;
}

.blog-post__author {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.blog-post__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.blog-post__body {
  font-size: clamp(0.92rem, 1.4vw, 1.02rem);
  line-height: 1.8;
  color: var(--muted);
}

.blog-post__body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 3rem 0 1rem;
  letter-spacing: 0.01em;
}

.blog-post__body p {
  margin: 0 0 1.4rem;
}

.blog-post__body strong {
  color: var(--ink);
  font-weight: 700;
}

.blog-post__body blockquote {
  margin: 2rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-style: italic;
}

.blog-post__body blockquote p {
  margin: 0;
}

.blog-post__body code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--line);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

.blog-post__body a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.15em;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}

.blog-post__body a:hover {
  color: var(--accent);
}

/* ─── Post footer ─── */

.blog-post__end {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.blog-post__end-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease;
}

.blog-post__end-link:hover {
  color: var(--ink);
}
