site.css 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  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. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  150. padding: 4px 2px;
  151. position: relative;
  152. }
  153. .site-nav a:hover {
  154. color: var(--accent);
  155. text-decoration: none;
  156. }
  157. .site-nav a::after {
  158. content: "";
  159. position: absolute;
  160. left: 0;
  161. bottom: -3px;
  162. width: 0;
  163. height: 2px;
  164. background: var(--accent);
  165. transition: width 0.22s ease;
  166. }
  167. .site-nav a:hover::after,
  168. .site-nav a.active::after {
  169. width: 100%;
  170. }
  171. /* Mobile menu */
  172. .menu-toggle {
  173. display: none;
  174. background: none;
  175. border: none;
  176. cursor: pointer;
  177. padding: 8px;
  178. flex-direction: column;
  179. gap: 5px;
  180. z-index: 100;
  181. margin-left: auto;
  182. }
  183. .menu-toggle span {
  184. display: block;
  185. width: 24px;
  186. height: 2px;
  187. background: var(--text);
  188. transition: all 0.3s ease;
  189. border-radius: 2px;
  190. }
  191. .menu-toggle:hover span {
  192. background: var(--accent);
  193. }
  194. .menu-toggle.active span:nth-child(1) {
  195. transform: rotate(45deg) translate(5px, 5px);
  196. }
  197. .menu-toggle.active span:nth-child(2) {
  198. opacity: 0;
  199. }
  200. .menu-toggle.active span:nth-child(3) {
  201. transform: rotate(-45deg) translate(5px, -5px);
  202. }
  203. .mobile-nav {
  204. display: none;
  205. position: absolute;
  206. top: 100%;
  207. left: 0;
  208. right: 0;
  209. background: rgba(251, 249, 246, 0.98);
  210. border-bottom: 1px solid var(--border);
  211. padding: 12px 24px 16px;
  212. backdrop-filter: blur(10px);
  213. box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
  214. }
  215. .mobile-nav a {
  216. display: block;
  217. padding: 12px 0;
  218. color: var(--text);
  219. font-weight: 500;
  220. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  221. font-size: 1rem;
  222. border-bottom: 1px solid rgba(47, 49, 45, 0.06);
  223. }
  224. .mobile-nav a:last-child {
  225. border-bottom: none;
  226. }
  227. .mobile-nav a:hover {
  228. color: var(--accent);
  229. text-decoration: none;
  230. }
  231. /* Layout */
  232. main.wrap {
  233. padding: 32px 0 48px;
  234. }
  235. /* Generic card */
  236. .card {
  237. position: relative;
  238. background: var(--panel);
  239. border: 1px solid var(--border);
  240. border-radius: 12px;
  241. padding: 24px;
  242. box-shadow: var(--shadow-soft);
  243. transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
  244. backdrop-filter: blur(1.5px);
  245. overflow: hidden;
  246. }
  247. .card::before {
  248. content: "";
  249. position: absolute;
  250. inset: 0;
  251. background-image:
  252. repeating-radial-gradient(
  253. circle at 30% 20%,
  254. transparent 0,
  255. transparent 2px,
  256. rgba(58, 56, 50, 0.008) 2px,
  257. rgba(58, 56, 50, 0.008) 4px
  258. );
  259. opacity: 0.55;
  260. pointer-events: none;
  261. }
  262. .card > * {
  263. position: relative;
  264. z-index: 1;
  265. }
  266. .card:hover {
  267. border-color: rgba(92, 117, 96, 0.15);
  268. box-shadow: 0 10px 24px rgba(58, 56, 50, 0.07);
  269. }
  270. /* Hero */
  271. .hero {
  272. position: relative;
  273. padding: 32px 28px;
  274. margin-bottom: 28px;
  275. background: var(--hero-bg);
  276. border: 1px solid var(--border);
  277. border-radius: 14px;
  278. box-shadow: var(--shadow);
  279. overflow: hidden;
  280. }
  281. .hero::after {
  282. content: "";
  283. position: absolute;
  284. inset: 0;
  285. background:
  286. linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)),
  287. radial-gradient(circle at 85% 20%, rgba(92,117,96,0.035), transparent 28%);
  288. pointer-events: none;
  289. }
  290. .hero h1 {
  291. position: relative;
  292. z-index: 1;
  293. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  294. font-size: 2rem;
  295. font-weight: 600;
  296. margin: 0 0 10px;
  297. color: var(--text);
  298. letter-spacing: -0.02em;
  299. line-height: 1.1;
  300. }
  301. .hero p,
  302. .hero ul,
  303. .hero li {
  304. position: relative;
  305. z-index: 1;
  306. }
  307. .hero p {
  308. margin: 0 0 12px;
  309. color: var(--text-soft);
  310. font-size: 1rem;
  311. line-height: 1.7;
  312. }
  313. .eyebrow {
  314. display: inline-block;
  315. margin-bottom: 8px;
  316. color: var(--warm);
  317. font-size: 0.8rem;
  318. text-transform: uppercase;
  319. letter-spacing: 0.08em;
  320. font-weight: 700;
  321. }
  322. /* Grid sections */
  323. .grid {
  324. display: grid;
  325. gap: 16px;
  326. margin-bottom: 24px;
  327. }
  328. .three-up {
  329. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  330. }
  331. .section-card {
  332. background: rgba(252, 250, 245, 0.88);
  333. transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  334. }
  335. .section-card:hover {
  336. transform: translateY(-2px);
  337. box-shadow: 0 12px 26px rgba(47, 49, 45, 0.06);
  338. border-color: rgba(66, 107, 87, 0.14);
  339. background: rgba(252, 250, 245, 0.94);
  340. }
  341. .section-card h2,
  342. .post-item h2,
  343. .post-item h3 {
  344. margin-top: 0;
  345. color: var(--text);
  346. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  347. font-weight: 600;
  348. letter-spacing: -0.01em;
  349. }
  350. .section-card h2 {
  351. font-size: 1.25rem;
  352. margin-bottom: 10px;
  353. }
  354. .post-item h2 {
  355. font-size: 1.15rem;
  356. }
  357. .post-item h3 {
  358. font-size: 1.1rem;
  359. }
  360. .section-head {
  361. display: flex;
  362. align-items: center;
  363. justify-content: space-between;
  364. gap: 16px;
  365. margin-bottom: 16px;
  366. padding-bottom: 12px;
  367. border-bottom: 1px solid var(--border);
  368. }
  369. .section-head h2 {
  370. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  371. font-size: 1.3rem;
  372. font-weight: 600;
  373. margin: 0;
  374. color: var(--text);
  375. letter-spacing: -0.01em;
  376. }
  377. /* 页面头部标题 */
  378. .page-head h1 {
  379. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  380. font-size: 2rem;
  381. font-weight: 600;
  382. margin: 0 0 12px;
  383. color: var(--text);
  384. letter-spacing: -0.02em;
  385. }
  386. /* Post list */
  387. .post-list {
  388. display: grid;
  389. gap: 14px;
  390. margin-top: 16px;
  391. }
  392. .post-item {
  393. position: relative;
  394. background: var(--panel);
  395. border: 1px solid var(--border);
  396. border-radius: 10px;
  397. padding: 20px 20px 20px 22px;
  398. transition: all 0.2s ease;
  399. overflow: hidden;
  400. }
  401. .post-item::before {
  402. content: "";
  403. position: absolute;
  404. left: 0;
  405. top: 14px;
  406. bottom: 14px;
  407. width: 3px;
  408. background: linear-gradient(
  409. 180deg,
  410. rgba(92, 117, 96, 0),
  411. rgba(92, 117, 96, 0.22),
  412. rgba(92, 117, 96, 0)
  413. );
  414. border-radius: 2px;
  415. }
  416. .post-item:hover {
  417. border-color: rgba(92, 117, 96, 0.2);
  418. box-shadow: var(--shadow-soft);
  419. }
  420. .post-item:first-child {
  421. background: var(--list-accent);
  422. }
  423. .meta {
  424. color: var(--muted);
  425. font-size: 0.9rem;
  426. }
  427. /* Article */
  428. .article {
  429. background: rgba(252, 250, 245, 0.9);
  430. border: 1px solid var(--border);
  431. border-radius: 14px;
  432. padding: 28px 30px;
  433. box-shadow: var(--shadow-soft);
  434. backdrop-filter: blur(1px);
  435. }
  436. .article h1 {
  437. margin-bottom: 12px;
  438. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  439. font-size: 2rem;
  440. letter-spacing: -0.02em;
  441. font-weight: 600;
  442. color: var(--text);
  443. line-height: 1.15;
  444. }
  445. .article h2,
  446. .article h3,
  447. .article h4,
  448. .article h5,
  449. .article h6 {
  450. position: relative;
  451. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  452. font-weight: 600;
  453. margin-top: 1.8em;
  454. color: var(--text);
  455. letter-spacing: -0.01em;
  456. line-height: 1.2;
  457. }
  458. .article h2 {
  459. font-size: 1.5rem;
  460. padding-bottom: 0.28em;
  461. border-bottom: 1px solid rgba(92, 117, 96, 0.14);
  462. }
  463. .article h3 {
  464. font-size: 1.3rem;
  465. }
  466. /* 正文内容中的标题使用衬线体 */
  467. .prose h1,
  468. .prose h2,
  469. .prose h3,
  470. .prose h4,
  471. .prose h5,
  472. .prose h6 {
  473. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  474. font-weight: 600;
  475. color: var(--text);
  476. letter-spacing: -0.01em;
  477. margin-top: 1.8em;
  478. margin-bottom: 0.8em;
  479. }
  480. .prose h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
  481. .prose h2 { font-size: 1.5rem; border-bottom: 1px solid rgba(92, 117, 96, 0.14); padding-bottom: 0.28em; }
  482. .prose h3 { font-size: 1.3rem; }
  483. .prose h4 { font-size: 1.15rem; }
  484. .prose h5 { font-size: 1.05rem; }
  485. .prose h6 { font-size: 1rem; }
  486. .prose :first-child {
  487. margin-top: 0;
  488. }
  489. .prose p,
  490. .prose li {
  491. color: var(--text-soft);
  492. }
  493. .prose img {
  494. max-width: 100%;
  495. height: auto;
  496. border-radius: 8px;
  497. }
  498. .prose blockquote {
  499. margin: 1.2rem 0;
  500. padding: 1rem 1.2rem;
  501. background: rgba(242, 239, 230, 0.88);
  502. border-left: 3px solid var(--accent);
  503. border-radius: 8px;
  504. color: var(--text);
  505. font-style: normal;
  506. }
  507. .prose code {
  508. background: rgba(242, 239, 230, 0.92);
  509. padding: 0.18rem 0.42rem;
  510. border-radius: 4px;
  511. font-size: 0.9em;
  512. color: var(--accent-hover);
  513. }
  514. .prose pre {
  515. background: rgba(242, 239, 230, 0.96);
  516. padding: 16px;
  517. border-radius: 10px;
  518. overflow-x: auto;
  519. border: 1px solid var(--border);
  520. box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  521. }
  522. .prose pre code {
  523. background: transparent;
  524. padding: 0;
  525. color: inherit;
  526. }
  527. /* Tags */
  528. .tags {
  529. display: flex;
  530. flex-wrap: wrap;
  531. gap: 8px;
  532. margin-top: 12px;
  533. }
  534. .tag {
  535. display: inline-flex;
  536. padding: 4px 10px;
  537. border-radius: 4px;
  538. background: var(--panel-soft);
  539. color: var(--accent);
  540. font-size: 0.8rem;
  541. border: 1px solid var(--border);
  542. font-weight: 500;
  543. font-family: "PingFang SC", sans-serif;
  544. }
  545. .tag:first-child {
  546. background: var(--accent-light);
  547. border-color: rgba(92, 117, 96, 0.12);
  548. color: var(--accent);
  549. }
  550. /* Footer */
  551. .site-footer {
  552. padding: 0 0 48px;
  553. color: var(--muted);
  554. font-size: 0.9rem;
  555. }
  556. /* Mobile */
  557. @media (max-width: 720px) {
  558. body {
  559. background-image:
  560. radial-gradient(circle at 0% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  561. radial-gradient(circle at 100% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  562. radial-gradient(circle at 0% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  563. radial-gradient(circle at 100% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  564. url("../background-mobile.png"),
  565. repeating-radial-gradient(
  566. circle at 50% 50%,
  567. transparent 0,
  568. transparent 2px,
  569. rgba(58, 56, 50, 0.01) 2px,
  570. rgba(58, 56, 50, 0.01) 4px
  571. );
  572. background-size: auto, auto, auto, auto, cover, 4px 4px;
  573. background-position: center, center, center, center, center top, center;
  574. background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  575. background-attachment: scroll, scroll, scroll, scroll, scroll, local;
  576. }
  577. .header-inner,
  578. .section-head {
  579. flex-direction: column;
  580. align-items: flex-start;
  581. }
  582. .menu-toggle {
  583. display: flex;
  584. position: absolute;
  585. right: 0;
  586. top: 18px;
  587. }
  588. .site-nav {
  589. display: none;
  590. }
  591. .site-nav.active,
  592. .mobile-nav.active {
  593. display: block;
  594. }
  595. .card,
  596. .hero,
  597. .article {
  598. padding: 20px;
  599. }
  600. .article h1 {
  601. font-size: 1.5rem;
  602. }
  603. .hero h1 {
  604. font-size: 1.7rem;
  605. }
  606. .site-title {
  607. font-size: 1.4rem;
  608. padding-right: 56px;
  609. }
  610. .site-logo {
  611. width: 40px;
  612. height: 40px;
  613. }
  614. .site-tagline {
  615. font-size: 0.88rem;
  616. }
  617. .three-up {
  618. grid-template-columns: 1fr;
  619. }
  620. .post-item {
  621. padding: 18px 16px 18px 18px;
  622. }
  623. }