:root {
  color-scheme: dark;
  --bg: #080909;
  --surface: #111312;
  --surface-raised: #1a1d19;
  --line: #30342f;
  --text: #f3f3ed;
  --muted: #a7aaa2;
  --green: #9dce58;
  --green-bright: #c1ef74;
  --orange: #eaa84c;
  --sidebar-width: 286px;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.app-shell { min-height: 100vh; padding-top: 76px; }
html.nav-open, body.nav-open { overflow: hidden; }

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid #383838;
  background: #272727;
  box-shadow: 0 3px 12px #0005;
}
.brand { display: flex; flex: none; align-items: center; gap: 13px; white-space: nowrap; }
.brand-mark { display: block; width: 30px; height: 42px; flex: none; image-rendering: pixelated; object-fit: contain; }
.brand-copy strong { color: #f5f5ef; font-size: 15px; font-weight: 900; letter-spacing: -.04em; text-shadow: 2px 2px #0a0a0a; }
.nav-list { position: fixed; z-index: 15; top: 76px; bottom: 0; left: 0; display: flex; width: min(var(--sidebar-width), 86vw); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 18px 12px; border-right: 1px solid #343b35; background: #151a16; box-shadow: 16px 0 35px #0008; transform: translateX(-105%); transition: transform .26s cubic-bezier(.2, .75, .2, 1); }
.nav-open .nav-list { transform: translateX(0); }
.nav-backdrop { display: none; position: fixed; z-index: 14; inset: 76px 0 0; border: 0; background: #0008; cursor: pointer; }
.nav-open .nav-backdrop { display: block; }
.nav-item {
  position: relative;
  display: flex;
  min-height: 52px;
  flex: none;
  align-items: center;
  gap: 13px;
  padding: 0 12px;
  border-bottom: 1px solid #303830;
  color: #f0f3eb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.nav-item svg { display: block; width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item::after { position: absolute; top: 0; right: auto; bottom: 0; left: 0; width: 3px; height: auto; transform: scaleY(0); transform-origin: top; background: #f2ff9b; content: ""; transition: transform .2s ease; }
.nav-item.active { color: #c1ef74; }
.nav-item.active::after { transform: scaleY(1); }
.header-actions { display: flex; flex: none; align-items: center; gap: 12px; }
.menu-toggle { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid #555; background: transparent; color: #eee; cursor: pointer; }
.menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.main-area { min-height: calc(100vh - 76px); }
.page-wrap { width: 100%; margin: 0 auto; }
.page { display: none; min-height: calc(100vh - 76px); padding: 42px 0 54px; animation: enter .24s ease both; }
.page.active { display: flex; flex-direction: column; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Full-width, illustrated landing hero */
.page#page-home { width: 100%; padding: 0 0 24px; }
.hero-banner {
  position: relative;
  display: flex;
  min-height: clamp(430px, 49vw, 600px);
  align-items: flex-end;
  overflow: hidden;
  background-color: #10172b;
}
.hero-image { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-banner::before { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, #07090ecf 0%, #07090e8c 32%, #07090e20 70%, transparent 100%), linear-gradient(0deg, #080a0d85 0%, transparent 45%); pointer-events: none; content: ""; }
.hero-banner::after { position: absolute; z-index: 3; inset: 0; border-bottom: 1px solid #ffffff18; pointer-events: none; content: ""; }
.hero-title { position: absolute; z-index: 2; top: clamp(24px, 3.5vw, 52px); left: clamp(16px, 3vw, 48px); width: min(1080px, calc(100% - 32px)); margin: 0; line-height: 0; }
.eyebrow { color: var(--green-bright); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-shadow: 0 1px 5px #000; }
h1 { margin: 0; color: #fff; font-size: clamp(48px, 7.2vw, 92px); font-weight: 900; letter-spacing: -.07em; line-height: .95; text-shadow: 0 3px 1px #080909, 0 7px 18px #000b; }
h1 span { color: #bfe881; }
.hero-title-image { display: block; width: min(100%, 1080px); height: auto; filter: drop-shadow(0 4px 3px #000d) drop-shadow(0 8px 14px #000b); }
.section-heading, .quick-grid, .home-social-links { width: min(100% - 48px, 1120px); margin-right: auto; margin-left: auto; }
.section-heading { display: flex; align-items: center; gap: 20px; margin-top: 52px; }
.section-heading h2 { margin: 0; color: #f1f2eb; font-size: 16px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.section-heading::after { height: 1px; flex: 1; background: linear-gradient(90deg, #4a5147, transparent); content: ""; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.quick-card { --button-fill: #9dce58; --button-edge: #607e35; display: flex; min-height: 52px; align-items: center; justify-content: flex-start; gap: 10px; overflow: hidden; padding: 0 16px; border: 0; border-bottom: 4px solid var(--button-edge); background: var(--button-fill); color: #171b12; text-align: left; cursor: pointer; transition: filter .15s ease; }
.quick-card:nth-child(2) { --button-fill: #79c4c7; --button-edge: #447b7e; }
.quick-card:nth-child(3) { --button-fill: #e7b45d; --button-edge: #967039; }
.quick-card:nth-child(4) { --button-fill: #b8a0dc; --button-edge: #73628e; }
.quick-card:hover { filter: brightness(1.06); }
.card-icon { display: grid; width: 24px; height: 24px; flex: none; place-items: center; color: inherit; }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .hammer-handle, .card-icon .hammer-handle { stroke-width: 1.3; stroke-linecap: butt; stroke-linejoin: miter; }
.quick-card strong { position: relative; z-index: 1; font-size: 13px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.home-social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: auto; padding-top: 28px; color: #fff; font-size: 13px; }
.home-social-links a { display: inline-flex; align-items: center; gap: 8px; color: #fff; cursor: pointer; }
.home-social-links svg { display: block; width: 18px; height: 18px; flex: none; fill: currentColor; }
.home-social-links img { display: block; width: 18px; height: 18px; flex: none; }
.social-link-list { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #393d38; }
.social-link-list a { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; cursor: pointer; }
.social-link-list svg { display: block; width: 20px; height: 20px; flex: none; fill: currentColor; }
.social-link-list img { display: block; width: 20px; height: 20px; flex: none; }

/* Archive pages */
.page:not(#page-home) { width: min(100% - 64px, 1120px); margin: 0 auto; }
.page-title { margin: 0; color: var(--text); font-size: clamp(36px, 5vw, 58px); font-weight: 900; letter-spacing: -.06em; line-height: 1.1; }
.community-list, .resource-list { margin-top: 32px; padding-top: 24px; border-top: 1px solid #393d38; }
.community-entry { color: #e6e8df; font-size: 18px; line-height: 1.8; overflow-wrap: anywhere; }
.community-entry + .community-entry { margin-top: 24px; }
.community-entry a { color: #fff; text-decoration: underline; text-decoration-color: #a3cf62; text-underline-offset: 3px; cursor: pointer; }
.community-star { color: #f4d36f; }
.resource-name strong { font-size: 14px; font-weight: 700; }
.resource-type { color: #939b8c; font-size: 10px; font-weight: 700; letter-spacing: .09em; text-align: right; }
.resource-arrow { color: #a3c86c; font-size: 18px; text-align: right; }
.empty-state { display: grid; min-height: 210px; place-items: center; margin-top: 32px; border: 1px solid #333834; background: radial-gradient(ellipse at center, #151b13, #0b0d0b 70%); }
.empty-state strong { color: #a3c86c; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 1050px) {
  .topbar { height: 68px; padding: 0 22px; }
  .app-shell { padding-top: 68px; }
  .brand-mark { width: 24px; height: 33px; }
  .brand-copy strong { font-size: 13px; }
  .nav-list { top: 68px; }
  .nav-backdrop { top: 68px; }
  .main-area, .page { min-height: calc(100vh - 68px); }
}
@media (max-width: 820px) {
  .topbar { height: 64px; gap: 12px; padding: 0 18px; }
  .app-shell { padding-top: 64px; }
  .header-actions { margin-left: auto; }
  .nav-list { top: 64px; }
  .nav-backdrop { top: 64px; }
  .main-area, .page { min-height: calc(100vh - 64px); }
  .hero-banner { min-height: 480px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-image { object-position: 58% center; }
  .hero-title { left: 20px; width: calc(100% - 40px); }
  .section-heading, .quick-grid, .home-social-links { width: calc(100% - 40px); }
  .page:not(#page-home) { width: calc(100% - 40px); }
}
@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .brand { gap: 9px; }
  .brand-copy strong { font-size: 12px; }
  .hero-banner { min-height: 440px; }
  .hero-banner::before { background: linear-gradient(90deg, #07090eaa, #07090e25 82%), linear-gradient(0deg, #080a0db3 0%, transparent 65%); }
  .hero-image { object-position: 63% center; }
  .hero-title { left: 16px; width: calc(100% - 32px); }
  h1 { font-size: clamp(43px, 12vw, 62px); }
  .eyebrow { font-size: 9px; }
  .section-heading, .quick-grid, .home-social-links { width: calc(100% - 32px); }
  .section-heading { margin-top: 38px; }
  .quick-grid { grid-template-columns: 1fr; gap: 8px; }
  .quick-card { min-height: 52px; }
  .page:not(#page-home) { width: calc(100% - 32px); padding-top: 34px; }
  .resource-row { min-height: 60px; grid-template-columns: minmax(0, 1fr) 76px 18px; gap: 8px; padding: 0 7px; }
  .resource-name strong { font-size: 12px; }
  .resource-type { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
