:root {
  --bg:         #282c34;
  --bg-sidebar: #21252b;
  --bg-hover:   #2c313c;
  --text:       #abb2bf;
  --muted:      #5c6370;
  --heading:    #e5c07b;
  --link:       #61afef;
  --link-hover: #98c379;
  --border:     #3e4452;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* ── Sidebar ── */

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 190px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.sidebar-title {
  margin-bottom: 2.5rem;
}

.sidebar-title a {
  color: var(--heading);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-links {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
}

.nav-links a:hover {
  background: var(--bg-hover);
  color: var(--link);
}

.nav-links a.active {
  background: var(--bg-hover);
  color: var(--link);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.sidebar-footer a:hover {
  color: var(--link);
}

/* ── Main content ── */

.main {
  margin-left: 190px;
  padding: 3rem 4rem;
  max-width: 860px;
}

h1 {
  color: var(--heading);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.75rem;
}

h2 {
  color: var(--heading);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

h3 {
  color: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

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

img {
  max-width: 100%;
  border-radius: 4px;
  display: block;
  margin: 1.5rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
}

code {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
}

pre {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9em;
}

blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}

/* ── Blog index ── */

.post-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:first-child {
  border-top: 1px solid var(--border);
}

.post-date {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.post-title a {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--link);
}

.post-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ── Blog post ── */

.article-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: -1rem;
  margin-bottom: 2rem;
}

article p,
article ul,
article ol {
  max-width: 68ch;
}

/* ── Projects ── */

.project-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.project:first-child {
  border-top: 1px solid var(--border);
}

.project-name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.project-name a {
  color: var(--text);
  text-decoration: none;
}

.project-name a:hover {
  color: var(--link);
}

.project-desc {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-links {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
}
