/* DeckJourney Blog - Clean minimal styles */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --color-primary: #6c47ff;
  --color-primary-hover: #5a38e0;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-subtle: #f9fafb;
  --color-border: #e5e7eb;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --max-width: 720px;
  --spacing-page: 1.5rem;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem var(--spacing-page);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}
.nav-brand:hover { color: var(--color-primary); }

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--color-text); }

.nav-link-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
}
.nav-link-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

/* Main content */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--spacing-page);
  min-height: calc(100vh - 130px);
}

/* Homepage post list */
.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-list-item {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2rem;
}
.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.post-list-item h2 a {
  color: var(--color-text);
  text-decoration: none;
}
.post-list-item h2 a:hover { color: var(--color-primary); }

.post-list-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.post-list-excerpt {
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.65;
}

.read-more {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.read-more:hover { text-decoration: underline; }

.no-posts {
  color: var(--color-text-muted);
  text-align: center;
  padding: 3rem 0;
}

/* Post page */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.post-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.post-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.post-description {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.post-cover-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1.5rem;
}

/* Post content */
.post-content {
  line-height: 1.75;
  font-size: 1.0625rem;
}

.post-content h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.post-content h3 { font-size: 1.25rem; margin-top: 2rem; }
.post-content p { margin: 1.25rem 0; }
.post-content a { color: var(--color-primary); }
.post-content a:hover { text-decoration: underline; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin: 1.25rem 0; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  border-radius: 0 6px 6px 0;
}
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-subtle);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--color-border);
}
.post-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.6;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.back-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--color-text); }

.post-cta {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  font-size: 0.9rem;
}
.post-cta p { margin: 0; }
.post-cta a { color: var(--color-primary); font-weight: 500; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  margin-top: 3rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem var(--spacing-page);
  text-align: center;
}

.footer-brand {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.footer-brand a {
  color: var(--color-text);
  text-decoration: none;
}
.footer-brand a:hover { color: var(--color-primary); }

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}
.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--color-text); }

/* Responsive */
@media (max-width: 600px) {
  .post-title { font-size: 1.75rem; }
  .page-title { font-size: 1.5rem; }
  .nav-link-primary { display: none; }
}
