site.css 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. :root {
  2. /* Botanical academic palette: 优雅复古 + 清新自然 */
  3. --bg: #f6f3ee;
  4. --panel: #fbf9f6;
  5. --panel-soft: #f1ece5;
  6. --text: #2f312d;
  7. --muted: #6f7168;
  8. /* 主强调色:植物绿 */
  9. --accent: #426b57;
  10. --accent-hover: #355746;
  11. --accent-soft: #dce8df;
  12. /* 次级色:雾灰绿 */
  13. --accent-2: #8ca395;
  14. /* 复古暖调 */
  15. --warm: #a07c64;
  16. --warm-soft: #efe5da;
  17. --border: rgba(47, 49, 45, 0.08);
  18. --shadow: 0 6px 20px rgba(47, 49, 45, 0.05);
  19. /* 替换原来的 rose / blue 系 */
  20. --hero-bg: #ece4da;
  21. --hero-tint: #f3ede5;
  22. --list-highlight: #e5efe8;
  23. --tag-bg: #eef4ef;
  24. --tag-border: #d4e2d7;
  25. }
  26. /* 复古纸张纹理 */
  27. body {
  28. background-image:
  29. radial-gradient(circle at 50% 0%, rgba(160, 124, 100, 0.03) 0%, transparent 50%),
  30. radial-gradient(circle at 0% 100%, rgba(160, 124, 100, 0.03) 0%, transparent 50%),
  31. repeating-linear-gradient(90deg, transparent 0, transparent 2px, rgba(160, 124, 100, 0.02) 2px, rgba(160, 124, 100, 0.02) 4px);
  32. }
  33. * { box-sizing: border-box; }
  34. body {
  35. margin: 0;
  36. background: var(--bg);
  37. color: var(--text);
  38. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  39. line-height: 1.8;
  40. font-size: 16px;
  41. letter-spacing: 0.01em;
  42. }
  43. a {
  44. color: var(--accent);
  45. text-decoration: none;
  46. transition: color 0.2s ease;
  47. }
  48. a:hover {
  49. color: var(--accent-hover);
  50. text-decoration: underline;
  51. }
  52. .wrap {
  53. width: min(960px, calc(100% - 32px));
  54. margin: 0 auto;
  55. }
  56. .site-header {
  57. position: sticky;
  58. top: 0;
  59. backdrop-filter: blur(10px);
  60. background: rgba(246, 243, 238, 0.88);
  61. border-bottom: 1px solid var(--border);
  62. z-index: 10;
  63. }
  64. .header-inner {
  65. display: flex;
  66. justify-content: space-between;
  67. gap: 24px;
  68. padding: 18px 0;
  69. align-items: center;
  70. }
  71. .site-title {
  72. display: flex;
  73. align-items: center;
  74. gap: 12px;
  75. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  76. font-size: 1.8rem;
  77. font-weight: 700;
  78. color: var(--text);
  79. letter-spacing: -0.02em;
  80. text-shadow: 1px 1px 0 rgba(160, 124, 100, 0.08);
  81. }
  82. .site-title a {
  83. display: flex;
  84. align-items: center;
  85. gap: 12px;
  86. text-decoration: none;
  87. color: inherit;
  88. }
  89. .site-title a:hover {
  90. color: var(--accent);
  91. text-shadow: 1px 2px 6px rgba(66, 107, 87, 0.12);
  92. }
  93. .site-logo {
  94. width: 64px;
  95. height: 64px;
  96. border-radius: 50%;
  97. object-fit: cover;
  98. box-shadow: 0 2px 10px rgba(66, 107, 87, 0.08);
  99. }
  100. .site-tagline {
  101. margin: 6px 0 0;
  102. color: var(--muted);
  103. font-size: 0.95rem;
  104. }
  105. .site-nav {
  106. display: flex;
  107. gap: 16px;
  108. flex-wrap: wrap;
  109. }
  110. .site-nav a {
  111. color: var(--text);
  112. font-weight: 500;
  113. padding: 4px 2px;
  114. position: relative;
  115. }
  116. .site-nav a:hover {
  117. color: var(--accent);
  118. text-decoration: none;
  119. }
  120. .site-nav a::after {
  121. content: "";
  122. position: absolute;
  123. left: 0;
  124. bottom: -3px;
  125. width: 0;
  126. height: 2px;
  127. background: var(--accent);
  128. transition: width 0.22s ease;
  129. }
  130. .site-nav a:hover::after {
  131. width: 100%;
  132. }
  133. main.wrap {
  134. padding: 32px 0 48px;
  135. }
  136. .card {
  137. background: var(--panel);
  138. border: 1px solid var(--border);
  139. border-radius: 18px;
  140. padding: 24px;
  141. box-shadow: var(--shadow);
  142. }
  143. .hero {
  144. padding: 28px 24px;
  145. margin-bottom: 24px;
  146. background: linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-tint) 100%);
  147. border: 1px solid rgba(160, 124, 100, 0.12);
  148. border-radius: 18px;
  149. }
  150. .hero h1 {
  151. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  152. font-size: 1.8rem;
  153. font-weight: 700;
  154. margin: 0 0 8px;
  155. color: var(--text);
  156. }
  157. .eyebrow {
  158. display: inline-block;
  159. margin-bottom: 8px;
  160. color: var(--warm);
  161. font-size: 0.8rem;
  162. text-transform: uppercase;
  163. letter-spacing: 0.08em;
  164. font-weight: 700;
  165. }
  166. .grid {
  167. display: grid;
  168. gap: 16px;
  169. margin-bottom: 24px;
  170. }
  171. .three-up {
  172. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  173. }
  174. .section-card {
  175. transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  176. }
  177. .section-card:hover {
  178. transform: translateY(-2px);
  179. box-shadow: 0 10px 24px rgba(47, 49, 45, 0.06);
  180. border-color: rgba(66, 107, 87, 0.14);
  181. }
  182. .section-card h2,
  183. .post-item h2,
  184. .post-item h3 {
  185. margin-top: 0;
  186. color: var(--text);
  187. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  188. font-weight: 600;
  189. }
  190. .section-card h2 { font-size: 1.2rem; }
  191. .post-item h2 { font-size: 1.15rem; }
  192. .post-item h3 { font-size: 1.05rem; }
  193. .section-head {
  194. display: flex;
  195. align-items: center;
  196. justify-content: space-between;
  197. gap: 16px;
  198. margin-bottom: 16px;
  199. }
  200. .section-head h2 {
  201. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  202. font-size: 1.2rem;
  203. font-weight: 600;
  204. margin: 0;
  205. }
  206. .post-list {
  207. display: grid;
  208. gap: 16px;
  209. }
  210. /* section-card 与 post-list 之间留间距 */
  211. .post-list {
  212. margin-top: 12px;
  213. }
  214. .post-item {
  215. background: var(--panel);
  216. border: 1px solid var(--border);
  217. border-radius: 18px;
  218. padding: 20px;
  219. transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  220. }
  221. .post-item:hover {
  222. transform: translateY(-1px);
  223. border-color: rgba(66, 107, 87, 0.14);
  224. }
  225. /* 只高亮第一个 */
  226. .post-item:first-child {
  227. background: var(--list-highlight);
  228. border-color: rgba(66, 107, 87, 0.14);
  229. }
  230. .meta {
  231. color: var(--muted);
  232. font-size: 0.9rem;
  233. }
  234. .article h1 {
  235. margin-bottom: 12px;
  236. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  237. font-size: 1.8rem;
  238. letter-spacing: -0.03em;
  239. font-weight: 700;
  240. }
  241. .article h2,
  242. .article h3,
  243. .article h4,
  244. .article h5,
  245. .article h6 {
  246. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  247. font-weight: 600;
  248. margin-top: 1.5em;
  249. }
  250. .article h2 { font-size: 1.4rem; }
  251. .article h3 { font-size: 1.2rem; }
  252. .prose :first-child {
  253. margin-top: 0;
  254. }
  255. .prose img {
  256. max-width: 100%;
  257. height: auto;
  258. border-radius: 8px;
  259. }
  260. .prose blockquote {
  261. margin: 1.2rem 0;
  262. padding: 1rem 1.2rem;
  263. background: var(--panel-soft);
  264. border-left: 3px solid var(--accent);
  265. border-radius: 8px;
  266. color: var(--text);
  267. }
  268. .prose code {
  269. background: var(--panel-soft);
  270. padding: 0.2rem 0.4rem;
  271. border-radius: 4px;
  272. font-size: 0.9em;
  273. }
  274. .prose pre {
  275. background: var(--panel-soft);
  276. padding: 16px;
  277. border-radius: 10px;
  278. overflow-x: auto;
  279. border: 1px solid var(--border);
  280. }
  281. .tags {
  282. display: flex;
  283. flex-wrap: wrap;
  284. gap: 8px;
  285. margin-top: 12px;
  286. }
  287. .tag {
  288. display: inline-flex;
  289. padding: 5px 11px;
  290. border-radius: 999px;
  291. background: var(--tag-bg);
  292. color: var(--accent);
  293. font-size: 0.85rem;
  294. border: 1px solid var(--tag-border);
  295. font-weight: 500;
  296. }
  297. .tag:first-child {
  298. background: var(--warm-soft);
  299. border-color: rgba(160, 124, 100, 0.18);
  300. color: var(--warm);
  301. }
  302. .site-footer {
  303. padding: 0 0 48px;
  304. color: var(--muted);
  305. font-size: 0.9rem;
  306. }
  307. @media (max-width: 720px) {
  308. .header-inner,
  309. .section-head {
  310. flex-direction: column;
  311. align-items: flex-start;
  312. }
  313. .card,
  314. .hero {
  315. padding: 20px;
  316. }
  317. .article h1 {
  318. font-size: 1.5rem;
  319. }
  320. .site-title {
  321. font-size: 1.4rem;
  322. }
  323. .site-logo {
  324. width: 40px;
  325. height: 40px;
  326. }
  327. .site-nav {
  328. width: 100%;
  329. margin-top: 12px;
  330. }
  331. .site-nav a {
  332. font-size: 0.9rem;
  333. padding: 6px 12px 6px 0;
  334. }
  335. }