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

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #1a1a25;
  --border: #1e1e2e;
  --text: #e4e4e7;
  --text-dim: #71717a;
  --text-muted: #52525b;
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-glow: rgba(0, 255, 65, 0.15);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.2);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.2);
  --amber: #f59e0b;
  --rose: #f43f5e;
  --blue: #3b82f6;
  --neon-gradient: linear-gradient(135deg, var(--cyan), var(--purple), var(--rose));
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --radius: 12px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========== Matrix Rain Canvas ========== */
#matrix-rain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.06;
  pointer-events: none;
}

/* ========== Navigation ========== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
}
.logo-img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}
.logo-text { font-family: var(--font-mono); }
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: color 0.3s;
  position: relative;
}
.nav-links a:hover { color: var(--green); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-mobile { display: none; }

/* ========== Hero ========== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  position: relative;
  z-index: 1;
}

.terminal {
  width: 100%;
  max-width: 700px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 17, 24, 0.9);
  backdrop-filter: blur(10px);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.05);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 30, 46, 0.5);
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  min-height: 160px;
}
.terminal-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt { color: var(--green); font-weight: 600; }
.typewriter { color: var(--text); }
.cursor {
  color: var(--green);
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.terminal-output {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}
.terminal-output .highlight { color: var(--cyan); }
.terminal-output .success { color: var(--green); }
.terminal-output .warn { color: var(--amber); }

.hero-tagline {
  text-align: center;
  max-width: 700px;
}
.hero-tagline h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.gradient-text {
  background: var(--neon-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 20px var(--green-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}
.btn-icon { font-size: 18px; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========== Sections ========== */
.section {
  padding: 100px 24px;
  position: relative;
  z-index: 1;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  display: block;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-sub {
  color: var(--text-dim);
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== About Grid ========== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s;
}
.about-card:hover {
  border-color: var(--cyan);
  background: var(--bg-card-hover);
  box-shadow: 0 0 30px var(--cyan-glow);
  transform: translateY(-4px);
}
.about-icon {
  font-size: 32px;
  margin-bottom: 16px;
}
.about-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.about-card p {
  color: var(--text-dim);
  font-size: 14px;
}

/* Stats */
.about-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--green);
}
.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ========== Org Chart ========== */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
}
.org-level {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.org-connector {
  width: 1px;
  height: 30px;
  background: var(--border);
}
.org-connector.horizontal {
  width: 200px;
  height: 1px;
}
.org-connector.triple {
  width: 400px;
}

/* ========== Team Cards ========== */
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  width: 200px;
  position: relative;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 0 40px var(--cyan-glow), 0 20px 60px rgba(0, 0, 0, 0.3);
}
.team-card.ceo { border-color: var(--amber); }
.team-card.ceo:hover { box-shadow: 0 0 40px rgba(245, 158, 11, 0.3); }
.team-card.csuite { border-color: rgba(168, 85, 247, 0.3); }
.team-card.csuite:hover { box-shadow: 0 0 40px var(--purple-glow); }

.card-glow {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, var(--cyan-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.team-card:hover .card-glow { opacity: 1; }

.card-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  position: relative;
}
.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--bg-card);
}
.card-info h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.card-role {
  font-size: 12px;
  color: var(--cyan);
  display: block;
  margin-bottom: 8px;
}
.card-tagline {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}
.card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.card-status.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--green); }
  50% { box-shadow: 0 0 16px var(--green), 0 0 24px var(--green-glow); }
}

/* Team Detail Overlay */
.team-detail {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.team-detail.active { display: flex; }
.detail-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 32px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.3s;
  font-family: var(--font-mono);
}
.detail-close:hover { color: var(--text); }
.detail-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  position: relative;
}
.detail-content .detail-emoji {
  font-size: 64px;
  margin-bottom: 16px;
}
.detail-content .detail-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 30px var(--cyan-glow);
  position: relative;
}
.detail-content .detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-content .detail-avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: var(--bg-card);
}
.footer-logo-img {
  height: 24px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 3px;
}
.detail-content h3 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 4px;
}
.detail-content .detail-role {
  color: var(--cyan);
  font-size: 14px;
  margin-bottom: 8px;
}
.detail-content .detail-tagline {
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 24px;
}
.detail-content .detail-desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 24px;
}
.detail-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.detail-skills .skill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

/* ========== Tech Grid ========== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.tech-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: all 0.3s;
}
.tech-item:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px var(--green-glow);
}
.tech-icon { font-size: 24px; }

/* ========== CTA ========== */
.cta-block {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.cta-terminal {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 24px;
  display: inline-block;
  margin-bottom: 32px;
}
.cta-terminal .prompt { color: var(--green); }
.cta-terminal .arg { color: var(--cyan); }
.cta-block h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 16px;
}
.cta-block p {
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-links {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.social-links a {
  color: var(--text-dim);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.social-links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
  transform: translateY(-2px);
}

/* ========== Footer ========== */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--green); }

/* ========== Animations ========== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .nav-mobile span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 30px;
  }

  .team-card { width: 160px; padding: 16px; }
  .card-avatar { width: 60px; height: 60px; }
  .org-level { gap: 12px; }
  .org-connector.horizontal, .org-connector.triple { display: none; }

  .hero-actions { flex-direction: column; align-items: center; }
  .cta-links { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .team-card { width: 140px; padding: 12px; }
  .card-info h3 { font-size: 11px; }
}
