site.css 4.8 KB

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