/* rewild the web — stylesheet */

@font-face {
  font-family: 'Press Start 2P';
  src: url('https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg:        #0d1a0d;
  --bg-alt:    #111f11;
  --border:    #2a4a2a;
  --green-dim: #4a7a4a;
  --green:     #6aab6a;
  --green-hi:  #8fcf8f;
  --text:      #b8d8b8;
  --text-dim:  #6a8a6a;
  --accent:    #5a9a5a;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── typography ── */

h1, h2, h3 {
  font-family: 'Press Start 2P', monospace;
  color: var(--green-hi);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

h1 { font-size: 1rem; margin-bottom: 0.5rem; }
h2 { font-size: 0.75rem; margin: 2.5rem 0 1rem; color: var(--green); }
h3 { font-size: 0.6rem; margin: 1.5rem 0 0.5rem; color: var(--green-dim); }

p { margin-bottom: 1rem; }

a {
  color: var(--green-hi);
  text-decoration: underline;
  text-decoration-color: var(--green-dim);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--green-hi);
}

/* ── header ── */

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.site-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: var(--green-hi);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
}

.site-title:hover { color: #fff; text-decoration: none; }

.tagline {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  margin: 0;
}

.tagline a {
  color: inherit;
  text-decoration: none;
}

.tagline a:hover {
  color: var(--green);
}

nav {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--green);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

nav a:hover { color: var(--green-hi); }
nav a.active { color: var(--green-hi); border-bottom: 1px solid var(--green-hi); }

/* ── footer ── */

footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

footer a { color: var(--text-dim); }
footer a:hover { color: var(--green); }

/* ── resource cards ── */

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-item {
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  transition: border-color 0.15s;
}

.resource-item:hover {
  border-color: var(--green-dim);
}

.resource-item a.resource-link {
  font-weight: bold;
  color: var(--green-hi);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

.resource-item a.resource-link:hover { color: #fff; }

.resource-meta {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
}

.resource-desc {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
}

.tag {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  margin-right: 0.3rem;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
}

/* ── sections / categories ── */

.category-section {
  margin-bottom: 3rem;
}

/* ── index hero ── */

.intro {
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  background: var(--bg-alt);
  font-size: 0.85rem;
  line-height: 1.8;
}

.intro p:last-child { margin-bottom: 0; }

/* ── page content (single pages) ── */

.content h2 { margin-top: 2rem; }
.content ul, .content ol {
  margin: 0.75rem 0 1rem 1.5rem;
}
.content li { margin-bottom: 0.4rem; }

/* ── utilities ── */

.dim { color: var(--text-dim); }
.mono { font-family: 'Courier New', Courier, monospace; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ── light mode (inverted) ── */

@media (prefers-color-scheme: light) {
  :root {
    --bg:        #f4f8f4;
    --bg-alt:    #edf3ed;
    --border:    #c4d8c4;
    --green-dim: #4a7a4a;
    --green:     #2a6a2a;
    --green-hi:  #1a4a1a;
    --text:      #141e14;
    --text-dim:  #4a5e4a;
    --accent:    #2a5a2a;
  }

  a:hover { color: #000; }
  .site-title:hover { color: #000; }
  .resource-item a.resource-link:hover { color: #000; }
}

/* ── responsive ── */

@media (max-width: 600px) {
  body { padding: 1rem 1rem 3rem; }
  h1 { font-size: 0.7rem; }
  nav { gap: 1rem; }
}
