/* ============================================
   MOLIBOT — Brutalist-Warm-Tech Design System
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}

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

/* ---- Design Variables ---- */
:root {
  --bg-primary: #07070d;
  --bg-secondary: #0d0d1a;
  --bg-tertiary: #14142a;
  --bg-card: rgba(20, 20, 42, 0.6);
  --bg-card-hover: rgba(30, 30, 60, 0.8);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --accent: #00f0a0;
  --accent-dim: #009970;
  --accent-bright: #50ffc0;
  --accent-secondary: #7c5cfc;
  --accent-secondary-dim: #5a3ddb;
  --accent-warm: #ff6b35;
  --accent-warm-dim: #cc4400;

  --text-primary: #e8e8ef;
  --text-secondary: #9a9ab0;
  --text-muted: #5c5c78;

  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 700ms cubic-bezier(0.16, 1, 0.3, 1);

  --max-width: 1200px;
  --nav-height: 72px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes gridShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  50% { transform: translateY(-120px) translateX(30px); }
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--border); box-shadow: 0 0 0 rgba(0, 240, 160, 0); }
  50% { border-color: rgba(0, 240, 160, 0.2); box-shadow: 0 0 20px rgba(0, 240, 160, 0.05); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes cursorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), backdrop-filter var(--transition-base);
  background: transparent;
}

.nav.scrolled {
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  font-family: var(--font-mono);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-gh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-family: var(--font-mono);
}

.nav-gh-btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(0, 240, 160, 0.05);
}

.lang-switcher {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  text-transform: uppercase;
  transition: all var(--transition-fast);
}

.lang-switcher:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(0, 240, 160, 0.04);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 240, 160, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 160, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridShift 8s linear infinite;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 160, 0.08) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}

.hero-glow-2 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.06) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
  z-index: 0;
  animation: pulseGlow 5s ease-in-out infinite;
  animation-delay: -2s;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
}

.hero-particle:nth-child(1) { left: 10%; top: 20%; animation: floatParticle 8s ease-in-out infinite; animation-delay: 0s; }
.hero-particle:nth-child(2) { left: 30%; top: 60%; animation: floatParticle 10s ease-in-out infinite; animation-delay: -2s; width: 2px; height: 2px; }
.hero-particle:nth-child(3) { left: 50%; top: 30%; animation: floatParticle 9s ease-in-out infinite; animation-delay: -4s; }
.hero-particle:nth-child(4) { left: 70%; top: 70%; animation: floatParticle 11s ease-in-out infinite; animation-delay: -1s; width: 2px; height: 2px; background: var(--accent-secondary); }
.hero-particle:nth-child(5) { left: 85%; top: 40%; animation: floatParticle 7s ease-in-out infinite; animation-delay: -3s; background: var(--accent-secondary); }
.hero-particle:nth-child(6) { left: 20%; top: 80%; animation: floatParticle 12s ease-in-out infinite; animation-delay: -5s; width: 2px; }
.hero-particle:nth-child(7) { left: 60%; top: 85%; animation: floatParticle 8s ease-in-out infinite; animation-delay: -6s; }
.hero-particle:nth-child(8) { left: 90%; top: 15%; animation: floatParticle 9s ease-in-out infinite; animation-delay: -1.5s; }

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 240, 160, 0.2);
  border-radius: 100px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 32px;
  font-family: var(--font-mono);
  background: rgba(0, 240, 160, 0.04);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseGlow 1.5s ease-in-out infinite;
}

.hero-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 0 40px rgba(0, 240, 160, 0.15);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 50%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.6;
  margin-bottom: 12px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 20px;
  margin-bottom: 40px;
}

.hero-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 0;
  position: relative;
}

.hero-tag:not(:last-child)::after {
  content: '·';
  margin-left: 16px;
  color: var(--accent-dim);
  opacity: 0.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 24px rgba(0, 240, 160, 0.2);
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 32px rgba(0, 240, 160, 0.35);
  transform: translateY(-2px);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(0, 240, 160, 0.04);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: fadeIn 2s ease 1.5s both;
  font-family: var(--font-mono);
}

.hero-scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
}

/* ---- Section Shared ---- */
.section {
  padding: 120px 24px;
  position: relative;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  font-family: var(--font-mono);
  line-height: 1.7;
}

.section-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 24px 0 40px;
}

.header-centered {
  text-align: center;
}

.header-centered .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.header-centered .section-divider {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Channels Section ---- */
.channels {
  background: var(--bg-secondary);
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 60px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.channel-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.channel-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.channel-card:hover::before {
  opacity: 1;
}

.channel-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 240, 160, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.3rem;
  transition: background var(--transition-fast);
}

.channel-card:hover .channel-icon {
  background: rgba(0, 240, 160, 0.15);
}

.channel-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
}

.channel-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.5;
}

/* ---- Features Section ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 240, 160, 0.1) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
}

.feature-card-wide {
  grid-column: span 2;
}

.feature-card-colored {
  background: linear-gradient(135deg, rgba(0, 240, 160, 0.06), rgba(124, 92, 252, 0.06));
  border-color: rgba(0, 240, 160, 0.08);
}

.feature-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-secondary-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 240, 160, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.7;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.feature-tag {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 240, 160, 0.06);
  border: 1px solid rgba(0, 240, 160, 0.1);
  font-size: 0.65rem;
  color: var(--accent-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Architecture Section ---- */
.architecture {
  background: var(--bg-secondary);
  overflow: hidden;
}

.arch-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.arch-visual {
  position: relative;
}

.arch-diagram {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.6);
  padding: 20px;
}

.arch-diagram svg {
  width: 100%;
  height: auto;
}

.arch-text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.arch-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.8;
  margin-bottom: 16px;
}

.arch-principles {
  list-style: none;
  margin-top: 24px;
}

.arch-principles li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.arch-principles li:last-child {
  border-bottom: none;
}

.arch-principles .check {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Stats Strip ---- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 60px;
}

.stat-item {
  background: var(--bg-card);
  padding: 32px 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* ---- Chatlog Section ---- */
.chatlog-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.chatlog-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chatlog-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chatlog-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text-primary);
}

.chatlog-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 240, 160, 0.06);
}

.chatlog-container {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.chatlog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.chatlog-dots {
  display: flex;
  gap: 6px;
}

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

.chatlog-dot:nth-child(1) { background: #ff5f57; }
.chatlog-dot:nth-child(2) { background: #febc2e; }
.chatlog-dot:nth-child(3) { background: #28c840; }

.chatlog-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-family: var(--font-mono);
}

.chatlog-messages {
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-assistant {
  align-self: flex-start;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 4px;
}

.chat-msg-user .chat-msg-avatar {
  background: var(--accent);
  color: var(--bg-primary);
}

.chat-msg-assistant .chat-msg-avatar {
  background: var(--accent-secondary);
  color: white;
}

.chat-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1.6;
  font-family: var(--font-mono);
}

.chat-msg-user .chat-msg-bubble {
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

.chat-msg-assistant .chat-msg-bubble {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-secondary);
}

.chat-msg-assistant .chat-msg-bubble strong {
  color: var(--accent);
  font-weight: 400;
}

.chat-msg-assistant .chat-msg-bubble em {
  color: var(--accent-secondary);
  font-style: normal;
}

.chat-msg-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.chatlog-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.chatlog-loading {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- Quick Start Section ---- */
.quickstart {
  background: var(--bg-secondary);
}

.quickstart-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.terminal {
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 60px rgba(0, 240, 160, 0.04);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

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

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.terminal-body {
  padding: 24px;
  overflow-x: auto;
}

.terminal-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
}

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

.terminal-code .comment {
  color: var(--text-muted);
  font-style: italic;
}

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

.terminal-code .path {
  color: var(--accent-secondary);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: cursorPulse 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

.quickstart-text h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.quickstart-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.8;
  margin-bottom: 16px;
}

.quickstart-features {
  list-style: none;
  margin-top: 24px;
}

.quickstart-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  padding: 10px 0;
}

.quickstart-features .check {
  color: var(--accent);
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
  padding: 80px 24px 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.7;
  margin-top: 16px;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .arch-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .quickstart-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .quickstart-text {
    order: -1;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-wide {
    grid-column: span 1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(7, 7, 13, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-mobile-toggle {
    display: block;
  }

  .hero {
    min-height: 90vh;
    padding: 100px 20px 60px;
  }

  .hero-tags {
    gap: 4px 12px;
  }

  .hero-tag:not(:last-child)::after {
    margin-left: 12px;
  }

  .section {
    padding: 80px 20px;
  }

  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item {
    padding: 24px 16px;
  }

  .chat-msg {
    max-width: 95%;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .channels-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .chatlog-messages {
    padding: 16px;
  }

  .chat-msg {
    max-width: 100%;
  }
}
