/* Будни Айтишника — статическая тема (перенос из Tailwind-дизайна) */
:root {
  --background: 220 18% 7%;
  --foreground: 0 0% 98%;
  --card: 220 14% 11%;
  --card-foreground: 0 0% 98%;
  --primary: 217 91% 60%;
  --primary-foreground: 0 0% 98%;
  --secondary: 210 16% 18%;
  --muted: 220 10% 20%;
  --muted-foreground: 220 10% 70%;
  --border: 220 12% 22%;
  --ring: 217 91% 60%;
  --radius: 0.5rem;
  --surface-dark: 220 20% 10%;
  --gradient-accent: linear-gradient(90deg, hsl(217 91% 60%), hsl(210 80% 55%), hsl(200 85% 50%));
  --gradient-hero: linear-gradient(135deg, hsl(220 18% 7%), hsl(220 25% 8%), hsl(217 30% 10%));
  --gradient-card: linear-gradient(145deg, hsl(220 14% 11%), hsl(217 16% 13%));
  --glow-blue: 0 0 20px hsl(217 91% 60% / 0.25);
}

* { box-sizing: border-box; border-color: hsl(var(--border)); }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Manrope, "Noto Sans", Arial, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: hsl(var(--primary)); text-decoration: none; text-underline-offset: 3px; transition: color .15s ease-out; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.01em; line-height: 1.25; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.muted { color: hsl(var(--muted-foreground)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: hsl(var(--background)); }
::-webkit-scrollbar-thumb { background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); border-radius: 999px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; height: 64px; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-size: 1.25rem; font-weight: 800; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.nav-desktop { display: none; gap: 1.5rem; align-items: center; }
.nav-desktop a { font-size: .9rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.nav-desktop a:hover { color: hsl(var(--primary)); text-decoration: none; }
.header-actions { display: none; align-items: center; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--radius); padding: .5rem 1rem; font-weight: 600; font-size: .9rem;
  border: 1px solid transparent; cursor: pointer; min-height: 40px; text-decoration: none;
}
.btn-primary { background: var(--gradient-accent); color: hsl(var(--primary-foreground)); box-shadow: var(--glow-blue); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.05); }
.btn-outline { border-color: hsl(var(--border)); color: hsl(var(--foreground)); background: transparent; }
.menu-toggle { display: inline-flex; background: none; border: 0; color: hsl(var(--foreground)); padding: .5rem; cursor: pointer; }
.nav-mobile { display: none; border-top: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
.nav-mobile.open { display: block; }
.nav-mobile nav { display: flex; flex-direction: column; gap: .25rem; padding: .75rem 1rem; }
.nav-mobile a { padding: .6rem 0; color: hsl(var(--muted-foreground)); font-weight: 500; }
@media (min-width: 860px) {
  .nav-desktop { display: flex; }
  .header-actions { display: flex; }
  .menu-toggle { display: none; }
}

/* Layout */
main { min-height: 60vh; }
.section { padding: 2.5rem 0; }
.page { padding: 2rem 0; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 2fr 1fr; } }

/* Hero */
.hero { background: var(--gradient-hero); border-bottom: 1px solid hsl(var(--border)); padding: 3.5rem 0; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin: 0 0 1rem; }
.hero p { font-size: 1.15rem; color: hsl(var(--muted-foreground)); max-width: 720px; }
.hero .btn { margin-top: 1.5rem; }
.accent { color: hsl(var(--primary)); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--gradient-card); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); overflow: hidden; transition: border-color .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: hsl(var(--primary) / 0.4); box-shadow: var(--glow-blue); }
.card img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; display: block; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.card .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: hsl(var(--primary)); font-weight: 700; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card h3 a { color: hsl(var(--foreground)); }
.card h3 a:hover { color: hsl(var(--primary)); text-decoration: none; }
.card p { margin: 0; font-size: .9rem; color: hsl(var(--muted-foreground)); }
.card .meta { font-size: .78rem; color: hsl(var(--muted-foreground)); margin-top: auto; }

/* Breadcrumbs */
.breadcrumbs { font-size: .82rem; color: hsl(var(--muted-foreground)); margin: 0 0 1rem; }
.breadcrumbs a { color: hsl(var(--muted-foreground)); }
.breadcrumbs a:hover { color: hsl(var(--primary)); }

/* Article */
.article-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; margin: .25rem 0 .75rem; }
.article-lead { font-size: 1.2rem; color: hsl(var(--muted-foreground)); margin: 0 0 1.25rem; }
.article-cover { width: 100%; border: 1px solid hsl(var(--primary) / 0.2); border-radius: var(--radius); margin-bottom: 1.5rem; }
.aside-box { background: hsl(var(--card)); border: 1px solid hsl(var(--primary) / 0.2); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.aside-box .title { font-size: .85rem; font-weight: 700; color: hsl(var(--primary)); margin: 0 0 .75rem; }
.toc ul, .related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.toc a, .related a { color: hsl(var(--muted-foreground)); font-size: .9rem; }
.cta-box { margin-top: 2.5rem; padding: 1.5rem; border: 1px solid hsl(var(--primary) / 0.2); border-radius: var(--radius); background: hsl(var(--card)); }
.cta-box h3 { margin: 0 0 1rem; font-size: 1.1rem; }

/* Prose (перенос из index.css) */
.prose { color: hsl(var(--foreground)); }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; color: hsl(var(--primary)); scroll-margin-top: 80px; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 .75rem; }
.prose p { margin: 0 0 1rem; color: hsl(var(--muted-foreground)); }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.prose li { margin-bottom: .4rem; color: hsl(var(--muted-foreground)); }
.prose code { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); padding: .1rem .35rem; border-radius: 4px; font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose pre { background: hsl(var(--surface-dark)); border: 1px solid hsl(var(--primary) / 0.2); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: 0 0 1rem; }
.prose pre code { background: transparent; color: hsl(var(--foreground)); padding: 0; }
.prose blockquote { border-left: 4px solid hsl(var(--primary) / 0.4); padding-left: 1rem; font-style: italic; color: hsl(var(--muted-foreground)); margin: 1rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .92rem; display: block; overflow-x: auto; }
.prose th { background: hsl(var(--primary) / 0.1); border: 1px solid hsl(var(--primary) / 0.2); padding: .6rem .75rem; text-align: left; font-weight: 600; }
.prose td { border: 1px solid hsl(var(--primary) / 0.2); padding: .6rem .75rem; }
.prose tr:hover { background: hsl(var(--primary) / 0.05); }
.prose a { color: hsl(var(--primary)); }
.prose strong { font-weight: 600; color: hsl(var(--foreground)); }

/* Search */
.search-box { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.search-box input { flex: 1; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: .7rem .9rem; color: hsl(var(--foreground)); font-size: 1rem; }
.search-results { display: flex; flex-direction: column; gap: 1rem; }
.search-hit { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 1rem; background: hsl(var(--card)); }
.search-hit h3 { margin: 0 0 .35rem; font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid hsl(var(--border)); background: hsl(var(--card)); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 1.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h3 { font-size: 1.05rem; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: hsl(var(--muted-foreground)); font-size: .9rem; }
.footer-bottom { border-top: 1px solid hsl(var(--border)); padding: 1.5rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: hsl(var(--muted-foreground)); font-size: .85rem; }

/* Section headings */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { font-size: 1.5rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid hsl(var(--border)); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; color: hsl(var(--muted-foreground)); }
.chip:hover { border-color: hsl(var(--primary) / 0.5); color: hsl(var(--primary)); text-decoration: none; }
