:root {
  --bg: #fafbfc;
  --sidebar-bg: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #f1f5f9;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

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

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

/* Sidebar logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-subbrand {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Tags */
.sidebar-tags .tag {
  display: inline-block;
  background: var(--code-bg);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  margin: 0.125rem;
}

/* About page */
.about-page h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.about-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.about-page p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-page ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.about-page li {
  margin-bottom: 0.375rem;
}

.about-page strong {
  color: var(--text-primary);
}

.about-page code {
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.875em;
}

/* Table styles */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

article th {
  background: var(--code-bg);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

article td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

article tr:hover td {
  background: var(--bg);
}

.sidebar-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.25rem;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-links a:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.sidebar-links a.active {
  background: #eff6ff;
  color: var(--accent);
  font-weight: 500;
}

/* Main content */
.main {
  flex: 1;
  margin-left: 280px;
  padding: 3rem 4rem;
  max-width: 860px;
}

/* Hero */
.hero {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

/* Issue cards */
.issue-list {
  list-style: none;
}

.issue-item {
  padding: 1.25rem 1.5rem;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: all 0.15s;
}

.issue-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.issue-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}

.issue-item .meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.issue-item .tag {
  background: var(--code-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Article */
article h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

article .article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

article p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

article h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

article ul, article ol {
  margin: 1rem 0 1.25rem 1.5rem;
  color: var(--text-secondary);
}

article li {
  margin-bottom: 0.375rem;
}

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

article a:hover {
  text-decoration: underline;
}

article code {
  background: var(--code-bg);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: "SF Mono", "Fira Code", monospace;
}

article pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

article pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: #eff6ff;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

article blockquote p {
  margin-bottom: 0;
}

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

/* Navigation */
nav.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

nav.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

nav.breadcrumb a:hover {
  color: var(--accent);
}

nav.breadcrumb span {
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1rem;
  }
  .main {
    margin-left: 0;
    padding: 1.5rem 1rem;
  }
}
