:root { 
  --bg:#090a0c; 
  --fg:#fcf8f8; 
  --mut:#bebeb2; 
  --card:#17181d; 
  --line:#202127; 
}

* { 
  box-sizing: border-box; 
}

html {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

body { 
  margin:0; 
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; 
  background:var(--bg); 
  color:var(--fg);
  overflow-x: hidden;
}

a { 
  color: inherit; 
  text-decoration: none; 
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

header { 
  position: sticky; 
  top:0; 
  background:rgba(11,12,15,.8); 
  backdrop-filter: blur(8px); 
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px 0;
  position: relative;
}

.header-nav {
  padding: 8px 0 12px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(15,16,20,.5);
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

.logo-text {
  line-height: 1.2;
}

.burger-menu {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger-menu span {
  width: 24px;
  height: 3px;
  background: #fff;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

.desktop-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 100%;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
}

.desktop-nav a, .mobile-nav a { 
  padding:10px 14px; 
  border-radius: 999px; 
  display:inline-flex; 
  gap:8px; 
  align-items:center; 
  font-size:14px; 
  color:#e6e6ea; 
  transition: all 0.2s ease;
}

.desktop-nav a.active, .desktop-nav a:hover,
.mobile-nav a.active, .mobile-nav a:hover { 
  background:#fff; 
  color:#000; 
}

.header-badges {
  display: flex;
  gap: 8px;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(11,12,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 20px;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.mobile-nav.active {
  display: flex;
}

.mobile-badges {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.kicker { 
  color:#a8a8b5; 
  text-transform: uppercase; 
  letter-spacing: .2em; 
  font-size:12px; 
  margin-bottom:6px; 
}

h1 { 
  font-size: 34px; 
  margin: 14px 0; 
}

h2 { 
  font-size: 26px; 
  margin: 18px 0 10px; 
}

h3 { 
  font-size: 18px; 
  margin: 12px 0 8px; 
}

p, li { 
  color:#d7d7de; 
  line-height:1.6; 
}

section { 
  padding: 32px 0; 
  border-bottom:1px solid var(--line); 
}

.grid { 
  display:grid; 
  gap:14px; 
}

.grid-2 { 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
}

.grid-3 { 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
}

.card { 
  background: var(--card); 
  border:1px solid var(--line); 
  border-radius: 16px; 
  padding: 16px; 
}

.badge { 
  display:inline-flex; 
  padding:6px 10px; 
  font-size:12px; 
  border:1px solid var(--line); 
  border-radius:999px; 
  color:#e6e6ea; 
  margin-right:8px; 
}

footer { 
  background:#0f1014; 
  border-top:1px solid var(--line); 
  padding: 36px 0; 
  font-size:14px; 
}

ul.inline { 
  list-style: disc; 
  padding-left: 18px; 
}

ol.inline { 
  padding-left:18px; 
}

.muted { 
  color:#a8a8b5; 
  font-size: 14px; 
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
  .desktop-nav a, .mobile-nav a {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  .burger-menu {
    min-height: 44px;
    min-width: 44px;
  }
  
  .badge {
    min-height: 32px;
    padding: 8px 12px;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .header-top {
    width: 100%;
    overflow-x: hidden;
    padding: 8px 0;
  }
  
  .header-nav {
    display: none;
  }
  
  .logo-section {
    gap: 8px;
  }
  
  .logo-text strong {
    font-size: 14px;
    line-height: 1.3;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .header-badges {
    display: none;
  }
  
  h1 {
    font-size: 28px;
    margin: 12px 0;
  }
  
  h2 {
    font-size: 22px;
    margin: 16px 0 8px;
  }
  
  h3 {
    font-size: 16px;
    margin: 10px 0 6px;
  }
  
  section {
    padding: 24px 0;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  p, div, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  table, pre, code {
    max-width: 100%;
    overflow-x: auto;
  }
  
  .badge {
    font-size: 11px;
    padding: 4px 8px;
    margin-right: 6px;
  }
  
  .mobile-badges .badge {
    margin-bottom: 6px;
  }
  
  footer {
    padding: 24px 0;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  .logo-text {
    display: none;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .grid {
    gap: 12px;
  }
  
  .card {
    padding: 12px;
  }
  
  section {
    padding: 20px 0;
  }
}
