/* IceGiant Blog — a quiet reading surface. */

.blog-hero {
  padding-top: clamp(40px, 6vw, 92px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.blog-hero .display {
  font-size: clamp(48px, 7.2vw, 116px);
  margin-left: -0.05em;
}
.blog-hero .lede { margin-top: clamp(20px, 2.6vw, 32px); max-width: 52ch; }
.blog-hero--small { padding-bottom: clamp(24px, 3vw, 44px); }

.blog-index { padding-bottom: var(--section); }

.post-list { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  align-items: center;
  padding-block: clamp(32px, 5vw, 72px);
}
.post-row + .post-row { background: var(--surface); }
.post-cover { grid-column: 1 / span 6; overflow: hidden; }
.post-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}
.post-cover:hover img { transform: scale(1.03); }
.post-copy { grid-column: 1 / -1; }
.post-row--with-cover .post-copy { grid-column: 7 / span 6; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: var(--step-small);
  color: var(--muted);
}
.post-tags { color: var(--muted); }
.post-title {
  margin-top: 16px;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.post-title a { transition: color 160ms var(--ease); }
.post-title a:hover { color: var(--accent); }
.post-summary {
  margin-top: 18px;
  max-width: 54ch;
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink);
}

/* --- Article ------------------------------------------------------------ */

.post { padding-top: clamp(32px, 5vw, 72px); padding-bottom: var(--section); }
.post-wrap { max-width: none; }
.post-head { max-width: none; margin-inline: 0; }
.post-h1 {
  margin-top: 18px;
  font-size: clamp(18px, 4.2vw, 42px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.prose {
  max-width: 720px;
  margin: clamp(32px, 4vw, 56px) auto 0;
  color: var(--ink);
}
.prose > * + * { margin-top: 1.1em; }
.prose p { font-size: var(--step-body); line-height: 1.7; }
.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.prose h3 {
  margin-top: 1.7em;
  font-size: clamp(21px, 1.9vw, 25px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.prose h4 { margin-top: 1.5em; font-size: 20px; font-weight: 500; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose img, .prose video {
  width: 100%;
  height: auto;
  margin-block: clamp(24px, 3vw, 40px);
  background: var(--surface);
}
.prose blockquote {
  padding-left: 22px;
  border-left: 3px solid var(--surface-3);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.015em;
}
.prose code {
  padding: 2px 6px;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.prose pre {
  overflow-x: auto;
  padding: 20px;
  background: var(--surface);
}
.prose pre code { padding: 0; background: none; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step-small); }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--surface-3); text-align: left; }
.prose hr { height: 1px; border: 0; background: var(--surface-3); }

@media (max-width: 860px) {
  .post-row { grid-template-columns: 1fr; }
  .post-cover,
  .post-row--with-cover .post-copy { grid-column: 1 / -1; }
  .post-row--with-cover .post-copy { margin-top: 24px; }
}

.post-hero {
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  overflow: hidden;
}
.post-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  object-fit: cover;
}

.post-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding-top: clamp(16px, 2vw, 28px);
}
.post-strip figure { overflow: hidden; }
.post-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@keyframes blog-drift {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}
.post-cover img { animation: blog-drift 14s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .post-cover img { animation: none; }
}
@media (max-width: 640px) {
  .post-strip { grid-template-columns: 1fr 1fr; }
}

.term-list { display: flex; flex-direction: column; }
.term-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(20px, 2.6vw, 34px);
}
.term-row .post-title { margin: 0; }
.term-row .post-meta { font-size: var(--step-small); }

.blog-hero--split .blog-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: center;
}
.blog-hero-art { overflow: hidden; background: var(--surface); }
.blog-hero-art img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  animation: blog-drift 14s ease-in-out infinite alternate;
}
@media (max-width: 860px) {
  .blog-hero--split .blog-hero-grid { grid-template-columns: 1fr; }
  .blog-hero-art { margin-top: 24px; }
}

:lang(zh) .post-title { line-height: 1.3; }
:lang(zh) .post-summary,
:lang(zh) .prose p,
:lang(zh) .prose li { line-height: 1.85; }
:lang(zh) .post-h1 { font-size: clamp(26px, 4.2vw, 42px); line-height: 1.3; }
