﻿:root {
  --bg: #f3efe5;
  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Georgia", "Times New Roman", "Songti SC", "STSong", serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", "SFMono-Regular", "Courier New", monospace;
  --paper: #fffaf0;
  --surface: rgba(255, 250, 240, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --ink: #1e2430;
  --muted: #5f6758;
  --line: rgba(30, 36, 48, 0.1);
  --accent: #bd5d38;
  --accent-deep: #8f3f20;
  --shadow: 0 20px 60px rgba(58, 42, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(189, 93, 56, 0.18), transparent 32%),
    radial-gradient(circle at right 20%, rgba(124, 141, 109, 0.16), transparent 24%),
    linear-gradient(180deg, #efe7d8 0%, #f8f3ea 55%, #f3efe5 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.1rem 0.38rem;
  border-radius: 8px;
  background: rgba(30, 36, 48, 0.06);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.site-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 20px auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero,
.sub-hero {
  position: relative;
  padding: 4px 0 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(189, 93, 56, 0.95), rgba(143, 63, 32, 0.92));
  color: #fff7ee;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(143, 63, 32, 0.18);
}

.brand-text {
  display: block;
}

.brand-text strong {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
}

.nav-links a:hover,
.text-link:hover,
.post-footer a:hover,
.markdown-body a:hover,
.toc-list a:hover {
  color: var(--accent-deep);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 32px;
  align-items: start;
}

.hero-copy,
.hero-card,
.about-card,
.notes-panel,
.post-card,
.topic-card,
.filters,
.archive-grid,
.intro-strip,
.article-card,
.article-toc {
  animation: fadeUp 0.7s ease both;
}

.eyebrow,
.section-label,
.card-label,
.toc-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-serif);
}

h1 {
  font-size: clamp(2.6rem, 4.9vw, 4.1rem);
  line-height: 1.14;
  max-width: 7.2ch;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.hero-text,
.intro-strip p,
.topic-card p,
.post-card p,
.about-card p,
.about-list,
.sub-hero-copy p,
.article-card p,
.article-card li,
.toc-empty {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.hero-copy {
  max-width: 700px;
  padding-top: 14px;
}

.hero-copy h1 {
  margin-bottom: 16px;
}

.hero-copy .eyebrow {
  margin-bottom: 12px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(30, 36, 48, 0.08);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.post-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 58px rgba(58, 42, 24, 0.16);
  border-color: rgba(189, 93, 56, 0.24);
  background: rgba(255, 250, 240, 0.9);
}

.button-primary {
  background: linear-gradient(135deg, #c7673c, #a44c29);
  color: #fff8f0;
  box-shadow: 0 18px 30px rgba(164, 76, 41, 0.16);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 36, 48, 0.08);
}

.hero-card,
.topic-card,
.post-card,
.about-card,
.notes-panel,
.article-card,
.article-toc {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero-card {
  padding: 26px 26px 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 250, 240, 0.78)),
    radial-gradient(circle at top right, rgba(189, 93, 56, 0.08), transparent 40%);
}

.pulse-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.pulse-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  padding: 10px 0;
  border-bottom: 1px solid rgba(30, 36, 48, 0.08);
}

.pulse-list li:last-child {
  border-bottom: 0;
}

.pulse-list span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(189, 93, 56, 0.16), rgba(189, 93, 56, 0.08));
  color: var(--accent-deep);
  font-weight: 700;
}

.section {
  margin-top: 40px;
}

.intro-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
  padding: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topic-grid,
.post-grid,
.archive-grid,
.about-layout,
.note-points {
  display: grid;
  gap: 18px;
}

.topic-grid,
.post-grid,
.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-meta,
.post-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-card h3,
.topic-card h3 {
  margin: 14px 0 10px;
  font-size: 1.18rem;
}

.topic-card-detailed {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.topic-card-head p {
  margin: 0;
}

.topic-grid-detailed {
  grid-template-columns: 1fr;
}

.topic-links {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.topic-links-label {
  margin: 0 0 12px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.topic-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.topic-links li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(30, 36, 48, 0.06);
}

.topic-links li span {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.topic-links li a {
  color: var(--ink);
  font-weight: 600;
}

.topic-links li a:hover {
  color: var(--accent);
}

.topic-empty {
  color: var(--muted);
}

.post-card p {
  min-height: 88px;
}

.text-link,
.post-footer a,
.markdown-body a,
.toc-list a {
  color: var(--accent);
  font-weight: 600;
}

.notes-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
}

.note-points {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sub-hero-copy {
  max-width: 700px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 0;
  background: transparent;
  border: 0;
}

.filter-button {
  border: 1px solid rgba(30, 36, 48, 0.1);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-button.active {
  background: var(--accent);
  color: #fff8f0;
}

.about-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-list {
  margin: 16px 0 0;
  padding-left: 18px;
}

.article-hero {
  padding-bottom: 8px;
}

.article-head {
  max-width: 860px;
}

.article-head h1 {
  max-width: none;
  margin-bottom: 16px;
}

.article-layout {
  max-width: 1180px;
  margin: 0 auto 24px;
}

.article-layout.with-sidebar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.article-card {
  padding: 30px;
}

.article-meta {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.raw-note-card {
  padding: 28px;
}

.article-toc {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.toc-card-inner {
  display: grid;
  gap: 10px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.toc-item {
  line-height: 1.4;
}

.toc-level-2 a {
  font-size: 0.98rem;
}

.toc-level-3 {
  padding-left: 14px;
}

.toc-level-3 a {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}

.toc-level-4 {
  padding-left: 28px;
}

.toc-level-4 a {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.toc-list a {
  display: block;
  padding: 6px 10px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.toc-list a.active {
  background: rgba(189, 93, 56, 0.12);
  color: var(--accent-deep);
}

.markdown-body {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.9;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  max-width: none;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}

.markdown-body h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.markdown-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(30, 36, 48, 0.08);
}

.markdown-body h3 {
  font-size: 1.45rem;
}

.markdown-body h4 {
  font-size: 1.18rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body table,
.markdown-body pre {
  margin: 1rem 0 1.25rem;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.4rem;
}

.markdown-body li {
  margin: 0.45rem 0;
  color: var(--ink);
}

.markdown-body strong {
  color: var(--ink);
  font-weight: 700;
}

.markdown-body hr {
  border: 0;
  border-top: 1px solid rgba(30, 36, 48, 0.12);
  margin: 2rem 0;
}

.markdown-body blockquote {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(189, 93, 56, 0.06);
  border-radius: 0 14px 14px 0;
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body pre {
  padding: 1rem 1.1rem;
  overflow: auto;
  white-space: pre;
  line-height: 1.65;
  color: #f5efe4;
  background: #1f2430;
  border-radius: 18px;
  border: 1px solid rgba(30, 36, 48, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(30, 36, 48, 0.08);
}

.markdown-body th,
.markdown-body td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(30, 36, 48, 0.08);
}

.markdown-body th {
  font-weight: 700;
  color: var(--ink);
  background: rgba(30, 36, 48, 0.04);
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .intro-strip,
  .notes-panel,
  .topic-grid,
  .post-grid,
  .archive-grid,
  .about-layout,
  .note-points,
  .article-layout.with-sidebar {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    max-height: none;
    order: -1;
  }

  .section-heading,
  .topbar,
  .footer,
  .post-meta,
  .post-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar {
    margin-bottom: 24px;
  }

  .brand {
    gap: 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.25rem;
  }

  .brand-text strong {
    font-size: 1.16rem;
  }

  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(30, 36, 48, 0.08);
    font-weight: 600;
  }

  .hero-copy,
  .hero-card,
  .topic-card,
  .post-card,
  .notes-panel,
  .about-card,
  .article-card,
  .article-toc,
  .intro-strip {
    border-radius: 20px;
  }

  .hero-copy h1,
  .sub-hero-copy h1,
  .article-head h1 {
    font-size: clamp(2.1rem, 12vw, 3.1rem);
    line-height: 1.08;
  }

  .hero-text,
  .sub-hero-copy p,
  .markdown-body,
  .post-card p,
  .topic-card p,
  .about-card p {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .hero-pills {
    gap: 8px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .post-card h3 {
    font-size: 1.28rem;
  }

  .post-meta,
  .post-footer {
    width: 100%;
  }

  .toc-list a {
    padding: 9px 12px;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-button {
    width: 100%;
  }

  .site-shell {
    width: min(100% - 16px, 1240px);
    margin: 8px auto;
    padding: 18px;
    border-radius: 22px;
  }

  h1 {
    max-width: none;
  }

  .nav-links,
  .hero-actions {
    flex-wrap: wrap;
  }

  .post-card p {
    min-height: auto;
  }

  .topic-links li {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-card,
  .raw-note-card,
  .article-toc {
    padding: 20px;
  }

  .markdown-body {
    font-size: 1rem;
  }

  .markdown-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}


