site.css 4.9 KB

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