/* CSS Variables - Following ashwch.com design system */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #10b981;
  --accent-color: #8b5cf6;
  --text-color: #1f2937;
  --text-light: #4b5563;
  --background-color: #ffffff;
  --background-alt: #f9fafb;
  --border-color: #e5e7eb;
  --code-bg: #f3f4f6;
  --header-bg: rgba(255, 255, 255, 0.9);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --widget-bg: rgba(0, 0, 0, 0.85);
  --widget-border: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] {
  --primary-color: #60a5fa;
  --primary-dark: #3b82f6;
  --secondary-color: #34d399;
  --accent-color: #a78bfa;
  --text-color: #f3f4f6;
  --text-light: #d1d5db;
  --background-color: #111827;
  --background-alt: #1f2937;
  --border-color: #374151;
  --code-bg: #1f2937;
  --header-bg: rgba(17, 24, 39, 0.9);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.author-link {
  color: var(--primary-color);
  font-weight: 600;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: var(--background-alt);
}

[data-theme="light"] .moon { display: none; }
[data-theme="dark"] .sun { display: none; }

/* Main content */
.page-content {
  min-height: calc(100vh - 160px);
}

/* Hero section */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--background-alt) 0%, var(--background-color) 100%);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background-color: var(--background-alt);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

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

/* Features grid */
.features {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--background-alt);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Screenshot showcase */
.screenshot-section {
  padding: 4rem 0;
  background-color: var(--background-alt);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.screenshot-item {
  background-color: var(--background-color);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.screenshot-item:hover {
  transform: scale(1.05);
  box-shadow: var(--card-shadow);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-item h4 {
  padding: 1rem;
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

/* Widget preview */
.widget-preview {
  background-color: var(--widget-bg);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--widget-border);
  color: white;
  display: inline-block;
  margin: 1rem 0;
}

/* Footer */
.site-footer {
  background-color: var(--background-alt);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-simple {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

.footer-simple a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-simple a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Code blocks */
code {
  background-color: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .subtitle {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}