/* breakingnet — заметки */
:root {
  --bg: #f7f5f0;
  --surface: #fffdf8;
  --text: #22211f;
  --muted: #6b6860;
  --line: #e2ddd2;
  --accent: #2f6f62;
  --accent-soft: #e3eeea;
  --code-bg: #efece4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "PT Serif", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171816;
    --surface: #1e1f1c;
    --text: #e6e3da;
    --muted: #9a968b;
    --line: #2f302b;
    --accent: #7fbfae;
    --accent-soft: #23302c;
    --code-bg: #232420;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--serif);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 22px; padding-bottom: 18px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font: 600 19px/1 var(--sans); letter-spacing: -0.01em;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-weight: 400; color: var(--muted); font-size: 14px; }
.nav { display: flex; gap: 18px; font: 15px/1 var(--sans); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

main { padding: 40px 0 64px; }

/* intro */
.intro { margin-bottom: 40px; }
.intro h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
.intro p { margin: 0; color: var(--muted); }

/* post list */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 22px 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; padding-top: 0; }
.post-list h2 { font-size: 22px; line-height: 1.3; margin: 4px 0 8px; font-weight: 600; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { margin: 0; color: var(--muted); font-size: 17px; }

.meta { font: 13.5px/1.4 var(--sans); color: var(--muted); }
.meta a { color: var(--muted); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 4px; }
.tag {
  font: 12.5px/1 var(--sans); padding: 4px 8px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent); text-decoration: none;
}
.tag:hover { text-decoration: underline; }

/* article */
.post-header { margin-bottom: 28px; }
.post-header h1 { font-size: 34px; line-height: 1.2; margin: 8px 0 12px; font-weight: 600; letter-spacing: -0.01em; }
.prose h2 { font-size: 23px; line-height: 1.3; margin: 36px 0 10px; font-weight: 600; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  margin: 24px 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent); color: var(--muted); font-style: italic;
}
.prose code {
  font: 0.84em/1.5 var(--mono); background: var(--code-bg);
  padding: 2px 5px; border-radius: 4px;
}
.prose pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 16px; overflow-x: auto; margin: 0 0 20px;
}
.prose pre code { background: none; padding: 0; font-size: 14.5px; line-height: 1.55; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font: 15.5px/1.45 var(--sans); }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.note {
  font: 15.5px/1.55 var(--sans); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; margin: 0 0 20px;
}

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
  font: 15px/1.4 var(--sans);
}
.post-nav a { text-decoration: none; }
.post-nav span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* archive */
.year { font: 600 15px/1 var(--sans); color: var(--muted); margin: 32px 0 10px; letter-spacing: 0.04em; }
.archive { list-style: none; padding: 0; margin: 0; }
.archive li { display: flex; gap: 16px; padding: 6px 0; align-items: baseline; }
.archive time { font: 14px/1 var(--mono); color: var(--muted); flex: none; width: 52px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tag-cloud .tag { font-size: 14px; padding: 6px 10px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); font: 14px/1.5 var(--sans); color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 28px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font: 600 64px/1 var(--mono); color: var(--accent); margin-bottom: 10px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .intro h1 { font-size: 26px; }
  .post-header h1 { font-size: 28px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .nav { gap: 14px; }
}
