/* Dev0pser — статическая тема технического медиа */
@font-face {
  font-family: Rubik;
  src: url("/assets/fonts/rubik-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Rubik;
  src: url("/assets/fonts/rubik-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

: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-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; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1280px) { .container { padding-inline: 2rem; } }
.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 {
  --header-height: 60px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #46506b;
  color: #f8f8fc;
  background: radial-gradient(ellipse at 76% -85%, #495b85, transparent 55%), linear-gradient(108deg, #161b2c 0%, #1b2336 45%, #26314a 73%, #191e30 100%);
  font-family: Rubik, system-ui, sans-serif;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1920px;
  min-height: var(--header-height);
  padding-inline: clamp(1rem, 2.8vw, 3.5rem);
}
.site-header a:hover { text-decoration: none; }
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  gap: .5rem;
  color: #f9f9fc;
  font-size: 1.54rem;
  font-weight: 590;
  letter-spacing: -.05em;
  line-height: 1;
}
.brand img { flex: none; width: 26px; height: auto; }
.nav-desktop { display: none; }
.header-actions { display: flex; align-items: center; gap: .35rem; }
.header-search, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 5px;
  color: #eff0f7;
  cursor: pointer;
}
.header-search:hover, .menu-toggle:hover, .site-menu[open] .menu-toggle { background: #ffffff12; color: #fff; }
.header-search[aria-current="page"] { color: #c3b7ff; }
.header-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  min-height: 44px;
  padding-inline: .25rem;
  color: #f6f5fc;
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
}
.header-telegram svg { width: 1.22em; height: 1.22em; flex: none; }
.header-telegram:hover { color: #cfc7ff; }
.header-actions > .header-telegram { display: none; }
.menu-toggle { list-style: none; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-lines { position: relative; width: 20px; height: 12px; }
.menu-lines::before, .menu-lines::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}
.menu-lines::before { top: 1px; }
.menu-lines::after { bottom: 1px; }
.site-menu[open] .menu-lines::before { top: 5px; transform: rotate(45deg); }
.site-menu[open] .menu-lines::after { bottom: 5px; transform: rotate(-45deg); }
.nav-mobile {
  position: absolute;
  inset: 100% 0 auto;
  max-height: calc(100vh - var(--header-height) - 1px);
  max-height: calc(100dvh - var(--header-height) - 1px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: .25rem clamp(1rem, 2.8vw, 3.5rem) .8rem;
  border-bottom: 1px solid #47516b;
  background: #1b2336;
  box-shadow: 0 12px 28px rgb(7 11 23 / 28%);
}
.nav-mobile > a:not(.header-telegram) {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #354057;
  color: #f0eff7;
  font-size: 1rem;
}
.nav-mobile .header-telegram { margin-top: .4rem; }
.nav-mobile a[aria-current="page"] { color: #c8bfff; font-weight: 600; }
.site-header :focus-visible { outline: 2px solid #c0b4ff; outline-offset: 2px; }
@media (min-width: 420px) and (max-width: 1099px) {
  .header-actions > .header-telegram { display: inline-flex; }
  .nav-mobile .header-telegram { display: none; }
}
@media (min-width: 1100px) {
  .site-header { --header-height: clamp(64px, 5.2vw, 76px); }
  .header-inner { gap: clamp(.65rem, 1.25vw, 1.5rem); }
  .brand { font-size: clamp(1.6rem, 2.25vw, 2.4rem); gap: clamp(.54rem, .8vw, .9rem); }
  .brand img { width: clamp(29px, 2.75vw, 47px); }
  .brand::after, .header-actions::before { content: ""; width: 1px; height: 1.75rem; background: #76809a; }
  .brand::after { margin-left: clamp(.35rem, 1.05vw, 1.35rem); }
  .nav-desktop { flex: 1; display: flex; align-items: stretch; justify-content: space-around; gap: .45rem; }
  .nav-desktop a {
    display: inline-flex;
    align-items: center;
    min-height: var(--header-height);
    color: #f3f1f7;
    font-size: clamp(.865rem, 1.16vw, 1.24rem);
    font-weight: 460;
    letter-spacing: -.022em;
    white-space: nowrap;
  }
  .nav-desktop a:hover { color: #d1caff; }
  .nav-desktop a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px #b5aaff; }
  .header-actions { flex: none; gap: clamp(.2rem, .55vw, .65rem); }
  .header-actions > .header-telegram { display: inline-flex; font-size: clamp(.88rem, 1.01vw, 1.1rem); }
  .site-menu { display: none; }
}

.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; }

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

/* Обложка главной */
.entry-hero {
  position: relative;
  isolation: isolate;
  background: #172131;
  color: #fff9f1;
}
.entry-art,
.entry-hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.entry-art {
  z-index: -2;
}
.entry-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}
.entry-hero::after {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgb(8 14 24 / 35%), transparent 72%),
              linear-gradient(0deg, rgb(9 14 24 / 56%), transparent 64%);
}
.entry-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  width: 100%;
  max-width: 1840px;
  min-height: clamp(31rem, 51.1vw, 60rem);
  min-height: clamp(31rem, min(51.1vw, 90svh), 60rem);
  margin-inline: auto;
  padding: 4rem clamp(1.5rem, 3.5vw, 4rem) clamp(2.5rem, 5.1vw, 6rem);
}
.entry-hero h1 {
  margin: 0;
  font: 540 clamp(3rem, 4.75vw, 5.6rem)/.99 Rubik, system-ui, sans-serif;
  letter-spacing: -.043em;
}
.entry-hero h1 span {
  display: block;
}
.entry-lead {
  max-width: 60ch;
  margin: clamp(.8rem, 1.05vw, 1.25rem) 0 0;
  color: #fff9f2;
  font: 420 clamp(1.05rem, 1.57vw, 1.75rem)/1.35 Rubik, system-ui, sans-serif;
}
.entry-routes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem clamp(1.3rem, 2.8vw, 3.25rem);
  margin-top: clamp(1.45rem, 2.85vw, 3.25rem);
}
.entry-routes a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(48px, 4.25vw, 72px);
  font: 535 clamp(1rem, 1.55vw, 1.72rem)/1.18 Rubik, system-ui, sans-serif;
  letter-spacing: -.025em;
}
.entry-start {
  padding: .6rem clamp(1.25rem, 2.3vw, 2.75rem);
  border-radius: 5px;
  color: #211b19;
  background: #f6b775;
}
.entry-start:hover {
  background: #ffca91;
  text-decoration: none;
}
.entry-routes .entry-devops {
  color: #fffaf3;
  text-decoration: underline;
  text-underline-offset: .24em;
  text-decoration-thickness: .08em;
}
.entry-devops:hover {
  color: #ffd6a7;
}
.entry-hero a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
@media (max-width: 800px) and (orientation: portrait) {
  .entry-art img { object-position: 95% center; }
  .entry-hero::after {
    background: linear-gradient(0deg, rgb(8 14 25 / 94%) 0%, rgb(8 14 25 / 84%) 22%,
      rgb(8 14 25 / 38%) 51%, transparent 75%);
  }
  .entry-layout {
    min-height: clamp(25rem, 76svh, 43rem);
    padding: 3rem clamp(1rem, 4.6vw, 2rem) clamp(1.6rem, 6.2vw, 3rem);
  }
  .entry-hero h1 { font-size: clamp(1.95rem, 9.8vw, 3.9rem); }
  .entry-lead { max-width: 34ch; font-size: clamp(1rem, 2.6vw, 1.18rem); line-height: 1.42; }
  .entry-routes { gap: .3rem clamp(.85rem, 3.8vw, 1.7rem); margin-top: 1.4rem; }
  .entry-routes a { min-height: 46px; font-size: clamp(.9rem, 3.9vw, 1.1rem); }
  .entry-start { padding-inline: clamp(.8rem, 3.6vw, 1.3rem); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .entry-layout { min-height: clamp(15rem, 78svh, 23rem); padding-block: 1.5rem; }
  .entry-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
  .entry-lead { max-width: 48ch; margin-top: .65rem; font-size: 1rem; }
  .entry-routes { gap: 1.4rem; margin-top: .8rem; }
  .entry-routes a { min-height: 44px; font-size: 1rem; }
}
.accent { color: hsl(var(--primary)); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.card {
  position: relative; isolation: isolate; min-width: 0;
  background: var(--gradient-card); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gradient-accent); opacity: .72; }
.card::after { content: ""; position: absolute; z-index: -1; width: 9rem; height: 9rem; right: -4.5rem; bottom: -5rem; border-radius: 50%; background: hsl(var(--primary) / .07); transition: transform .25s ease, opacity .25s ease; }
.card:hover { transform: translateY(-2px); border-color: hsl(var(--primary) / 0.45); box-shadow: var(--glow-blue); }
.card:hover::after { transform: scale(1.18); opacity: .9; }
.card-body { min-height: 100%; padding: 1.35rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .65rem; }
.card .tag { width: fit-content; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: hsl(var(--primary)); font-weight: 750; border: 1px solid hsl(var(--primary) / .24); border-radius: 999px; padding: .18rem .55rem; background: hsl(var(--primary) / .06); }
.card h3 { margin: 0; font-size: 1.12rem; line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; }
.card h3 a { color: hsl(var(--foreground)); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: hsl(var(--primary)); text-decoration: none; }
.card p { margin: 0; font-size: .9rem; color: hsl(var(--muted-foreground)); flex: 1; }
.card .meta { font-size: .78rem; color: hsl(var(--muted-foreground)); margin-top: auto; }
@media (min-width: 760px) { .cards { gap: 1.25rem; } .card-body { padding: 1.5rem; } }

/* 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 { max-width: 24ch; font-size: clamp(1.75rem, 3.5vw, 2.6rem); font-weight: 800; margin: .25rem 0 .85rem; text-wrap: balance; overflow-wrap: anywhere; }
.article-lead { max-width: 76ch; font-size: clamp(1.05rem, 2vw, 1.2rem); color: hsl(var(--muted-foreground)); margin: 0 0 1.25rem; }
.grid-2 > article > .meta { padding-bottom: 1.35rem; margin-bottom: 1.5rem; border-bottom: 1px solid hsl(var(--border)); color: hsl(var(--muted-foreground)); }
.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)); min-width: 0; overflow-wrap: break-word; }
.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 { width: 100%; max-width: 100%; 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)); }
@media (min-width: 960px) { .grid-2 > aside { align-self: start; position: sticky; top: 88px; } }
@media (max-width: 480px) {
  .page { padding-block: 1.5rem; }
  .article-title { font-size: 1.75rem; }
  .article-lead { line-height: 1.55; }
  .prose h2 { font-size: 1.35rem; }
  .prose h3 { font-size: 1.15rem; }
  .cta-box, .aside-box { padding: 1rem; }
}

/* 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 h1, .section-head h2 { font-size: 1.5rem; margin: 0; font-weight: 700; }
.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; }

.article-tags { margin-top: 1.5rem; }
