/* ============================================================
   Bastion Hunt — site styles
   Edit colors, fonts, and spacing here. Changes apply to every page.
   ============================================================ */

:root {
  /* Colors — change these to re-theme the whole site */
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #ffffff;
  --color-accent: #2563eb;
  --color-border: #e5e5e5;
  --color-code-bg: #f5f5f5;

  /* Fonts */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --max-width: 680px;
}

/* Dark mode — automatically applies if the visitor's device prefers dark */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-bg: #0f0f0f;
    --color-accent: #60a5fa;
    --color-border: #2a2a2a;
    --color-code-bg: #1a1a1a;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---- Header / Navigation ---- */
header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.125rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.nav-links a:hover {
  color: var(--color-accent);
}

/* ---- Main content ---- */
main {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 1rem 0 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
}

p { margin: 1rem 0; }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { text-decoration-thickness: 2px; }

.lede {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  line-height: 1.5;
}

/* ---- Lists ---- */
ul, ol { padding-left: 1.5rem; }
li { margin: 0.25rem 0; }

/* ---- Code ---- */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--color-code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background-color: var(--color-code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
}

pre code {
  background: none;
  padding: 0;
}

/* ---- Project list ---- */
.project-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.project-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}

.project-list li:last-child {
  border-bottom: none;
}

.project-list h3 {
  margin: 0 0 0.25rem;
}

.project-list h3 a {
  text-decoration: none;
  color: var(--color-text);
}

.project-list h3 a:hover {
  color: var(--color-accent);
}

.project-list p {
  margin: 0.25rem 0;
  color: var(--color-text-muted);
}

.project-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ---- Images ---- */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ---- Footer ---- */
footer {
  max-width: var(--max-width);
  margin: 4rem auto 2rem;
  padding: 2rem 1.5rem 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

footer p { margin: 0; }
