/* Claude-Style Minimalistic Blog */

:root {
  /* Claude's warm color palette */
  --bg-primary: #FAF9F6;
  --bg-secondary: #F5F4F0;
  --text-primary: #2D2D2D;
  --text-secondary: #6B6B6B;
  --text-tertiary: #9B9B9B;
  --accent: #DA7756;
  --accent-hover: #C96A4B;
  --border: #E8E6E1;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Layout */
  --max-width: 680px;
  --border-radius: 8px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Header */
header {
  padding: var(--space-xl) 0 var(--space-lg);
}

.site-title {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.site-title:hover {
  color: var(--accent);
}

/* Social links */
.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-links a {
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

/* Navigation */
nav {
  margin-top: var(--space-sm);
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-right: var(--space-md);
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent);
}

/* Main content */
main {
  padding-bottom: var(--space-xl);
}

/* Article list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.article-link {
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  padding: var(--space-xs) 0;
  transition: color 0.2s ease;
}

.article-link::after {
  content: ' →';
  opacity: 0;
  transition: opacity 0.2s ease;
}

.article-link:hover {
  color: var(--accent);
}

.article-link:hover::after {
  opacity: 1;
}

/* Article page */
.article-header {
  margin-bottom: var(--space-lg);
}

.article-header .article-title {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.article-content {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.article-content h1 { font-size: 1.75rem; }
.article-content h2 { font-size: 1.35rem; }
.article-content h3 { font-size: 1.15rem; }

.article-content p {
  margin-bottom: var(--space-md);
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--accent-hover);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: var(--space-md) 0;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-md);
  margin: var(--space-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content code {
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
  background: var(--bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.article-content pre {
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: var(--space-md) 0;
}

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

.article-content ul,
.article-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.article-content li {
  margin-bottom: var(--space-xs);
}

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

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

.back-link::before {
  content: '←';
  margin-right: var(--space-xs);
}

/* Footer */
footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}

footer p {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* Loading state */
.loading {
  color: var(--text-tertiary);
  font-style: italic;
}

/* Code syntax highlighting overrides */
.article-content pre[class*="language-"] {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  font-size: 0.9rem;
}

.article-content code[class*="language-"] {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* KaTeX math styling */
.katex-display {
  margin: var(--space-md) 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Mermaid diagrams */
.mermaid {
  margin: var(--space-md) 0;
  text-align: center;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

/* Responsive */
@media (max-width: 600px) {
  :root {
    --space-xl: 2.5rem;
  }

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

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