/* === Notion-inspired minimal style === */

:root {
  --bg: #ffffff;
  --bg-card: #f7f6f3;
  --bg-hover: #efedea;
  --text: #37352f;
  --text-light: #9ca3af;
  --text-muted: #6b7280;
  --border: #e3e2e0;
  --accent: #2eaadc;
  --accent-hover: #1a8bc1;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --max-content: 720px;
  --max-wide: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header & Nav === */
.site-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: var(--text);
}

.site-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Mobile nav */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.card:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.card-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.6;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  background: #ede9e3;
  color: var(--text-muted);
}

/* === Article list === */
.article-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}

.article-item:hover {
  opacity: 0.7;
}

.article-item-date {
  flex-shrink: 0;
  width: 90px;
  font-size: 0.82rem;
  color: var(--text-light);
  padding-top: 2px;
}

.article-item-body {
  flex: 1;
  min-width: 0;
}

.article-item-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.article-item-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.article-item-tags {
  margin-top: 8px;
}

.type-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 500;
}

.type-long {
  background: #dbeafe;
  color: #1e40af;
}

.type-short {
  background: #dcfce7;
  color: #166534;
}

/* === Article detail === */
.article-header {
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.article-content p {
  margin: 0 0 1.2em;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
  letter-spacing: -0.2px;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5em 0 0.5em;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.6em;
}

.article-content li {
  margin-bottom: 0.3em;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1em;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  font-style: italic;
}

.article-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 2px 5px;
  border-radius: 3px;
}

.article-content pre {
  background: #f5f5f5;
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1em 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--text);
}

/* === Card Wall === */
.card-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.quote-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  transition: transform 0.15s;
}

.quote-card:hover {
  transform: translateY(-2px);
}

.quote-card .quote-text {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 12px;
  font-style: italic;
}

.quote-card .quote-source {
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: right;
}

.quote-card.blue { border-left-color: #2eaadc; }
.quote-card.green { border-left-color: #10b981; }
.quote-card.yellow { border-left-color: #f59e0b; }
.quote-card.red { border-left-color: #ef4444; }
.quote-card.purple { border-left-color: #8b5cf6; }

/* === Timeline (AI Life) === */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.timeline-content {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.timeline-mood {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* === Home Feed === */
.feed-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin: 32px 0 16px;
  font-weight: 600;
}

/* === Footer === */
.site-footer {
  margin-top: 80px;
  padding: 24px 0 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* === Responsive === */
@media (max-width: 640px) {
  .site-header {
    padding: 24px 0 20px;
    margin-bottom: 24px;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .nav.open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: block;
    position: absolute;
    top: 28px;
    right: 24px;
  }

  .article-item {
    flex-direction: column;
    gap: 6px;
  }

  .article-item-date {
    width: auto;
    font-size: 0.78rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .article-content {
    font-size: 1.2rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.3rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-summary {
    font-size: 1.05rem;
  }

  .timeline-content {
    font-size: 1.1rem;
  }

  .timeline-title {
    font-size: 1.2rem;
  }

  .site-desc {
    font-size: 1.05rem;
  }

  .nav a {
    font-size: 1.05rem;
  }

  .card-wall {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 16px;
  }

  .timeline-item::before {
    left: -20px;
    width: 8px;
    height: 8px;
  }
}

/* === Empty state === */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* === Loading === */
.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-light);
}
