/* netcodec.site — базовые стили */
:root {
  --bg: #0e1116;
  --bg-card: #171c24;
  --accent: #4da3ff;
  --accent-2: #7ef0c1;
  --text: #e6eaf0;
  --muted: #9aa7b5;
  --border: #2a3240;
  --radius: 12px;
  --maxw: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Шапка */
.site-header {
  background: rgba(23, 28, 36, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.main-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--text);
  background: rgba(77, 163, 255, 0.12);
}

/* Хлебные крошки */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 14px 0 0;
}
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: var(--border); }

/* Герой */
.hero {
  position: relative;
  padding: 84px 0 56px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(77, 163, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(126, 240, 193, 0.08), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero .tag {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 20px;
  animation: fadeUp .6s ease both;
}
h1 { font-size: 2.4rem; line-height: 1.2; margin: 0 0 16px; animation: fadeUp .6s .1s ease both; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; margin: 0 auto 28px; animation: fadeUp .6s .2s ease both; }
.hero .btn { animation: fadeUp .6s .3s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #06121f;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 10px;
  margin: 4px;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Заголовки разделов */
.section-title {
  text-align: center;
  font-size: 1.7rem;
  margin: 24px 0 8px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 8px;
}

/* Карточки разделов */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 32px 0 48px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(77, 163, 255, 0.12);
}
.card .num { color: var(--accent); font-weight: 700; font-size: 0.85rem; letter-spacing: .06em; }
.card h2, .card h3 { margin: 8px 0 8px; font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Таймлайн (страница «История») */
.timeline {
  position: relative;
  margin: 32px 0 48px;
  padding-left: 28px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .15s ease;
}
.timeline-item:hover { border-color: var(--accent); }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.timeline-item .year {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: .05em;
}
.timeline-item h3 { margin: 6px 0; font-size: 1.1rem; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Глоссарий */
.glossary dt {
  font-weight: 700;
  color: var(--accent-2);
  margin-top: 20px;
  font-size: 1.05rem;
}
.glossary dd {
  margin: 4px 0 0;
  color: #cfd8e3;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; padding: 8px 0 48px; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 22px;
  color: var(--accent);
  font-weight: 700;
  transition: transform .15s ease;
}
.faq details[open] summary::before { content: "−"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Контент статей */
.article { padding: 24px 0 48px; max-width: 780px; }
.article h2 { font-size: 1.6rem; margin: 36px 0 12px; color: var(--accent-2); }
.article h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.article p, .article li { color: #cfd8e3; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article a { color: var(--accent); }

.note {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--muted);
}
.note strong { color: var(--text); }

code, pre {
  font-family: Consolas, "Courier New", monospace;
  background: #0a0d12;
  border: 1px solid var(--border);
  border-radius: 6px;
}
code { padding: 2px 6px; font-size: 0.9em; }
pre { padding: 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: none; padding: 0; color: var(--accent-2); }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
th { background: var(--bg-card); }

/* Подвал */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer ul { list-style: none; padding: 0; margin: 8px 0 0; }
.site-footer li { margin-bottom: 6px; }

@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .hero { padding: 48px 0 32px; }
  .timeline { padding-left: 20px; }
  .timeline-item::before { left: -28px; }
}
