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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-alt: #1c2128;
  --border: #30363d;
  --ink: #c9d1d9;
  --ink-bright: #f0f6fc;
  --accent: #58a6ff;
  --accent-dim: #1f6feb;
  --green: #3fb950;
  --yellow: #d2991d;
  --muted: #8b949e;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface); padding: 0.1rem 0.3rem; border-radius: 3px; border: 1px solid var(--border); }
pre code { background: none; border: none; padding: 0; }

/* ─── Top Bar ─── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.topbar h1 { font-size: 1rem; font-weight: 600; }
.topbar h1 a { color: var(--ink-bright); }
.topbar h1 .dot { color: var(--green); margin-right: 0.25rem; }
.topbar nav a {
  margin-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.topbar nav a:hover,
.topbar nav a.active { color: var(--ink-bright); text-decoration: none; }

/* ─── Two-Column Layout ─── */
.page {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 3rem - 3rem);
}

/* ─── Sidebar (Left) ─── */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 3rem;
  height: calc(100vh - 3rem);
  overflow-y: auto;
}
.sidebar h2 {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 0; }
.sidebar a {
  display: block;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sidebar a:hover,
.sidebar a.active {
  background: var(--surface-alt);
  border-left-color: var(--accent);
  color: var(--ink-bright);
  text-decoration: none;
}
.sidebar .badge {
  display: inline-block;
  font-size: 0.55rem;
  padding: 0.08rem 0.35rem;
  border-radius: 10px;
  margin-left: 0.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.active { background: rgba(63,185,80,0.15); color: var(--green); }
.badge.completed { background: rgba(72,79,88,0.3); color: var(--muted); }
.badge.in-progress { background: rgba(210,153,29,0.15); color: var(--yellow); }

/* ─── Main Content (Right) ─── */
.content {
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 900px;
}
.content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-bright);
  margin-bottom: 0.25rem;
}

.content img {  
max-width: 100%;  
height: auto;  
display: block;  
border-radius: 6px;  
margin: 1rem 0;  
border: 1px solid var(--border);  
}  

.content .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Project Cards (index.html) */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.project-card:hover { border-color: var(--accent-dim); }
.project-card h2 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.project-card h2 a { color: var(--ink-bright); }
.project-card .desc { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.5rem; }
.project-card .meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  align-items: center;
  flex-wrap: wrap;
}
.project-card .meta a { color: var(--accent); font-size: 0.75rem; }

/* Update Timeline */
.timeline { margin-top: 1.5rem; }
.update { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.update:last-child { border-bottom: none; }
.update h3 { font-size: 1rem; color: var(--ink-bright); margin-bottom: 0.15rem; }
.update .update-date {
  font-size: 0.75rem;
  color: #d2991d;
  display: block;
  margin-bottom: 0.35rem;
}
.update-body { font-size: 0.9rem; line-height: 1.7; }
.update-body p { margin-bottom: 0.5rem; }
.update-body pre {
  background: var(--surface);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 0.5rem 0;
}
.update-body ul, .update-body ol { margin-left: 1.25rem; margin-bottom: 0.5rem; }
.update-body li { margin-bottom: 0.25rem; }

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

/* Responsive */
@media (max-width: 768px) {
  .page { flex-direction: column; }
  .sidebar {
    width: 100%; position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
  }
  .content { padding: 1.5rem 1rem; }
  .topbar .container { padding: 0 1rem; }
}
