:root {
  --red: #ef1f16;
  --yellow: #ffe500;
  --black: #11110f;
  --white: #f7f5ed;
  --paper: #fffdf8;
  --ink: #1c1b19;
  --muted: #6b675f;
  --line: rgba(17, 17, 15, 0.1);
  --shadow: 0 10px 30px rgba(17, 17, 15, 0.06);
  --radius: 16px;
  --content: 680px;
  --shell: 1120px;
  --font: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.shell { width: min(100% - 40px, var(--shell)); margin: 0 auto; }
.content-shell { width: min(100% - 40px, var(--content)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 245, 237, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 10px 0;
}
.brand {
  color: var(--black); font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em; text-decoration: none;
}
.brand i { color: var(--red); font-style: normal; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.nav-links a {
  color: rgba(17,17,15,.72); font-weight: 600; font-size: 15px; text-decoration: none;
}
.nav-links a.active, .nav-links a:hover { color: var(--red); }
.nav-cta {
  background: var(--red); color: #fff !important;
  padding: 8px 14px; border-radius: 999px; font-weight: 700 !important;
}
.nav-cta:hover { text-decoration: none; filter: brightness(1.05); }

/* Blog hero band */
.blog-band {
  background: var(--black);
  color: var(--white);
  border-bottom: 6px solid var(--yellow);
  padding: 42px 0 38px;
}
.blog-band .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--black);
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 6px;
  margin: 0 0 14px;
}
.blog-band h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15; font-weight: 800; letter-spacing: -.03em;
}
.blog-band .lead {
  margin: 0; max-width: 36em;
  color: rgba(247,245,237,.78); font-size: 1.05rem; line-height: 1.7;
}

main.page { padding: 36px 0 80px; }

/* Cards */
.card-list { display: grid; gap: 18px; margin-top: 8px; }
.card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 31, 22, .35);
  box-shadow: 0 16px 40px rgba(17,17,15,.1);
  text-decoration: none;
}
.card-cover {
  background: #ece8de;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  min-height: 160px;
}
.card-cover.placeholder {
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, rgba(255,229,0,.55), rgba(239,31,22,.18)),
    var(--black);
  color: var(--black); font-weight: 800; font-size: 14px;
}
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.card-body h2 {
  margin: 0; font-size: 1.28rem; line-height: 1.35; font-weight: 760; letter-spacing: -.01em;
}
.card-body .summary {
  margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta {
  margin: 0; color: var(--muted); font-size: 13px; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.tag {
  display: inline-flex; align-items: center;
  background: var(--black); color: var(--yellow);
  padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .02em;
}
.tag.soft { background: rgba(17,17,15,.06); color: var(--ink); }

/* Post */
.post-top { margin-bottom: 18px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14px; color: var(--red);
}
.back:hover { text-decoration: none; opacity: .85; }
.post-hero {
  margin: 0 0 28px;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background: #161511;
  box-shadow: var(--shadow);
}
.post-hero img {
  display: block; width: 100%; max-height: 460px;
  object-fit: contain; object-position: center; background: #161511;
}
.post-head h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  line-height: 1.25; font-weight: 800; letter-spacing: -.025em;
}
.post-head .summary {
  margin: 12px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.7;
}
.source { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.content { margin-top: 34px; }
.content > *:first-child { margin-top: 0; }
.content h2, .content h3, .content h4 {
  color: var(--black); line-height: 1.35; letter-spacing: -.015em;
  margin: 2em 0 .75em; font-weight: 780;
}
.content h2 {
  font-size: 1.45rem;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--yellow);
}
.content h3 { font-size: 1.2rem; }
.content p, .content ul, .content ol, .content blockquote, .content pre, .content table, .content hr {
  margin: 0 0 1.25em;
}
.content ul, .content ol { padding-left: 1.35em; }
.content li { margin: .28em 0; }
.content li::marker { color: var(--red); }
.content blockquote {
  margin-left: 0; padding: 14px 18px;
  border-left: 4px solid var(--red);
  background: rgba(255,229,0,.18);
  border-radius: 0 12px 12px 0;
  color: rgba(17,17,15,.88);
}
.content img {
  display: block; margin: 1.25em auto; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.content code {
  font-family: var(--mono);
  background: rgba(17,17,15,.06);
  padding: .12em .4em; border-radius: 5px; font-size: .9em;
}
.content pre {
  background: #14131a; color: #efece4;
  padding: 16px 18px; overflow-x: auto;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.content pre code {
  background: transparent; padding: 0; color: inherit; font-size: 13.5px; line-height: 1.65;
}
.content table {
  width: 100%; border-collapse: collapse; display: block; overflow-x: auto;
  border-radius: 10px;
}
.content th, .content td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: left;
}
.content th { background: rgba(255,229,0,.35); font-weight: 700; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.content a { font-weight: 600; }

.post-nav {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.post-nav a {
  display: block; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; color: inherit; text-decoration: none;
}
.post-nav a:hover { border-color: rgba(239,31,22,.35); text-decoration: none; }
.post-nav .label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.post-nav .title { font-weight: 750; line-height: 1.4; }
.post-nav .next { text-align: right; }
.post-nav .disabled { visibility: hidden; }

.site-footer {
  background: var(--black); color: rgba(247,245,237,.82);
  padding: 28px 0 40px; margin-top: 20px;
}
.site-footer a { color: var(--yellow); }
.site-footer p { margin: 0; font-size: 14px; }
.empty { color: var(--muted); padding: 24px 0; }

@media (max-width: 820px) {
  .card { grid-template-columns: 1fr; }
  .card-cover, .card-cover img { min-height: 180px; max-height: 220px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
}
@media (max-width: 640px) {
  .shell, .content-shell { width: min(100% - 28px, var(--shell)); }
  .nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .blog-band { padding: 30px 0 28px; }
  .card-body { padding: 18px; }
  main.page { padding: 24px 0 64px; }
  body { font-size: 16.5px; }
}
