/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #f5f3eb;
  --color-bg-alt: #e8e4d6;
  --color-text: #2d2d2d;
  --color-heading: #1a1a1a;
  --color-muted: #6b6b5e;
  --color-accent: #5d8a3c;
  --color-accent-dark: #4a7330;
  --color-accent-light: #dfe8d0;
  --color-border: #c8c4b4;
  --color-card: #ffffff;
  --color-dark: #3a3a32;
  --max-width: 1000px;
  --shadow-sm: 2px 2px 0 rgba(0,0,0,0.08);
  --shadow-md: 4px 4px 0 rgba(0,0,0,0.1);
  --shadow-lg: 6px 6px 0 rgba(0,0,0,0.12);
  --radius: 4px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  letter-spacing: 0.01em;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: all 0.2s;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.site-header {
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 rgba(0,0,0,0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
}

.site-logo::before {
  content: "⛏";
  font-size: 22px;
  transition: transform 0.3s;
}

.site-logo:hover {
  text-decoration: none;
  transform: scale(1.02);
  color: #fff;
}

.site-logo:hover::before {
  transform: rotate(-15deg);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}

.site-nav a {
  color: #e8e4d6;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
  position: relative;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

.site-nav a.active {
  color: #fff;
  font-weight: 600;
  background: var(--color-accent);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  background: linear-gradient(135deg, #4a7c3a 0%, #3a6b2a 50%, #2d5a20 100%);
  border-bottom: 4px solid var(--color-accent-dark);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%);
  background-size: 20px 20px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  position: relative;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* ===== Sections ===== */
.section {
  padding: 56px 0;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
  position: relative;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translate(-2px, -2px);
  text-decoration: none;
  border-color: var(--color-accent);
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ===== Mod Cards (with image) ===== */
.mod-card {
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.mod-card:hover {
  box-shadow: var(--shadow-md);
  transform: translate(-2px, -2px);
  border-color: var(--color-accent);
}

.mod-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-border);
  transition: transform 0.3s;
}

.mod-card:hover .mod-card-img {
  transform: scale(1.03);
}

.mod-card-body {
  padding: 18px 20px;
}

.mod-card-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 6px;
}

.mod-card-body p {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.mod-tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  margin-right: 6px;
  margin-top: 10px;
  border: 1px solid var(--color-accent);
  transition: all 0.2s;
}

.mod-tag:hover {
  background: var(--color-accent);
  color: white;
}

/* ===== Content / Article ===== */
.content {
  max-width: 720px;
  margin: 0 auto;
}

.content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-heading);
  margin: 36px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--color-accent);
}

.content h2:first-child {
  margin-top: 0;
}

.content p {
  margin-bottom: 14px;
}

.content ul, .content ol {
  margin: 12px 0 16px 22px;
}

.content li {
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.content li:hover {
  transform: translateX(4px);
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-card);
  border: 2px solid var(--color-border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: translate(-2px, -2px);
  border-color: var(--color-accent);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item-caption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-muted);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 3px solid var(--color-accent);
  padding: 28px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  margin-top: 48px;
  background: var(--color-dark);
}

/* ===== Mod Section Divider ===== */
.mod-section {
  margin-bottom: 40px;
}

.mod-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--color-accent);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ===== Selection ===== */
::selection {
  background: var(--color-accent);
  color: white;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 12px 20px;
    gap: 10px;
  }

  .site-nav ul {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-nav a {
    padding: 5px 10px;
    font-size: 13px;
  }

  .card:hover {
    transform: translate(-1px, -1px);
  }

  .mod-card:hover {
    transform: translate(-1px, -1px);
  }

  .section-title {
    font-size: 22px;
  }
}

/* ===== 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;
}

/* ===== Filter bar (responds to the user) ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-btn {
  font: inherit;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.filter-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.filter-btn[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.card-grid > .is-hidden {
  display: none;
}

.filter-status {
  font-size: 13px;
  color: var(--color-muted);
  margin: -14px 0 24px;
}

/* ===== Lightbox (responds to the user) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(26, 26, 26, 0.88);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: var(--color-card);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--color-accent);
}

img.zoomable {
  cursor: zoom-in;
}
