/* Base */
:root {
  --bg: #0a0a0a;
  --bg-light: #111111;
  --text: #e0e0e0;
  --text-dim: #888888;
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --terminal-bg: #0d1117;
  --border: #222222;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Sections */
section {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Hero */
.hero {
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.ascii-logo {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: clamp(0.5rem, 2.5vw, 1rem);
  color: var(--accent);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.token-ca {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.token-ca span {
  color: var(--accent);
  font-weight: 600;
}

.token-ca code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  color: var(--text);
  font-size: 0.8rem;
}

.token-ca a {
  text-decoration: none;
}

.token-ca a:hover code {
  color: var(--accent);
}

.tagline {
  font-size: 1.5rem;
  color: var(--text-dim);
  margin-bottom: 3rem;
  font-style: italic;
}

.demo {
  margin: 2rem auto;
  max-width: 700px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(74, 222, 128, 0.1);
  border: 1px solid var(--border);
}

.demo img {
  width: 100%;
  display: block;
}

.install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.install code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  background: var(--terminal-bg);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--accent);
  border: 1px solid var(--border);
}

.install .or {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-light);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
  margin-top: 1rem;
}

.github-btn:hover {
  background: var(--border);
  border-color: var(--text-dim);
}

/* Problem */
.problem {
  text-align: center;
  border-top: 1px solid var(--border);
}

.problem .big {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.problem p {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.problem .highlight {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 1.5rem;
  animation: flicker 3s infinite;
}

/* Solution */
.solution {
  text-align: center;
  border-top: 1px solid var(--border);
}

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.flow-item {
  text-align: center;
}

.flow-item .folder {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  background: var(--terminal-bg);
  padding: 1rem 1.5rem;
  border-radius: 6px;
  font-size: 1.125rem;
  color: var(--accent);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.flow-item .label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flow-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
}

.mantra {
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 2rem;
  font-weight: 500;
}

/* How It Works */
.how {
  border-top: 1px solid var(--border);
}

.terminal {
  background: var(--terminal-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  background: #1a1a1a;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-body {
  padding: 1.5rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  font-size: 0.9rem;
}

.cmd {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cmd:last-child {
  margin-bottom: 0;
}

.prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.comment {
  color: var(--text-dim);
  margin-left: auto;
}

/* Philosophy */
.philosophy {
  text-align: center;
  border-top: 1px solid var(--border);
}

.incantation {
  font-style: italic;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto;
  border: none;
}

.incantation p {
  margin-bottom: 0.75rem;
}

.incantation .alive {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-style: normal;
  margin-top: 1.5rem;
  animation: flicker 3s infinite;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* Flicker Animation */
@keyframes flicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  }
  92% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  }
  93% {
    opacity: 0.8;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
  }
  94% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  }
  96% {
    opacity: 0.9;
    text-shadow: 0 0 30px rgba(74, 222, 128, 1);
  }
  97% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.links a:hover {
  color: var(--accent);
}

.footer-tagline {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
  section {
    padding: 3rem 1rem;
  }

  .hero {
    padding-top: 4rem;
  }

  .ascii-logo {
    font-size: 0.45rem;
  }

  .tagline {
    font-size: 1.25rem;
  }

  .install {
    flex-direction: column;
  }

  .install .or {
    display: none;
  }

  .flow {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .terminal-body {
    font-size: 0.75rem;
    padding: 1rem;
  }

  .comment {
    display: none;
  }

  .problem .big {
    font-size: 1.5rem;
  }
}
