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

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #1a1814;
  --muted: #6b6860;
  --accent: #c0392b;
  --border: #e8e4dc;
  --mono: 'JetBrains Mono', monospace;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Golos Text', sans-serif;
  --tag-bg: #eef2ff;
  --tag-text: #3b4fd4;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-name span { color: var(--accent); }

nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--text); font-weight: 500; }

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

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
}

.tag.swift { background: #fff3eb; color: #c0522b; }
.tag.xcode { background: #eef8ff; color: #1a6fa8; }
.tag.tools { background: #f0fdf4; color: #166534; }
.tag.perf  { background: #fdf4ff; color: #7e22ce; }

.code-block {
  background: #1e1e2e;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #cdd6f4;
  overflow-x: auto;
  line-height: 1.7;
  margin: 1.5rem 0;
}

.code-block .kw { color: #cba6f7; }
.code-block .str { color: #a6e3a1; }
.code-block .fn { color: #89b4fa; }
.code-block .cm { color: #6c7086; font-style: italic; }
.code-block .num { color: #fab387; }
.code-block .type { color: #f38ba8; }
