/* 文心设计规范 · 片语 Timeline 页
   暖纸基底 + 朱砂印 + 衬线阅读 + 物哀时间 */

:root {
  --bg-warm: #F1ECE4;
  --bg-pure: #FAF9F5;
  --bg-subtle: #EBE6DC;
  --text-primary: #3A3837;
  --text-secondary: #7D7974;
  --text-muted: #B8B3AC;
  --text-heading: #2C2B29;
  --color-accent: #8B3525;
  --color-accent-hover: #A84030;
  --color-accent-subtle: #F6F0EE;
  --color-border-subtle: #DFD9CE;
  --color-border-strong: #D3CBBF;
  --width-article: clamp(320px, 72vw, 840px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-warm);
  color: var(--text-primary);
  font-family: "Lora", "EB Garamond", "Noto Serif SC", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 纸张噪点 */
.paper {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.024;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--width-article);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem;
}

/* Header */
.site-header { margin-bottom: 3.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; color: inherit; text-decoration: none; }
.brand-mark { width: 34px; height: 36px; flex-shrink: 0; }
.brand h1 {
  font-family: "Lora", "Noto Serif SC", serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-heading);
  letter-spacing: -.01em;
}
.signature {
  display: flex; align-items: center; gap: .4rem;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: .75rem;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}
.seal {
  color: var(--color-accent);
  font-size: .55rem;
  font-weight: 700;
  animation: breathe 4s ease-in-out infinite;
}
.dot-sep { color: var(--text-muted); }
.signature-tag { letter-spacing: .08em; font-size: .7rem; }
.bio {
  font-family: "Lora", "Noto Serif SC", serif;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 36rem;
}
.rule {
  width: 100%; height: 1px;
  background: var(--color-border-subtle);
  margin-top: 2rem;
}

@keyframes breathe { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* Timeline */
.timeline { display: block; }

.memo { padding: 0; }

.meta {
  display: flex; align-items: baseline; gap: .75rem;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: .7rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.time-organic {
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: .04em;
}
.time-absolute { color: var(--text-muted); font-size: .65rem; }

.content {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
}
.content p { margin: 0 0 1.1em; text-align: justify; }
.content h1, .content h2, .content h3 {
  font-family: "Lora", "Noto Serif SC", serif;
  color: var(--text-heading);
  margin: 1.8em 0 .6em;
  letter-spacing: -.01em;
}
.content h3 { font-size: 1.15rem; }
.content h2 { font-size: 1.35rem; }
.content h1 { font-size: 1.6rem; }
.content strong { color: var(--text-heading); font-weight: 700; }
.content em { font-style: italic; }
.content a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
}
.content a:hover { border-bottom-color: var(--color-accent); }
.content code {
  font-family: "JetBrains Mono", monospace;
  font-size: .82em;
  background: var(--bg-subtle);
  padding: .12em .4em;
  border-radius: 2px;
  color: var(--color-accent);
}
.content pre {
  font-family: "JetBrains Mono", monospace;
  font-size: .78rem;
  background: var(--bg-subtle);
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--color-border-strong);
  border-radius: 2px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 1.2em 0;
}
.content pre code { background: none; padding: 0; color: inherit; }
.content blockquote {
  margin: 1.2em 0;
  padding: .25em 0 .25em 1rem;
  border-left: 2px solid var(--color-accent);
  font-style: italic;
  color: var(--text-secondary);
}
.content ul, .content ol { padding-left: 1.2em; margin: 1em 0; }
.content li { margin: .35em 0; }
.content img { max-width: 100%; border-radius: 2px; }

/* Gallery */
.gallery {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
  width: 100%;
}
.gallery.g1 { grid-template-columns: 1fr; max-width: 32rem; aspect-ratio: 16/10; }
.gallery.g2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2/1; }
.gallery.g3 { grid-template-columns: repeat(3, 1fr); aspect-ratio: 3/1; }
.gallery.g4 { grid-template-columns: 1fr 1fr; aspect-ratio: 1/1; max-width: 66%; }
.gallery.g5, .gallery.g6, .gallery.g7, .gallery.g8, .gallery.g9 {
  grid-template-columns: repeat(3, 1fr);
  aspect-ratio: 1/1;
  max-width: 83%;
}
.grid-cell {
  border: 1px solid var(--color-border-subtle);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-subtle);
}
.grid-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Divider */
.divider {
  display: flex; justify-content: center; align-items: center; gap: .75rem;
  padding: 3.5rem 0;
}
.divider > span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-border-strong); opacity: .22;
}
.divider .dot.accent {
  background: var(--color-accent); opacity: .25;
  transform: rotate(45deg);
  width: 4px; height: 4px;
}

/* Pager */
.pager {
  margin-top: 4rem;
  text-align: center;
  font-family: "Inter", "Noto Sans SC", sans-serif;
}
.load-more {
  display: inline-block;
  padding: .65rem 1.5rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .04em;
  transition: all .25s ease;
}
.load-more:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.end-mark {
  color: var(--text-muted);
  font-size: .8rem;
  letter-spacing: .12em;
  font-family: "Lora", "Noto Serif SC", serif;
}
.empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 4rem 0;
}

/* Footer */
.site-footer {
  margin-top: 8rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
  font-family: "Inter", "Noto Sans SC", sans-serif;
  font-size: .7rem;
  color: var(--text-secondary);
}
.site-footer .powered {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .6rem;
  margin-top: .5rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-warm: #161413;
    --bg-pure: #1C1A19;
    --bg-subtle: #22201E;
    --text-primary: #DCD7CD;
    --text-secondary: #8A857D;
    --text-muted: #534F4A;
    --text-heading: #EBE6DD;
    --color-accent: #C4533E;
    --color-accent-hover: #D9614A;
    --color-accent-subtle: #2B1815;
    --color-border-subtle: #282522;
    --color-border-strong: #33302C;
  }
  .paper { opacity: .012; mix-blend-mode: screen; }
}

@media (max-width: 640px) {
  .page { padding: 2rem 1.25rem 4rem; }
  .gallery.g4, .gallery.g5, .gallery.g6, .gallery.g7, .gallery.g8, .gallery.g9 {
    max-width: 100%;
  }
}
