site.css 13 KB

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