site.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. :root {
  2. /* 植物学研究手稿风格 */
  3. /* 主背景:浅米色纸张质感 */
  4. --bg: #f9f7f1;
  5. --panel: #fcfaf5;
  6. --panel-soft: #f2efe6;
  7. /* 文字色:墨灰(不是纯黑) */
  8. --text: #3a3832;
  9. --muted: #7a7870;
  10. /* 植物绿:鼠尾草绿(低饱和) */
  11. --accent: #5c7560;
  12. --accent-hover: #4a5e4b;
  13. --accent-light: #e8ece6;
  14. /* 辅助色:暖棕(不是蓝色/紫色) */
  15. --warm: #8b7355;
  16. --warm-soft: #f0e8dc;
  17. /* 边框和阴影:极淡 */
  18. --border: rgba(58, 56, 50, 0.06);
  19. --shadow: 0 2px 8px rgba(58, 56, 50, 0.03);
  20. /* Hero 和卡片 */
  21. --hero-bg: #fcfaf5;
  22. --list-accent: #eef2ee;
  23. }
  24. /* 植物学研究手稿风格背景 */
  25. body {
  26. margin: 0;
  27. background-color: var(--bg);
  28. /* 纸张质感纹理 */
  29. background-image:
  30. /* 角落淡色晕影(不在中心) */
  31. radial-gradient(circle at 0% 0%, rgba(139, 115, 85, 0.04) 0%, transparent 50%),
  32. radial-gradient(circle at 100% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 50%),
  33. radial-gradient(circle at 0% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 50%),
  34. radial-gradient(circle at 100% 100%, rgba(139, 115, 85, 0.04) 0%, transparent 50%),
  35. /* 极淡的纸张纤维纹理 */
  36. repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 2px, rgba(58, 56, 50, 0.01) 2px, rgba(58, 56, 50, 0.01) 4px),
  37. /* 植物学研究手稿风格 - 角落装饰 */
  38. url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cg fill='none' stroke='%235c7560' stroke-width='0.5' stroke-opacity='0.08'%3E%3Cpath d='M50 50 Q80 30 100 60 T140 80'/%3E%3Cpath d='M55 55 Q75 40 90 65 T130 75'/%3E%3Cpath d='M540 50 Q510 30 490 60 T450 80'/%3E%3Cpath d='M535 55 Q515 40 500 65 T460 75'/%3E%3Cpath d='M50 550 Q80 570 100 540 T140 520'/%3E%3Cpath d='M55 545 Q75 560 90 535 T130 525'/%3E%3Cpath d='M540 550 Q510 570 490 540 T450 520'/%3E%3Cpath d='M535 545 Q515 560 500 535 T460 525'/%3E%3C/g%3E%3Cg fill='%235c7560' stroke='none' opacity='0.04'%3E%3Cpath d='M20 200 Q40 180 60 200 T80 240 Q60 260 40 240 T20 200'/%3E%3Cpath d='M580 200 Q560 180 540 200 T520 240 Q540 260 560 240 T580 200'/%3E%3C/g%3E%3C/svg%3E");
  39. background-size: 600px 600px, 4px 4px, 800px 800px;
  40. background-position: center, center, center;
  41. background-attachment: local, local, fixed;
  42. }
  43. * { box-sizing: border-box; }
  44. body {
  45. color: var(--text);
  46. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  47. line-height: 1.8;
  48. font-size: 16px;
  49. letter-spacing: 0.01em;
  50. }
  51. a {
  52. color: var(--accent);
  53. text-decoration: none;
  54. transition: color 0.2s ease;
  55. }
  56. a:hover {
  57. color: var(--accent-hover);
  58. text-decoration: underline;
  59. }
  60. .wrap {
  61. width: min(960px, calc(100% - 32px));
  62. margin: 0 auto;
  63. }
  64. .site-header {
  65. position: sticky;
  66. top: 0;
  67. backdrop-filter: blur(10px);
  68. background: rgba(246, 243, 238, 0.88);
  69. border-bottom: 1px solid var(--border);
  70. z-index: 10;
  71. }
  72. .header-inner {
  73. display: flex;
  74. justify-content: space-between;
  75. gap: 24px;
  76. padding: 18px 0;
  77. align-items: center;
  78. }
  79. .site-title {
  80. display: flex;
  81. align-items: center;
  82. gap: 12px;
  83. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  84. font-size: 1.9rem;
  85. font-weight: 600;
  86. color: var(--text);
  87. letter-spacing: -0.01em;
  88. }
  89. .site-title a {
  90. display: flex;
  91. align-items: center;
  92. gap: 12px;
  93. text-decoration: none;
  94. color: inherit;
  95. }
  96. .site-title a:hover {
  97. color: var(--accent);
  98. }
  99. .site-tagline {
  100. margin: 6px 0 0;
  101. color: var(--muted);
  102. font-size: 0.9rem;
  103. font-weight: 400;
  104. }
  105. .site-logo {
  106. width: 56px;
  107. height: 56px;
  108. border-radius: 50%;
  109. object-fit: cover;
  110. border: 2px solid var(--border);
  111. }
  112. .site-tagline {
  113. margin: 6px 0 0;
  114. color: var(--muted);
  115. font-size: 0.95rem;
  116. }
  117. .site-nav {
  118. display: flex;
  119. gap: 16px;
  120. flex-wrap: wrap;
  121. }
  122. /* Hamburger 菜单按钮 */
  123. .menu-toggle {
  124. display: none;
  125. background: none;
  126. border: none;
  127. cursor: pointer;
  128. padding: 8px;
  129. flex-direction: column;
  130. gap: 5px;
  131. z-index: 100;
  132. margin-left: auto;
  133. }
  134. .menu-toggle span {
  135. display: block;
  136. width: 24px;
  137. height: 2px;
  138. background: var(--text);
  139. transition: all 0.3s ease;
  140. border-radius: 2px;
  141. }
  142. .menu-toggle:hover span {
  143. background: var(--accent);
  144. }
  145. .menu-toggle.active span:nth-child(1) {
  146. transform: rotate(45deg) translate(5px, 5px);
  147. }
  148. .menu-toggle.active span:nth-child(2) {
  149. opacity: 0;
  150. }
  151. .menu-toggle.active span:nth-child(3) {
  152. transform: rotate(-45deg) translate(5px, -5px);
  153. }
  154. .site-nav a {
  155. color: var(--text);
  156. font-weight: 500;
  157. padding: 4px 2px;
  158. position: relative;
  159. }
  160. .site-nav a:hover {
  161. color: var(--accent);
  162. text-decoration: none;
  163. }
  164. .site-nav a::after {
  165. content: "";
  166. position: absolute;
  167. left: 0;
  168. bottom: -3px;
  169. width: 0;
  170. height: 2px;
  171. background: var(--accent);
  172. transition: width 0.22s ease;
  173. }
  174. .site-nav a:hover::after {
  175. width: 100%;
  176. }
  177. /* 移动端导航菜单 */
  178. .mobile-nav {
  179. display: none;
  180. position: absolute;
  181. top: 100%;
  182. left: 0;
  183. right: 0;
  184. background: rgba(251, 249, 246, 0.98);
  185. border-bottom: 1px solid var(--border);
  186. padding: 16px 24px;
  187. backdrop-filter: blur(10px);
  188. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  189. }
  190. .mobile-nav a {
  191. display: block;
  192. padding: 12px 0;
  193. color: var(--text);
  194. font-weight: 500;
  195. font-size: 1rem;
  196. border-bottom: 1px solid rgba(47, 49, 45, 0.06);
  197. }
  198. .mobile-nav a:last-child {
  199. border-bottom: none;
  200. }
  201. .mobile-nav a:hover {
  202. color: var(--accent);
  203. }
  204. main.wrap {
  205. padding: 32px 0 48px;
  206. }
  207. .card {
  208. background: var(--panel);
  209. border: 1px solid var(--border);
  210. border-radius: 12px;
  211. padding: 24px;
  212. box-shadow: var(--shadow);
  213. transition: border-color 0.2s ease;
  214. }
  215. .card:hover {
  216. border-color: rgba(92, 117, 96, 0.15);
  217. }
  218. .hero {
  219. padding: 32px 28px;
  220. margin-bottom: 28px;
  221. background: var(--hero-bg);
  222. border: 1px solid var(--border);
  223. border-radius: 12px;
  224. }
  225. .hero h1 {
  226. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  227. font-size: 2rem;
  228. font-weight: 600;
  229. margin: 0 0 8px;
  230. color: var(--text);
  231. letter-spacing: -0.02em;
  232. }
  233. .hero p {
  234. margin: 0;
  235. color: var(--muted);
  236. font-size: 1rem;
  237. line-height: 1.6;
  238. }
  239. .hero h1 {
  240. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  241. font-size: 1.8rem;
  242. font-weight: 700;
  243. margin: 0 0 8px;
  244. color: var(--text);
  245. }
  246. .eyebrow {
  247. display: inline-block;
  248. margin-bottom: 8px;
  249. color: var(--warm);
  250. font-size: 0.8rem;
  251. text-transform: uppercase;
  252. letter-spacing: 0.08em;
  253. font-weight: 700;
  254. }
  255. .grid {
  256. display: grid;
  257. gap: 16px;
  258. margin-bottom: 24px;
  259. }
  260. .three-up {
  261. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  262. }
  263. .section-card {
  264. transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  265. }
  266. .section-card:hover {
  267. transform: translateY(-2px);
  268. box-shadow: 0 10px 24px rgba(47, 49, 45, 0.06);
  269. border-color: rgba(66, 107, 87, 0.14);
  270. }
  271. .section-card h2,
  272. .post-item h2,
  273. .post-item h3 {
  274. margin-top: 0;
  275. color: var(--text);
  276. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  277. font-weight: 600;
  278. letter-spacing: -0.01em;
  279. }
  280. .section-card h2 { font-size: 1.25rem; }
  281. .post-item h2 { font-size: 1.15rem; }
  282. .post-item h3 { font-size: 1.1rem; }
  283. .section-head {
  284. display: flex;
  285. align-items: center;
  286. justify-content: space-between;
  287. gap: 16px;
  288. margin-bottom: 16px;
  289. padding-bottom: 12px;
  290. border-bottom: 1px solid var(--border);
  291. }
  292. .section-head h2 {
  293. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  294. font-size: 1.3rem;
  295. font-weight: 600;
  296. margin: 0;
  297. color: var(--text);
  298. letter-spacing: -0.01em;
  299. }
  300. .post-list {
  301. display: grid;
  302. gap: 14px;
  303. margin-top: 16px;
  304. }
  305. .post-item {
  306. background: var(--panel);
  307. border: 1px solid var(--border);
  308. border-radius: 10px;
  309. padding: 20px;
  310. transition: all 0.2s ease;
  311. }
  312. .post-item:hover {
  313. border-color: rgba(92, 117, 96, 0.2);
  314. box-shadow: var(--shadow);
  315. }
  316. /* 第一个项目用淡色背景 */
  317. .post-item:first-child {
  318. background: var(--list-accent);
  319. }
  320. .meta {
  321. color: var(--muted);
  322. font-size: 0.9rem;
  323. }
  324. .article h1 {
  325. margin-bottom: 12px;
  326. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  327. font-size: 2rem;
  328. letter-spacing: -0.02em;
  329. font-weight: 600;
  330. color: var(--text);
  331. }
  332. .article h2,
  333. .article h3,
  334. .article h4,
  335. .article h5,
  336. .article h6 {
  337. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  338. font-weight: 600;
  339. margin-top: 1.8em;
  340. color: var(--text);
  341. letter-spacing: -0.01em;
  342. }
  343. .article h2 { font-size: 1.5rem; }
  344. .article h3 { font-size: 1.3rem; }
  345. .prose :first-child {
  346. margin-top: 0;
  347. }
  348. .prose img {
  349. max-width: 100%;
  350. height: auto;
  351. border-radius: 8px;
  352. }
  353. .prose blockquote {
  354. margin: 1.2rem 0;
  355. padding: 1rem 1.2rem;
  356. background: var(--panel-soft);
  357. border-left: 3px solid var(--accent);
  358. border-radius: 8px;
  359. color: var(--text);
  360. }
  361. .prose code {
  362. background: var(--panel-soft);
  363. padding: 0.2rem 0.4rem;
  364. border-radius: 4px;
  365. font-size: 0.9em;
  366. }
  367. .prose pre {
  368. background: var(--panel-soft);
  369. padding: 16px;
  370. border-radius: 10px;
  371. overflow-x: auto;
  372. border: 1px solid var(--border);
  373. }
  374. .tags {
  375. display: flex;
  376. flex-wrap: wrap;
  377. gap: 8px;
  378. margin-top: 12px;
  379. }
  380. .tag {
  381. display: inline-flex;
  382. padding: 4px 10px;
  383. border-radius: 4px;
  384. background: var(--panel-soft);
  385. color: var(--accent);
  386. font-size: 0.8rem;
  387. border: 1px solid var(--border);
  388. font-weight: 500;
  389. font-family: "PingFang SC", sans-serif;
  390. }
  391. .tag:first-child {
  392. background: var(--accent-light);
  393. border-color: rgba(92, 117, 96, 0.12);
  394. color: var(--accent);
  395. }
  396. .site-footer {
  397. padding: 0 0 48px;
  398. color: var(--muted);
  399. font-size: 0.9rem;
  400. }
  401. @media (max-width: 720px) {
  402. .header-inner,
  403. .section-head {
  404. flex-direction: column;
  405. align-items: flex-start;
  406. }
  407. .menu-toggle {
  408. display: flex;
  409. }
  410. .site-nav {
  411. display: none;
  412. width: 100%;
  413. flex-direction: column;
  414. margin-top: 12px;
  415. gap: 0;
  416. }
  417. .site-nav.active {
  418. display: flex;
  419. }
  420. .site-nav a {
  421. font-size: 0.9rem;
  422. padding: 12px 0;
  423. border-bottom: 1px solid rgba(47, 49, 45, 0.06);
  424. width: 100%;
  425. }
  426. .site-nav a::after {
  427. display: none;
  428. }
  429. .site-nav a:hover {
  430. background: var(--panel-soft);
  431. }
  432. .card,
  433. .hero {
  434. padding: 20px;
  435. }
  436. .article h1 {
  437. font-size: 1.5rem;
  438. }
  439. .site-title {
  440. font-size: 1.4rem;
  441. }
  442. .site-logo {
  443. width: 40px;
  444. height: 40px;
  445. }
  446. .site-nav a {
  447. font-size: 0.9rem;
  448. padding: 10px 0;
  449. }
  450. }