:root {
  --bg: #0f1117;
  --panel: #161a23;
  --panel-2: #1c2130;
  --text: #e6e9f0;
  --muted: #8b93a7;
  --accent: #6ea8fe;
  --accent-2: #7ee0a3;
  --border: #262c3b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
  color: var(--accent-2);
}

/* ---------- home ---------- */
.hero { padding: 72px 24px 40px; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 3rem; margin: 0 0 8px; letter-spacing: -1px; }
.hero .dot { color: var(--accent); }
.tagline { color: var(--muted); font-size: 1.1rem; margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.meta #note-count { color: var(--accent-2); }

.days {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 24px;
}
.days h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 8px; }
.days a {
  display: block;
  padding: 8px 12px;
  margin: 4px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
.days a.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.days a:hover { background: var(--panel-2); text-decoration: none; }

/* ---------- day pages ---------- */
body { display: grid; grid-template-columns: 260px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
}
.brand { margin-bottom: 16px; padding: 0 6px; }
.brand a { font-size: 1.15rem; font-weight: 700; }
.brand span { display: block; color: var(--muted); font-size: 0.8rem; }
.sidebar a {
  display: block;
  padding: 7px 10px;
  margin: 3px 0;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.sidebar a.active { border-color: var(--accent); background: var(--panel-2); }
.sidebar a:hover { background: var(--panel-2); text-decoration: none; }

main { padding: 48px clamp(20px, 6vw, 80px) 80px; min-width: 0; }
article h1 { font-size: 2rem; margin-top: 0; }
article h1, article h2, article h3 { line-height: 1.25; }
article ul { padding-left: 22px; }
article li { margin: 6px 0; }
article p { margin: 12px 0; }
article img {
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}
article img:hover { transform: scale(1.03); }
/* Obsidian-style ![[...]] embeds: honor explicit width (up to full column), stay responsive */
article img.embed { max-width: 100%; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  cursor: default;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.lightbox:empty { display: none; }

@media (max-width: 760px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .hero { padding-top: 48px; }
}
