/* NJFUer 品牌博客 · clean editorial */
:root {
  --b-bg: #f7f8f5;
  --b-surface: #ffffff;
  --b-soft: #edf2ec;
  --b-ink: #0d1b14;
  --b-muted: #59675f;
  --b-green: #0c3d31;
  --b-green-2: #145c49;
  --b-line: #e2e8df;
  --b-radius: 20px;
  --b-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
body.page-blog { background: var(--b-bg); color: var(--b-ink); font-family: var(--b-font); }

.blog-hero { padding: 64px 0 34px; }
.blog-hero .eyebrow { color: var(--b-green-2); }
.blog-hero h1 { margin: 14px 0 14px; font-size: clamp(2.9rem, 5.6vw, 5rem); line-height: 1.08; letter-spacing: -.06em; font-weight: 800; }
.blog-hero h1 em { display: block; font-style: normal; color: var(--b-green-2); }
.blog-lang-note { margin: 8px 0 0 !important; color: #59675f !important; font-size: .72rem !important; }
.blog-hero p { margin: 0; max-width: 36em; color: var(--b-muted); font-size: .9rem; line-height: 1.9; }
.blog-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; color: #59675f; font-size: .66rem; }
.blog-meta a { display: inline-flex; align-items: center; gap: 4px; color: var(--b-green-2); font-weight: 700; }
.blog-meta .ic { width: 13px; height: 13px; }

.blog-main { padding: 8px 0 62px; }

/* Featured */
.featured-post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 340px; overflow: hidden; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface); box-shadow: 0 28px 60px -50px rgba(12,61,49,.45); transition: box-shadow .2s, transform .2s; }
.featured-post:hover { transform: translateY(-2px); box-shadow: 0 34px 70px -48px rgba(12,61,49,.5); }
.featured-cover { position: relative; min-height: 340px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: #f3fff8; }
.featured-cover::after, .post-cover::after, .article-cover::after { content: ""; position: absolute; right: -55px; bottom: -90px; width: 250px; height: 250px; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); pointer-events: none; }
.cover-cat { position: relative; z-index: 1; align-self: flex-start; padding: 4px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 5px; color: rgba(255,255,255,.82); font-size: .58rem; font-weight: 600; letter-spacing: .04em; }
.cover-word { position: relative; z-index: 1; align-self: flex-end; font-size: clamp(3rem, 5.4vw, 5rem); font-weight: 800; line-height: .9; letter-spacing: -.07em; color: rgba(255,255,255,.88); }
.featured-body { display: flex; flex-direction: column; justify-content: center; padding: 32px 34px; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #59675f; font-size: .62rem; }
.post-meta time { color: var(--b-green-2); font-weight: 700; }
.featured-body h2 { text-wrap: balance; margin: 12px 0 9px; font-size: clamp(1.5rem, 2.5vw, 2.15rem); line-height: 1.35; letter-spacing: -.04em; font-weight: 800; }
.featured-body p { margin: 0; color: var(--b-muted); font-size: .8rem; line-height: 1.85; }
.read-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 18px; color: var(--b-green-2); font-size: .7rem; font-weight: 700; }
.read-more .ic { width: 14px; height: 14px; transition: transform .18s; }
a:hover .read-more .ic { transform: translateX(4px); }

/* Toolbar */
.blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.blog-filter { display: flex; flex-wrap: wrap; gap: 7px; }
.blog-filter button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid var(--b-line); border-radius: 8px; background: #fff; color: var(--b-muted); font-size: .66rem; font-weight: 600; cursor: pointer; }
.blog-filter button span { color: #59675f; font-size: .58rem; }
.blog-filter button:hover { border-color: var(--b-green-2); color: var(--b-green-2); }
.blog-filter button.is-active { background: var(--b-green); border-color: var(--b-green); color: #fff; }
.blog-filter button.is-active span { color: #b7e6cd; }
.rss-link { display: inline-flex; align-items: center; gap: 5px; color: #59675f; font-size: .64rem; }
.rss-link:hover { color: var(--b-green-2); }
.rss-link .ic { width: 14px; height: 14px; }
.blog-count { margin: 12px 0 0; color: #59675f; font-size: .62rem; }

/* Grid */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.post-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--b-line); border-radius: 16px; background: #fff; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card:hover { transform: translateY(-2px); border-color: #cfdacf; box-shadow: 0 24px 50px -42px rgba(12,61,49,.45); }
.post-cover { position: relative; aspect-ratio: 1.72; min-height: 0; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: #f3fff8; }
.post-cover .cover-word { font-size: clamp(2.2rem, 3.8vw, 3.2rem); }
.post-body { display: flex; flex-direction: column; flex: 1; padding: 16px 17px 17px; }
.post-body h3 { text-wrap: balance; margin: 8px 0 6px; font-size: 1rem; line-height: 1.5; letter-spacing: -.02em; }
.post-body p { margin: 0; color: var(--b-muted); font-size: .71rem; line-height: 1.8; }
.post-body .read-more { margin-top: auto; padding-top: 13px; font-size: .66rem; }

/* Cover tones */
.cover-brand { background: linear-gradient(145deg, #145c49 0%, #082e26 100%); }
.cover-gpa { background: linear-gradient(145deg, #255f8f 0%, #12304e 100%); }
.cover-id { background: linear-gradient(145deg, #8a6428 0%, #4b3414 100%); }
.cover-print { background: linear-gradient(145deg, #2f6b53 0%, #173d2f 100%); }
.cover-guide { background: linear-gradient(145deg, #7a5140 0%, #3f261d 100%); }
.cover-update { background: linear-gradient(145deg, #5b537f 0%, #2e2947 100%); }

.blog-empty { padding: 50px 22px; border: 1px dashed var(--b-line); border-radius: 16px; text-align: center; background: #fff; }
.blog-empty h2 { margin: 0 0 6px; font-size: 1.2rem; }
.blog-empty p { margin: 0 0 18px; color: var(--b-muted); font-size: .8rem; }

.blog-subscribe { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: 34px; padding: 28px 30px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-soft); }
.blog-subscribe .eyebrow { color: var(--b-green-2); }
.blog-subscribe h2 { margin: 7px 0 5px; font-size: clamp(1.35rem, 2.3vw, 1.75rem); letter-spacing: -.03em; }
.blog-subscribe p { margin: 0; color: var(--b-muted); font-size: .76rem; line-height: 1.8; }
.blog-subscribe .btn { background: var(--b-green); border-color: var(--b-green); color: #fff; }

/* Article */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130; pointer-events: none; }
.read-progress i { display: block; width: 0; height: 100%; background: var(--b-green-2); }
.article { padding-bottom: 20px; }
.article-head { max-width: 840px; padding-top: 52px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: #59675f; font-size: .68rem; font-weight: 600; }
.back-link:hover { color: var(--b-green-2); }
.back-link .ic { width: 13px; height: 13px; transform: rotate(180deg); }
.article-meta { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-top: 22px; color: #59675f; font-size: .63rem; }
.article-cat { padding: 4px 8px; border-radius: 5px; background: var(--b-soft); color: var(--b-green-2); font-size: .58rem; font-weight: 700; }
.article-meta time { color: var(--b-green-2); font-weight: 700; }
.article-head h1 { text-wrap: balance; margin: 14px 0 13px; font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.24; letter-spacing: -.05em; font-weight: 800; }
.article-excerpt { margin: 0; max-width: 42em; color: var(--b-muted); font-size: .92rem; line-height: 1.9; }
.article-lang-note { margin: 14px 0 0; color: #59675f; font-size: .7rem; }
.article-byline { display: flex; align-items: center; gap: 9px; margin-top: 20px; }
.byline-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--b-soft); color: var(--b-green-2); }
.byline-mark .ic { width: 16px; height: 16px; }
.article-byline span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.article-byline b { font-size: .68rem; }
.article-byline small { margin-top: 2px; color: #59675f; font-size: .58rem; }

.article-cover { position: relative; width: min(1040px, calc(100% - 48px)); min-height: 280px; margin: 28px auto 0; padding: 22px; border-radius: var(--b-radius); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: #f3fff8; }
.article-cover .cover-word { font-size: clamp(3.5rem, 8vw, 6.5rem); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; max-width: 1040px; padding-top: 28px; }
.article-body { min-width: 0; max-width: 760px; padding: 34px 38px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: #fff; color: #2c3d34; font-size: .94rem; line-height: 1.95; }
.article-body > p:first-child { font-size: 1rem; color: var(--b-ink); }
.article-body h2 { margin: 34px 0 9px; color: var(--b-ink); font-size: 1.35rem; line-height: 1.45; letter-spacing: -.025em; scroll-margin-top: 88px; }
.article-body h3 { margin: 24px 0 7px; color: var(--b-ink); font-size: 1.08rem; }
.article-body p { margin: 10px 0; }
.article-body ul, .article-body ol { margin: 12px 0; padding-left: 1.35em; }
.article-body li { margin: 6px 0; }
.article-body a { color: var(--b-green-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body strong { color: var(--b-ink); }
.article-body blockquote { margin: 22px 0; padding: 14px 17px; border-left: 2px solid var(--b-green-2); border-radius: 0; background: var(--b-soft); color: var(--b-green-2); font-size: .92rem; line-height: 1.85; }
.article-body blockquote p { margin: 0; }
.article-body table { width: 100%; margin: 18px 0; border-collapse: collapse; font-size: .82rem; }
.article-body th, .article-body td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--b-line); }
.article-body th { background: var(--b-soft); color: var(--b-green); font-weight: 700; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body code { padding: 2px 5px; border-radius: 4px; background: var(--b-soft); font-size: .86em; }

.article-side { position: relative; }
.article-side-card { position: sticky; top: 92px; padding: 16px; border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
.article-side-card p { margin: 6px 0 10px; color: var(--b-muted); font-size: .68rem; line-height: 1.8; }
.article-side-card .text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--b-green-2); font-size: .66rem; font-weight: 700; }
.article-side-card .ic { width: 13px; height: 13px; }
.article-toc { position: sticky; top: 92px; margin-bottom: 10px; padding: 15px 16px; border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
.article-toc b { display: block; margin-bottom: 7px; font-size: .68rem; }
.article-toc ol { margin: 0; padding-left: 1.1em; }
.article-toc li { margin: 5px 0; color: var(--b-muted); font-size: .66rem; line-height: 1.5; }
.article-toc a:hover { color: var(--b-green-2); }

.article-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; max-width: 840px; margin-top: 28px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.article-tags span { padding: 4px 8px; border: 1px solid var(--b-line); border-radius: 6px; background: #fff; color: var(--b-muted); font-size: .6rem; }
.article-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #59675f; font-size: .64rem; cursor: pointer; }
.text-btn:hover { color: var(--b-green-2); }
.text-btn .ic { width: 13px; height: 13px; }

.author-box { display: flex; align-items: center; gap: 13px; max-width: 840px; margin-top: 26px; padding: 18px; border: 1px solid var(--b-line); border-radius: 14px; background: #fff; }
.author-mark { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--b-soft); color: var(--b-green-2); }
.author-mark .ic { width: 19px; height: 19px; }
.author-box > div { min-width: 0; }
.author-box b { font-size: .76rem; }
.author-box p { margin: 3px 0 0; color: var(--b-muted); font-size: .66rem; line-height: 1.7; }
.author-box .btn { margin-left: auto; }

.related { padding: 34px 0 56px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }

@media (max-width: 980px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-cover { min-height: 260px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-layout { grid-template-columns: 1fr; gap: 20px; }
  .article-side { display: grid; grid-template-columns: 1fr; gap: 10px; order: -1; }
  .article-side-card { display: none; }
  .article-side-card, .article-toc { position: static; }
  .article-toc[hidden] { display: none; }
}

@media (max-width: 640px) {
  .blog-hero { padding: 38px 0 24px; }
  .blog-hero h1 { font-size: clamp(2.35rem, 10.8vw, 3rem); }
  .blog-hero p { font-size: .84rem; }
  .blog-main { padding-bottom: 44px; }
  .featured-cover { min-height: 210px; }
  .featured-body { padding: 22px 20px 24px; }
  .featured-body h2 { font-size: 1.35rem; }
  .post-grid, .related-grid { grid-template-columns: 1fr; gap: 14px; }
  .post-cover { aspect-ratio: 1.85; }
  .blog-toolbar { margin-top: 26px; }
  .blog-subscribe { padding: 22px 18px; }
  .blog-subscribe .btn { width: 100%; }
  .article-head { padding-top: 34px; }
  .article-head h1 { font-size: clamp(1.9rem, 8.6vw, 2.5rem); }
  .article-cover { width: calc(100% - 32px); min-height: 190px; margin-top: 20px; }
  .article-cover .cover-word { font-size: 3.6rem; }
  .article-layout { padding-top: 20px; }
  .article-body { padding: 22px 18px; font-size: .92rem; line-height: 1.95; }
  .article-body h2 { font-size: 1.22rem; }
  .article-foot { flex-direction: column; }
  .author-box { align-items: flex-start; flex-wrap: wrap; }
  .author-box .btn { margin-left: 53px; }
}

@media (max-width: 380px) {
  .blog-hero h1 { font-size: 2.05rem; }
  .featured-body h2 { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
