site.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @font-face {
  2. font-family: "Dancing Script";
  3. src: url("../fonts/DancingScript-Regular.woff2") format("woff2"),
  4. url("../fonts/DancingScript-Regular.woff") format("woff");
  5. font-weight: normal;
  6. font-style: normal;
  7. font-display: swap;
  8. }
  9. @font-face {
  10. font-family: "Pacifico";
  11. src: url("../fonts/Pacifico-Regular.woff2") format("woff2");
  12. font-weight: normal;
  13. font-style: normal;
  14. font-display: swap;
  15. }
  16. :root {
  17. /* 莫兰迪低饱和亮色主题 */
  18. --bg: #faf8f5;
  19. --panel: #ffffff;
  20. --panel-soft: #f5f3f0;
  21. --text: #2d2a26;
  22. --muted: #6b665e;
  23. --accent: #9c7c75;
  24. --accent-2: #7a8b9c;
  25. --border: rgba(45,42,38,0.08);
  26. --pink-soft: #f7f1f2;
  27. --cream-soft: #fef9f3;
  28. }
  29. * { box-sizing: border-box; }
  30. body {
  31. margin: 0;
  32. background: var(--bg);
  33. color: var(--text);
  34. font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  35. line-height: 1.8;
  36. font-size: 16px;
  37. letter-spacing: 0.01em;
  38. }
  39. a { color: var(--accent); text-decoration: none; }
  40. a:hover { text-decoration: underline; }
  41. .wrap { width: min(960px, calc(100% - 32px)); margin: 0 auto; }
  42. .site-header { position: sticky; top: 0; backdrop-filter: blur(8px); background: rgba(255,255,255,0.85); border-bottom: 1px solid var(--border); }
  43. .header-inner { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; align-items: center; }
  44. .site-title {
  45. display: flex;
  46. align-items: center;
  47. gap: 12px;
  48. font-family: "Pacifico", "Dancing Script", cursive;
  49. font-size: 1.8rem;
  50. font-weight: 500;
  51. color: var(--text);
  52. letter-spacing: 0.02em;
  53. text-shadow: 2px 2px 4px rgba(156, 124, 117, 0.15);
  54. }
  55. .site-title a {
  56. display: flex;
  57. align-items: center;
  58. gap: 12px;
  59. text-decoration: none;
  60. }
  61. .site-title a:hover {
  62. color: var(--accent);
  63. text-shadow: 2px 2px 6px rgba(156, 124, 117, 0.25);
  64. }
  65. .site-logo {
  66. width: 64px;
  67. height: 64px;
  68. border-radius: 50%;
  69. object-fit: cover;
  70. }
  71. .site-tagline { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
  72. .site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
  73. .site-nav a { color: var(--text); font-weight: 500; }
  74. main.wrap { padding: 32px 0 48px; }
  75. .card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 4px 16px rgba(45,42,38,0.04); }
  76. .hero { padding: 28px 24px; margin-bottom: 24px; background: linear-gradient(135deg, var(--pink-soft-2) 0%, var(--green-soft) 100%); border: 1px solid var(--border); }
  77. .hero h1 {
  78. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  79. font-size: 1.8rem;
  80. font-weight: 700;
  81. margin: 0 0 8px;
  82. }
  83. .eyebrow { display: inline-block; margin-bottom: 8px; color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
  84. .grid { display: grid; gap: 16px; margin-bottom: 24px; }
  85. .three-up { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  86. .section-card h2, .post-item h2, .post-item h3 {
  87. margin-top: 0;
  88. color: var(--text);
  89. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  90. font-weight: 600;
  91. }
  92. .section-card h2 { font-size: 1.2rem; }
  93. .post-item h2 { font-size: 1.15rem; }
  94. .post-item h3 { font-size: 1.05rem; }
  95. .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
  96. .section-head h2 {
  97. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  98. font-size: 1.2rem;
  99. font-weight: 600;
  100. margin: 0;
  101. }
  102. .post-list { display: grid; gap: 16px; }
  103. .meta { color: var(--muted); font-size: 0.9rem; }
  104. .article h1 {
  105. margin-bottom: 12px;
  106. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  107. font-size: 1.8rem;
  108. letter-spacing: -0.03em;
  109. font-weight: 700;
  110. }
  111. .article h2, .article h3, .article h4, .article h5, .article h6 {
  112. font-family: "Noto Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", serif;
  113. font-weight: 600;
  114. margin-top: 1.5em;
  115. }
  116. .article h2 { font-size: 1.4rem; }
  117. .article h3 { font-size: 1.2rem; }
  118. .prose :first-child { margin-top: 0; }
  119. .prose img { max-width: 100%; height: auto; border-radius: 8px; }
  120. .prose blockquote { margin: 1.2rem 0; padding: 1rem 1.2rem; background: var(--panel-soft); border-left: 3px solid var(--accent); border-radius: 8px; color: var(--text); }
  121. .prose code { background: var(--panel-soft); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.9em; }
  122. .prose pre { background: var(--panel-soft); padding: 16px; border-radius: 10px; overflow-x: auto; border: 1px solid var(--border); }
  123. .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  124. .tag { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: var(--panel-soft); color: var(--text); font-size: 0.85rem; border: 1px solid var(--border); font-weight: 500; }
  125. .site-footer { padding: 0 0 48px; color: var(--muted); font-size: 0.9rem; }
  126. @media (max-width: 720px) {
  127. .header-inner, .section-head { flex-direction: column; align-items: flex-start; }
  128. .card, .hero { padding: 20px; }
  129. .article h1 { font-size: 1.5rem; }
  130. }