@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-sans-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-sans-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-sans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-serif-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/pt-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-serif-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/pt-serif-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --sky: #eaf4fd;
  --sky-deep: #c7e3f9;
  --white: #ffffff;
  --surface: #f3f8fd;
  --indigo: #4f5fea;
  --indigo-dark: #3b49c4;
  --yellow: #ffe93c;
  --ink: #16181d;
  --ink-muted: #5b6472;
  --line: #e1ebf6;
  --radius: 10px;
  --container: 1160px;
  --font-display: "PT Serif", Georgia, serif;
  --font-body: "PT Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sky) url("/img/texture.svg");
  line-height: 1.6;
}

a {
  color: var(--indigo);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* Header */

.site-header {
  background: linear-gradient(180deg, var(--sky-deep), var(--sky));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.logo:hover { text-decoration: none; }

.logo-mark { flex-shrink: 0; }

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.site-nav a:hover {
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
}

.site-nav a.is-current {
  color: var(--ink);
  background: var(--white);
}

.header-banner {
  line-height: 0;
  overflow: hidden;
}

.header-banner svg {
  display: block;
  width: 100%;
  height: 96px;
}

@media (max-width: 560px) {
  .header-banner svg { height: 64px; }
}

/* Two-column layout: content + sidebar */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 60px -28px rgba(23, 43, 77, 0.22);
  margin-top: -1.5rem;
  margin-bottom: 3rem;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

.layout-side {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 1.5rem;
}

/* Featured (homepage hero) */

.featured {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.featured {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.75rem;
}

.featured-cover-link { display: block; }

.featured .entry-cover {
  aspect-ratio: 4 / 3;
}

.featured-body { display: flex; flex-direction: column; }

.featured-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  margin: 0.6rem 0 0.85rem;
}

.featured-title a { color: var(--ink); }
.featured-title a:hover { text-decoration: underline; }

.featured-excerpt {
  max-width: 60ch;
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.featured-foot {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: auto;
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.featured-cta:hover { text-decoration: none; background: #ffe100; }

.featured-empty .featured-title { font-family: var(--font-display); font-size: 1.5rem; }
.featured-empty .featured-excerpt { color: var(--ink-muted); }

/* Section headers */

.section-title,
.section-head h1 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.section-head { margin-bottom: 1.75rem; }

.section-head p { color: var(--ink-muted); margin: 0.5rem 0 0; }

.rubric-bar {
  display: block;
  width: 2.75rem;
  height: 4px;
  border-radius: 2px;
  margin-bottom: 0.9rem;
}

/* Entry list (article rows) */

.entry-list {
  display: flex;
  flex-direction: column;
}

.entry { border-top: 1px solid var(--line); }
.entry:last-child { border-bottom: 1px solid var(--line); }

.entry-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 0;
  color: inherit;
}

.entry-link:hover { text-decoration: none; }
.entry-link:hover .entry-title { text-decoration: underline; }

.entry-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-cover-icon { width: 42%; height: 42%; }
.featured .entry-cover-icon { width: 34%; height: 34%; }

.entry-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
  margin-bottom: 0.5rem;
}

.entry-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 700;
}

a.entry-tag:hover { text-decoration: none; opacity: 0.8; }

.entry-date {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.entry-title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}

.entry-excerpt {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.empty-state { color: var(--ink-muted); }

/* Sidebar widgets */

.side-widget {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.side-widget:last-child { border-bottom: none; padding-bottom: 0; }

.side-title {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.side-list a { font-size: 0.95rem; line-height: 1.4; }

.side-rubrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.side-rubrics a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.side-rubrics a:hover { text-decoration: none; opacity: 0.75; }

.side-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.side-count {
  margin-left: auto;
  color: var(--ink-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.side-about p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Article page */

.article-page { max-width: 720px; }

.article-header { margin-bottom: 1.75rem; }

.article-header h1 {
  margin: 0.75rem 0 1rem;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.2;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.tag:hover { text-decoration: none; border-color: var(--ink-muted); }

.prose {
  font-size: 1.08rem;
}

.prose p { margin: 0 0 1.15rem; }

.article-figure {
  margin: 1.5rem 0 1.75rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.article-figure figcaption {
  margin-top: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.article-figure figcaption a { color: inherit; text-decoration: underline; }

.article-source,
.article-disclaimer {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.article-source p,
.article-disclaimer p { margin: 0; }

/* Share buttons */

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.share-label {
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 0.15rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.share-btn:hover {
  text-decoration: none;
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--white);
}

/* Search */

#search { margin-top: 0.5rem; }

.pagefind-ui { --pagefind-ui-primary: var(--indigo); --pagefind-ui-text: var(--ink); --pagefind-ui-background: var(--surface); --pagefind-ui-border: var(--line); --pagefind-ui-font: var(--font-body); }

/* Footer */

.site-footer {
  background: var(--white);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-brand-block { max-width: 32rem; }

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-note {
  margin: 0.4rem 0 0;
  color: var(--ink-muted);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-links a {
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer-bottom {
  padding-bottom: 1.75rem;
}

.footer-copy {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1.75rem;
    border-radius: 16px;
  }

  .layout-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2.5rem;
  }

  .side-widget { flex: 1 1 220px; }

  .featured {
    grid-template-columns: 1fr;
  }

  .featured .entry-cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .entry-link {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .layout-side { flex-direction: column; }

  .layout { padding: 1.25rem; margin-top: -1rem; }
}
