:root {
  --bg: #0c0c0c;
  --fg: #c8c8c8;
  --fg-dim: #707070;
  --fg-bright: #e8e8e8;
  --accent: #7aa2f7;
  --accent-dim: #555;
  --border: #1a1a1a;
  --mono: 'Cascadia Code', 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --sans: system-ui, -apple-system, sans-serif;
  --content-width: 65ch;
}

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

html { font-size: 16px; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
nav {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  display: flex;
  gap: 1.5rem;
}

/* Main content */
main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Footer */
footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  display: flex;
  justify-content: space-between;
}

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

/* Landing page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80vh;
  font-family: var(--mono);
  gap: 1rem;
}

.landing h1 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg-bright);
  letter-spacing: 0.02em;
}

.landing .tagline {
  font-size: 0.82rem;
  color: var(--fg-dim);
  max-width: 380px;
  line-height: 1.6;
}

.landing .divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 0.6rem 0;
}

.landing .links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.landing .links .row {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.landing .links .project-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.landing .links .src {
  color: var(--accent-dim);
  font-size: 0.7rem;
}

/* Garden index */
.garden-list { list-style: none; }

.garden-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.garden-item:last-child { border-bottom: none; }

.garden-item h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.garden-item h2 a { color: var(--fg-bright); }
.garden-item h2 a:hover { color: var(--accent); }

.garden-item .meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.garden-item .description {
  font-size: 0.9rem;
  color: var(--fg);
}

.stage {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  background: var(--border);
  color: var(--fg-dim);
}

.stage-seedling { color: #a6e3a1; }
.stage-budding { color: #f9e2af; }
.stage-evergreen { color: #89b4fa; }

.topic-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent-dim);
  cursor: pointer;
}

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

/* Filters */
.garden-filters {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.filter-btn:hover { border-color: var(--accent-dim); color: var(--fg); }
.filter-btn.active { border-color: var(--accent); color: var(--accent); }

/* Post single */
.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin-bottom: 0.5rem;
}

.post-header .meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--fg-dim);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-content h2 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin: 2rem 0 0.8rem;
}

.post-content h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-bright);
  margin: 1.5rem 0 0.6rem;
}

.post-content p { margin-bottom: 1rem; }

.post-content ul, .post-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.post-content li { margin-bottom: 0.3rem; }

.post-content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #1a1a2e;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.post-content pre {
  background: #1a1a2e;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.5;
}

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

.post-content blockquote {
  border-left: 2px solid var(--accent-dim);
  padding-left: 1rem;
  color: var(--fg-dim);
  margin-bottom: 1rem;
}

.post-content a { text-decoration: underline; text-underline-offset: 2px; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.post-content th, .post-content td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left;
}

.post-content th {
  background: #1a1a2e;
  color: var(--fg-bright);
  font-weight: 500;
}

.post-content strong { color: var(--fg-bright); }

/* Projects */
.project-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .project-cards { grid-template-columns: 1fr; }
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem;
}

.project-card h2 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--fg-dim);
  margin-bottom: 0.8rem;
}

.project-card .project-links {
  font-family: var(--mono);
  font-size: 0.8rem;
  display: flex;
  gap: 1rem;
}
