/* Rutj — personal site. Static, no external assets. */
:root {
  --paper: #eef0ec;
  --ink: #14181c;
  --muted: #5a6068;
  --rule: #d3d6d1;
  --accent: #0f5b63;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.62 var(--sans);
  font-feature-settings: "kern" 1;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 28px 72px;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 12px/1.4 var(--mono);
  letter-spacing: .02em;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.statusbar .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
}

header.masthead {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  padding: 54px 0 40px;
  border-bottom: 1px solid var(--rule);
}

.masthead .id {
  font: 13px/1.5 var(--mono);
  color: var(--muted);
}
.masthead .id strong { display: block; color: var(--ink); font-weight: 600; }

.masthead h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.masthead p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  padding: 38px 0;
  border-bottom: 1px solid var(--rule);
}

section > h2 {
  font: 13px/1.5 var(--mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 0;
}

section .body { min-width: 0; }

ul.list { list-style: none; margin: 0; padding: 0; }

ul.list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid transparent;
}
ul.list li + li { border-top-color: var(--rule); }

ul.list .when {
  font: 13px/1.6 var(--mono);
  color: var(--muted);
  padding-top: 3px;
}

ul.list .what strong { font-weight: 600; }
ul.list .what span { color: var(--muted); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

p { margin: 0 0 14px; max-width: 62ch; }
p.lede { font-size: 19px; }

footer {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 36px;
  padding-top: 34px;
  color: var(--muted);
  font-size: 14px;
}
footer .mono { font-family: var(--mono); font-size: 12px; }

article { max-width: 62ch; }
article h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
  margin: 34px 0 8px;
}
article .meta {
  font: 13px/1.6 var(--mono);
  color: var(--muted);
  margin-bottom: 28px;
}
article h2 { font-size: 19px; margin: 30px 0 8px; }
article pre {
  font: 13px/1.55 var(--mono);
  background: #e6e8e3;
  padding: 14px 16px;
  overflow-x: auto;
}
article code { font-family: var(--mono); font-size: .94em; }
article ul { padding-left: 20px; }
.back { font: 13px/1 var(--mono); }

@media (max-width: 720px) {
  .wrap { padding: 20px 20px 56px; }
  header.masthead, section, footer { grid-template-columns: 1fr; gap: 14px; }
  header.masthead { padding: 34px 0 26px; }
  section > h2 { margin: 0; }
  ul.list li { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .statusbar { flex-direction: column; gap: 6px; }
}

/* Navigation and figures */
nav.top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 14px 0 0;
  font: 13px/1.5 var(--mono);
}
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a:hover { color: var(--accent); text-decoration: underline; }
nav.top a[aria-current="page"] { color: var(--ink); }

figure { margin: 22px 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption {
  margin-top: 8px;
  font: 12px/1.5 var(--mono);
  color: var(--muted);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 720px) { .grid-two { grid-template-columns: 1fr; gap: 18px; } }

dl.facts { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 18px; }
dl.facts dt { font: 13px/1.6 var(--mono); color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 720px) { dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 12px; } }

/* Большой подвал сайта */
.site-footer {
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px 36px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer h3 {
  font: 12px/1.5 var(--mono);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .brand { color: var(--ink); font-family: var(--serif); font-size: 19px; margin: 0 0 6px; }
.site-footer .colophon {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  font: 12px/1.5 var(--mono);
}
@media (max-width: 860px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .site-footer { grid-template-columns: 1fr; gap: 22px; }
  .site-footer .colophon { flex-direction: column; }
}

/* Палитра шире: один акцент на смысл, а не радуга ради радуги */
:root {
  --rust: #8c3b2e;
  --indigo: #3d4a86;
  --olive: #4f5d2f;
  --ochre: #8d6417;
}

section > h2::before,
.site-footer h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  vertical-align: 1px;
  background: var(--accent);
}
section > h2.c2::before { background: var(--rust); }
section > h2.c3::before { background: var(--indigo); }
section > h2.c4::before { background: var(--olive); }

.site-footer div:nth-child(2) h3::before { background: var(--rust); }
.site-footer div:nth-child(3) h3::before { background: var(--indigo); }
.site-footer div:nth-child(4) h3::before { background: var(--olive); }

.tag {
  display: inline-block;
  font: 11px/1.7 var(--mono);
  letter-spacing: .03em;
  padding: 0 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: 1px;
  text-decoration: none;
}
.tag-net    { color: var(--accent); }
.tag-ops    { color: var(--rust); }
.tag-backup { color: var(--olive); }
.tag-dns    { color: var(--indigo); }
.tag-web    { color: var(--ochre); }

article p.meta .tag { margin-right: 12px; }

/* Цвет подписи раздела — по смыслу, не радугой */
section > h2.c1 { color: var(--accent); }
section > h2.c2 { color: var(--rust); }
section > h2.c3 { color: var(--indigo); }
