:root {
  --color-primary-green: #2d5016;
  --color-accent-green: #5a8c3a;
  --color-light-green: #e8f1e0;
  --color-brown: #6b4423;
  --color-light-brown: #d4c5b9;
  --color-text-dark: #1a1a1a;
  --color-text-light: #555555;
  --color-border: #d0c8c0;
  --color-bg-light: #faf8f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Georgia', 'Garamond', serif;
  line-height: 1.7;
  color: var(--color-text-dark);
  background: linear-gradient(135deg, var(--color-bg-light) 0%, #f5f3f0 100%);
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  border-bottom: 3px solid var(--color-accent-green);
  padding: 3rem 2rem;
  text-align: center;
  color: #f0f0f0;
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.2);
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  margin-top: 0.5rem;
  color: #d0d0d0;
  font-size: 1.1rem;
  font-style: italic;
}

nav {
  background: var(--color-light-green);
  padding: 1rem 1.5rem;
  display: flex;
  gap: 2rem;
  border-bottom: 2px solid var(--color-accent-green);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

nav a {
  color: var(--color-primary-green);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-family: system-ui, sans-serif;
}

nav a:hover {
  background: var(--color-accent-green);
  color: #ffffff;
  transform: translateY(-2px);
}

main {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

h1, h2, h3 {
  font-weight: 600;
  color: var(--color-primary-green);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  border-bottom: 3px solid var(--color-accent-green);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.6rem;
  color: var(--color-brown);
  padding-left: 1rem;
  border-left: 4px solid var(--color-accent-green);
}

h3 {
  font-size: 1.2rem;
  color: var(--color-accent-green);
}

section {
  background: #ffffff;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid var(--color-accent-green);
  box-shadow: 0 2px 8px rgba(45, 80, 22, 0.1);
  transition: box-shadow 0.3s ease;
}

section:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.15);
}

p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

ul, ol {
  color: var(--color-text-light);
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.7rem;
}

a {
  color: var(--color-accent-green);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

a:hover {
  color: var(--color-brown);
  text-decoration: underline;
}

footer {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  border-top: 3px solid var(--color-accent-green);
  font-family: system-ui, sans-serif;
  box-shadow: 0 -4px 12px rgba(45, 80, 22, 0.15);
}

footer p {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  border-top: 3px solid var(--color-accent-green);
  box-shadow: 0 -4px 12px rgba(45, 80, 22, 0.15);
}

.footer-main {
  font-size: 1rem;
  margin: 0;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-secondary {
  font-size: 0.9rem;
  margin-top: 0.6rem;
  margin-bottom: 0;
  color: #e8f1e0;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.small {
  font-size: 0.85rem;
  color: #b0b0b0;
  margin-top: 1rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 80, 22, 0.7);
  display: none;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, var(--color-light-green) 100%);
  max-width: 550px;
  margin: 8% auto;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(45, 80, 22, 0.3);
  border: 2px solid var(--color-accent-green);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h3 {
  margin-top: 0;
  color: var(--color-primary-green);
  font-size: 1.4rem;
}

.modal-content p {
  color: var(--color-text-light);
  line-height: 1.7;
}

.modal-button {
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  color: #fff;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(45, 80, 22, 0.2);
}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 80, 22, 0.3);
}

.modal-button:active {
  transform: translateY(0);
}

/* Taxonomy index pages */
.taxonomy-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.taxonomy-card {
  background: linear-gradient(135deg, #ffffff 0%, var(--color-light-green) 100%);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--color-accent-green);
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.1);
  transition: all 0.3s ease;
}

.taxonomy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(45, 80, 22, 0.2);
  border-left: 4px solid var(--color-brown);
}

.taxonomy-card a {
  font-size: 1.1rem;
  color: var(--color-primary-green);
  text-decoration: none;
  font-weight: 600;
}

.taxonomy-card a:hover {
  color: var(--color-brown);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 2rem 1rem;
  }

  header h1 {
    font-size: 1.8rem;
  }

  nav {
    gap: 1rem;
    padding: 0.8rem 1rem;
  }

  nav a {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .modal-content {
    margin: 20% auto;
    padding: 1.5rem;
  }

  .taxonomy-list {
    grid-template-columns: 1fr;
  }
}

/* ───────────────────────────────────────────────────────────────
   JOURNAL HEADER & COVER PAGE STYLING
   ─────────────────────────────────────────────────────────────── */

.journal-header {
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  border-bottom: 3px solid var(--color-accent-green);
  padding: 3rem 2rem;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.2);
  margin: 0;
}

.journal-title {
  font-size: 2.8rem;
  font-weight: 600;
  margin: 0 0 0.8rem 0;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.journal-subtitle {
  color: #e8f1e0;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.journal-meta {
  font-size: 0.9rem;
  color: #d0d0d0;
  margin-top: 1rem;
  font-family: 'Monaco', 'Courier New', monospace;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Journal-style sections */
.intro,
.toc,
.editorial,
.current-entries {
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-left: 4px solid var(--color-accent-green);
  background: rgba(232, 241, 224, 0.3);
  border-radius: 2px;
}

.intro p,
.editorial p {
  line-height: 1.8;
  color: var(--color-text-dark);
}

.toc ul,
.current-entries ul {
  list-style: none;
  padding-left: 0;
}

.toc li,
.current-entries li {
  margin: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.toc li:before,
.current-entries li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent-green);
  font-weight: bold;
}

.toc a,
.current-entries a {
  color: var(--color-primary-green);
  text-decoration: none;
  font-weight: 500;
}

.toc a:hover,
.current-entries a:hover {
  text-decoration: underline;
  color: var(--color-brown);
}

/* Entry groups for taxonomy sections */
.entry-list {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
}

.entry-group {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.entry-group h3 {
  font-size: 1.05rem;
  color: var(--color-brown);
  margin: 0 0 0.8rem 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.entry-group ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.entry-group li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.entry-group li:before {
  content: "–";
  position: absolute;
  left: 0.5rem;
  color: var(--color-accent-green);
  font-weight: 600;
}

.entry-group a {
  color: var(--color-primary-green);
  text-decoration: none;
  font-weight: 500;
}

.entry-group a:hover {
  text-decoration: underline;
  color: var(--color-brown);
}

.entry-group .family-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-left: 0.3rem;
  font-style: italic;
}

/* Article filter buttons */
.article-filter {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.filter-btn {
  background: #f5f5f5;
  border: 2px solid var(--color-border);
  color: var(--color-text-dark);
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.filter-btn:hover {
  background: var(--color-light-green);
  border-color: var(--color-accent-green);
  color: var(--color-primary-green);
}

.filter-btn.active {
  background: var(--color-accent-green);
  border-color: var(--color-primary-green);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(45, 80, 22, 0.2);
}

/* Quick access navigation */
.quick-access {
  margin-bottom: 3rem;
  padding: 1.5rem;
  border-left: 4px solid var(--color-accent-green);
  background: rgba(232, 241, 224, 0.3);
  border-radius: 2px;
}

.nav-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.nav-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary-green) 0%, var(--color-brown) 100%);
  color: #ffffff;
  padding: 1rem;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(45, 80, 22, 0.15);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 80, 22, 0.25);
  color: #ffffff;
}

.nav-btn:active {
  transform: translateY(0);
}
