site.css 6.6 KB

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