site.css 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  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. /* 搜索框样式 */
  387. .search-box {
  388. margin: 24px 0;
  389. }
  390. #search-input {
  391. width: 100%;
  392. padding: 14px 18px;
  393. font-size: 1rem;
  394. border: 1px solid var(--border);
  395. border-radius: 10px;
  396. background: var(--panel);
  397. color: var(--text);
  398. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  399. transition: border-color 0.2s ease, box-shadow 0.2s ease;
  400. outline: none;
  401. }
  402. #search-input:focus {
  403. border-color: var(--accent);
  404. box-shadow: 0 0 0 3px rgba(92, 117, 96, 0.1);
  405. }
  406. #search-input::placeholder {
  407. color: var(--muted);
  408. }
  409. .search-results {
  410. margin-top: 16px;
  411. max-height: 60vh;
  412. overflow-y: auto;
  413. }
  414. .search-result-item {
  415. background: var(--panel);
  416. border: 1px solid var(--border);
  417. border-radius: 10px;
  418. padding: 16px;
  419. margin-bottom: 12px;
  420. transition: border-color 0.2s ease, box-shadow 0.2s ease;
  421. }
  422. .search-result-item:hover {
  423. border-color: rgba(92, 117, 96, 0.2);
  424. box-shadow: var(--shadow);
  425. }
  426. .search-result-item h3 {
  427. margin: 0 0 8px;
  428. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  429. font-size: 1.2rem;
  430. font-weight: 600;
  431. color: var(--text);
  432. }
  433. .search-result-item h3 a {
  434. color: inherit;
  435. text-decoration: none;
  436. transition: color 0.2s ease;
  437. }
  438. .search-result-item h3 a:hover {
  439. color: var(--accent);
  440. }
  441. .search-result-item .meta {
  442. margin: 0 0 8px;
  443. color: var(--muted);
  444. font-size: 0.85rem;
  445. }
  446. .search-result-item .preview {
  447. margin: 0 0 10px;
  448. color: var(--text);
  449. font-size: 0.95rem;
  450. line-height: 1.6;
  451. }
  452. .search-result-item .tags {
  453. display: flex;
  454. flex-wrap: wrap;
  455. gap: 6px;
  456. }
  457. .search-result-item .tag {
  458. background: rgba(92, 117, 96, 0.1);
  459. color: var(--accent);
  460. font-size: 0.75rem;
  461. padding: 4px 8px;
  462. border-radius: 4px;
  463. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  464. }
  465. .no-results {
  466. color: var(--muted);
  467. text-align: center;
  468. padding: 24px;
  469. font-size: 0.95rem;
  470. }
  471. /* Post list */
  472. .post-list {
  473. display: grid;
  474. gap: 14px;
  475. margin-top: 16px;
  476. }
  477. .post-item {
  478. position: relative;
  479. background: var(--panel);
  480. border: 1px solid var(--border);
  481. border-radius: 10px;
  482. padding: 20px 20px 20px 22px;
  483. transition: all 0.2s ease;
  484. overflow: hidden;
  485. }
  486. .post-item::before {
  487. content: "";
  488. position: absolute;
  489. left: 0;
  490. top: 14px;
  491. bottom: 14px;
  492. width: 3px;
  493. background: linear-gradient(
  494. 180deg,
  495. rgba(92, 117, 96, 0),
  496. rgba(92, 117, 96, 0.22),
  497. rgba(92, 117, 96, 0)
  498. );
  499. border-radius: 2px;
  500. }
  501. .post-item:hover {
  502. border-color: rgba(92, 117, 96, 0.2);
  503. box-shadow: var(--shadow-soft);
  504. }
  505. .post-item:first-child {
  506. background: var(--list-accent);
  507. }
  508. .meta {
  509. color: var(--muted);
  510. font-size: 0.9rem;
  511. }
  512. /* Article */
  513. .article {
  514. background: rgba(252, 250, 245, 0.9);
  515. border: 1px solid var(--border);
  516. border-radius: 14px;
  517. padding: 28px 30px;
  518. box-shadow: var(--shadow-soft);
  519. backdrop-filter: blur(1px);
  520. }
  521. .article h1 {
  522. margin-bottom: 12px;
  523. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  524. font-size: 2rem;
  525. letter-spacing: -0.02em;
  526. font-weight: 600;
  527. color: var(--text);
  528. line-height: 1.15;
  529. }
  530. .article h2,
  531. .article h3,
  532. .article h4,
  533. .article h5,
  534. .article h6 {
  535. position: relative;
  536. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  537. font-weight: 600;
  538. margin-top: 1.8em;
  539. color: var(--text);
  540. letter-spacing: -0.01em;
  541. line-height: 1.2;
  542. }
  543. .article h2 {
  544. font-size: 1.5rem;
  545. padding-bottom: 0.28em;
  546. border-bottom: 1px solid rgba(92, 117, 96, 0.14);
  547. }
  548. .article h3 {
  549. font-size: 1.3rem;
  550. }
  551. /* 正文内容中的标题使用衬线体 */
  552. .prose h1,
  553. .prose h2,
  554. .prose h3,
  555. .prose h4,
  556. .prose h5,
  557. .prose h6 {
  558. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  559. font-weight: 600;
  560. color: var(--text);
  561. letter-spacing: -0.01em;
  562. margin-top: 1.8em;
  563. margin-bottom: 0.8em;
  564. }
  565. .prose h1 { font-size: 1.8rem; letter-spacing: -0.02em; }
  566. .prose h2 { font-size: 1.5rem; border-bottom: 1px solid rgba(92, 117, 96, 0.14); padding-bottom: 0.28em; }
  567. .prose h3 { font-size: 1.3rem; }
  568. .prose h4 { font-size: 1.15rem; }
  569. .prose h5 { font-size: 1.05rem; }
  570. .prose h6 { font-size: 1rem; }
  571. .prose :first-child {
  572. margin-top: 0;
  573. }
  574. .prose p,
  575. .prose li {
  576. color: var(--text-soft);
  577. }
  578. .prose img {
  579. max-width: 100%;
  580. height: auto;
  581. border-radius: 8px;
  582. }
  583. .prose blockquote {
  584. margin: 1.2rem 0;
  585. padding: 1rem 1.2rem;
  586. background: rgba(242, 239, 230, 0.88);
  587. border-left: 3px solid var(--accent);
  588. border-radius: 8px;
  589. color: var(--text);
  590. font-style: normal;
  591. }
  592. .prose code {
  593. background: rgba(242, 239, 230, 0.92);
  594. padding: 0.18rem 0.42rem;
  595. border-radius: 4px;
  596. font-size: 0.9em;
  597. color: var(--accent-hover);
  598. }
  599. .prose pre {
  600. background: rgba(242, 239, 230, 0.96);
  601. padding: 16px;
  602. border-radius: 10px;
  603. overflow-x: auto;
  604. border: 1px solid var(--border);
  605. box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  606. }
  607. .prose pre code {
  608. background: transparent;
  609. padding: 0;
  610. color: inherit;
  611. }
  612. /* Tags */
  613. .tags {
  614. display: flex;
  615. flex-wrap: wrap;
  616. gap: 8px;
  617. margin-top: 12px;
  618. }
  619. .tag {
  620. display: inline-flex;
  621. padding: 4px 10px;
  622. border-radius: 4px;
  623. background: var(--panel-soft);
  624. color: var(--accent);
  625. font-size: 0.8rem;
  626. border: 1px solid var(--border);
  627. font-weight: 500;
  628. font-family: "PingFang SC", sans-serif;
  629. }
  630. .tag:first-child {
  631. background: var(--accent-light);
  632. border-color: rgba(92, 117, 96, 0.12);
  633. color: var(--accent);
  634. }
  635. /* Footer */
  636. .site-footer {
  637. padding: 0 0 48px;
  638. color: var(--muted);
  639. font-size: 0.9rem;
  640. }
  641. /* Mobile */
  642. @media (max-width: 720px) {
  643. body {
  644. background-image:
  645. radial-gradient(circle at 0% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  646. radial-gradient(circle at 100% 0%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  647. radial-gradient(circle at 0% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  648. radial-gradient(circle at 100% 100%, rgba(139, 115, 85, 0.03) 0%, transparent 40%),
  649. url("../background-mobile.png"),
  650. repeating-radial-gradient(
  651. circle at 50% 50%,
  652. transparent 0,
  653. transparent 2px,
  654. rgba(58, 56, 50, 0.01) 2px,
  655. rgba(58, 56, 50, 0.01) 4px
  656. );
  657. background-size: auto, auto, auto, auto, cover, 4px 4px;
  658. background-position: center, center, center, center, center top, center;
  659. background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  660. background-attachment: scroll, scroll, scroll, scroll, scroll, local;
  661. }
  662. .header-inner,
  663. .section-head {
  664. flex-direction: column;
  665. align-items: flex-start;
  666. }
  667. .menu-toggle {
  668. display: flex;
  669. position: absolute;
  670. right: 0;
  671. top: 18px;
  672. }
  673. .site-nav {
  674. display: none;
  675. }
  676. .site-nav.active,
  677. .mobile-nav.active {
  678. display: block;
  679. }
  680. .card,
  681. .hero,
  682. .article {
  683. padding: 20px;
  684. }
  685. .article h1 {
  686. font-size: 1.5rem;
  687. }
  688. .hero h1 {
  689. font-size: 1.7rem;
  690. }
  691. .site-title {
  692. font-size: 1.4rem;
  693. padding-right: 56px;
  694. }
  695. .site-logo {
  696. width: 40px;
  697. height: 40px;
  698. }
  699. .site-tagline {
  700. font-size: 0.88rem;
  701. }
  702. .three-up {
  703. grid-template-columns: 1fr;
  704. }
  705. .post-item {
  706. padding: 18px 16px 18px 18px;
  707. }
  708. }
  709. /* 搜索框样式 */
  710. .search-box {
  711. margin: 24px 0;
  712. }
  713. #search-input {
  714. width: 100%;
  715. padding: 14px 18px;
  716. font-size: 1rem;
  717. border: 1px solid var(--border);
  718. border-radius: 10px;
  719. background: var(--panel);
  720. color: var(--text);
  721. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  722. transition: border-color 0.2s ease, box-shadow 0.2s ease;
  723. outline: none;
  724. box-shadow: var(--shadow-soft);
  725. }
  726. #search-input:focus {
  727. border-color: var(--accent);
  728. box-shadow: 0 0 0 3px rgba(92, 117, 96, 0.15);
  729. }
  730. #search-input::placeholder {
  731. color: var(--muted);
  732. }
  733. .search-results {
  734. margin-top: 16px;
  735. max-height: 60vh;
  736. overflow-y: auto;
  737. }
  738. .search-result-item {
  739. background: var(--panel);
  740. border: 1px solid var(--border);
  741. border-radius: 10px;
  742. padding: 16px;
  743. margin-bottom: 12px;
  744. transition: border-color 0.2s ease, box-shadow 0.2s ease;
  745. }
  746. .search-result-item:hover {
  747. border-color: rgba(92, 117, 96, 0.2);
  748. box-shadow: var(--shadow);
  749. }
  750. .search-result-item h3 {
  751. margin: 0 0 8px;
  752. font-family: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif CN", serif;
  753. font-size: 1.2rem;
  754. font-weight: 600;
  755. color: var(--text);
  756. }
  757. .search-result-item h3 a {
  758. color: inherit;
  759. text-decoration: none;
  760. transition: color 0.2s ease;
  761. }
  762. .search-result-item h3 a:hover {
  763. color: var(--accent);
  764. }
  765. .search-result-item .meta {
  766. margin: 0 0 8px;
  767. color: var(--muted);
  768. font-size: 0.85rem;
  769. }
  770. .search-result-item .preview {
  771. margin: 0 0 10px;
  772. color: var(--text);
  773. font-size: 0.95rem;
  774. line-height: 1.7;
  775. }
  776. .search-result-item .tags {
  777. display: flex;
  778. gap: 6px;
  779. flex-wrap: wrap;
  780. }
  781. .tag {
  782. display: inline-block;
  783. padding: 2px 8px;
  784. font-size: 0.8rem;
  785. background: var(--accent-light);
  786. color: var(--accent);
  787. border-radius: 4px;
  788. text-decoration: none;
  789. }
  790. .tag:hover {
  791. background: var(--accent);
  792. color: white;
  793. }
  794. .no-results {
  795. color: var(--muted);
  796. text-align: center;
  797. padding: 20px;
  798. }