/* Huizi's Blog - Main Stylesheet */

:root {
  --text: #1a1a1a;
  --text-light: #6b7280;
  --bg: #ffffff;
  --border: #e5e7eb;
  --link: #1a1a1a;
  --max-width: 65ch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Georgia", "Times New Roman", "Noto Serif SC", "Source Han Serif SC", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* Header */
.site-header {
  text-align: center;
  margin-bottom: 3rem;
}

.site-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.site-title:hover {
  border-bottom-color: var(--text);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-nav a {
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

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

/* Prose content */
.prose h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose a {
  color: var(--text);
  text-underline-offset: 3px;
}

.prose a:hover {
  opacity: 0.7;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li > ul, .prose li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.prose strong {
  font-weight: 700;
}

.prose blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-light);
  font-style: italic;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Blog list */
.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.blog-list li:last-child {
  border-bottom: none;
}

.blog-list a {
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.blog-list a:hover {
  border-bottom-color: var(--text);
}

.blog-list .post-date {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-left: 0.75rem;
}

/* Project cards */
.project-card {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.project-card:last-child {
  border-bottom: none;
}

.project-card h3 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  text-align: center;
  padding-top: 3rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Back link */
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Article page */
.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.article-date {
  font-size: 0.95rem;
  color: var(--text-light);
}

.article-body {
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 2rem 1.25rem 3rem;
  }

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

  .site-nav {
    gap: 1.5rem;
  }

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

  .prose h1, .article-title {
    font-size: 1.75rem;
  }

  .prose h2 {
    font-size: 1.3rem;
  }
}

/* Subtle fade-in */
.prose {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
