:root {
  --bg: #0f1218;
  --panel: #171b24;
  --text: #ece8de;
  --muted: #a3a6ad;
  --accent: #e8a33d;
  --line: #262b36;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* верхняя полоска со ссылками */
.topnav { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.topnav .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 16px; }
.topnav a { color: var(--text); text-decoration: none; font-weight: 600; }
.topnav nav a { margin-left: 22px; font-weight: 500; color: #d9d5cb; }
.topnav a:hover { color: var(--accent); }
.topnav.solid { position: static; border-bottom: 1px solid var(--line); }

header.hero { position: relative; min-height: 88vh; display: grid; align-items: end; overflow: hidden; }
header.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
header.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,18,24,.55) 0%, rgba(15,18,24,.15) 18%, rgba(15,18,24,.55) 55%, var(--bg) 100%); }
.hero-text { position: relative; z-index: 1; padding-bottom: 64px; }
.tag { display: inline-block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(232,163,61,.5); border-radius: 999px; padding: 3px 12px; margin-bottom: 14px; background: rgba(15,18,24,.6); }
h1 { font-size: clamp(48px, 9vw, 104px); line-height: 1; margin: 0 0 14px; letter-spacing: -.02em; }
.lead { font-size: clamp(18px, 2.3vw, 23px); max-width: 42rem; margin: 0; color: #d9d5cb; }

section { padding: 72px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.5vw, 36px); margin: 0 0 28px; }
.intro { color: var(--muted); max-width: 46rem; margin: -12px 0 28px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* как собирается билд: дерево + шаги */
.build { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.tree { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  font: 15px/1.7 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre; overflow-x: auto; color: #d9d5cb; }
.tree .ev { color: var(--accent); }
.tree .mod { color: var(--muted); }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 14px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.steps b { color: var(--text); }

.shot { margin: 0 0 22px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.shot figcaption { padding: 12px 18px; color: var(--muted); font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.gallery .shot { margin: 0; }

/* дневник: карточки на главной */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.post-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  color: var(--text); text-decoration: none; transition: border-color .15s; }
.post-card:hover { border-color: rgba(232,163,61,.6); }
.post-card time { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.post-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.post-card p { margin: 0; color: var(--muted); font-size: 16px; }
.more { margin: 24px 0 0; }

.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.status div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.status b { display: block; font-size: 22px; color: var(--accent); }
.status span { color: var(--muted); font-size: 15px; }

/* страница дневника */
.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(40px, 7vw, 72px); }
.page-head p { color: var(--muted); margin: 0; }
.toc { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { border-bottom: 1px solid var(--line); }
.toc a { display: flex; gap: 16px; padding: 10px 0; text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--accent); }
.toc time { flex: 0 0 9.5em; color: var(--muted); font-size: 15px; padding-top: 1px; }
article.entry { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
article.entry:first-of-type { border-top: 0; }
.entry time { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.entry h2 { margin: 0 0 18px; line-height: 1.2; }
.entry h2 a { color: inherit; text-decoration: none; }
.entry h3 { font-size: 19px; margin: 28px 0 6px; }
.entry p, .entry ul { margin: 0 0 14px; }
.entry ul { padding-left: 22px; }
.entry li { margin-bottom: 6px; }
.entry .shot { margin: 22px 0; }
.entry .note { color: var(--muted); font-size: 15px; }

footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .build { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  header.hero { min-height: 72vh; }
  .hero-text { padding-bottom: 40px; }
  section { padding: 52px 0; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .tree { font-size: 12px; padding: 16px 14px; }
  .topnav nav a { margin-left: 16px; }
  .toc a { flex-direction: column; gap: 0; }
  .toc time { flex: none; }
  article.entry { padding: 44px 0; }
}
