:root {
  --max: 1100px;
  --green: #1E6A24;
  --yellow: #FED700;
  --dark: #333;
  --light-bg: #f5f5f5;
  --border: #ddd;
}

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

body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--dark);
  background: #fff;
}

main {
  max-width: var(--max);
  padding: 24px 18px 60px;
  margin: 0 auto;
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: 28px; margin: 0 0 16px; }

h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 28px 0 10px;
  font-weight: 700;
}

a { color: inherit; }
a:hover { text-decoration: none; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--green);
  letter-spacing: -0.01em;
}

.site-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #888;
  margin-left: 8px;
}

@media (max-width: 700px) {
  .site-sub {
    margin-left: 0;
  }
}

.site-title { text-decoration: none; }

@media (max-width: 700px) {
  .site-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.new-note-btn {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 6px 14px;
  border: 2px solid var(--green);
  color: var(--green);
}

.new-note-btn:hover {
  background: var(--green);
  color: #fff;
}

nav a {
  margin-left: 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
}

nav a:hover { text-decoration: underline; }

/* Search */
.search-section { margin-bottom: 20px; }

.search-bar {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 2px solid var(--dark);
  background: #fff;
  font-family: inherit;
  outline: none;
}

.search-bar:focus {
  border-color: var(--green);
}

/* Filters */
.filter-section { margin-bottom: 10px; }
.filter-group { margin-bottom: 6px; }

.filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #888;
  margin-right: 8px;
}

.filter-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  margin: 2px 4px 2px 0;
  font-family: inherit;
}

.filter-chip:hover { background: var(--light-bg); }

.filter-chip.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* Notes count */
.notes-count {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}

/* Notes grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
}

/* Note card */
.note-card {
  border-left: 3px solid var(--green);
  padding: 16px 18px;
  background: var(--light-bg);
  transition: background 0.1s;
}

.note-card:hover { background: #ebebeb; }

/* Long notes span full width and get multi-column body */
.note-card--long {
  grid-column: 1 / -1;
}

.note-card--long .note-card-body {
  column-count: 2;
  column-gap: 28px;
}

@media (max-width: 700px) {
  .note-card--long .note-card-body {
    column-count: 1;
  }
}

.note-card-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

.note-card-meta time { margin-right: 10px; }

.note-project {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}

.note-project:hover { text-decoration: underline; }

.note-card-body {
  font-size: 15px;
  line-height: 1.55;
}

.note-card-body p:first-child { margin-top: 0; }
.note-card-body p:last-child { margin-bottom: 0; }

.note-card-body img { max-width: 100%; }

.note-card-body pre {
  background: #e8e8e8;
  padding: 10px;
  overflow-x: auto;
  font-size: 13px;
}

.note-card-body code {
  font-size: 13px;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

.note-card-body p code {
  background: #e8e8e8;
  padding: 1px 4px;
}

.note-card-tags { margin-top: 10px; }

/* Tag chips */
.tag-chip {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  margin: 2px 4px 2px 0;
  color: var(--dark);
}

.tag-chip:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

/* Single note page */
.note-header {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

.note-tags { margin-bottom: 24px; }

.note-body {
  line-height: 1.65;
  margin-top: 24px;
}

.note-body img { max-width: 100%; }

.note-body pre {
  background: var(--light-bg);
  padding: 14px;
  overflow-x: auto;
  border-left: 3px solid var(--border);
}

.note-body code {
  font-size: 14px;
  font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

.note-body p code {
  background: var(--light-bg);
  padding: 2px 5px;
}

.note-body blockquote {
  border-left: 3px solid var(--green);
  margin-left: 0;
  padding-left: 16px;
  color: #555;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: #888;
}

.site-footer a { color: #888; }
