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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1c2128;
  --border:    #30363d;
  --border2:   #21262d;
  --accent:    #4fc3f7;
  --accent2:   #0288d1;
  --green:     #3fb950;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --muted2:    #6e7681;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.nav-logo::before { content: '> '; color: var(--muted2); }

.nav-back {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--accent); }

/* ─── LANG SWITCHER ─── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 4px 0 8px;
  background: var(--surface);
  transition: border-color 0.15s;
}
.lang-switcher:hover { border-color: var(--muted2); }

.lang-globe { width: 14px; height: 14px; color: var(--muted2); flex-shrink: 0; }

.lang-select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 20px 6px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='none' stroke='%238b949e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2 3.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 10px;
}
.lang-select option { background: var(--surface); color: var(--text); }

/* ─── FOOTER SHARED ─── */
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted2);
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--accent); }

@media (max-width: 640px) {
  nav { padding: 0 1rem; }
}
