/* ==========================================================================
   Base styles — professional dark theme
   ========================================================================== */

:root {
  --bg: #0a0f1c;
  --bg-elevated: #0e1524;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7edf7;
  --text-muted: #9aa6bf;
  --text-dim: #6c7892;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-2: #818cf8;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Background texture & glows */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 0%, transparent 72%);
}

.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.glow-1 {
  width: 480px;
  height: 480px;
  background: rgba(14, 165, 233, 0.55);
  top: -160px;
  right: -100px;
  opacity: 0.22;
}

.glow-2 {
  width: 440px;
  height: 440px;
  background: rgba(99, 102, 241, 0.55);
  bottom: -180px;
  left: -120px;
  opacity: 0.18;
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.brand-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--accent);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lang-toggle:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.lang-toggle .flag {
  font-size: 1.05rem;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
  border-color: transparent;
  color: #04121f;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.08);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

/* Typography */
.h2 {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.1px;
}

.h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 700;
}

.p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.small {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--text-muted);
}

.list li {
  margin: 6px 0;
}

.list li::marker {
  color: var(--accent);
}

/* Footer */
.footer {
  margin-top: 34px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }
}
