:root {
  --bg:          #100b07;
  --bg-card:     #1a140d;
  --bg-card-2:   #221a10;
  --amber:       #f2a33c;
  --amber-dim:   #b8792a;
  --amber-glow:  rgba(242, 163, 60, 0.16);
  --paper:       #f2ede2;
  --text-dim:    #a89a85;
  --olive:       #8a9a5b;
  --olive-dim:   #5c6b42;
  --olive-bg:    #171a10;
  --hairline:    #33291a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

h1, h2, h3 {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 11, 7, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.75rem;
}
.wordmark {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.wordmark .dot { color: var(--amber); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber); }
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--paper);
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  list-style: none;
  position: fixed;
  top: var(--nav-height, 60px);
  left: 0; right: 0;
  max-height: 0; overflow: hidden;
  background: var(--bg-card);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 49;
  transition: max-height 0.3s ease;
}
.mobile-nav.open { max-height: 260px; }
.mobile-nav li { border-top: 1px solid var(--hairline); }
.mobile-nav a {
  display: block; padding: 1rem 1.75rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.92rem;
  color: var(--paper); text-decoration: none;
}
.mobile-nav a:active { color: var(--amber); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding: 4rem 1.75rem;
}
.needle-field {
  position: absolute; top: 50%; right: 8%;
  width: 340px; height: 340px;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}
.needle-field svg { width: 100%; height: 100%; }
.needle-pivot {
  transform-origin: 170px 300px;
  animation: needleSweep 5.5s ease-in-out infinite;
}
@keyframes needleSweep {
  0%, 100% { transform: rotate(-19deg); }
  50%      { transform: rotate(19deg); }
}
@media (prefers-reduced-motion: reduce) {
  .needle-pivot { animation: none; transform: rotate(0deg); }
}

.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.status-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--amber);
  margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.status-line .blink {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--amber);
  animation: blink 1.8s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .status-line .blink { animation: none; } }

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--paper);
  margin-bottom: 1rem;
}
.hero h1 .amber { color: var(--amber); }
.hero .lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero .lede strong { color: var(--paper); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 3px;
  transition: transform 0.15s, background 0.2s;
}
.btn-primary { background: var(--amber); color: #100b07; }
.btn-primary:hover { background: #ffb85c; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--paper);
  border: 1px solid var(--hairline);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ── SECTIONS ── */
section { max-width: 1080px; margin: 0 auto; padding: 5.5rem 1.75rem; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.8rem;
  display: block;
}
h2.section-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: var(--paper);
  margin-bottom: 1rem;
}

/* ── TACTUS ── */
.tactus-wrap { background: var(--bg-card); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.tactus-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; align-items: center;
}
.tactus-visual { display: flex; gap: 1.2rem; align-items: flex-end; justify-content: center; }
.tactus-icon { width: 120px; height: 120px; border-radius: 26px; border: 1px solid var(--hairline); box-shadow: 0 12px 40px var(--amber-glow); }
.tactus-device {
  width: 200px; border-radius: 18px; border: 1px solid var(--hairline);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.tactus-copy p { color: var(--text-dim); margin-bottom: 1.1rem; }
.tactus-copy strong { color: var(--paper); }
.feature-list { list-style: none; margin: 1.5rem 0; display: grid; gap: 0.7rem; }
.feature-list li {
  font-size: 0.95rem; color: var(--paper);
  padding-left: 1.4rem; position: relative;
}
.feature-list li::before {
  content: '›'; position: absolute; left: 0; color: var(--amber); font-weight: 700;
}
.free-badge {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; color: var(--amber);
  border: 1px solid var(--amber-dim); border-radius: 3px;
  padding: 0.3rem 0.7rem; margin-bottom: 1.2rem;
}
@media (max-width: 820px) {
  .tactus-grid { grid-template-columns: 1fr; }
  .tactus-visual { order: -1; }
}

/* ── ZOMBIE GAME (olive sub-theme) ── */
.zombie-wrap { background: var(--olive-bg); border-bottom: 1px solid var(--hairline); }
.zombie-wrap .eyebrow { color: var(--olive); }
.status-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--olive); border: 1px solid var(--olive-dim);
  padding: 0.25rem 0.6rem; border-radius: 3px; margin-bottom: 1rem;
}
.zombie-copy p { color: var(--text-dim); margin-bottom: 1.1rem; max-width: 62ch; }
.zombie-copy strong { color: var(--paper); }
.screenshot-strip {
  display: flex; gap: 0.9rem; overflow-x: auto; padding: 1.6rem 0 0.5rem;
  scrollbar-color: var(--olive-dim) transparent;
}
.screenshot-strip img {
  height: 200px; width: auto; border-radius: 6px;
  border: 1px solid var(--hairline); flex-shrink: 0;
}

/* ── ARCHIVE ── */
.archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.archive-card {
  background: var(--bg-card); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 1.6rem;
}
.archive-card .year {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--text-dim); margin-bottom: 0.5rem; display: block;
}
.archive-card h3 { font-size: 1.1rem; color: var(--paper); margin-bottom: 0.6rem; }
.archive-card p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1rem; }
.archive-card a {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--amber); text-decoration: none;
}
.archive-card a:hover { text-decoration: underline; }
@media (max-width: 640px) { .archive-grid { grid-template-columns: 1fr; } }

/* ── DEVLOG (log-entry style) ── */
.devlog-list { display: flex; flex-direction: column; margin-top: 1.5rem; }
.log-entry {
  display: grid; grid-template-columns: 130px 1fr; gap: 1.5rem;
  padding: 1.3rem 0; border-bottom: 1px solid var(--hairline);
  text-decoration: none; color: inherit;
}
.log-entry:first-child { padding-top: 0; }
.log-entry:hover .log-title { color: var(--amber); }
.log-date {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--text-dim); padding-top: 0.15rem;
}
.log-title {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 1rem; color: var(--paper); margin-bottom: 0.4rem;
  transition: color 0.15s;
}
.log-excerpt { font-size: 0.92rem; color: var(--text-dim); }
@media (max-width: 560px) {
  .log-entry { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ── POST PAGE ── */
.post-header { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.75rem 0; }
.post-header .back-link { margin-bottom: 1.5rem; display: block; }
.post-header .log-date { display: block; }
.post-body { max-width: 720px; margin: 0 auto; padding: 2rem 1.75rem 5rem; }
.post-body h2 { font-size: 1.4rem; color: var(--amber); margin: 2.2rem 0 0.9rem; }
.post-body h3 { font-size: 1.15rem; color: var(--paper); margin: 1.8rem 0 0.7rem; }
.post-body p { color: var(--paper); margin-bottom: 1.1rem; }
.post-body a { color: var(--amber); }
.post-body code {
  font-family: 'JetBrains Mono', monospace; background: var(--bg-card);
  padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.88em;
}
.post-body pre {
  background: var(--bg-card); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 1.2rem; overflow-x: auto; margin-bottom: 1.2rem;
}
.back-link {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--text-dim); text-decoration: none; display: inline-block; margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--amber); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--hairline);
  padding: 3rem 1.75rem; text-align: center;
}
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.footer-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--text-dim); text-decoration: none;
}
.footer-links a:hover { color: var(--amber); }
footer .copy { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--text-dim); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
