:root {
  --bg-base: #050505;
  --bg-panel: #111111;
  --bg-elevated: #1a1a1a;
  --border-default: #2B2B2B;
  --border-subtle: #1a1a1a;
  --border-accent: rgba(0, 212, 170, 0.35);
  --text-primary: #f0f1f5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --accent-primary: #00D4AA;
  --accent-yellow: #FFAA00;
  --accent-warn: #ff6b6b;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
}

* { box-sizing: border-box; }

html {
  background: var(--bg-base);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  position: relative;
}

/* Фон: радиальный градиент + вертикальная сетка, как в BlogLayout */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.06), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(120, 80, 255, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(0, 212, 170, 0.03) 80px,
      rgba(0, 212, 170, 0.03) 81px
    );
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
}

a { color: var(--accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Header — фиксированный, как HomeHeader в SPA
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-2xl);
  background: rgba(2, 2, 16, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.site-logo {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.95rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.site-header nav a:hover {
  color: var(--text-primary);
  background: var(--bg-panel);
  border-color: var(--border-default);
  text-decoration: none;
}

.post-main {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 20px 64px;
}

/* ============================================================
   Article page — стили как в BlogPostView.vue
   ============================================================ */
.blog-post__article {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 28px 32px;
}

.blog-post__title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--accent-primary);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 16px;
}

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 2px 10px;
  border: 1px solid var(--accent-yellow);
  border-radius: 999px;
  color: var(--accent-yellow);
}

.post-body { color: var(--text-primary); }
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 1.3em 0 0.55em;
  line-height: 1.3;
  font-weight: 700;
}
.post-body h1 {
  font-size: 1.4rem;
  color: var(--accent-primary);
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 0.35em;
}
.post-body h2 { font-size: 1.2rem; border-bottom: 1px solid var(--border-default); padding-bottom: 0.3em; }
.post-body h3 { font-size: 1.05rem; }
.post-body p { margin: 0.75em 0; }
.post-body ul, .post-body ol { margin: 0.75em 0; padding-left: 1.5em; }
.post-body li { margin: 0.25em 0; }
.post-body strong { font-weight: 700; color: var(--accent-primary); }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.post-body pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.9em 1em;
  overflow-x: auto;
  margin: 0.9em 0;
}
.post-body code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-elevated); padding: 0.15em 0.4em; border-radius: var(--radius-sm); }
.post-body pre code { background: transparent; padding: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; border: 1px solid var(--border-default); }
.post-body th, .post-body td { border: 1px solid var(--border-default); padding: 8px 12px; text-align: left; }
.post-body th { font-weight: 700; color: var(--accent-primary); }
.post-body blockquote {
  border-left: 3px solid var(--border-default);
  margin: 12px 0;
  padding: 4px 14px;
  color: var(--text-secondary);
}

/* ============================================================
   Index page — список статей
   ============================================================ */
.post-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.post-list__item a {
  display: block;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.post-list__item a:hover { border-color: var(--accent-primary); text-decoration: none; }
.post-list__item h2 { margin: 0 0 8px; font-size: 1.2rem; }
.post-list__item p { margin: 0 0 12px; color: var(--text-secondary); }

/* ============================================================
   Comments
   ============================================================ */
.comments { margin-top: 48px; border-top: 1px solid var(--border-default); padding-top: 24px; }
.comments-list { color: var(--text-muted); }
.comment {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.comment__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.comment__author { color: var(--accent-primary); }
.comment__body { color: var(--text-primary); white-space: pre-wrap; overflow-wrap: break-word; }
.comment__likes { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); }

.comment-form { display: grid; gap: 10px; margin-top: 20px; }
.comment-form input, .comment-form textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font: inherit;
}
.comment-form textarea { min-height: 100px; resize: vertical; }
.comment-form button {
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #04110d;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  justify-self: start;
}
.comment-form .hp { position: absolute; left: -9999px; }
.comment-error { color: var(--accent-warn); }

.likes-count { color: var(--text-muted); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) var(--space-2xl);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  background: #02020a;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 767px) {
  .site-header {
    height: 56px;
    padding: 0 var(--space-md);
  }

  .post-main {
    padding-top: 80px;
  }

  .blog-post__article {
    padding: 20px 18px;
  }
}
