:root {
  --bg: #1a1a2e;
  --fg: #e0e0e0;
  --accent: #4fc3f7;
  --muted: #888;
  --border: #333;
  --card-bg: #16213e;
  --sidebar-bg: #111827;
  --sidebar-text: #9ca3af;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--fg);
  line-height: 1.7;
}

/* === Layout === */
.app {
  display: flex;
  min-height: 100vh;
}

/* === Sidebar === */
.sidebar {
  width: 200px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0 1rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.sidebar-title {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* === Sidebar buttons === */
.menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.5rem;
  flex: 1;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}

.menu-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  border-color: var(--border);
}

.menu-btn .icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.menu-btn .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-foot-note {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

/* === Main content === */
.main {
  flex: 1;
  padding: 2rem max(2rem, 5vw);
  max-width: 900px;
  min-width: 0;
}

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

h1, h2, h3 { color: var(--accent); margin: 1.5rem 0 0.75rem; line-height: 1.3; }
h1 { font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h2 { font-size: 1.5rem; }

code { background: var(--card-bg); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; }
pre { background: var(--card-bg); padding: 1rem; border-radius: 6px; overflow-x: auto; margin: 1rem 0; }
pre code { background: none; padding: 0; }

header { margin-bottom: 2.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
header h1 { margin: 0; font-size: 2rem; }
header p { color: var(--muted); margin-top: 0.5rem; }

article { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
article:last-child { border-bottom: none; }
article h1 { margin-top: 0; }

.meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.meta span { margin-right: 1rem; }

section.notes h2 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; text-align: center; }

.page-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.page-header h1 { margin: 0; font-size: 1.75rem; }
.page-header p { color: var(--muted); margin-top: 0.25rem; font-size: 0.9rem; }

/* === Task tables === */
.task-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.95rem;
}
.task-table th,
.task-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.task-table th {
  background: var(--card-bg);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-backlog { background: #2d1b4e; color: #c084fc; }
.status-in_progress { background: #1e3a5f; color: #60a5fa; }
.status-completed { background: #1a3a2a; color: #4ade80; }
.task-completed td { color: var(--muted); }
.task-in_progress td:first-child { font-weight: 600; }

/* === About page === */
.about-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.about-hero .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  margin: 0 auto 1.2rem;
}
.about-hero h1 {
  margin: 0;
  border: none;
  font-size: 2.2rem;
}
.about-hero .tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
  margin-top: 0.75rem;
}
.about-hero .accent-line {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}
.about-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.about-body h2 {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.about-body strong { color: var(--accent); }
.about-body em { color: var(--accent); }

/* === Responsive: stack on narrow === */
@media (max-width: 680px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
  }
  .sidebar-header { padding: 0 0 0.75rem; margin-bottom: 0.25rem; }
  .sidebar-logo { width: 32px; height: 32px; font-size: 0.9rem; }
  .menu { flex-direction: row; flex-wrap: wrap; padding: 0; gap: 0.35rem; }
  .menu-btn { padding: 0.25rem 0.5rem; font-size: 0.78rem; }
  .sidebar-footer { display: none; }
  .main { padding: 1.25rem 1rem; }
}
