* {
  box-sizing: border-box;
}

:root {
  --surface: #12141c;
  --surface-2: #191b24;
  --card: #1d2030;
  --line: #2c3044;
  --text: #e8eaf0;
  --muted: #9aa0b5;
  --accent: #c8ff00;
  --accent-2: #7c9cff;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'SN Pro', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--surface);
  overflow-x: hidden;
}

.bg-dots {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(60, 64, 84, 0.5) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
}

h1, h2, h3 {
  font-family: 'JetBrains Mono', Menlo, monospace;
  letter-spacing: -0.02em;
}

.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: rgba(18, 20, 28, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.logo__caret { color: var(--accent); }

.nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: #10130a;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(200, 255, 0, 0.18);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(200, 255, 0, 0.28);
}

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

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-2);
  background: rgba(124, 156, 255, 0.08);
}

.hero__title {
  margin: 1rem 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
}

.hero__lead {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 2.4rem 0 0;
}

.stats li {
  display: flex;
  flex-direction: column;
}

.stats strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--accent);
}

.stats span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- terminal ---------- */
.terminal {
  background: #0d0f16;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  transform: rotate(1.2deg);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }

.terminal__title {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.terminal__body {
  min-height: 260px;
  padding: 1rem 1.1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.term-cmd { color: var(--text); }
.term-prompt { color: var(--accent); }
.term-out { color: var(--muted); }
.term-ok { color: #6ee787; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem);
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.section__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }

/* ---------- filters / search ---------- */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter:hover { border-color: var(--accent-2); color: var(--text); }

.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #10130a;
  font-weight: 600;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.search {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 255, 0, 0.15);
}

.search-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- posts ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.2rem;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  animation: pop 0.35s ease both;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(14px); }
}

.post:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 255, 0, 0.5);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.post__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.post__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(124, 156, 255, 0.14);
  color: var(--accent-2);
}

.post__date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.post h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.post__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
}

.post__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.post__read { color: var(--accent); }

.empty {
  text-align: center;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  padding: 2.5rem 0;
}

/* ---------- about + plans ---------- */
.section--split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.about, .plans {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}

.about h2, .plans h2 { margin-top: 0; font-size: 1.5rem; }

.about p {
  color: var(--muted);
  line-height: 1.75;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--accent);
  background: rgba(200, 255, 0, 0.06);
}

.roadmap {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.roadmap li {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.92rem;
  color: var(--muted);
  transition: border-color 0.2s, transform 0.2s;
}

.roadmap li:hover { transform: translateX(5px); }

.roadmap li.done {
  color: var(--text);
  border-color: rgba(110, 231, 135, 0.4);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 4vw, 3rem);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.site-footer p { margin: 0.3rem 0; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.75);
  backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}

@keyframes fade { from { opacity: 0; } }

.modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  animation: slideUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
}

.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.modal__close:hover {
  background: var(--accent);
  color: #10130a;
  border-color: var(--accent);
}

.modal__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 0.6rem;
}

.modal__card h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.3;
  padding-right: 2.5rem;
}

.modal__body {
  color: #c9cde0;
  line-height: 1.8;
  font-size: 0.98rem;
}

.modal__body p { margin: 0 0 1rem; }

.modal__body h4 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  margin: 1.5rem 0 0.6rem;
  font-size: 1rem;
}

.modal__body pre {
  background: #0d0f16;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #b7f77a;
}

.modal__body blockquote {
  margin: 1rem 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(200, 255, 0, 0.06);
  border-radius: 0 10px 10px 0;
  color: var(--text);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 0.8rem 1.4rem;
  background: var(--accent);
  color: #10130a;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(200, 255, 0, 0.25);
  animation: slideUp 0.3s ease;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .section--split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, auto); gap: 1.1rem 2rem; }
  .nav { display: none; }
}

@media (max-width: 520px) {
  .site-header .btn { display: none; }
  .terminal { transform: none; }
}
