@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:         #04100d;
  --nav-bg:     #061410;
  --card-bg:    #091c15;
  --border:     #163529;
  --accent:     #2dbd96;
  --accent-dim: #147A61;
  --accent-hi:  #3dd9ac;
  --text:       #ddeee8;
  --muted:      #6b9e8e;
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
  --nav-h:      58px;
  --r:          10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 6px;
  z-index: 200;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-right: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 2px; list-style: none; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  transition: color 0.14s, background 0.14s;
}

.nav-links a:hover { color: var(--text); background: rgba(45,189,150,0.07); }
.nav-links a.active { color: var(--accent); background: rgba(45,189,150,0.1); }

.nav-spacer { flex: 1; }

.nav-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.nav-search-btn:hover,
.nav-search-wrap.open .nav-search-btn {
  color: var(--text);
  border-color: var(--border);
  background: var(--card-bg);
}

.nav-search-panel {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 28px;
  width: 340px;
  background: #0d2318;
  border: 1px solid rgba(45,189,150,0.18);
  border-radius: var(--r);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(45,189,150,0.06);
  overflow: hidden;
  display: none;
  z-index: 9999;
}

.nav-search-wrap.open .nav-search-panel { display: block; }

.nav-search-input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(45,189,150,0.15);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 10px 14px 10px 38px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b9e8e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.nav-search-input::placeholder { color: var(--muted); }

.nav-search-results { max-height: 320px; overflow-y: auto; }

.sr-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: rgba(45,189,150,0.06); }

.sr-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.sr-snippet {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.sr-item mark {
  background: rgba(45,189,150,0.25);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}

.sr-empty {
  padding: 14px;
  font-size: 0.83rem;
  color: var(--muted);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.btn-primary {
  background: var(--accent-dim);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hi); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--card-bg); color: var(--text); }


footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

footer a { color: var(--muted); text-decoration: none; transition: color 0.14s; }
footer a:hover { color: var(--accent); }
footer .footer-links { display: flex; gap: 20px; }
footer .footer-spacer { flex: 1; }


code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: rgba(45,189,150,0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
