:root {
  --wald-bg-light: #f8f9fa;
  --wald-green-dark: #1f3622;
  --wald-green-mid: #416e3c;
  --wald-green-light: #6ea862;
  --wald-brown-light: #d4c4a3;
  --wald-text-dark: #34495e;
  --wald-text-muted: #6c757d;
  /* Existing variables not directly mapped but potentially used elsewhere */
  --moss: #8cbf68;
  --cream: #f4f7f1;
  --accent: #d2b35b;
  --text: #1d2e24; /* Kept for existing components that might still use it */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0; /* Keep existing margin */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* From index.html */
  background-color: var(--wald-bg-light); /* From index.html */
  color: var(--wald-text-dark); /* From index.html */
}

a {
  color: var(--wald-green-dark); /* Updated to new variable */
  text-decoration: none;
}

a:hover {
  color: var(--wald-green-mid); /* Updated to new variable */
  text-decoration: underline;
}

.site-header {
  background-color: var(--wald-green-dark); /* From index.html */
  color: #fff;
  padding: 1.5rem 0; /* From index.html */
  text-align: center; /* From index.html */
  margin-bottom: 3rem; /* From index.html */
}

.site-title {
  font-size: 2.5rem; /* From index.html */
  font-weight: 700;
  margin-bottom: 0.5rem; /* From index.html */
  color: #fff;
}

.site-title a {
  color: white;
  text-decoration: none;
}

.site-tagline {
  font-size: 1.1rem; /* From index.html */
  color: rgba(255, 255, 255, 0.8); /* From index.html */
  margin: 10px 0 0; /* Keep existing margin */
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.65);
}

.navbar-toggler-icon {
  width: 18px;
  height: 2px;
  background-color: #fff;
  display: block;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  width: 18px;
  height: 2px;
  background-color: #fff;
  position: absolute;
  left: 0;
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  bottom: -6px;
}

.hero {
  background: linear-gradient(135deg, rgba(13, 33, 20, 0.95), rgba(86, 146, 93, 0.9)), url('https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  min-height: 420px;
  display: flex;
  align-items: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  letter-spacing: .18em;
  font-size: .85rem;
  color: #d8e2d3;
}

.section-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .8rem;
  color: var(--forest-medium);
  margin-bottom: .5rem;
}

.post-card {
  border: 1px solid rgba(56, 109, 70, 0.15);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(40, 62, 44, 0.08);
}

.post-card-body {
  padding: 1.8rem;
}

.post-card h3 {
  margin-bottom: .5rem;
}

.post-card h3 a {
  color: var(--forest-dark);
}

.post-card p {
  line-height: 1.75;
}

/* New styles from index.html */
.category-nav {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: 1.5rem;
  margin-bottom: 3rem;
  position: sticky;
  top: 1rem;
  z-index: 1020;
}
.category-nav-title {
  color: var(--wald-green-dark);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.category-badge {
  background-color: var(--wald-green-light);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.category-badge:hover {
  background-color: var(--wald-green-mid);
  transform: translateY(-2px);
  color: #fff;
}
.category-section {
  scroll-margin-top: 100px; /* Adjust for sticky nav height */
  padding-top: 2rem;
  margin-bottom: 3rem;
}
.category-heading {
  color: var(--wald-green-dark);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--wald-brown-light);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.code-card {
  margin-top: 1rem;
  background: #f1f6ed;
  border-left: 4px solid var(--wald-green-mid); /* Updated to new variable */
  padding: 1rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .92rem;
  white-space: pre-wrap;
  border-radius: 0 0.85rem 0.85rem 0.85rem;
}
.sidebar-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(56, 109, 70, 0.12);
  box-shadow: 0 16px 34px rgba(40, 62, 44, 0.05);
}
.sidebar-card h2 {
  margin-top: 0;
  color: var(--wald-green-dark); /* Updated to new variable */
}
.sidebar-card ul {
  padding-left: 0;
}
.sidebar-card li {
  margin-bottom: .75rem;
}
.sidebar-card li a {
  color: var(--wald-green-dark); /* Updated to new variable */
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #f1f6ed;
  border: 1px solid rgba(56, 109, 70, 0.15); /* Keep existing rgba, close to --wald-green-mid */
  color: var(--wald-green-dark); /* Updated to new variable */
  text-decoration: none;
  font-weight: 500;
}
.tag-pill:hover,
.tag-pill:focus {
  background: var(--wald-green-light); /* Updated to new variable */
  border-color: var(--wald-green-mid); /* Updated to new variable */
  color: var(--wald-green-dark); /* Updated to new variable */
}
.tag-size-1 { font-size: 0.95rem; }
.tag-size-2 { font-size: 1rem; }
.tag-size-3 { font-size: 1.05rem; }
.tag-size-4 { font-size: 1.1rem; }
.tag-size-5 { font-size: 1.14rem; }

/* Updated site-footer from index.html */
.site-footer {
  background-color: var(--wald-green-dark); /* From index.html */
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0; /* From index.html */
  text-align: center; /* From index.html */
  margin-top: 4rem; /* From index.html */
}
.site-footer a {
  color: rgba(255, 255, 255, 0.95);
}
.articles-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
/* Updated article-card from index.html */
.article-card {
  border: 1px solid rgba(0, 0, 0, 0.125); /* From index.html */
  border-left: 5px solid var(--wald-green-light); /* From index.html */
  border-radius: 0.5rem; /* From index.html */
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* From index.html */
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; /* From index.html */
  background-color: #fff; /* From index.html */
  height: 100%; /* From index.html */
  display: flex; /* From index.html */
  flex-direction: column; /* From index.html */
}
.article-card:hover {
  transform: translateY(-5px); /* From index.html */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); /* From index.html */
  border-left-color: var(--wald-green-dark); /* From index.html */
}
.article-card h3 {
  margin-top: 0;
  color: var(--wald-green-dark); /* Updated to new variable */
  font-size: 1.2rem; /* Keep existing font-size */
}
.article-card h3 a {
  color: inherit;
  text-decoration: none;
}
.article-card .category {
  font-size: 0.9rem;
  color: var(--wald-green-mid); /* Updated to new variable */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.article-card .teaser {
  color: var(--wald-text-muted); /* Updated to new variable */
  line-height: 1.5;
  font-size: 0.95rem;
}
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.article-container article {
  background: var(--cream);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header .navbar-collapse {
  transition: all 0.3s ease;
}

.site-header .nav-link {
  color: rgba(255, 255, 255, 0.92);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: #d2b35b;
}

@media (max-width: 991.98px) {
  .site-header .navbar-collapse {
    background: rgba(16, 46, 24, 0.98);
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
  }

  .site-header .navbar-nav {
    gap: 0.5rem;
  }

  .site-header .nav-link {
    padding: 0.75rem 0;
  }
}

@media (max-width: 992px) {
  .hero {
    min-height: 520px;
  }
}

@media (max-width: 768px) {
  .post-card-body {
    padding: 1.5rem;
  }
}
