/* =============================================
   BEGBED LLC — Main Stylesheet
   ============================================= */

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fb;
  --color-border: #e5e7eb;
  --color-text: #1a1a2e;
  --color-text-secondary: #555770;
  --color-primary: #0a1628;
  --color-accent: #2563eb;
  --color-accent-light: #dbeafe;
  --color-white: #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}
.nav--scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 20px rgba(0,0,0,0.15);
}
.nav__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  color: var(--color-white);
  display: flex;
  align-items: center;
  z-index: 1001;
}
.nav__logo svg { height: 28px; width: auto; }
.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__link {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav__link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav__link--cta {
  background: var(--color-accent);
  color: #fff !important;
  font-weight: 600;
}
.nav__link--cta:hover { background: #1d4ed8; }

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .nav__menu--open { right: 0; }
  .nav__link {
    font-size: 1.2rem;
    padding: 14px 24px;
    width: 100%;
    text-align: center;
  }
  .nav__link--cta { margin-top: 16px; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 0 60px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.88) 0%, rgba(22, 36, 60, 0.82) 40%, rgba(26, 54, 93, 0.78) 100%),
    url('../img/hero-background.png') center center / cover no-repeat;
  z-index: 0;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 70% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}
.hero__tag {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-white);
  margin-bottom: 28px;
  letter-spacing: -0.03em;
}
.hero__subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 44px;
  max-width: 640px;
}
.hero__actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.hero__proof {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.hero__proof-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__proof-item strong {
  color: var(--color-white);
  font-size: 1.05rem;
  font-weight: 700;
}
.hero__proof-item span {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}
.hero__proof-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.15);
}

@media (max-width: 480px) {
  .hero { padding: 100px 0 60px; }
  .hero__proof-divider { display: none; }
  .hero__proof { gap: 20px; }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
}
.btn--primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
}
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn--white {
  background: #fff;
  color: var(--color-primary);
}
.btn--white:hover { background: #f0f0f0; transform: translateY(-1px); }
.btn--lg { padding: 16px 36px; font-size: 1rem; }
.btn--full { width: 100%; }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section__tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 16px;
  text-align: center;
}
.section__title--left { text-align: left; }
.section__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

/* =============================================
   SERVICES
   ============================================= */
.services {
  padding: 100px 0;
  background: var(--color-bg);
}
.services .section__tag,
.services .section__title { text-align: center; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}
.service-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.service-card__desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.service-card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-card__list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}
.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.services__grid { grid-template-columns: repeat(2, 1fr); }
.service-card--ai {
  background: linear-gradient(135deg, #f0f4ff 0%, var(--color-surface) 100%);
  border-color: var(--color-accent);
  position: relative;
}
.service-card__icon--ai {
  background: linear-gradient(135deg, #6C5CE7, #2563eb);
  color: #fff;
}
.service-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #6C5CE7, #2563eb);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}
.services__grid [data-animate]:nth-child(4) { transition-delay: 0.3s; }

@media (max-width: 900px) { .services__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* =============================================
   ABOUT
   ============================================= */
.about {
  padding: 100px 0;
  background: var(--color-surface);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.about__text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.about__stats {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__stat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.about__stat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}
.about__stat-icon svg { width: 20px; height: 20px; }
.about__stat strong { display: block; font-size: 0.95rem; font-weight: 700; }
.about__stat span { font-size: 0.85rem; color: var(--color-text-secondary); }

/* About visual - card stack */
.about__card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about__card-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: var(--transition);
}
.about__card-item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.about__card-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  flex-shrink: 0;
}
.about__card-item p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
}

/* =============================================
   PORTFOLIO — FEATURED HERO CARD (MyFlexHive)
   ============================================= */
.portfolio__hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 28px;
}
.portfolio__hero-info .portfolio__category {
  color: #fff;
  background: var(--color-accent);
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
}
.portfolio__hero-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}
.portfolio__hero-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}
.portfolio__hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.portfolio__hero-feature {
  padding: 14px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.portfolio__hero-feature strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.portfolio__hero-feature span {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .portfolio__hero-card { grid-template-columns: 1fr; padding: 24px; }
  .portfolio__hero-features { grid-template-columns: 1fr; }
}

/* =============================================
   FLEXHIVE ANIMATED DEMO
   ============================================= */
.flexhive-demo {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  background: #0A0A0F;
  font-family: 'Inter', sans-serif;
}
.flexhive-demo__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a1a24;
  border-bottom: 1px solid #2a2a3a;
}
.flexhive-demo__dots {
  display: flex;
  gap: 6px;
}
.flexhive-demo__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.flexhive-demo__dots span:nth-child(1) { background: #ff5f57; }
.flexhive-demo__dots span:nth-child(2) { background: #ffbd2e; }
.flexhive-demo__dots span:nth-child(3) { background: #28ca41; }
.flexhive-demo__url {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: #888;
  background: #111118;
  padding: 5px 16px;
  border-radius: 6px;
}
.flexhive-demo__screen {
  padding: 0;
  min-height: 320px;
  overflow: hidden;
}

/* FH Nav */
.fh-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #1a1a2a;
}
.fh-nav__logo {
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.fh-nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.65rem;
  color: #aaa;
}
.fh-btn-sm {
  background: #6C5CE7;
  color: #fff !important;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
}

/* FH Hero */
.fh-hero {
  padding: 28px 20px 20px;
  text-align: center;
  background: linear-gradient(180deg, #0A0A0F 0%, #12121f 100%);
}
.fh-hero__tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6C5CE7;
  margin-bottom: 8px;
}
.fh-hero__title {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
  animation: fh-fadeUp 1s ease both;
}
.fh-hero__sub {
  display: block;
  font-size: 0.6rem;
  color: #888;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 16px;
}
.fh-hero__search { padding: 0 12px; }
.fh-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a28;
  border: 1px solid #2a2a3a;
  border-radius: 10px;
  padding: 10px 14px;
}
.fh-search-bar__icon { font-size: 0.8rem; }
.fh-search-bar__text {
  font-size: 0.65rem;
  color: #555;
}

/* Typing animation */
.fh-typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #6C5CE7;
  width: 0;
  animation: fh-type 3s steps(35) 1.5s forwards, fh-blink 0.7s step-end infinite;
}

/* FH Spaces */
.fh-spaces {
  padding: 16px 20px 20px;
}
.fh-spaces__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #ccc;
  margin-bottom: 12px;
}
.fh-spaces__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fh-space-card {
  background: #141420;
  border: 1px solid #1e1e30;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
}
.fh-anim-1 { animation: fh-cardIn 0.5s ease 2s forwards; }
.fh-anim-2 { animation: fh-cardIn 0.5s ease 2.2s forwards; }
.fh-anim-3 { animation: fh-cardIn 0.5s ease 2.4s forwards; }
.fh-space-card__img {
  height: 52px;
  background-size: cover;
}
.fh-space-card__img--1 { background: linear-gradient(135deg, #6C5CE7, #a29bfe); }
.fh-space-card__img--2 { background: linear-gradient(135deg, #00b894, #55efc4); }
.fh-space-card__img--3 { background: linear-gradient(135deg, #e17055, #fab1a0); }
.fh-space-card__info {
  padding: 8px 10px;
}
.fh-space-card__name {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  color: #eee;
  margin-bottom: 2px;
}
.fh-space-card__meta {
  font-size: 0.5rem;
  color: #777;
}

/* Animations */
@keyframes fh-fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fh-type {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes fh-blink {
  50% { border-color: transparent; }
}
@keyframes fh-cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Replay animation when scrolled into view */
.portfolio__hero-card.animated .fh-hero__title { animation: fh-fadeUp 1s ease both; }
.portfolio__hero-card.animated .fh-typing { animation: fh-type 3s steps(35) 1.5s forwards, fh-blink 0.7s step-end infinite; }
.portfolio__hero-card.animated .fh-anim-1 { animation: fh-cardIn 0.5s ease 2s forwards; }
.portfolio__hero-card.animated .fh-anim-2 { animation: fh-cardIn 0.5s ease 2.2s forwards; }
.portfolio__hero-card.animated .fh-anim-3 { animation: fh-cardIn 0.5s ease 2.4s forwards; }

/* Pause animation until visible */
.portfolio__hero-card:not(.animated) .fh-hero__title,
.portfolio__hero-card:not(.animated) .fh-typing,
.portfolio__hero-card:not(.animated) .fh-space-card {
  animation: none;
  opacity: 0;
}

@media (max-width: 600px) {
  .fh-spaces__grid { grid-template-columns: 1fr 1fr; }
  .fh-space-card:nth-child(3) { display: none; }
  .fh-hero__title { font-size: 1rem; }
}

/* =============================================
   NEXUSAI ANIMATED DEMO
   ============================================= */
.portfolio__hero-card--ai {
  border-color: #6C5CE7;
}
.portfolio__hero-card--ai .portfolio__category {
  background: linear-gradient(135deg, #6C5CE7, #2563eb) !important;
}
.nexus-demo {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  background: #0f0f1a;
  font-family: 'Inter', sans-serif;
}
.nexus-demo__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a1a28;
  border-bottom: 1px solid #2a2a3a;
}
.nexus-demo__dots {
  display: flex;
  gap: 6px;
}
.nexus-demo__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.nexus-demo__dots span:nth-child(1) { background: #ff5f57; }
.nexus-demo__dots span:nth-child(2) { background: #ffbd2e; }
.nexus-demo__dots span:nth-child(3) { background: #28ca41; }
.nexus-demo__url {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: #888;
  background: #111118;
  padding: 5px 16px;
  border-radius: 6px;
}
.nexus-demo__screen {
  display: flex;
  min-height: 340px;
}

/* Sidebar */
.nx-sidebar {
  width: 120px;
  background: #111120;
  border-right: 1px solid #1e1e30;
  padding: 14px 10px;
  flex-shrink: 0;
}
.nx-sidebar__logo {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nx-logo-icon {
  color: #6C5CE7;
  font-size: 0.9rem;
}
.nx-sidebar__menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nx-sidebar__item {
  font-size: 0.58rem;
  color: #666;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: default;
}
.nx-sidebar__item--active {
  background: rgba(108, 92, 231, 0.15);
  color: #a29bfe;
}

/* Chat */
.nx-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nx-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1e1e30;
}
.nx-chat__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #eee;
}
.nx-chat__status {
  font-size: 0.58rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nx-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28ca41;
  animation: nx-pulse 2s infinite;
}
.nx-chat__messages {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Messages */
.nx-msg {
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
}
.nx-msg--user { justify-content: flex-end; }
.nx-msg__avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6C5CE7, #a29bfe);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nx-msg__bubble {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.6rem;
  line-height: 1.6;
  max-width: 260px;
}
.nx-msg__bubble--user {
  background: #6C5CE7;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.nx-msg__bubble--ai {
  background: #1a1a2c;
  color: #ccc;
  border-bottom-left-radius: 4px;
}
.nx-msg__label {
  display: block;
  font-size: 0.52rem;
  font-weight: 700;
  color: #a29bfe;
  margin-bottom: 4px;
}
.nx-msg__bubble strong { color: #fff; }
.nx-highlight {
  display: block;
  font-size: 0.55rem;
  color: #fdcb6e;
  margin-top: 3px;
}
.nx-msg__bubble--action {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
}
.nx-action-btn {
  font-size: 0.52rem;
  background: rgba(108, 92, 231, 0.15);
  color: #a29bfe;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

/* Chat input */
.nx-chat__input {
  margin: 0 16px 14px;
  padding: 10px 14px;
  background: #1a1a28;
  border: 1px solid #2a2a3a;
  border-radius: 10px;
}
.nx-chat__input-text {
  font-size: 0.6rem;
  color: #555;
}

/* NexusAI Animations */
.nx-msg-anim-1 { animation: nx-msgIn 0.4s ease 0.8s forwards; }
.nx-msg-anim-2 { animation: nx-msgIn 0.5s ease 2s forwards; }
.nx-msg-anim-3 { animation: nx-msgIn 0.4s ease 3.2s forwards; }

.nx-ai-typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #6C5CE7;
  width: 0;
  animation: fh-type 2.5s steps(25) 0.3s forwards, fh-blink 0.7s step-end infinite;
}

@keyframes nx-msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes nx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Pause until visible */
.portfolio__hero-card--ai:not(.animated) .nx-msg,
.portfolio__hero-card--ai:not(.animated) .nx-ai-typing {
  animation: none;
  opacity: 0;
}
.portfolio__hero-card--ai.animated .nx-msg-anim-1 { animation: nx-msgIn 0.4s ease 0.8s forwards; }
.portfolio__hero-card--ai.animated .nx-msg-anim-2 { animation: nx-msgIn 0.5s ease 2s forwards; }
.portfolio__hero-card--ai.animated .nx-msg-anim-3 { animation: nx-msgIn 0.4s ease 3.2s forwards; }
.portfolio__hero-card--ai.animated .nx-ai-typing { animation: fh-type 2.5s steps(25) 0.3s forwards, fh-blink 0.7s step-end infinite; }

@media (max-width: 600px) {
  .nx-sidebar { width: 80px; padding: 10px 6px; }
  .nx-sidebar__item { font-size: 0.5rem; padding: 5px 6px; }
  .nx-msg__bubble { max-width: 180px; }
}

/* =============================================
   PORTFOLIO
   ============================================= */
.portfolio {
  padding: 100px 0;
  background: var(--color-bg);
}
.portfolio .section__tag,
.portfolio .section__title { text-align: center; }
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.portfolio__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.portfolio__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}
.portfolio__preview {
  padding: 32px 32px 0;
  display: flex;
  justify-content: center;
}
.portfolio__info {
  padding: 28px 32px 32px;
}
.portfolio__category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 8px;
  display: block;
}
.portfolio__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.portfolio__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}
.portfolio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portfolio__tags span {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

/* Mockup styles */
.portfolio__mockup {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-bottom: none;
  background: #fff;
}
.mockup__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #f3f4f6;
  border-bottom: 1px solid var(--color-border);
}
.mockup__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}
.mockup__content {
  padding: 16px;
  min-height: 160px;
}
.mockup__nav {
  height: 8px;
  width: 60%;
  background: #e5e7eb;
  border-radius: 4px;
  margin-bottom: 16px;
}
.mockup__hero-block {
  height: 48px;
  background: linear-gradient(135deg, var(--color-accent-light), #c7d2fe);
  border-radius: 6px;
  margin-bottom: 16px;
}
.mockup__grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mockup__grid-3 div {
  height: 40px;
  background: #f3f4f6;
  border-radius: 4px;
}

/* Phone mockup */
.portfolio__mockup--2 {
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  padding: 12px 0;
}
.mockup__phone {
  width: 160px;
  background: #1a1a2e;
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.mockup__phone-notch {
  width: 60px;
  height: 6px;
  background: #2d2d44;
  border-radius: 3px;
  margin: 4px auto 12px;
}
.mockup__phone-content {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.mockup__phone-header {
  height: 10px;
  width: 50%;
  background: #e5e7eb;
  border-radius: 3px;
  margin-bottom: 12px;
}
.mockup__phone-card {
  height: 32px;
  background: linear-gradient(135deg, var(--color-accent-light), #e0e7ff);
  border-radius: 6px;
  margin-bottom: 8px;
}
.mockup__phone-nav {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}
.mockup__phone-nav span {
  width: 20px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
}

/* Desktop with sidebar mockup */
.portfolio__mockup--3 .mockup__content {
  display: flex;
  gap: 12px;
}
.mockup__sidebar {
  width: 60px;
  background: #f8f9fb;
  border-radius: 4px;
  flex-shrink: 0;
}
.mockup__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mockup__table-row {
  height: 24px;
  background: #f3f4f6;
  border-radius: 4px;
}
.mockup__table-row:first-child {
  background: linear-gradient(135deg, var(--color-accent-light), #e0e7ff);
}

/* Split layout mockup */
.portfolio__mockup--4 .mockup__content { padding: 12px; }
.mockup__split {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.mockup__split-left {
  flex: 1;
  height: 100px;
  background: linear-gradient(135deg, #e0e7ff, var(--color-accent-light));
  border-radius: 6px;
}
.mockup__split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.mockup__line {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
}
.mockup__line--short { width: 60%; }
.mockup__btn-block {
  height: 20px;
  width: 50%;
  background: var(--color-accent);
  border-radius: 4px;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .portfolio__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
}

/* =============================================
   PROCESS
   ============================================= */
.process {
  padding: 100px 0;
  background: var(--color-surface);
}
.process .section__tag,
.process .section__title { text-align: center; }
.process__timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.process__timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.process__step {
  display: flex;
  gap: 28px;
  padding-bottom: 40px;
  position: relative;
}
.process__step:last-child { padding-bottom: 0; }
.process__number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.process__content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-top: 2px;
}
.process__content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 480px) {
  .process__timeline::before { left: 20px; }
  .process__number { width: 42px; height: 42px; font-size: 1rem; }
  .process__step { gap: 20px; }
}

/* =============================================
   TECH STACK
   ============================================= */
.techstack {
  padding: 80px 0;
  background: var(--color-bg);
}
.techstack .section__tag,
.techstack .section__title { text-align: center; }
.techstack__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.techstack__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
}
.techstack__item:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.techstack__item h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}
.techstack__item p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.techstack__grid [data-animate]:nth-child(5) { transition-delay: 0.4s; }
@media (max-width: 900px) { .techstack__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .techstack__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .techstack__grid { grid-template-columns: 1fr; } }

/* =============================================
   BEGBED HOMES
   ============================================= */
.homes {
  padding: 100px 0;
  background: var(--color-surface);
}
.homes__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}
.homes__text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}
.homes__features {
  margin: 28px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.homes__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}
.homes__features li svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.homes__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.homes__badge {
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  width: 100%;
  max-width: 340px;
}
.homes__badge svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--color-accent);
}
.homes__badge span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.homes__badge p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* Homes showcase */
.homes__showcase {
  width: 100%;
  max-width: 400px;
}
.homes__showcase-card {
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 16px;
}
.homes__showcase-icon {
  width: 56px;
  height: 56px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.homes__showcase-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
}
.homes__showcase-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: 8px;
}
.homes__showcase-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.homes__showcase-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 28px;
}
.homes__showcase-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
}
.homes__showcase-stats strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.homes__showcase-stats span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
}
.homes__ig-follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.homes__ig-follow:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(225, 48, 108, 0.3);
  color: #fff;
}
.homes__ig-follow svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Featured portfolio card */
.portfolio__card--featured {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, #f0f4ff 0%, var(--color-surface) 100%);
}
.portfolio__card--featured .portfolio__category {
  color: #fff;
  background: var(--color-accent);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
}

@media (max-width: 768px) {
  .homes__grid { grid-template-columns: 1fr; gap: 40px; }
  .homes__badge { max-width: 280px; margin: 0 auto; }
}

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, #0a1628 0%, #1a365d 100%);
  text-align: center;
}
.cta-banner__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.cta-banner__text {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
  padding: 100px 0;
  background: var(--color-bg);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact__text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.contact__detail {
  display: flex;
  align-items: center;
  gap: 16px;
}
.contact__detail svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.contact__detail strong { display: block; font-size: 0.9rem; }
.contact__detail a,
.contact__detail span { font-size: 0.9rem; color: var(--color-text-secondary); }
.contact__detail a:hover { color: var(--color-accent); }

.contact__social {
  display: flex;
  gap: 12px;
}
.contact__social a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: var(--transition);
}
.contact__social a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.contact__social a svg { width: 18px; height: 18px; }

/* Form */
.contact__form-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__group {
  margin-bottom: 20px;
}
.form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form__optional {
  font-weight: 400;
  color: var(--color-text-secondary);
}
.form__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: var(--transition);
}
.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}
.form__input::placeholder { color: #aaa; }
.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__hp { position: absolute; left: -9999px; }
.form__note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 12px;
}

/* Success state */
.contact__success {
  text-align: center;
  padding: 60px 20px;
}
.contact__success svg {
  width: 56px;
  height: 56px;
  color: #22c55e;
  margin: 0 auto 20px;
}
.contact__success h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact__success p {
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .form__row { grid-template-columns: 1fr; }
  .contact__form-wrap { padding: 24px; }
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer__logo {
  display: inline-block;
  margin-bottom: 16px;
}
.footer__logo svg { height: 28px; width: auto; }
.footer__desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 260px;
}
.footer__heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.95);
  margin-bottom: 16px;
}
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  text-align: center;
}
.footer__bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-animate].animated {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for grids */
.services__grid [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.services__grid [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.portfolio__grid [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.portfolio__grid [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.portfolio__grid [data-animate]:nth-child(4) { transition-delay: 0.3s; }
.techstack__grid [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.techstack__grid [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.techstack__grid [data-animate]:nth-child(4) { transition-delay: 0.3s; }
.process__step[data-animate]:nth-child(2) { transition-delay: 0.1s; }
.process__step[data-animate]:nth-child(3) { transition-delay: 0.2s; }
.process__step[data-animate]:nth-child(4) { transition-delay: 0.3s; }
