/* Kalgoorlie Retro Gaming - red dirt, gold and Goldfields dusk */
:root {
  --night: #120d16;
  --dusk: #2a1630;
  --panel: #1c1219;
  --panel-edge: #4a2a1e;
  --red-dirt: #b5451b;
  --ochre: #d9822b;
  --gold: #f2c14e;
  --sand: #ecdcbc;
  --muted: #b9a58a;
  --phosphor: #7dff8a;
  --pixel: "Press Start 2P", monospace;
  --term: "VT323", monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--sand);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--gold); }
a:hover { color: #fff; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 13, 22, 0.94);
  border-bottom: 3px solid var(--red-dirt);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand {
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 1px;
}
.brand span { color: var(--ochre); }
.nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.nav a {
  font-family: var(--term);
  font-size: 22px;
  color: var(--sand);
  text-decoration: none;
}
.nav a:hover, .nav a.active { color: var(--gold); }

/* Hero */
.hero { position: relative; background: var(--dusk); }
.hero img {
  display: block;
  width: 100%;
  height: clamp(240px, 37vw, 440px);
  object-fit: cover;
  object-position: center bottom;
  image-rendering: pixelated;
}
.hero-text {
  position: absolute;
  left: 0; right: 0; top: 7%;
  text-align: center;
  padding: 0 16px;
}
.hero h1 {
  font-family: var(--pixel);
  font-size: clamp(16px, 3.6vw, 40px);
  line-height: 1.4;
  margin: 0;
  color: var(--gold);
  text-shadow: 3px 3px 0 #000, 0 0 18px rgba(242, 193, 78, 0.45);
}
.hero p {
  display: inline-block;
  background: rgba(18, 13, 22, 0.6);
  padding: 2px 12px;
  font-family: var(--term);
  font-size: clamp(18px, 2.4vw, 28px);
  margin: 10px 0 0;
  color: var(--sand);
  text-shadow: 2px 2px 0 #000;
}

/* Sections */
main { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0 8px; }
h2 {
  font-family: var(--pixel);
  font-size: clamp(15px, 2.2vw, 22px);
  color: var(--gold);
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 3px dashed var(--red-dirt);
}
h3 {
  font-family: var(--pixel);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ochre);
  margin: 0 0 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--panel);
  border: 3px solid var(--panel-edge);
  box-shadow: 6px 6px 0 #000;
  padding: 20px;
}
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }

/* Green-screen terminal box */
.terminal {
  background: #061006;
  border: 3px solid #1f3a1f;
  box-shadow: inset 0 0 24px rgba(125, 255, 138, 0.12), 6px 6px 0 #000;
  padding: 16px 18px;
  font-family: var(--term);
  font-size: 22px;
  line-height: 1.35;
  color: var(--phosphor);
  text-shadow: 0 0 6px rgba(125, 255, 138, 0.6);
  overflow-x: auto;
}
.terminal .dim { color: #3fa64a; }
.terminal .cursor::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

ul.doors { list-style: none; margin: 0; padding: 0; }
ul.doors li { padding: 6px 0; border-bottom: 1px dotted var(--panel-edge); }
ul.doors li:last-child { border-bottom: 0; }
ul.doors b { color: var(--gold); }

.button {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 12px;
  color: #1a0f08;
  background: var(--gold);
  border: 0;
  padding: 12px 16px;
  margin-top: 6px;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--red-dirt);
}
.button:hover { background: #fff; color: #1a0f08; }

/* News */
.post { margin-bottom: 18px; }
.post .date {
  font-family: var(--term);
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 6px;
}
.empty { color: var(--muted); font-style: italic; }

/* Footer */
footer {
  margin-top: 64px;
  border-top: 3px solid var(--red-dirt);
  background: #0c080e;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 28px;
  font-family: var(--term);
  font-size: 20px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .terminal .cursor::after { animation: none; }
}
