/* CHAZIF - Static HTML Theme */
/* Fonts: Space Grotesk (headings) + Inter (body) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* CSS Variables */
:root {
  --color-background: #ffffff;
  --color-foreground: #1a1a1a;
  --color-accent: #CFFF04;
  --color-accent-hover: #b8e600;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-surface: #f9fafb;
}

.dark {
  --color-background: #0a0a0a;
  --color-foreground: #e5e5e5;
  --color-accent: #CFFF04;
  --color-accent-hover: #b8e600;
  --color-muted: #9ca3af;
  --color-border: #2a2a2a;
  --color-surface: #141414;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
  transition: background-color 0.2s, color 0.2s;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Container */
.container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background-color: rgba(var(--color-background), 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dark .header {
  background-color: rgba(10, 10, 10, 0.8);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 768px;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-foreground);
  letter-spacing: -0.02em;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.nav-link:hover {
  color: var(--color-foreground);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-icon:hover {
  color: var(--color-foreground);
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

/* Main Content */
.main {
  max-width: 768px;
  margin: 0 auto;
  padding: 40px 24px;
}

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

.section-bordered {
  border-bottom: 1px solid var(--color-border);
}

/* Typography */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.page-title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 24px;
}

/* Text sizes */
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75;
}

.text-base {
  font-size: 1rem;
  line-height: 1.75;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

/* Colors */
.text-muted {
  color: var(--color-muted);
}

.text-accent {
  color: var(--color-accent);
}

/* Hero */
.hero {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-size: 2.25rem;
  line-height: 1.1;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 640px;
}

/* Forms */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 512px;
}

@media (min-width: 640px) {
  .form-row {
    flex-direction: row;
  }
}

.input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.875rem;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
  outline: none;
  transition: border-color 0.15s;
}

.input::placeholder {
  color: var(--color-muted);
}

.input:focus {
  border-color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-accent);
  color: var(--color-foreground);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
  white-space: nowrap;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Success Message */
.success-message {
  padding: 16px 0;
}

.success-message h3 {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.success-message p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Error Message */
.error-message {
  font-size: 0.875rem;
  color: #ef4444;
  margin-top: 12px;
}

/* Curriculum Timeline */
.timeline {
  margin-top: 40px;
}

.phase {
  margin-bottom: 48px;
}

.phase-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.timeline-list {
  border-left: 2px solid var(--color-border);
  margin-left: 16px;
  padding-left: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border);
}

.timeline-item.published::before {
  background-color: var(--color-accent);
}

.timeline-item a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
  color: var(--color-foreground);
}

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

.timeline-item a:hover .post-number {
  color: var(--color-accent);
}

.post-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent);
  min-width: 28px;
}

.timeline-item.locked .post-number {
  color: var(--color-foreground);
  opacity: 0.5;
}

.timeline-item.locked {
  color: var(--color-muted);
}

.timeline-item.locked .post-title {
  opacity: 0.7;
}

.lock-icon {
  display: inline-flex;
  margin-left: 8px;
  opacity: 0.4;
}

/* Dumpster Fires Grid */
.fires-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .fires-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.fire-card {
  border: 1px solid var(--color-border);
  padding: 24px;
}

.fire-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.fire-card p {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* Author Section */
.author-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 640px) {
  .author-section {
    flex-direction: row;
    align-items: flex-start;
  }
}

.author-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-muted);
}

.author-content h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.author-content p {
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-accent);
  color: var(--color-foreground);
  padding: 2px 8px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.category-badge:hover {
  background-color: var(--color-accent-hover);
}

/* Post Card */
.post-card {
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}

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

.post-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.post-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-card h2 a {
  color: var(--color-foreground);
  text-decoration: none;
}

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

.post-card p {
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-date {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Article Styles */
.article-header {
  margin-bottom: 40px;
}

.article-header .post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .article-title {
    font-size: 2.5rem;
  }
}

/* Table of Contents */
.toc {
  margin-bottom: 40px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.toc h2 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 6px;
}

.toc li.level-3 {
  padding-left: 16px;
}

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

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

/* Article Content */
.article-content {
  font-size: 1.125rem;
  line-height: 1.75;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 20px;
  color: var(--color-foreground);
}

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

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

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

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

.article-content strong {
  font-weight: 600;
}

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

.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background-color: var(--color-surface);
  padding: 2px 6px;
  border-radius: 4px;
}

.dark .article-content code {
  background-color: var(--color-dark-surface);
}

.article-content pre {
  background-color: #1a1a1a;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

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

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.tag {
  font-size: 0.75rem;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  padding: 4px 8px;
}

/* Email CTA */
.email-cta {
  margin-top: 48px;
  padding: 32px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.dark .email-cta {
  background-color: var(--color-dark-surface);
}

.email-cta h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.email-cta p {
  color: var(--color-muted);
  margin-bottom: 16px;
}

/* Post Navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.post-nav-link {
  display: block;
  max-width: 45%;
  text-decoration: none;
}

.post-nav-link.prev {
  text-align: left;
}

.post-nav-link.next {
  text-align: right;
  margin-left: auto;
}

.post-nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.post-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-foreground);
}

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

/* Comments Section */
.comments {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.comments h2 {
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.comments-placeholder {
  padding: 48px;
  background-color: var(--color-surface);
  border: 1px dashed var(--color-border);
  text-align: center;
  color: var(--color-muted);
}

.dark .comments-placeholder {
  background-color: var(--color-dark-surface);
}

/* Search */
.search-input {
  width: 100%;
  padding: 16px;
  font-size: 1.125rem;
  font-family: 'Space Grotesk', sans-serif;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-foreground);
  outline: none;
  transition: border-color 0.15s;
}

.search-input::placeholder {
  color: var(--color-muted);
}

.search-input:focus {
  border-color: var(--color-accent);
}

.search-results {
  margin-top: 32px;
}

.search-result {
  margin-bottom: 24px;
}

.search-result h3 {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.search-result h3 a {
  color: var(--color-foreground);
  text-decoration: none;
}

.search-result h3 a:hover {
  color: var(--color-accent);
}

.search-result p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.no-results {
  color: var(--color-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  margin-top: 80px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 24px;
  max-width: 768px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
  }
}

.footer p {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* Prose content (for About page) */
.prose {
  max-width: none;
}

.prose p {
  margin-bottom: 20px;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}

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

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

/* Utilities */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.max-w-2xl {
  max-width: 640px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-foreground);
}
