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

:root {
  --bg: #1b1b1f;
  --bg2: #222228;
  --bg3: #2a2a30;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #f1f1f1;
  --muted: #909090;
  --muted2: #636363;
  --accent: oklch(0.62 0.19 42);
  --accent-dim: oklch(0.42 0.14 42);
  --accent-glow: oklch(0.62 0.19 42 / 0.15);
  --accent2: oklch(0.72 0.17 65);
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter Tight', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #1b1b1f;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

#plexus-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body > *:not(#plexus-canvas) {
  position: relative;
  z-index: 1;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(27, 27, 31, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

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

.nav-links a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

.nav-cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 80px;
  text-align: center;
}

.hero-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-glow);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  max-width: 900px;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.7rem 1.6rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-ghost {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.7rem 1.6rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}

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

/* TERMINAL HERO CARD */
.hero-terminal {
  margin-top: 4rem;
  width: 100%;
  max-width: 680px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 0 60px oklch(0.62 0.19 42 / 0.08), 0 40px 80px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  padding: 0.7rem 1rem;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

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

.terminal-body {
  padding: 1.2rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
}

.t-comment { color: var(--muted2); }
.t-keyword { color: oklch(0.72 0.18 42); }
.t-string { color: oklch(0.75 0.15 140); }
.t-class { color: oklch(0.75 0.18 50); }
.t-prompt { color: var(--muted); }
.t-cmd { color: var(--accent2); }
.t-output { color: oklch(0.75 0.15 140); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--text);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* SECTION */
section {
  padding: 7rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width: 600px;
}

.section-desc {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

hr.section-div {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

/* BENTO GRID */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 12px;
}

.bento-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.2s;
  cursor: default;
}

.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.bento-featured {
  grid-column: span 7;
  min-height: 320px;
  background: linear-gradient(135deg, #0f0c18 0%, #0a0a12 100%);
  border-color: oklch(0.42 0.14 42 / 0.4);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.bento-featured:hover {
  border-color: oklch(0.55 0.18 42 / 0.8);
  box-shadow: 0 0 40px oklch(0.62 0.19 42 / 0.1);
}

.bento-tall { grid-column: span 5; min-height: 320px; }
.bento-half { grid-column: span 6; min-height: 200px; }
.bento-third { grid-column: span 4; min-height: 200px; }
.bento-full { grid-column: span 12; }

.bento-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.tag-live { background: oklch(0.35 0.15 140); color: oklch(0.75 0.15 140); }
.tag-soon { background: oklch(0.2 0.05 42); color: var(--muted); }
.tag-oss { background: oklch(0.25 0.08 50); color: oklch(0.75 0.12 50); }

.bento-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.bento-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.bento-arrow {
  position: absolute;
  bottom: 1.4rem;
  right: 1.4rem;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.bento-card:hover .bento-arrow {
  border-color: var(--accent);
  color: var(--accent);
}

.bento-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding: 1rem;
}

.chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  opacity: 0.7;
  transition: opacity 0.2s;
}

.featured-mockup {
  margin-top: 1.4rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid oklch(0.42 0.14 42 / 0.3);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
}

.featured-meta {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.featured-stat .val {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

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

.oss-icon {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* TECH STACK */
.tech-stack {
  padding: 7rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 3rem;
}

.tech-item {
  background: var(--bg2);
  padding: 2rem;
  position: relative;
  transition: background 0.2s;
}

.tech-item:hover { background: var(--bg3); }

.tech-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}

.tech-item:nth-child(3n)::after { display: none; }

.tech-item-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted2);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.tech-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.tech-version {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.tech-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.tech-bar {
  margin-top: 1.2rem;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.tech-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
}

/* PHILOSOPHY */
.philosophy {
  padding: 0 2rem 7rem;
  max-width: 1100px;
  margin: 0 auto;
}

.quote-block {
  border-left: 2px solid var(--accent-dim);
  padding: 2rem 2.5rem;
  background: var(--bg2);
  border-radius: 0 8px 8px 0;
}

.quote-text {
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1rem;
}

.quote-author {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* CTA BAND */
.cta-band {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 7rem;
}

.cta-inner {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg2), var(--bg));
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: var(--accent);
  filter: blur(80px);
  opacity: 0.08;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cta-inner p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* FOOTER */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(27, 27, 31, 0.88);
  backdrop-filter: blur(12px);
}

.footer-logo {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted2);
}

/* FADE IN */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* MOBILE MENU */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(27, 27, 31, 0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 1.5rem 1.25rem;
  z-index: 98;
  flex-direction: column;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.mobile-menu a:hover { color: var(--text); }

.mobile-menu .mobile-cta {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-hover) !important;
  border-radius: 4px;
  color: var(--text) !important;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.mobile-menu .mobile-cta:hover {
  border-color: var(--accent) !important;
  background: var(--accent-glow);
}

/* Responsive */
@media (max-width: 900px) {
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 120px 1.5rem 80px; }
  .hero-terminal { max-width: 100%; }

  .bento-featured,
  .bento-tall,
  .bento-half,
  .bento-third { grid-column: span 12; }

  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-item::after { display: none; }

  section { padding: 5rem 1.5rem; }
  .tech-stack { padding: 5rem 1.5rem; }
  .philosophy { padding: 0 1.5rem 5rem; }
  .cta-band { padding: 1rem 1.5rem 5rem; }
  .cta-inner { padding: 3rem 2rem; }

  footer { flex-direction: column; text-align: center; gap: 1rem; }
  .footer-links { justify-content: center; }
}

@media (max-width: 540px) {
  nav { padding: 0 1rem; }

  .hero { padding: 100px 1.25rem 60px; }
  .hero-terminal { margin-top: 2.5rem; }
  .terminal-body { padding: 1rem 1.1rem; font-size: 0.75rem; }

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

  section { padding: 4rem 1.25rem; }
  .tech-stack { padding: 4rem 1.25rem; }
  .philosophy { padding: 0 1.25rem 4rem; }
  .cta-band { padding: 1rem 1.25rem 4rem; }
  .cta-inner { padding: 2.5rem 1.25rem; }
  .cta-inner h2 { font-size: clamp(1.5rem, 7vw, 2.2rem); }
}
