/* ═══════════════════════════════════════════════════
   sultanov.space — Shared styles (used on every page)
   ═══════════════════════════════════════════════════ */

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

:root {
  --green: #2a9d2a;
  --green-hover: #1e7a1e;
  --text: #111111;
  --muted: #666666;
  --border: #d8d8d8;
  --bg: #f9f9f7;
  --surface: #ffffff;
  --surface2: #f4f9f4;
  --shadow: rgba(0,0,0,0.06);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --transition: 0.3s ease;
}
[data-theme="dark"] {
  --text: #eeeeff;
  --muted: #8888aa;
  --border: #2a2a3a;
  --bg: #0d0d14;
  --surface: #13131f;
  --surface2: #1a1a2a;
  --shadow: rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(128,128,128,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128,128,128,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none; z-index: 0;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}
.nav-logo { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.nav-logo span { color: var(--green); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--green); }
.nav-controls { display: flex; gap: 8px; }
.ctrl-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer; font-size: 15px;
  color: var(--muted);
  transition: all 0.2s;
}
.ctrl-btn:hover { border-color: var(--text); color: var(--text); }
.lang-btn { font-family: var(--mono); font-size: 11px; font-weight: 600; width: auto; padding: 0 10px; }
.hamburger-btn { display: none; font-size: 16px; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px 48px;
  text-align: center;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
footer a { color: var(--green); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── SHARED KEYFRAMES ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── SHARED MODAL SHELL (overlay + close button + tag chip look) ── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all 0.15s;
}
.modal-close:hover { border-color: var(--text); color: var(--text); }

@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .hamburger-btn { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 4px 20px 12px;
    box-shadow: 0 12px 24px var(--shadow);
  }
  .nav-links.mobile-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
  .nav-links li:last-child a { border-bottom: none; }
  footer { padding: 20px; }
}
