/* ── Variables ── */
:root {
  --bg:          #0d0f0a;
  --bg-2:        #141810;
  --bg-3:        #1c2116;
  --text:        #d4cfb8;
  --text-muted:  #7a7a62;
  --accent:      #6b8c3e;
  --accent-bright: #8ab84f;
  --accent-dim:  rgba(107, 140, 62, 0.12);
  --khaki:       #b5a96a;
  --khaki-dim:   rgba(181, 169, 106, 0.12);
  --border:      #252d1a;
  --border-light:#303d20;
  --danger:      #c0392b;
  --font-main:   'Oswald', sans-serif;
  --font-body:   'Source Serif 4', serif;
  --font-mono:   'JetBrains Mono', monospace;
  --max-w:       1100px;
  --max-w-text:  720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Subtle noise texture for tactical feel */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

main { flex: 1; }
img { max-width: 100%; display: block; height: auto;}
a { color: var(--accent-bright); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--khaki); }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-main);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.95rem; }

p { margin-bottom: 1rem; }

/* ── Nav ── */
header {
  background: var(--bg-2);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span { color: var(--accent-bright); }

nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

nav ul a {
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  transition: all 0.2s;
}

nav ul a:hover {
  color: var(--accent-bright);
  border-color: var(--border-light);
  background: var(--accent-dim);
}

.nav-search {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}

.nav-search:hover { border-color: var(--accent); color: var(--accent-bright); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ── Footer ── */
footer {
  background: var(--bg-2);
  border-top: 2px solid var(--accent);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Page wrapper ── */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── Tag / badge ── */
.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--accent-dim);
  color: var(--accent-bright);
  border: 1px solid rgba(107,140,62,0.3);
  border-radius: 2px;
  font-size: 0.72rem;
  font-family: var(--font-main);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-khaki {
  background: var(--khaki-dim);
  color: var(--khaki);
  border-color: rgba(181,169,106,0.3);
}

/* ── Category label ── */
.cat-label {
  font-family: var(--font-main);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  border-left: 3px solid var(--accent);
  padding-left: 0.5rem;
}

/* ── Section heading ── */
.section-heading {
  font-family: var(--font-main);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav ul { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-2); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); }
  nav ul.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}
