site.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. :root {
  2. /* Botanical Research Notebook / Latent Garden */
  3. --bg: #f9f7f1;
  4. --panel: rgba(252, 250, 245, 0.9);
  5. --panel-strong: rgba(252, 250, 245, 0.96);
  6. --panel-soft: #f2efe6;
  7. --text: #3a3832;
  8. --text-soft: #4a473f;
  9. --muted: #7a7870;
  10. --accent: #5c7560;
  11. --accent-hover: #4a5e4b;
  12. --accent-light: #e8ece6;
  13. --accent-line: rgba(92, 117, 96, 0.18);
  14. --warm: #8b7355;
  15. --warm-soft: #f0e8dc;
  16. --border: rgba(58, 56, 50, 0.08);
  17. --border-soft: rgba(58, 56, 50, 0.05);
  18. --shadow: 0 6px 18px rgba(58, 56, 50, 0.05);
  19. --shadow-soft: 0 3px 10px rgba(58, 56, 50, 0.035);
  20. --hero-bg: rgba(252, 250, 245, 0.92);
  21. --list-accent: rgba(238, 242, 238, 0.92);
  22. --paper-dot: rgba(58, 56, 50, 0.012);
  23. --paper-line: rgba(58, 56, 50, 0.018);
  24. --header-bg: rgba(246, 243, 238, 0.82);
  25. }
  26. * {
  27. box-sizing: border-box;
  28. }
  29. html {
  30. scroll-behavior: smooth;
  31. }
  32. body {
  33. margin: 0;
  34. color: var(--text);
  35. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  36. line-height: 1.8;
  37. font-size: 16px;
  38. letter-spacing: 0.01em;
  39. background-color: var(--bg);
  40. background-image:
  41. url("../background.png"),
  42. radial-gradient(circle at 20% 20%, rgba(139, 115, 85, 0.025) 0%, transparent 32%),
  43. radial-gradient(circle at 80% 30%, rgba(92, 117, 96, 0.02) 0%, transparent 30%),
  44. repeating-radial-gradient(
  45. circle at 50% 50%,
  46. transparent 0,
  47. transparent 2px,
  48. var(--paper-dot) 2px,
  49. var(--paper-dot) 4px
  50. );
  51. background-size: cover, auto, auto, 4px 4px;
  52. background-position: center top, center, center, center;
  53. background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  54. background-attachment: fixed, scroll, scroll, local;
  55. }
  56. /* 移动端优化:使用移动端专属背景图 */
  57. @media (max-width: 720px) {
  58. body {
  59. background-image: url("../background-mobile.png") !important;
  60. background-size: cover !important;
  61. background-position: center !important;
  62. background-repeat: no-repeat !important;
  63. background-attachment: scroll !important;
  64. background-color: var(--bg) !important;
  65. }
  66. }
  67. a {
  68. color: var(--accent);
  69. text-decoration: none;
  70. transition: color 0.2s ease, opacity 0.2s ease;
  71. }
  72. a:hover {
  73. color: var(--accent-hover);
  74. text-decoration: underline;
  75. }
  76. img {
  77. max-width: 100%;
  78. height: auto;
  79. }
  80. .wrap {
  81. width: min(960px, calc(100% - 32px));
  82. margin: 0 auto;
  83. }
  84. /* Header */
  85. .site-header {
  86. position: sticky;
  87. top: 0;
  88. backdrop-filter: blur(10px);
  89. background: var(--header-bg);
  90. border-bottom: 1px solid var(--border-soft);
  91. z-index: 50;
  92. }
  93. .header-inner {
  94. display: flex;
  95. justify-content: space-between;
  96. gap: 24px;
  97. padding: 16px 0;
  98. align-items: center;
  99. position: relative;
  100. }
  101. .site-brand {
  102. min-width: 0;
  103. }
  104. .site-title {
  105. display: flex;
  106. align-items: center;
  107. gap: 12px;
  108. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  109. font-size: 1.9rem;
  110. font-weight: 600;
  111. color: var(--text);
  112. letter-spacing: -0.01em;
  113. line-height: 1.1;
  114. }
  115. .site-title a {
  116. display: flex;
  117. align-items: center;
  118. gap: 12px;
  119. text-decoration: none;
  120. color: inherit;
  121. }
  122. .site-title a:hover {
  123. color: var(--accent);
  124. text-decoration: none;
  125. }
  126. .site-logo {
  127. width: 56px;
  128. height: 56px;
  129. border-radius: 50%;
  130. object-fit: cover;
  131. border: 1px solid var(--border);
  132. box-shadow: 0 2px 10px rgba(58, 56, 50, 0.04);
  133. flex-shrink: 0;
  134. }
  135. .site-tagline {
  136. margin: 6px 0 0;
  137. color: var(--muted);
  138. font-size: 0.95rem;
  139. }
  140. .site-nav {
  141. display: flex;
  142. gap: 18px;
  143. flex-wrap: wrap;
  144. align-items: center;
  145. }
  146. .site-nav a {
  147. color: var(--text);
  148. font-weight: 500;
  149. padding: 4px 2px;
  150. position: relative;
  151. }
  152. .site-nav a:hover {
  153. color: var(--accent);
  154. text-decoration: none;
  155. }
  156. .site-nav a::after {
  157. content: "";
  158. position: absolute;
  159. left: 0;
  160. bottom: -3px;
  161. width: 0;
  162. height: 2px;
  163. background: var(--accent);
  164. transition: width 0.22s ease;
  165. }
  166. .site-nav a:hover::after,
  167. .site-nav a.active::after {
  168. width: 100%;
  169. }
  170. /* Mobile menu */
  171. .menu-toggle {
  172. display: none;
  173. background: none;
  174. border: none;
  175. cursor: pointer;
  176. padding: 8px;
  177. flex-direction: column;
  178. gap: 5px;
  179. z-index: 100;
  180. margin-left: auto;
  181. }
  182. .menu-toggle span {
  183. display: block;
  184. width: 24px;
  185. height: 2px;
  186. background: var(--text);
  187. transition: all 0.3s ease;
  188. border-radius: 2px;
  189. }
  190. .menu-toggle:hover span {
  191. background: var(--accent);
  192. }
  193. .menu-toggle.active span:nth-child(1) {
  194. transform: rotate(45deg) translate(5px, 5px);
  195. }
  196. .menu-toggle.active span:nth-child(2) {
  197. opacity: 0;
  198. }
  199. .menu-toggle.active span:nth-child(3) {
  200. transform: rotate(-45deg) translate(5px, -5px);
  201. }
  202. .mobile-nav {
  203. display: none;
  204. position: absolute;
  205. top: 100%;
  206. left: 0;
  207. right: 0;
  208. background: rgba(251, 249, 246, 0.98);
  209. border-bottom: 1px solid var(--border);
  210. padding: 12px 24px 16px;
  211. backdrop-filter: blur(10px);
  212. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  213. }
  214. .mobile-nav a {
  215. display: block;
  216. padding: 12px 0;
  217. color: var(--text);
  218. font-weight: 500;
  219. font-size: 1rem;
  220. border-bottom: 1px solid rgba(47, 49, 45, 0.06);
  221. }
  222. .mobile-nav a:last-child {
  223. border-bottom: none;
  224. }
  225. .mobile-nav a:hover {
  226. color: var(--accent);
  227. text-decoration: none;
  228. }
  229. /* Layout */
  230. main.wrap {
  231. padding: 32px 0 48px;
  232. }
  233. /* Generic card */
  234. .card {
  235. position: relative;
  236. background: var(--panel);
  237. border: 1px solid var(--border);
  238. border-radius: 12px;
  239. padding: 24px;
  240. box-shadow: var(--shadow-soft);
  241. transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
  242. backdrop-filter: blur(1.5px);
  243. overflow: hidden;
  244. }
  245. .card::before {
  246. content: "";
  247. position: absolute;
  248. inset: 0;
  249. background-image:
  250. repeating-radial-gradient(
  251. circle at 30% 20%,
  252. transparent 0,
  253. transparent 2px,
  254. rgba(58, 56, 50, 0.008) 2px,
  255. rgba(58, 56, 50, 0.008) 4px
  256. );
  257. opacity: 0.55;
  258. pointer-events: none;
  259. }
  260. .card > * {
  261. position: relative;
  262. z-index: 1;
  263. }
  264. .card:hover {
  265. border-color: rgba(92, 117, 96, 0.15);
  266. box-shadow: 0 10px 24px rgba(58, 56, 50, 0.07);
  267. }
  268. /* Hero */
  269. .hero {
  270. position: relative;
  271. padding: 32px 28px;
  272. margin-bottom: 28px;
  273. background: var(--hero-bg);
  274. border: 1px solid var(--border);
  275. border-radius: 14px;
  276. box-shadow: var(--shadow);
  277. overflow: hidden;
  278. }
  279. .hero::after {
  280. content: "";
  281. position: absolute;
  282. inset: 0;
  283. background:
  284. linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)),
  285. radial-gradient(circle at 85% 20%, rgba(92,117,96,0.035), transparent 28%);
  286. pointer-events: none;
  287. }
  288. .hero h1 {
  289. position: relative;
  290. z-index: 1;
  291. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  292. font-size: 2rem;
  293. font-weight: 600;
  294. margin: 0 0 10px;
  295. color: var(--text);
  296. letter-spacing: -0.02em;
  297. line-height: 1.1;
  298. }
  299. .hero p,
  300. .hero ul,
  301. .hero li {
  302. position: relative;
  303. z-index: 1;
  304. }
  305. .hero p {
  306. margin: 0 0 12px;
  307. color: var(--text-soft);
  308. font-size: 1rem;
  309. line-height: 1.7;
  310. }
  311. .eyebrow {
  312. display: inline-block;
  313. margin-bottom: 8px;
  314. color: var(--warm);
  315. font-size: 0.8rem;
  316. text-transform: uppercase;
  317. letter-spacing: 0.08em;
  318. font-weight: 700;
  319. }
  320. /* Grid sections */
  321. .grid {
  322. display: grid;
  323. gap: 16px;
  324. margin-bottom: 24px;
  325. }
  326. .three-up {
  327. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  328. }
  329. .section-card {
  330. background: rgba(252, 250, 245, 0.88);
  331. transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  332. }
  333. .section-card:hover {
  334. transform: translateY(-2px);
  335. box-shadow: 0 12px 26px rgba(47, 49, 45, 0.06);
  336. border-color: rgba(66, 107, 87, 0.14);
  337. background: rgba(252, 250, 245, 0.94);
  338. }
  339. .section-card h2,
  340. .post-item h2,
  341. .post-item h3 {
  342. margin-top: 0;
  343. color: var(--text);
  344. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  345. font-weight: 600;
  346. letter-spacing: -0.01em;
  347. }
  348. .section-card h2 {
  349. font-size: 1.25rem;
  350. margin-bottom: 10px;
  351. }
  352. .post-item h2 {
  353. font-size: 1.15rem;
  354. }
  355. .post-item h3 {
  356. font-size: 1.1rem;
  357. }
  358. .section-head {
  359. display: flex;
  360. align-items: center;
  361. justify-content: space-between;
  362. gap: 16px;
  363. margin-bottom: 16px;
  364. padding-bottom: 12px;
  365. border-bottom: 1px solid var(--border);
  366. }
  367. .section-head h2 {
  368. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  369. font-size: 1.3rem;
  370. font-weight: 600;
  371. margin: 0;
  372. color: var(--text);
  373. letter-spacing: -0.01em;
  374. }
  375. /* 页面头部标题 */
  376. .page-head h1 {
  377. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  378. font-size: 2rem;
  379. font-weight: 600;
  380. margin: 0 0 12px;
  381. color: var(--text);
  382. letter-spacing: -0.02em;
  383. }
  384. /* Post list */
  385. .post-list {
  386. display: grid;
  387. gap: 14px;
  388. margin-top: 16px;
  389. }
  390. .post-item {
  391. position: relative;
  392. background: var(--panel);
  393. border: 1px solid var(--border);
  394. border-radius: 10px;
  395. padding: 20px 20px 20px 22px;
  396. transition: all 0.2s ease;
  397. overflow: hidden;
  398. }
  399. .post-item::before {
  400. content: "";
  401. position: absolute;
  402. left: 0;
  403. top: 14px;
  404. bottom: 14px;
  405. width: 3px;
  406. background: linear-gradient(
  407. 180deg,
  408. rgba(92, 117, 96, 0),
  409. rgba(92, 117, 96, 0.22),
  410. rgba(92, 117, 96, 0)
  411. );
  412. border-radius: 2px;
  413. }
  414. .post-item:hover {
  415. border-color: rgba(92, 117, 96, 0.2);
  416. box-shadow: var(--shadow-soft);
  417. }
  418. .post-item:first-child {
  419. background: var(--list-accent);
  420. }
  421. .meta {
  422. color: var(--muted);
  423. font-size: 0.9rem;
  424. }
  425. /* Article */
  426. .article {
  427. background: rgba(252, 250, 245, 0.9);
  428. border: 1px solid var(--border);
  429. border-radius: 14px;
  430. padding: 28px 30px;
  431. box-shadow: var(--shadow-soft);
  432. backdrop-filter: blur(1px);
  433. }
  434. .article h1 {
  435. margin-bottom: 12px;
  436. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  437. font-size: 2rem;
  438. letter-spacing: -0.02em;
  439. font-weight: 600;
  440. color: var(--text);
  441. line-height: 1.15;
  442. }
  443. .article h2,
  444. .article h3,
  445. .article h4,
  446. .article h5,
  447. .article h6 {
  448. position: relative;
  449. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  450. font-weight: 600;
  451. margin-top: 1.8em;
  452. color: var(--text);
  453. letter-spacing: -0.01em;
  454. line-height: 1.2;
  455. }
  456. .article h2 {
  457. font-size: 1.5rem;
  458. padding-bottom: 0.28em;
  459. border-bottom: 1px solid rgba(92, 117, 96, 0.14);
  460. }
  461. .article h3 {
  462. font-size: 1.3rem;
  463. }
  464. .prose :first-child {
  465. margin-top: 0;
  466. }
  467. .prose p,
  468. .prose li {
  469. color: var(--text-soft);
  470. }
  471. .prose img {
  472. max-width: 100%;
  473. height: auto;
  474. border-radius: 8px;
  475. }
  476. .prose blockquote {
  477. margin: 1.2rem 0;
  478. padding: 1rem 1.2rem;
  479. background: rgba(242, 239, 230, 0.88);
  480. border-left: 3px solid var(--accent);
  481. border-radius: 8px;
  482. color: var(--text);
  483. font-style: normal;
  484. }
  485. .prose code {
  486. background: rgba(242, 239, 230, 0.92);
  487. padding: 0.18rem 0.42rem;
  488. border-radius: 4px;
  489. font-size: 0.9em;
  490. color: var(--accent-hover);
  491. }
  492. .prose pre {
  493. background: rgba(242, 239, 230, 0.96);
  494. padding: 16px;
  495. border-radius: 10px;
  496. overflow-x: auto;
  497. border: 1px solid var(--border);
  498. box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  499. }
  500. .prose pre code {
  501. background: transparent;
  502. padding: 0;
  503. color: inherit;
  504. }
  505. /* Tags */
  506. .tags {
  507. display: flex;
  508. flex-wrap: wrap;
  509. gap: 8px;
  510. margin-top: 12px;
  511. }
  512. .tag {
  513. display: inline-flex;
  514. padding: 4px 10px;
  515. border-radius: 4px;
  516. background: var(--panel-soft);
  517. color: var(--accent);
  518. font-size: 0.8rem;
  519. border: 1px solid var(--border);
  520. font-weight: 500;
  521. font-family: "PingFang SC", sans-serif;
  522. }
  523. .tag:first-child {
  524. background: var(--accent-light);
  525. border-color: rgba(92, 117, 96, 0.12);
  526. color: var(--accent);
  527. }
  528. /* Footer */
  529. .site-footer {
  530. padding: 0 0 48px;
  531. color: var(--muted);
  532. font-size: 0.9rem;
  533. }
  534. /* Mobile */
  535. @media (max-width: 720px) {
  536. body {
  537. background-image:
  538. radial-gradient(circle at 0% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  539. radial-gradient(circle at 100% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  540. radial-gradient(circle at 0% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  541. radial-gradient(circle at 100% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  542. url("../background-mobile.png"),
  543. repeating-radial-gradient(
  544. circle at 50% 50%,
  545. transparent 0,
  546. transparent 2px,
  547. rgba(58, 56, 50, 0.01) 2px,
  548. rgba(58, 56, 50, 0.01) 4px
  549. );
  550. background-size: auto, auto, auto, auto, cover, 4px 4px;
  551. background-position: center, center, center, center, center top, center;
  552. background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  553. background-attachment: scroll, scroll, scroll, scroll, scroll, local;
  554. }
  555. .header-inner,
  556. .section-head {
  557. flex-direction: column;
  558. align-items: flex-start;
  559. }
  560. .menu-toggle {
  561. display: flex;
  562. position: absolute;
  563. right: 0;
  564. top: 18px;
  565. }
  566. .site-nav {
  567. display: none;
  568. }
  569. .site-nav.active,
  570. .mobile-nav.active {
  571. display: block;
  572. }
  573. .card,
  574. .hero,
  575. .article {
  576. padding: 20px;
  577. }
  578. .article h1 {
  579. font-size: 1.5rem;
  580. }
  581. .hero h1 {
  582. font-size: 1.7rem;
  583. }
  584. .site-title {
  585. font-size: 1.4rem;
  586. padding-right: 56px;
  587. }
  588. .site-logo {
  589. width: 40px;
  590. height: 40px;
  591. }
  592. .site-tagline {
  593. font-size: 0.88rem;
  594. }
  595. .three-up {
  596. grid-template-columns: 1fr;
  597. }
  598. .post-item {
  599. padding: 18px 16px 18px 18px;
  600. }
  601. }