:root {
  --bg: #f5f3ee;
  --fg: #1d1c1a;
  --muted: #6b675f;
  --rule: #d9d5cc;
  --link: #8a3a12;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "PT Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  line-height: 1.6;
}

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

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.wide { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0 1rem;
  margin-bottom: 2.5rem;
}
header.site .wide { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; }
header.site .name { font-size: 1.35rem; font-weight: bold; color: var(--fg); text-decoration: none; }
header.site nav { font-family: var(--sans); font-size: .9rem; }
header.site nav a { color: var(--muted); text-decoration: none; margin-left: 1.1rem; }
header.site nav a:first-child { margin-left: 0; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--fg); }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .4rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 .6rem; }
.meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: 0 0 1.8rem; }

p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
li { margin-bottom: .3rem; }

table { border-collapse: collapse; font-family: var(--sans); font-size: .9rem; margin: 0 0 1.4rem; width: 100%; }
th, td { text-align: left; padding: .35rem .6rem .35rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: normal; }

figure { margin: 2rem 0; }
figure img { display: block; width: 100%; height: auto; background: #e4e0d8; }
figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: .45rem; }
.bleed { margin-left: -6rem; margin-right: -6rem; }
@media (max-width: 58rem) { .bleed { margin-left: 0; margin-right: 0; } }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 36rem) { .pair { grid-template-columns: 1fr; } }

/* Список записей на главной */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { display: grid; grid-template-columns: 11rem 1fr; gap: 1.3rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 1px solid var(--rule); }
.posts img { width: 100%; height: auto; display: block; background: #e4e0d8; }
.posts h2 { margin: 0 0 .3rem; font-size: 1.2rem; }
.posts h2 a { color: var(--fg); text-decoration: none; }
.posts h2 a:hover { text-decoration: underline; }
.posts p { margin: 0; font-size: .95rem; }
.posts .meta { margin: 0 0 .4rem; }
@media (max-width: 36rem) { .posts li { grid-template-columns: 1fr; } }

/* Галерея */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; margin: 0 0 3rem; }
.grid a { display: block; }
.grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; background: #e4e0d8; }

.intro { font-size: 1.05rem; color: #3a3833; margin-bottom: 2rem; }

footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.4rem 0 2.5rem;
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--muted);
}
footer.site a { color: var(--muted); }

.nextprev { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--sans); font-size: .9rem; margin-top: 3rem; }
