:root {
  --bg: #0f1117;
  --surface: #181a22;
  --surface2: #21232e;
  --border: #2a2d3a;
  --text: #e1e3ea;
  --text-dim: #8b8fa3;
  --accent: #6c8cff;
  --accent-dim: #4a6ae0;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

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

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

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

.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

header h1 { font-size: 1.5rem; font-weight: 600; }
header h1 a { color: var(--text); }
header h1 a:hover { color: var(--accent); text-decoration: none; }

nav { margin-top: 0.75rem; display: flex; gap: 1.5rem; }
nav a { font-size: 0.9rem; color: var(--text-dim); font-weight: 500; }
nav a:hover { color: var(--text); text-decoration: none; }
nav a.active { color: var(--accent); }

/* Search */
.search-box {
  margin-bottom: 2rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.search-box input::placeholder {
  color: var(--text-dim);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

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

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.card .meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  display: flex;
  gap: 0.75rem;
}

.tag {
  display: inline-block;
  background: var(--surface2);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--mono);
}

.tag.uncle { color: var(--amber); background: rgba(251, 191, 36, 0.1); }
.tag.dr { color: var(--accent); background: rgba(108, 140, 255, 0.1); }

/* Daily / Session list */
.list-group {
  list-style: none;
}

.list-group li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-group li:last-child { border-bottom: none; }

.list-group .date {
  font-size: 0.85rem;
  color: var(--text-dim);
  min-width: 100px;
}

.list-group .title {
  flex: 1;
  margin: 0 1rem;
}

.list-group .count {
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--surface2);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

/* Section headers */
.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .emoji { font-size: 1.2rem; }

/* Bodega entry */
.bodega-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.bodega-entry .entry-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.bodega-entry .entry-title {
  font-size: 1rem;
  font-weight: 500;
}

.bodega-entry .entry-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.bodega-entry .entry-content {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

.bodega-entry .entry-content blockquote {
  border-left: 2px solid var(--accent-dim);
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: var(--text-dim);
  font-style: italic;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* Timestamp */
.timestamp {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 1rem;
}
