/* Пиксель-пауза — оформление. Тёмная база, один тёплый акцент. */

:root {
  --bg:        #0b0e14;
  --surface:   #131923;
  --surface-2: #1a2130;
  --border:    #242d3d;
  --text:      #e9eef7;
  --muted:     #8a99b3;
  --accent:    #ff6a3d;
  --accent-dim:#ff6a3d22;

  --w: 1120px;
  --r: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-head__inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand__mark {
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.brand__text { font-size: 17px; }

.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--text); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; color: var(--text);
  font-size: 20px; cursor: pointer;
}

/* ---------- Главная ---------- */

.hero { padding: 64px 0 40px; }
.hero__title {
  margin: 0 0 10px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero__sub { margin: 0; color: var(--muted); font-size: clamp(16px, 2.4vw, 20px); }

.section { padding: 40px 0 8px; }
.section__title {
  margin: 0 0 20px;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); font-weight: 600;
}

/* ---------- Карточки ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: #33405a; }

.card__media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { margin: 0; font-size: 19px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 700; }
.card__excerpt { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; flex: 1; }
.card__meta { color: #6d7c96; font-size: 13px; }

.card--featured { grid-column: 1 / -1; flex-direction: row; margin-bottom: 8px; }
.card--featured .card__media { flex: 0 0 55%; aspect-ratio: auto; }
.card--featured .card__body { justify-content: center; padding: 32px 34px; gap: 12px; }
.card--featured .card__title { font-size: clamp(22px, 3.2vw, 32px); }
.card--featured .card__excerpt { font-size: 16px; }

.tag {
  align-self: flex-start;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- Статья ---------- */

.post { max-width: 760px; margin: 0 auto; padding: 48px 0 0; }
.post__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.post__title {
  margin: 0; font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 800;
}
.post__lead { margin: 0; color: var(--muted); font-size: 19px; line-height: 1.55; }
.post__meta { margin: 0; color: #6d7c96; font-size: 14px; }
.post__cover { margin: 0 0 36px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }

.prose { font-size: 18px; line-height: 1.75; }
.prose h2 {
  margin: 44px 0 14px; font-size: 27px; line-height: 1.25;
  letter-spacing: -0.02em; font-weight: 700;
}
.prose h3 { margin: 32px 0 10px; font-size: 21px; font-weight: 700; }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 10px; margin: 26px 0; border: 1px solid var(--border); }
.prose figure { margin: 26px 0; }
.prose figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
.prose blockquote {
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted); font-style: italic;
}
.prose code {
  background: var(--surface-2); padding: 2px 6px;
  border-radius: 5px; font-size: 0.9em;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 38px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 16px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Служебное ---------- */

.page-head { padding: 56px 0 28px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.03em; font-weight: 800; }
.page-head p { margin: 0; color: var(--muted); }
.empty { color: var(--muted); }

.site-foot { margin-top: 80px; border-top: 1px solid var(--border); background: var(--surface); }
.site-foot__inner { padding: 36px 20px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.site-foot__name { margin: 0 0 4px; font-weight: 700; }
.site-foot__bio { margin: 0; color: var(--muted); font-size: 15px; max-width: 42ch; }
.site-foot__nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; font-size: 15px; }
.site-foot__nav a { color: var(--muted); }
.site-foot__nav a:hover { color: var(--text); }
.site-foot__copy { width: 100%; margin: 8px 0 0; color: #5d6a82; font-size: 13px; }

/* ---------- Телефон ---------- */

@media (max-width: 860px) {
  .card--featured { flex-direction: column; }
  .card--featured .card__media { flex: none; aspect-ratio: 16 / 9; }
  .card--featured .card__body { padding: 20px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .nav.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px 20px; gap: 14px;
  }
  .nav-toggle { display: block; }
  .hero { padding: 44px 0 28px; }
  .post { padding-top: 32px; }
  .prose { font-size: 17px; }
}
