site.css 5.0 KB

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