:root {
  --bg: #0a0a0a;
  --bg-raised: #111111;
  --bg-terminal: #050505;
  --text: #d4d4d4;
  --text-muted: #666666;
  --text-bright: #ffffff;
  --accent: #cc2222;
  --accent-dim: #991a1a;
  --green: #00cc33;
  --border: #1a1a1a;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Source Code Pro', 'Cascadia Mono', monospace;
  --max-width: 740px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: var(--text-bright);
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--text-bright);
}

.hidden {
  display: none !important;
}

/* =========================================
   LANDING
   ========================================= */

#landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
}

.landing-content {
  max-width: 640px;
  text-align: center;
}

.manifesto-line {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 2;
  color: var(--text);
  letter-spacing: 0.02em;
}

.manifesto-line .accent {
  color: var(--accent);
  font-weight: 500;
}

.mission-pulse {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.01em;
  transition: opacity 0.4s ease;
}

.mission-pulse.fade-out {
  opacity: 0;
}

.mission-pulse::before {
  content: '> ';
  color: var(--green);
  font-style: normal;
}

.enter-btn {
  margin-top: 3rem;
  display: inline-block;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.6rem 2rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.enter-btn:hover {
  border-color: var(--accent);
  color: var(--text-bright);
}

.enter-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.enter-btn .arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.enter-btn:hover .arrow {
  transform: translateX(3px);
}

/* =========================================
   NAV
   ========================================= */

#nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-brand {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.15em;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
}

/* =========================================
   TERMINAL
   ========================================= */

#terminal {
  background: var(--bg-terminal);
  border-bottom: 1px solid var(--border);
  padding: 1rem calc((100% - var(--max-width)) / 2 + 2rem);
  max-height: 400px;
  overflow-y: auto;
}

.terminal-output {
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-output .line {
  margin-bottom: 0.15rem;
}

.terminal-output .cmd-echo {
  color: var(--text-muted);
}

.terminal-output .cmd-echo .prompt-echo {
  color: var(--green);
}

.terminal-output .output-text {
  color: var(--text);
}

.terminal-output .output-error {
  color: var(--accent);
}

.terminal-output .output-accent {
  color: var(--accent);
}

.terminal-output .output-muted {
  color: var(--text-muted);
}

.terminal-input-line {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.prompt {
  color: var(--green);
  white-space: nowrap;
  user-select: none;
}

.terminal-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
  caret-color: var(--green);
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */

#content {
  padding: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.section h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.section-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-intro .cmd {
  color: var(--green);
  background: var(--bg-terminal);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  font-size: 0.8rem;
}

.section-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* =========================================
   ESSAYS
   ========================================= */

.essay-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.essay-link {
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.essay-link:hover {
  border-color: var(--accent-dim);
  background: var(--bg-raised);
}

.essay-link h2 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.essay-link:hover h2 {
  color: var(--text-bright);
}

.essay-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.essay-full .back-link {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.essay-full .back-link:hover {
  color: var(--accent);
}

.essay-body {
  font-size: 0.88rem;
  line-height: 1.85;
}

.essay-body p {
  margin-bottom: 1.2rem;
}

.essay-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.essay-body ol,
.essay-body ul {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.essay-body li {
  margin-bottom: 0.6rem;
}

.essay-body sup {
  font-size: 0.65rem;
  color: var(--accent);
  cursor: default;
}

.essay-body em {
  color: var(--text-bright);
  font-style: italic;
}

.essay-body strong {
  color: var(--text-bright);
  font-weight: 700;
}

.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footnotes h4 {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footnotes ol {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.5rem;
}

/* =========================================
   PROJECTS
   ========================================= */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.project {
  border: 1px solid var(--border);
  padding: 1.2rem 1.4rem;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project h2 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-bright);
}

.status {
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.status.active {
  border-color: var(--green);
  color: var(--green);
}

.status.paused {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.project p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-links {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.8rem;
}

.project-links a {
  font-size: 0.75rem;
  color: var(--accent);
}

/* =========================================
   ARSENAL
   ========================================= */

.arsenal-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1.5rem;
}

.arsenal-category h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.arsenal-category ul {
  list-style: none;
  padding: 0;
}

.arsenal-category li {
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.4rem 0;
  line-height: 1.5;
}

.arsenal-category li::before {
  content: '→ ';
  color: var(--text-muted);
}

.methodology-list li::before {
  content: none;
}

.methodology-list li {
  padding-left: 0;
  margin-bottom: 0.4rem;
}

.methodology-list strong {
  color: var(--green);
}

.prompt-block {
  margin-bottom: 1.2rem;
}

.prompt-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.prompt-block pre {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
}

.prompt-block code {
  font-size: 0.75rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================================
   CONTACT / SIGNAL
   ========================================= */

.contact-block {
  margin-top: 1.5rem;
}

.contact-block p {
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.signal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.signal-list li {
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.3rem 0;
  line-height: 1.5;
}

.signal-list li::before {
  content: '— ';
  color: var(--text-muted);
}

.contact-muted {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.contact-warning {
  margin-top: 1.5rem !important;
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 0.8rem;
}

/* =========================================
   FOOTER
   ========================================= */

#footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  margin-top: 4rem;
}

#footer p {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

#footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

#footer a:hover {
  color: var(--text);
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }

  #nav {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  #terminal {
    padding: 0.8rem 1rem;
  }

  #content {
    padding: 1.5rem 1rem;
  }

  .manifesto-line {
    font-size: 1rem;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .essay-link h2 {
    font-size: 0.85rem;
  }
}

@media (min-width: 1200px) {
  #content {
    max-width: 800px;
  }

  #terminal {
    padding: 1rem calc((100% - 800px) / 2 + 2rem);
  }
}

/* =========================================
   COGENESIS
   ========================================= */

.cogenesis-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}

.cogenesis-layer {
  border: 1px solid var(--border);
  padding: 1.5rem;
  position: relative;
}

.cogenesis-layer:hover {
  border-color: var(--green);
}

.layer-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.layer-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
  min-width: 2rem;
  font-family: var(--font);
}

.layer-header h2 {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}

.cogenesis-layer p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.layer-status {
  margin-top: 0.8rem;
}

.cogenesis-connector {
  text-align: center;
  color: var(--green);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.3rem 0;
  opacity: 0.5;
}

/* =========================================
   SCROLLBAR
   ========================================= */

::-webkit-scrollbar {
  width: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}
