/* exporteru.ru — базовая тема блога
   Фокус на типографике и удобстве чтения */

html {
  box-sizing: border-box;
  font-size: 16px;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #111827;
  background-color: #f9fafb;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
}

.page__wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(249, 250, 251, 0.92);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111827;
}

.site-header__logo span {
  opacity: 0.6;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav__link {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: #374151;
  text-decoration: none;
}

.site-nav__link:hover {
  background-color: rgba(37, 99, 235, 0.08);
  color: #111827;
}

.site-nav__link--active {
  background-color: #111827;
  color: #f9fafb;
}

.site-main {
  flex: 1 0 auto;
}

.page-section {
  padding: 2rem 1.25rem 3rem;
}

.page-section--narrow {
  max-width: 1200px;
  margin: 0 auto;
}

.page-section--article {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.page-lead {
  margin: 0 0 1.75rem;
  max-width: 60ch;
  color: #4b5563;
  font-size: 1.02rem;
}

.error-404 {
  padding: 3rem 0;
  text-align: center;
}
.error-404__code {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.5rem;
  color: #e5e7eb;
  letter-spacing: -0.05em;
}
.error-404 .btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: #111827;
  color: #fff;
  border-radius: 0.25rem;
  font-weight: 500;
}
.error-404 .btn:hover {
  background: #374151;
  text-decoration: none;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.page-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.article-body {
  color: #111827;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.3;
}

.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.25rem 1.5rem;
}

.article-body li + li {
  margin-top: 0.35rem;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid #111827;
  background: #f3f4f6;
  font-style: italic;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #111827;
  color: #f9fafb;
}

.article-body pre code {
  display: block;
  padding: 0.9rem 1rem;
  white-space: pre-wrap;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.article-sidebar {
  font-size: 0.9rem;
  color: #6b7280;
}

.article-sidebar__block + .article-sidebar__block {
  margin-top: 1.5rem;
}

.article-sidebar__title {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list__item a,
.tag-list__item span {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  font-size: 0.8rem;
  text-decoration: none;
}

.tag-list__item a:hover {
  background: #d1d5db;
}

/* Пагинация */
.pagination {
  margin-top: 2rem;
  margin-bottom: 0;
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination__list li {
  margin: 0;
}

.pagination__list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pagination__list a:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
}

.pagination__list a.active,
.pagination__list li.active a {
  border-color: #111827;
  background: #111827;
  color: #fff;
  pointer-events: none;
}

.pagination__list li.control a {
  font-size: 0.8rem;
}

.list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.list-heading__title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.list-heading__link {
  font-size: 0.85rem;
  color: #6b7280;
}

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

.post-list__item + .post-list__item {
  border-top: 1px solid #e5e7eb;
}

.post-card {
  display: block;
  padding: 1rem 0;
}

.post-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #111827;
}

.post-card__meta {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.post-card__excerpt {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0;
}

.pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pagination__link {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
  text-decoration: none;
}

.pagination__link--active {
  background: #111827;
  color: #f9fafb;
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f3f4f6;
  color: #6b7280;
  font-size: 0.9rem;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__brand {
  font-weight: 600;
  color: #4b5563;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-footer__link {
  color: #6b7280;
}

.site-footer__link:hover {
  color: #111827;
}

.home-hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.home-hero__kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.home-section {
  margin-top: 2.5rem;
}

.home-section + .home-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
}

.home-section__title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  margin: 0 0 0.75rem;
}

.home-section__description {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
}

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

.news-list__item + .news-list__item {
  border-top: 1px dashed #e5e7eb;
}

/* Плитка новостей на главной */
.news-tiles {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .news-tiles {
    grid-template-columns: 1fr;
  }
}

.news-tile {
  margin: 0;
}

.news-tile__link {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.news-tile__link:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  text-decoration: none;
}

.news-tile__meta {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.news-tile__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.4;
}

.home-section__more {
  margin: 0;
}

.news-row {
  padding: 0.7rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.news-row__meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.news-row__title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111827;
}

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

.related-list__item + .related-list__item {
  margin-top: 0.4rem;
}

.comments {
  margin-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
}

.comments__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.comments__list {
  margin-bottom: 1.5rem;
}

.comments__form {
  margin-top: 1rem;
}

/* Страница «Об авторе» */
.author-page {
  max-width: 960px;
  margin: 0 auto;
}

.author-page__head {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.author-page__avatar {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-page__role {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
  color: #4b5563;
}

.author-page .article-body {
  margin-top: 1rem;
}

/* Блок автора в сайдбаре статьи */
.author-box {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid #e5e7eb;
}

.author-box__avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.author-box__name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
}

.author-box__role {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

@media (max-width: 900px) {
  .site-header__inner {
    padding-inline: 1rem;
  }

  .home-grid,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .author-page__head {
    flex-direction: column;
  }

  .page-section {
    padding-inline: 1rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .page-title {
    font-size: 1.7rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }
}

