site.css 4.5 KB

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