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

:root {
  --bg: #141414;
  --card: rgba(255,255,255,0.05);
  --card-hover: rgba(255,255,255,0.09);
  --line: rgba(255,255,255,0.14);
  --text: #ececec;
  --muted: #a3a3a3;
  --accent: #e4e9b1;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(228,233,177,0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(120,150,190,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
}

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

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

/* Верхняя полоса */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 28px 0;
  font-size: 14px;
  color: var(--muted);
}
.topbar a:hover { color: var(--accent); }

/* Хлебные крошки */
.breadcrumbs { font-size: 13px; color: var(--muted); padding-top: 8px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.breadcrumbs a:hover { color: var(--accent); }

/* Шапка блога */
.hero { padding: 72px 0 56px; }
.hero h1 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.15;
  color: rgba(255,255,255,0.9);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}
.hero p { margin-top: 24px; max-width: 600px; font-size: 17px; color: var(--muted); }
.hero p a { color: var(--accent); border-bottom: 1px solid rgba(228,233,177,0.4); }

/* Список постов */
.section-title {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}

.posts { display: flex; flex-direction: column; gap: 16px; padding: 24px 0 72px; }

.post {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.post:hover { background: var(--card-hover); border-color: rgba(228,233,177,0.5); }
.post-thumb {
  flex: none;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.post-body { flex: 1; min-width: 0; }
.post-meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.post-tag { color: var(--accent); }
.post h2 { font-weight: 600; font-size: 20px; line-height: 1.25; margin: 8px 0; color: #fff; }
.post p { color: #cfcfcf; font-size: 15px; }

.empty {
  padding: 40px 28px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

/* Страница поста */
.post-head { padding: 32px 0 32px; }
.post-head h1 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 44px);
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  margin-top: 14px;
}
.lead { margin-top: 18px; color: var(--muted); font-size: 17px; }

.cover { margin: 0 0 28px; }
.cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.cover figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.tldr {
  margin: 0 0 28px;
  padding: 18px 22px;
  border: 1px solid rgba(228,233,177,0.35);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: rgba(228,233,177,0.06);
  color: #e6e6e6;
}
.tldr b { color: var(--accent); }

.content { padding: 8px 0 40px; font-size: 16px; line-height: 1.75; }
.content > * + * { margin-top: 1.2em; }
.content h2 { font-size: 22px; font-weight: 600; line-height: 1.3; color: #fff; margin-top: 2em; }
.content h3 { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--accent); margin-top: 1.6em; }
.content p { color: #dcdcdc; }
.content b, .content strong { color: #fff; }
.content a { color: var(--accent); border-bottom: 1px solid rgba(228,233,177,0.4); }
.content a:hover { border-bottom-color: var(--accent); }
.content ul, .content ol { padding-left: 1.4em; color: #dcdcdc; }
.content li + li { margin-top: 0.5em; }
.content blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: #cfcfcf; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.content img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.content code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 5px; font-size: 0.92em; }
.content pre { background: rgba(255,255,255,0.06); padding: 16px; border-radius: 10px; overflow-x: auto; }
.content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.content th { color: var(--accent); font-weight: 600; }

/* Частые вопросы */
.faq { padding: 8px 0 32px; border-top: 1px solid var(--line); }
.faq h2 { font-size: 22px; font-weight: 600; color: #fff; margin: 28px 0 8px; }
.faq h3 { font-size: 17px; font-weight: 600; color: var(--accent); margin-top: 22px; line-height: 1.35; }
.faq p { color: #dcdcdc; margin-top: 6px; line-height: 1.7; }

/* Об авторе */
.author {
  margin: 8px 0 32px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.author img {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.author .about { flex: 1; min-width: 0; }
.author b { display: block; color: #fff; margin-bottom: 6px; }
.author p { color: #cfcfcf; font-size: 15px; }
.author .links { margin-top: 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.author .links a { color: var(--accent); border-bottom: 1px solid rgba(228,233,177,0.4); }

/* Читайте также */
.related { padding: 8px 0 48px; }
.related .posts { padding: 16px 0 0; }

/* Подвал */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
footer a:hover { color: var(--accent); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 40px 0 36px; }
  .hero p { font-size: 16px; }
  .post { padding: 16px; gap: 14px; }
  .post-thumb { width: 84px; height: 84px; border-radius: 10px; }
  .post h2 { font-size: 17px; }
  .post p { font-size: 14px; }
  .author { padding: 18px; gap: 14px; }
  .author img { width: 64px; height: 64px; }
  .topbar { font-size: 13px; }
  .post-head { padding: 24px 0 24px; }
  .lead { font-size: 16px; }
  .content { font-size: 15px; }
  .content h2, .faq h2 { font-size: 20px; }
}
