:root {
  --bg: #111827;
  --panel: #0f172a;
  --panel-2: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #2563eb;
  --border: #243042;
  --font-heading: "Fraunces", serif;
  --font-body: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

.app {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h1 {
  margin: 0 0 10px;
  font-size: 20px;
  font-family: var(--font-heading);
}
#search {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b1220;
  color: var(--text);
  font-family: var(--font-body);
}

button, input, textarea, select {
  font-family: var(--font-body);
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
}
.skill-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  cursor: pointer;
}
.skill-item:hover { background: #162035; }
.skill-item.active { background: #1f3b73; }
.skill-item .name { font-weight: 700; margin-bottom: 4px; font-family: var(--font-heading); }
.skill-item .desc { color: var(--muted); font-size: 13px; }

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.content-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-header h2 { margin: 0; font-size: 24px; font-family: var(--font-heading); }
.content-header a { color: #93c5fd; text-decoration: none; }
.hidden { display: none; }

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-button:hover { background: #162035; }
.icon-sidebar {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.app.focus-mode {
  grid-template-columns: 0 1fr;
}
.app.focus-mode .sidebar {
  border-right: 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.meta {
  color: var(--muted);
  padding: 10px 22px;
  border-bottom: 1px solid var(--border);
  background: #0f1828;
  font-size: 14px;
}

.markdown {
  padding: 24px;
  overflow: auto;
  line-height: 1.6;
  white-space: normal;
}
.markdown pre {
  background: #07070b;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  overflow: auto;
  font-size: 14px;
}
.markdown code {
  font-family: var(--font-mono);
  font-size: 14px;
}
.markdown h1,.markdown h2,.markdown h3 {
  color: #f3f4f6;
  font-family: var(--font-heading);
}

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { height: 42vh; border-right: 0; border-bottom: 1px solid var(--border); }
}
