/* OpenClaw-inspired Minimal Theme */

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111116;
  --bg-tertiary: #1a1a22;
  
  --text: #ffffff;
  --text-secondary: #888899;
  --text-muted: #555566;
  
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #22222e;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --max-width: 900px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.3rem;
}

.nav-toggle {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-tertiary);
}

/* Main Content */
.main-content {
  padding-top: var(--nav-height);
}

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

/* Hero Section */
.hero {
  padding: 80px 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: white;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
  color: var(--text);
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-category {
  color: var(--accent);
  font-weight: 500;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  gap: 24px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.project-category {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
}

.project-tech {
  display: flex;
  gap: 6px;
}

.tech-tag {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Page Header */
.page-header {
  padding: 60px 0 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
}

/* Article Page */
.article-page {
  padding: 40px 0 80px;
}

.article-container {
  max-width: 720px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 40px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-category {
  color: var(--accent);
  font-weight: 500;
}

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.article-tag {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 40px 0 16px;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.article-content pre {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

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

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

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

.article-content a:hover {
  text-decoration: underline;
}

.article-content ul,
.article-content ol {
  margin: 20px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

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

/* Article Footer */
.article-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.article-admin {
  margin-top: 20px;
}

/* Related Posts */
.section-related {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.related-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 24px;
}

/* Footer */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 24px;
}

.admin-login {
  color: var(--text-muted);
}

.admin-login:hover {
  color: var(--text-secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
}

/* Code Block */
pre {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .footer-links {
    flex-wrap: wrap;
  }
}
