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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* === Custom Properties === */
:root {
  --green: #00ff88;
  --blue: #00ccff;
  --bg: #0a0a0a;
  --bg-alt: #0d0d0d;
  --surface: #111;
  --border: #1a1a1a;
  --text: #ccc;
  --text-secondary: #888;
  --text-dim: #666;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 560px;
  --nav-height: 56px;
}

/* === Base === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-label {
  display: block;
  text-align: center;
  color: var(--green);
  font-size: 11px;
  letter-spacing: 3px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

h2 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* === Navigation === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.btn-github {
  background: var(--green);
  color: #000 !important;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-github:hover {
  opacity: 0.85;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-terminal {
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  background: #1a1a1a;
  padding: 10px 14px;
  display: flex;
  gap: 7px;
}

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

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  min-height: 180px;
}

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

.prompt { color: var(--green); }
.cmd { color: #fff; }
.arg { color: var(--text-secondary); }

.terminal-output {
  margin-top: 12px;
  color: var(--text-secondary);
}

.terminal-output .line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}

.terminal-output .line.visible {
  opacity: 1;
  transform: translateY(0);
}

.terminal-cursor {
  color: var(--green);
  font-weight: 700;
  animation: blink 1s step-end infinite;
  display: inline;
}

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

.hero-cta {
  padding: 0 24px 24px;
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--green);
  color: #000;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  border: 1px solid var(--green);
  color: var(--green);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(0, 255, 136, 0.1);
}

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

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

/* === About === */
.about {
  background: var(--bg-alt);
}

.about h2 {
  margin-bottom: 16px;
}

.about-text {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* === Capabilities === */
.capabilities {
  background: var(--bg);
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}

.cap-label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--blue);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.cap-card h3 {
  margin-bottom: 8px;
}

.cap-card p {
  font-size: 12px;
  line-height: 1.5;
}

/* === Products === */
.products {
  background: var(--bg-alt);
}

.product-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  margin-top: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid;
  border-left: 3px solid;
  border-radius: 6px;
  padding: 22px;
  margin-bottom: 12px;
}

.product-web3 {
  border-color: rgba(0, 204, 255, 0.2);
  border-left-color: var(--blue);
}

.product-ai {
  border-color: rgba(0, 255, 136, 0.2);
  border-left-color: var(--green);
}

.product-card h3 {
  font-size: 16px;
}

.product-label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-top: 3px;
}

.product-web3 .product-label { color: var(--blue); }
.product-ai .product-label { color: var(--green); }

.product-card p {
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
}

.tag-blue {
  background: rgba(0, 204, 255, 0.07);
  color: var(--blue);
}

.tag-green {
  background: rgba(0, 255, 136, 0.07);
  color: var(--green);
}

/* === Contact === */
.contact {
  background: var(--bg);
  text-align: center;
}

.contact p {
  margin-top: 8px;
}

.contact-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* === Footer === */
.footer {
  background: #050505;
  padding: 20px;
  font-size: 11px;
  color: var(--text-dim);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-links a {
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links a:not(.btn-github) {
    display: none;
  }

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

  .stats {
    gap: 24px;
  }

  .hero-terminal {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 12px;
    padding: 16px;
  }

  h2 {
    font-size: 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }

  .stats {
    flex-direction: column;
    gap: 16px;
  }

  .contact-cta {
    flex-direction: column;
    align-items: center;
  }
}

/* === Nav Auth === */
.btn-login {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-login:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user-name {
  font-size: 13px;
  color: var(--text);
}

.btn-logout {
  font-size: 11px;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.2s;
}

.btn-logout:hover {
  border-color: #ff5f57;
  color: #ff5f57;
}
