@import url("/assets/style.css");

/* ============================================================
   博客页 —— 在首页样式之上追加
   ============================================================ */

.blog {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(110px, 18vh, 200px) clamp(20px, 6vw, 40px) 100px;
}

.blog__head {
  margin-bottom: clamp(50px, 9vh, 96px);
  padding-bottom: clamp(28px, 5vh, 48px);
  border-bottom: 1px solid var(--line);
}

.blog__head h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  margin: 18px 0 22px;
  opacity: 0;
  animation: rise 1.2s var(--ease) 0.1s forwards;
}

.blog__desc {
  color: var(--fg-dim);
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  line-height: 1.9;
  letter-spacing: 0.04em;
}

/* ---------- 文章条目 ---------- */
.posts { display: flex; flex-direction: column; }

.post {
  display: block;
  padding: clamp(26px, 4.4vh, 44px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.5s var(--ease);
}

.post::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.post:hover { padding-left: 22px; }
.post:hover::before { width: 14px; }

.post time {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--fg-faint);
}

.post h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin: 12px 0 10px;
  transition: color 0.4s var(--ease);
}

.post:hover h2 { color: var(--accent); }

.post p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  line-height: 1.85;
  max-width: 62ch;
}

/* ---------- 单篇文章 ---------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(110px, 18vh, 200px) clamp(20px, 6vw, 40px) 100px;
}

.article__back {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  transition: color 0.3s var(--ease);
}

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

.article h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: 0.05em;
  margin: 26px 0 16px;
}

.article__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--fg-faint);
  padding-bottom: clamp(28px, 5vh, 44px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(34px, 6vh, 56px);
}

.article__body p {
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 2.05;
  color: rgba(242, 240, 236, 0.82);
  margin-bottom: 1.5em;
}

.article__body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  margin: 2.2em 0 0.9em;
}

.article__body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 22px;
  color: var(--fg-dim);
  font-family: var(--serif);
  margin: 1.8em 0;
}

.article__body a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

.article__body code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 3px;
}

@media (max-width: 480px) {
  .post:hover { padding-left: 0; }
  .post:hover::before { width: 0; }
}
