site.css 5.1 KB

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