:root {
  --header-h: 72px;
  --paper: #FAF7F0;
  /* тёплый бумажный, не чисто-белый */
  --ink: #1A1A1A;
  --rule: #D8D2C6;
  --accent: #ed6ff9b2;
  --work-color: #F8F8FA;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='discrete' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-size: 100px 100px;
}

body {
  background: #EDEDEF;
  margin: 0;
  font-family: 'Oswald', sans-serif;

  display: grid;
  grid-template-columns: 1fr 0;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
  transition: grid-template-columns .25s ease;
}

body[menu-open] {
  grid-template-columns: 1fr 320px;
}

header {
  height: var(--header-h);
  background: var(--accent);
  color: rgb(11, 11, 11);
  padding-left: 10px;
  /* box-shadow: 0 4px 15px rgba(0, 20, 50, 0.3); */
  background-image: var(--grain);
  background-size: var(--grain-size);

  grid-row: 1;
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 10;

  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;

}


/* ===== Логотип (div внутри header) ===== */
header div {
  justify-self: start;
  /* прижать логотип влево внутри своей колонки */
  margin-right: 20px;
  /* отступ от меню (необязательно, но эстетично) */
}

header h1 {
  justify-self: end;
  color: var(--work-color);
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  border-bottom: solid 3px #ffffff;
}

header div img {
  max-height: 60px;
  /* задай нужную высоту */
  width: auto;
  display: block;
}

header button {
  font-size: 24px;
  background: none;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  justify-self: end;
  margin-right: 30px;
}

/* БОКОВОЕ МЕНЮ  */
aside {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  /* не растягиваться на всю строку */
  height: calc(100dvh - var(--header-h));
  overflow-y: auto;

  grid-column: 2;
  grid-row: 2;
  min-width: 0;

  background: var(--work-color);
}

aside[open] {
  transform: translateX(0);
}

aside button {
  display: block;
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: 0;
  cursor: pointer;
  color: #4C1D95;
  padding: 12px 16px;
}

aside button:hover {
  color: #ed6ff9;
}

aside ul {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
}

aside li+li {
  border-top: 1px solid #F0E6F5;
}

aside a {
  display: block;
  padding: 14px 20px;
  color: #1A1A1A;
  text-decoration: none;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .15s ease, color .15s ease;
}

aside a:hover {
  background: #F8F0FB;
  color: #ed6ff9;
}


main {
  gap: 10px;
  display: flex;
  flex-direction: column;
  max-width: 658px;
  margin: 0 auto;
  padding: 10px 8px;

  grid-column: 1;
  grid-row: 2;
}

/* ПОСТЫ */
article {
  background: var(--work-color);
  border: 1px solid #DDE1E6;
  border-bottom: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
  overflow: hidden;
  font-family: Lora, Georgia, serif;
  display: grid;
}

article>div {
  padding: 20px 24px 24px;
  display: grid;
  gap: 12px;
}

article>div>span:first-child {
  justify-self: start;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: #ed6ff9;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
}

article h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
  color: #1A1A1A;
}

article>img {
  margin-top: 10px;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  max-height: 60vh;
}

article p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #4A4A4A;
}

article footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #E5E5E5;
  font-family: Oswald, system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6B6B6B;
}

article footer span:first-child {
  color: #1A1A1A;
  font-weight: 600;
}

article footer span+span::before {
  content: "·";
  margin-right: 10px;
  color: #C0C0C0;
}

/* МАЛЕНЬКИЕ ЭКРАНЫ */
@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
    transition: none;
  }

  body[menu-open] {
    grid-template-columns: 1fr;
  }

  aside {
    position: fixed;
    top: var(--header-h);
    right: 0;
    grid-column: auto;
    grid-row: auto;
    width: min(320px, 85vw);
    overflow-y: auto;

    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 200;
    border-left: solid 1px var(--accent);
  }

  body[menu-open] aside {
    transform: translateX(0);
    overflow: hidden;
    overscroll-behavior: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .06),
      0 2px 4px rgba(0, 0, 0, .04);
  }

  header {
    grid-template-columns: 1fr 3fr 1fr;
    justify-items: center;
    /* padding: 20px 15px; */
  }

  header button {
    margin-right: 10px;
  }

  header h1 {
    font-size: 28px;
  }

  header div {
    justify-self: center;
    margin-right: 0;
  }

}

/* СУПЕР МАЛЕНЬКИЕ ЭКРАНЫ */
@media (max-width: 425px) {
  header h1 {
    font-size: 18px;
  }
}