/* Aniwave Modern Dark Theme CSS Design System (aniwaves.ru matched) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-main: #0e0e11;
  --bg-surface: #16161c;
  --bg-surface-hover: #1d1d26;
  --bg-header: #121217;
  --border-color: #24242e;
  --border-highlight: #343445;

  --text-primary: #ffffff;
  --text-secondary: #c5c7d8;
  --text-muted: #9ea0b5;

  --brand-purple: #7f46f8;
  --brand-purple-dark: #6f42c1;
  --brand-purple-bg: rgba(127, 70, 248, 0.15);
  
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-orange: #ff4500;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--text-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-purple); }

.wrap {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

/* Navigation Bar */
.site-header {
  background: rgba(18, 18, 23, 0.92);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 2px;
}

.brand span {
  color: var(--brand-purple);
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav nav a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav nav a:hover, .nav nav a.active {
  color: var(--brand-purple);
}

.btn-signin {
  background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(127, 70, 248, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-signin:hover {
  color: #fff;
  opacity: 0.9;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, #161622 0%, var(--bg-main) 100%);
  padding: 48px 0;
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-purple);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.lede {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
}

.hero-card strong {
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.hero-card p {
  color: var(--text-muted);
  font-size: 13px;
}

/* Cards & Section Grids */
.section {
  padding: 40px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.article-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.article-card h2, .article-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 10px 0;
}

.article-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.article-card time {
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
}

/* Badges & Pills */
.badge, .pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
}

.pill-purple { background: var(--brand-purple-bg); color: var(--brand-purple); border: 1px solid rgba(127, 70, 248, 0.3); }
.pill-cyan { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.pill-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }

/* Executive Summary Box (TL;DR) */
.tldr-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-purple);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}

.tldr-box strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-purple);
  display: block;
  margin-bottom: 8px;
}

.tldr-box ul {
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Single Article Styling */
article {
  max-width: 800px;
  margin: 0 auto;
}

article h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

article h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 28px 0 14px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  color: #fff;
}

article p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}

article a {
  color: var(--accent-cyan);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.25);
  transition: all 0.15s ease-in-out;
}

article a:hover {
  color: #fff;
  background-color: rgba(56, 189, 248, 0.1);
  border-bottom-color: var(--accent-cyan);
  border-radius: 4px;
  padding: 0 4px;
}

article pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-header);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: 60px;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid nav {
  display: flex;
  gap: 20px;
}

.footer-grid nav a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-grid nav a:hover {
  color: var(--brand-purple);
}

/* App-like Native Mobile Styling (@media max-width: 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 70px; /* Leave space for bottom app dock bar */
  }

  .wrap {
    width: calc(100% - 24px);
  }

  .nav nav {
    display: none; /* Hidden on mobile header, replaced by bottom app dock */
  }

  .nav {
    height: 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding: 24px 0 16px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .article-layout {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .article-sidebar {
    width: 100% !important;
    position: static !important;
    display: flex !important;
  }
}
