/* ============================================================
   anupama.dev — Stylesheet
   ============================================================ */

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

/* Eliminate 300ms tap delay on all touch devices */
html {
  touch-action: manipulation;
}

/* Remove blue tap flash on mobile; interactions provide their own :active feedback */
a, button, [role="button"], input, select, textarea, label {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg:            #030712;
  --surface:       #0d1117;
  --card:          rgba(13, 17, 23, 0.85);
  --border:        rgba(255, 255, 255, 0.07);
  --border-hover:  rgba(255, 255, 255, 0.16);
  --primary:       #6366f1;
  --primary-light: #818cf8;
  --primary-glow:  rgba(99, 102, 241, 0.22);
  --cyan:          #22d3ee;
  --purple:        #a855f7;
  --green:         #4ade80;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --text-dim:      #4b5563;
  --radius:        12px;
  --radius-lg:     18px;
  --shadow:        0 8px 40px rgba(0, 0, 0, 0.5);
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --dur:           0.28s;
}

html { scroll-behavior: smooth; }

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

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

[data-theme="light"] {
  --bg:            #f8fafc;
  --surface:       #ffffff;
  --card:          rgba(255, 255, 255, 0.9);
  --border:        rgba(0, 0, 0, 0.08);
  --border-hover:  rgba(0, 0, 0, 0.18);
  --primary:       #5355d4;
  --primary-light: #4338ca;
  --primary-glow:  rgba(83, 85, 212, 0.14);
  --cyan:          #0891b2;
  --purple:        #7c3aed;
  --green:         #16a34a;
  --text:          #0f172a;
  --text-muted:    #475569;
  --text-dim:      #94a3b8;
  --shadow:        0 8px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

/* Hero orbs in light mode */
[data-theme="light"] .hero__orb--1 {
  background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, transparent 70%);
}
[data-theme="light"] .hero__orb--2 {
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
}
[data-theme="light"] .hero__orb--3 {
  background: radial-gradient(circle, rgba(8,145,178,0.06) 0%, transparent 70%);
}
[data-theme="light"] .hero__grid {
  background-image:
    linear-gradient(rgba(83,85,212,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83,85,212,0.06) 1px, transparent 1px);
}

/* Gradient text stays readable in light mode */
[data-theme="light"] .hero__headline-gradient {
  background: linear-gradient(130deg, var(--primary) 0%, var(--cyan) 55%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .stats__number {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav in light mode */
[data-theme="light"] .nav.scrolled {
  background: rgba(248, 250, 252, 0.9);
}
[data-theme="light"] .nav__mobile {
  background: rgba(248, 250, 252, 0.98);
}

/* Cards in light mode */
[data-theme="light"] .service-card,
[data-theme="light"] .project-card,
[data-theme="light"] .about__card,
[data-theme="light"] .contact__option {
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

[data-theme="light"] .stats {
  background: #ffffff;
}

[data-theme="light"] .work {
  background: #f1f5f9;
}

[data-theme="light"] .tech {
  background: #f1f5f9;
}

[data-theme="light"] .footer {
  background: #ffffff;
}

/* About timeline dot in light mode */
[data-theme="light"] .about__timeline-dot {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Smooth theme transition */
body,
.nav,
.service-card,
.project-card,
.about__card,
.contact__option,
.stats,
.work,
.tech,
.footer {
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-hover);
  color: var(--text);
}
[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Show moon in dark mode, sun in light mode */
.theme-toggle__sun  { display: none; }
.theme-toggle__moon { display: block; }

[data-theme="light"] .theme-toggle__sun  { display: block; }
[data-theme="light"] .theme-toggle__moon { display: none; }

/* ============================================================
   SHARED HELPERS
   ============================================================ */

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 1.1rem;
}
.section-tag::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--primary-light);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.75;
}

.section-header { margin-bottom: 4rem; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 30px var(--primary-glow);
}
.btn--primary:hover  { background: var(--primary-light); box-shadow: 0 0 50px var(--primary-glow); transform: translateY(-2px); }
.btn--primary:active { background: #4338ca; transform: translateY(0) scale(0.97); box-shadow: none; }

.btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover  { background: rgba(255,255,255,0.09); border-color: var(--border-hover); }
.btn--ghost:active { background: rgba(255,255,255,0.14); transform: scale(0.97); }

.btn--outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 12px 24px;
}
.btn--outline:hover  { border-color: var(--primary); color: var(--primary-light); background: var(--primary-glow); }
.btn--outline:active { transform: scale(0.97); }

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0 2rem;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav.scrolled {
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav__container {
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  text-decoration: none;
}
.nav__logo-accent { color: var(--primary); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  padding: 10px 20px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 6px;
  transition: all var(--dur) var(--ease) !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.nav__cta:hover  { background: var(--primary-light) !important; box-shadow: 0 0 24px var(--primary-glow); }
.nav__cta:active { background: #4338ca !important; transform: scale(0.96); box-shadow: none !important; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  /* Large tap target — visually small, physically big */
  padding: 12px 10px;
  margin: -8px -6px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--dur) var(--ease);
  pointer-events: none;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  background: rgba(3, 7, 18, 0.98);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  padding: 17px 2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  /* Minimum 44px tap target */
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav__mobile a:hover  { color: var(--text); }
.nav__mobile a:active { color: var(--text); background: rgba(99,102,241,0.08); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 2rem 100px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 10%, transparent 75%);
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.hero__orb--1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, transparent 70%);
  top: -250px; left: -150px;
  animation: orb-drift 9s ease-in-out infinite;
}
.hero__orb--2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(168,85,247,0.11) 0%, transparent 70%);
  top: 80px; right: -120px;
  animation: orb-drift 11s ease-in-out infinite reverse;
}
.hero__orb--3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(34,211,238,0.07) 0%, transparent 70%);
  bottom: -100px; left: 35%;
  animation: orb-drift 13s ease-in-out infinite;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(25px, -35px) scale(1.06); }
  66%       { transform: translate(-18px, 22px) scale(0.96); }
}

.hero__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 2rem;
}
.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(74,222,128,0); }
}

.hero__headline {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin-bottom: 1.5rem;
  max-width: 820px;
  contain: layout;
}
.hero__line1,
.hero__line2 {
  display: block;
  height: 1.15em;
  overflow: hidden;
}
.hero__headline-gradient {
  background: linear-gradient(130deg, var(--primary-light) 0%, var(--cyan) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero__trusted {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero__trusted-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero__trusted-logos {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.hero__trusted-logos .sep { color: var(--text-dim); }

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.hero__scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scroll-reveal 2.2s ease-in-out infinite;
}
@keyframes scroll-reveal {
  0%   { transform: scaleY(0); transform-origin: top; }
  48%  { transform: scaleY(1); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   STATS
   ============================================================ */

.stats {
  padding: 3rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats__container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.stats__item {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 1.25rem 2rem;
}
.stats__number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}
.stats__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.stats__divider {
  width: 1px;
  height: 56px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */

.services { padding: 8rem 2rem; }
.services__container { max-width: 1200px; margin: 0 auto; }
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background 0.15s ease;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  will-change: transform;
  transform-style: preserve-3d;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.service-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  /* transform + background driven by JS tilt/spotlight — no CSS override */
  box-shadow:
    0 28px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(99,102,241,0.22),
    0 0 40px rgba(99,102,241,0.08),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.service-card:hover::after { opacity: 1; }

.service-card__icon {
  width: 46px;
  height: 46px;
  background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  transition: all var(--dur) var(--ease);
}
.service-card:hover .service-card__icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 24px var(--primary-glow);
  border-color: transparent;
}

.service-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--text);
}
.service-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.72;
  margin-bottom: 1.25rem;
}
.service-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.service-card__list li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding-left: 14px;
  position: relative;
}
.service-card__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   WORK
   ============================================================ */

.work {
  padding: 8rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.work__container { max-width: 1200px; margin: 0 auto; }
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.work__cta { text-align: center; margin-top: 2.5rem; }

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-card__image {
  height: 220px;
  position: relative;
  overflow: hidden;
  /* gradient is a fallback if the image fails to load */
}
.project-card__image--wecare  { background: linear-gradient(135deg, #0f2744 0%, #1a4a8a 50%, #1a237e 100%); }
.project-card__image--cropsense { background: linear-gradient(135deg, #14291a 0%, #1b5e30 50%, #155724 100%); }
.project-card__image--zeil    { background: linear-gradient(135deg, #3a0a40 0%, #7b0f62 50%, #5e1a90 100%); }
.project-card__image--devest  { background: linear-gradient(135deg, #0f1e4a 0%, #1a2f7a 50%, #24367a 100%); }

/* Real screenshot image — scrolls top→bottom on hover */
.project-card__img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(0);
  transition: transform 3.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.project-card:hover .project-card__img {
  /* slides image up to reveal bottom; calc uses the img's own height */
  transform: translateY(calc(-100% + 220px));
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
  z-index: 1;
}
.project-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.project-card__tags span {
  padding: 4px 10px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.88);
}

.project-card__content { padding: 1.5rem; }
.project-card__category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
  display: block;
  margin-bottom: 0.4rem;
}
.project-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.project-card__desc {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.project-card__link:hover {
  gap: 10px;
  color: var(--cyan);
}

/* Featured project card (full-width, horizontal layout) */
.project-card--featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2rem;
  min-height: 320px;
}
.project-card--featured .project-card__image {
  height: 100%;
  min-height: 280px;
}
.project-card--featured .project-card__content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.project-card--featured .project-card__title {
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}
.project-card--featured .project-card__desc {
  margin-bottom: 1.75rem;
}

/* captions4you gradient */
.project-card__image--captions {
  background: linear-gradient(135deg, #1e1040 0%, #4f21a1 35%, #b5179e 70%, #f72585 100%);
}

/* Animated UI mock inside the captions card */
.project-card__captions-visual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.5rem;
  z-index: 0;
}
.captions-chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  animation: chip-float 3s ease-in-out infinite;
}
.captions-chip--ig { background: rgba(193,53,132,0.35); animation-delay: 0s; }
.captions-chip--tt { background: rgba(0,0,0,0.4);       animation-delay: 0.4s; }
.captions-chip--yt { background: rgba(255,0,0,0.3);     animation-delay: 0.8s; }
.captions-chip--fb { background: rgba(24,119,242,0.35); animation-delay: 1.2s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.captions-score {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 18px;
  text-align: center;
  color: #fff;
  width: 100%;
  max-width: 160px;
}
.captions-score__label {
  display: block;
  font-size: 0.65rem;
  opacity: 0.75;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.captions-score__value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}
.captions-score__value small {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.6;
}

.captions-tag {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  width: 100%;
  text-align: center;
  letter-spacing: 0.04em;
}

/* Featured links row */
.project-card__feat-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Reversed featured card (image right, content left) */
.project-card--featured-reverse {
  grid-template-columns: 1fr 1fr;
}
.project-card--featured-reverse .project-card__content {
  order: 1;
}
.project-card--featured-reverse .project-card__image {
  order: 2;
}

/* Coming soon badge */
.project-card__coming-soon { margin-bottom: 0.75rem; }
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Apple App Store button */
.btn--appstore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  cursor: not-allowed;
  opacity: 0.75;
}
[data-theme="light"] .btn--appstore {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.1);
}

/* WakeMeUp gradient */
.project-card__image--wakemeup {
  background: linear-gradient(135deg, #050e1d 0%, #0a2240 35%, #0d3b4e 65%, #065f5a 100%);
}

/* Map / GPS visual mock */
.wakemeup-visual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  z-index: 1;
  background: rgba(5, 14, 29, 0.45);
}
.wakemeup-map {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wakemeup-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.wakemeup-pin__dot {
  width: 14px;
  height: 14px;
  background: #22d3ee;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(34,211,238,0.7);
  position: relative;
  z-index: 2;
}
.wakemeup-pin__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(34,211,238,0.5);
  animation: ring-pulse 2.4s ease-out infinite;
}
.wakemeup-pin__ring--1 { width: 36px;  height: 36px;  animation-delay: 0s; }
.wakemeup-pin__ring--2 { width: 64px;  height: 64px;  animation-delay: 0.7s; }
.wakemeup-pin__ring--3 { width: 96px;  height: 96px;  animation-delay: 1.4s; }

@keyframes ring-pulse {
  0%   { opacity: 0.8; transform: scale(0.5); }
  100% { opacity: 0;   transform: scale(1); }
}

.wakemeup-radius {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1px dashed rgba(34,211,238,0.25);
  background: rgba(34,211,238,0.04);
}

.wakemeup-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

@media (max-width: 860px) {
  .project-card--featured,
  .project-card--featured-reverse {
    grid-template-columns: 1fr;
  }
  .project-card--featured-reverse .project-card__content { order: 2; }
  .project-card--featured-reverse .project-card__image  { order: 1; }
  .project-card--featured .project-card__image,
  .project-card--featured-reverse .project-card__image {
    height: 220px;
    min-height: unset;
  }
}

/* ============================================================
   ABOUT
   ============================================================ */

.about { padding: 8rem 2rem; }
.about__container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about__text {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.9rem;
}

.about__highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.75rem 0;
}
.about__highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}
.about__highlight-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 8px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.about__highlight strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.about__highlight span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.about__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* About card / timeline */
.about__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
}

.about__avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.about__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 32px var(--primary-glow);
}

.about__timeline {
  display: flex;
  flex-direction: column;
}
.about__timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}
.about__timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.about__timeline-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 3px;
}
.about__timeline-dot--active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}
.about__timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.about__timeline-period {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
.about__timeline-body strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}
.about__timeline-body span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   TECH STACK
   ============================================================ */

.tech {
  padding: 6rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tech__container { max-width: 1100px; margin: 0 auto; }
.tech__tag { display: block; text-align: center; }

.tech__groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 3rem;
}
.tech__group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.7rem;
}
.tech__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech__pills span {
  padding: 5px 12px;
  background: rgba(99,102,241,0.07);
  border: 1px solid rgba(99,102,241,0.14);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
  cursor: default;
}
.tech__pills span:hover {
  background: var(--primary-glow);
  border-color: rgba(99,102,241,0.4);
  color: var(--primary-light);
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact {
  padding: 9rem 2rem 8rem;
  position: relative;
  overflow: hidden;
}
.contact__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.contact__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 65%);
}
.contact__container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Two-column layout */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5rem;
  align-items: start;
}
.contact__left { padding-top: 0.5rem; }
.contact__left .section-sub { max-width: 400px; margin-bottom: 2.5rem; }
.contact__left strong { color: var(--text); }

.contact__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.contact__option {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.contact__option:hover {
  border-color: rgba(99,102,241,0.4);
  background: var(--primary-glow);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.contact__option-icon {
  width: 38px;
  height: 38px;
  background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}
.contact__option-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.contact__option-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.contact__location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Contact form card ────────────────────────────────────── */

.contact-form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
}
.contact-form-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.contact-form-card__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-form__field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.cf-req { color: var(--primary-light); }

.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: var(--text-dim);
}
.contact-form__field input:focus,
.contact-form__field select:focus,
.contact-form__field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(99, 102, 241, 0.04);
}
.contact-form__field input.error,
.contact-form__field select.error,
.contact-form__field textarea.error {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

/* Custom select arrow */
.contact-form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.contact-form__field select option {
  background: #0d1117;
  color: var(--text);
}

.contact-form__field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.contact-form__submit {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.contact-form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.contact-form__status {
  font-size: 0.82rem;
  line-height: 1.55;
  border-radius: 8px;
  padding: 0;
  min-height: 0;
  transition: all 0.3s ease;
}
.contact-form__status:not(:empty) { padding: 12px 14px; }
.contact-form__status--success {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
}
.contact-form__status--error {
  background: rgba(244, 63, 94, 0.07);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #f43f5e;
}

/* Light mode form overrides */
[data-theme="light"] .contact-form-card {
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
[data-theme="light"] .contact-form__field input,
[data-theme="light"] .contact-form__field select,
[data-theme="light"] .contact-form__field textarea {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.1);
  color: var(--text);
}
[data-theme="light"] .contact-form__field input::placeholder,
[data-theme="light"] .contact-form__field textarea::placeholder { color: #94a3b8; }
[data-theme="light"] .contact-form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
[data-theme="light"] .contact-form__field select option { background: #ffffff; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
}
.footer__container { max-width: 1200px; margin: 0 auto; }
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer__brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 280px;
  margin-top: 0.5rem;
  line-height: 1.6;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: flex-start;
}
.footer__links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer__links a:hover { color: var(--text); }

.footer__col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.85rem;
}
.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer__col ul a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer__col ul a:hover { color: var(--text); }
.footer__copy {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.services__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.services__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.services__grid .reveal:nth-child(4) { transition-delay: 0.08s; }
.services__grid .reveal:nth-child(5) { transition-delay: 0.16s; }
.services__grid .reveal:nth-child(6) { transition-delay: 0.24s; }
.work__grid .reveal:nth-child(2)     { transition-delay: 0.1s; }
.work__grid .reveal:nth-child(3)     { transition-delay: 0.08s; }
.work__grid .reveal:nth-child(4)     { transition-delay: 0.16s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .tech__groups { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .about__container { grid-template-columns: 1fr; gap: 3rem; }
  .work__grid       { grid-template-columns: 1fr; }
  .stats__divider   { display: none; }
  .stats__container { display: grid; grid-template-columns: 1fr 1fr; }
  .contact__inner   { grid-template-columns: 1fr; gap: 3rem; }
  .contact-form__row { grid-template-columns: 1fr; }
}

/* ============================================================
   FUTURISTIC AI EFFECTS
   ============================================================ */

/* Neural network canvas */
.hero__neural {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

/* ── Cursor glow (element created by JS) ── */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 9990;
  will-change: transform;
  mix-blend-mode: screen;
}
[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(83,85,212,0.05) 0%, transparent 60%);
  mix-blend-mode: multiply;
}

/* ── Service card holographic spinning border ── */
@property --holo-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.service-card {
  isolation: isolate;
  overflow: visible;  /* allow ::before to extend beyond border-radius */
}
.service-card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: conic-gradient(
    from var(--holo-angle),
    #6366f1 0%, #22d3ee 20%, #a855f7 40%, #f72585 60%, #22d3ee 80%, #6366f1 100%
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: holo-spin 3s linear infinite;
}
.service-card:hover::before { opacity: 0; } /* disabled — tilt+spotlight used instead */

@keyframes holo-spin {
  to { --holo-angle: 360deg; }
}

/* Fallback for browsers without @property (Firefox < 128) */
@supports not (background: conic-gradient(from 1deg, red, blue)) {
  .service-card::before {
    background: linear-gradient(135deg, #6366f1, #22d3ee, #a855f7, #f72585);
    background-size: 300% 300%;
    animation: holo-shift 3s linear infinite;
  }
  @keyframes holo-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
}

/* ── Scan line sweeping down over project images on hover ── */
.project-card__image::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,0.95) 50%, transparent 100%);
  box-shadow: 0 0 10px rgba(34,211,238,0.7), 0 0 20px rgba(34,211,238,0.3);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
}
.project-card:hover .project-card__image::after {
  animation: scan-down 1.8s ease-in-out forwards;
}
@keyframes scan-down {
  0%   { top: 0;    opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* ── Glitch effect on hero headline ── */
.hero__headline { position: relative; }

.glitch-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.glitch-layer .hero__headline-gradient {
  /* solid colour override inside glitch layers */
  -webkit-text-fill-color: inherit;
  background: none;
}

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  20%       { clip-path: inset(8%  0 55% 0); transform: translateX(-5px); }
  40%       { clip-path: inset(48% 0 22% 0); transform: translateX(5px);  }
  60%       { clip-path: inset(28% 0 43% 0); transform: translateX(-3px); }
  80%       { clip-path: inset(68% 0 6%  0); transform: translateX(3px);  }
}
@keyframes glitch-2 {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  20%       { clip-path: inset(58% 0 8%  0); transform: translateX(6px);  }
  40%       { clip-path: inset(18% 0 52% 0); transform: translateX(-6px); }
  60%       { clip-path: inset(36% 0 35% 0); transform: translateX(4px);  }
  80%       { clip-path: inset(6%  0 66% 0); transform: translateX(-4px); }
}

.hero__headline.is-glitching .glitch-layer:nth-child(1) {
  opacity: 1;
  color: var(--cyan);
  animation: glitch-1 0.45s steps(1) forwards;
}
.hero__headline.is-glitching .glitch-layer:nth-child(2) {
  opacity: 1;
  color: var(--purple);
  animation: glitch-2 0.45s steps(1) forwards;
}

/* ── Floating data streams in hero ── */
.hero__stream {
  position: absolute;
  width: 1px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(99,102,241,0.55) 50%, transparent 100%);
  animation: stream-fall linear infinite;
}
@keyframes stream-fall {
  0%   { transform: translateY(-120px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.45; }
  100% { transform: translateY(110vh); opacity: 0; }
}

/* ── Shimmer on featured project cards ── */
.project-card--featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.035) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  animation: card-shimmer 5s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes card-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Radar sweep on about card ── */
.about__card {
  position: relative;
  overflow: hidden;
}
.about__card::after {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent      0deg,
    rgba(99,102,241,0.07) 35deg,
    transparent      70deg
  );
  animation: radar-sweep 7s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.about__card > * { position: relative; z-index: 1; }

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Stats number glow ── */
.stats__number {
  filter: drop-shadow(0 0 18px rgba(99,102,241,0.4));
}

/* ── Text scramble char ── */
.scramble-char {
  color: var(--primary-light);
  opacity: 0.75;
}

/* ── Nav logo neon on hover ── */
.nav__logo:hover .nav__logo-accent {
  text-shadow: 0 0 12px var(--primary), 0 0 28px var(--primary);
  transition: text-shadow 0.3s;
}

/* ── Magnetic buttons keep smooth transform ── */
.btn { will-change: transform; }

/* ── Contact glow button ── */
.btn--primary:hover {
  box-shadow: 0 0 0 1px var(--primary), 0 0 35px var(--primary-glow), 0 8px 24px rgba(0,0,0,0.3);
}

/* ── Light mode overrides for AI effects ── */
[data-theme="light"] .stats__number {
  filter: drop-shadow(0 0 12px rgba(83,85,212,0.25));
}
[data-theme="light"] .service-card::before {
  opacity: 0;
}
[data-theme="light"] .service-card:hover::before {
  opacity: 0.7;
}
[data-theme="light"] .about__card::after {
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent      0deg,
    rgba(83,85,212,0.05) 35deg,
    transparent      70deg
  );
}

/* ============================================================
   END FUTURISTIC AI EFFECTS
   ============================================================ */

@media (max-width: 860px) {
  .services__grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

  .project-card__feat-links { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .project-card__feat-links .btn { width: 100%; justify-content: center; }

  .about__card { padding: 1.5rem; }
  .hero__trusted { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 768px) {
  .nav__links     { display: none; }
  .nav__hamburger { display: flex; }

  /* Reduce heavy vertical padding on tablet */
  .services { padding: 5rem 1.5rem; }
  .work     { padding: 5rem 1.5rem; }
  .about    { padding: 5rem 1.5rem; }
  .contact  { padding: 6rem 1.5rem 4rem; }
  .tech     { padding: 4rem 1.5rem; }
  .stats    { padding: 2.5rem 1.5rem; }

  /* Nova promo CTA stacks */
  .nova-promo { padding: 60px 20px; }
  .nova-promo__actions { flex-direction: column; align-items: stretch; }
  .nova-promo__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  /* nav already hidden from 768px */

  /* Hero */
  .hero { padding: 90px 1.25rem 70px; min-height: auto; }
  .hero__headline { font-size: clamp(2rem, 9vw, 3rem); contain: layout; }
  .hero__sub { font-size: 1rem; margin-bottom: 2rem; }
  .hero__badge { font-size: 0.72rem; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__trusted-logos { gap: 0.4rem; font-size: 0.82rem; }
  .hero__scroll { display: none; }

  /* Stats */
  .stats { padding: 2rem 1.25rem; }
  .stats__container { grid-template-columns: 1fr 1fr; }
  .stats__item { padding: 0.85rem 0.5rem; }
  .stats__number { font-size: 2rem; }
  .stats__label { font-size: 0.75rem; }

  /* Services */
  .services { padding: 4rem 1.25rem; }
  .services__grid { grid-template-columns: 1fr; }
  .service-card { padding: 1.5rem; }

  /* Work */
  .work { padding: 4rem 1.25rem; }
  .work__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .project-card--featured,
  .project-card--featured-reverse { margin-top: 1.25rem; }
  .project-card__feat-links { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .project-card__feat-links .btn,
  .project-card__feat-links .btn--appstore { width: 100%; justify-content: center; }
  .project-card__feat-links .project-card__link { justify-content: center; }

  /* About */
  .about { padding: 4rem 1.25rem; }
  .about__actions { flex-direction: column; align-items: stretch; }
  .about__actions .btn { width: 100%; justify-content: center; }
  .about__card { padding: 1.25rem; }
  .about__avatar-wrap { width: 72px; height: 72px; }
  .about__avatar { width: 72px; height: 72px; }

  /* Tech */
  .tech { padding: 3.5rem 1.25rem; }
  .tech__groups { grid-template-columns: 1fr; gap: 1.75rem; }
  .tech__pills { gap: 6px; }
  .tech__pills span { font-size: 0.75rem; padding: 4px 10px; }

  /* Contact */
  .contact { padding: 4rem 1.25rem; }
  .contact__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-form__row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 1.5rem; }
  .contact__options { gap: 0.75rem; }

  /* Typography */
  .section-title { font-size: clamp(1.6rem, 7vw, 2.25rem); }
  .section-sub { font-size: 0.9rem; }
  .section-header { margin-bottom: 2rem; }

  /* Footer */
  .footer__top { flex-direction: column; gap: 1.5rem; }
  .footer__links { flex-wrap: wrap; gap: 0.75rem 1.25rem; }
  .footer__copy { flex-direction: column; gap: 0.4rem; text-align: center; }

  /* Prevent iOS Safari zoom-on-focus (needs ≥16px) */
  .contact-form__field input,
  .contact-form__field select,
  .contact-form__field textarea { font-size: 16px; }

  /* Hero trusted logos — wrap neatly */
  .hero__trusted-logos { flex-wrap: wrap; row-gap: 4px; }
}

/* ============================================================
   NAV — Nova AI link + badge
   ============================================================ */

.nav__nova-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-light) !important;
  font-weight: 600;
}

.nav__nova-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* ============================================================
   NOVA PROMO BANNER (main site)
   ============================================================ */

.nova-promo {
  padding: 80px 24px;
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(124, 58, 237, 0.06) 50%,
    rgba(34, 211, 238, 0.05) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.nova-promo__container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.nova-promo__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.nova-promo__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
  flex-shrink: 0;
}

.nova-promo__dot--green {
  background: var(--green);
  animation: badgePulse 2.4s ease-in-out infinite;
}

.nova-promo__headline {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}

.nova-promo__sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2rem;
}

.nova-promo__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Promo card visual ───────────────────────────────────── */

.nova-promo__visual {
  display: flex;
  justify-content: center;
}

.nova-promo__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 40px rgba(99, 102, 241, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nova-promo__card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.nova-promo__card-row:last-child { border-bottom: none; }

.nova-promo__card-row svg { color: var(--green); flex-shrink: 0; }

.nova-promo__card-row--header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  padding-bottom: 10px;
}

.nova-promo__card-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nova-promo__card-stat strong { color: var(--text); }

.nova-promo__card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 3px 9px;
  border-radius: 100px;
}

[data-theme="light"] .nova-promo__card {
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .nova-promo__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nova-promo__visual { display: none; }
}

/* ============================================================
   ELLIE NAV BADGE
   ============================================================ */

.nav__ellie-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a78bfa !important;
  font-weight: 600;
}

.nav__ellie-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* ============================================================
   AI PRODUCTS DUAL LAYOUT (replaces nova-promo on index.html)
   ============================================================ */

.ai-products__hd {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.ai-products__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 0.9rem;
}

.ai-products__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ai-products__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}

.ai-products__card:hover { transform: translateY(-4px); }

.ai-products__card--nova {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,.2), 0 0 40px rgba(99,102,241,.06);
}

.ai-products__card--ellie {
  border-color: rgba(167, 139, 250, 0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,.2), 0 0 40px rgba(167,139,250,.07);
}

.ai-products__card-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
  width: fit-content;
}

.ai-products__card--nova .ai-products__card-badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
}

.ai-products__card--ellie .ai-products__card-badge {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.22);
  color: #a78bfa;
}

.ai-products__card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: badgePulse 2.4s ease-in-out infinite;
}

.ai-products__card--nova  .ai-products__card-dot { background: var(--green); }
.ai-products__card--ellie .ai-products__card-dot { background: #a78bfa; }

.ai-products__card-name {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.ai-products__card--ellie .ai-products__card-name {
  background: linear-gradient(130deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-products__card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex: 1;
}

.ai-products__card-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn--ellie {
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  color: #fff !important;
  border: none;
  box-shadow: 0 0 20px rgba(167,139,250,.3);
}

.btn--ellie:hover {
  box-shadow: 0 0 30px rgba(167,139,250,.55);
  transform: translateY(-1px);
  color: #fff !important;
}

.ai-products__card-status {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.ai-products__card-status-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.ai-products__card--nova  .ai-products__card-status-hdr { color: var(--green); }
.ai-products__card--ellie .ai-products__card-status-hdr { color: #a78bfa; }

.ai-products__card-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.ai-products__card-status-row:last-child { border-bottom: none; }

.ai-products__card--nova  .ai-products__card-status-row svg { color: var(--green); flex-shrink: 0; }
.ai-products__card--ellie .ai-products__card-status-row svg { color: #a78bfa; flex-shrink: 0; }

.ai-products__card-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ai-products__card-stat strong { color: var(--text); }

.ai-products__card-stat-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 100px;
}

.ai-products__card--nova  .ai-products__card-stat-badge { color: var(--primary-light); background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2); }
.ai-products__card--ellie .ai-products__card-stat-badge { color: #a78bfa; background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.2); }

[data-theme="light"] .ai-products__card { background: #ffffff; box-shadow: 0 4px 24px rgba(0,0,0,.07); }
[data-theme="light"] .ai-products__card-status { background: #f8f9ff; }

@media (max-width: 768px) {
  .ai-products__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 80px 1rem 60px; }
  .hero__headline { font-size: clamp(1.75rem, 8.5vw, 2.5rem); }
  .hero__sub { font-size: 0.9rem; }

  .stats__container { grid-template-columns: 1fr 1fr; }
  .stats__number { font-size: 1.75rem; }

  .section-title { font-size: clamp(1.4rem, 7vw, 1.9rem); }

  .project-card__content { padding: 1.25rem; }
  .project-card--featured .project-card__content { padding: 1.5rem 1.25rem; }

  .contact-form-card { padding: 1.25rem; }

  .footer { padding: 2.5rem 1rem 1.5rem; }

  #ai-chat { bottom: 16px; right: 16px; }
  .ai-chat-bubble { font-size: 0.78rem; padding: 8px 12px; }
  .ai-chat-panel { width: calc(100vw - 32px); height: 72vh; }
}

/* ============================================================
   AI CONSULTANT CHAT WIDGET
   ============================================================ */

#ai-chat {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 16px;
  /* Container must not intercept taps — only the toggle button and open panel should */
  pointer-events: none;
}
#ai-chat-toggle,
.ai-chat-trigger {
  pointer-events: auto;
}

/* ── Toggle button ───────────────────────────────────────── */

/* ── Trigger wrapper ─────────────────────────────────────── */
.ai-chat-trigger {
  position: relative;
  display: flex;
  align-items: center;
}

/* ── Speech bubble ───────────────────────────────────────── */
.ai-chat-bubble {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px) scale(0.95);
  transform-origin: right center;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.ai-chat-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  border: 7px solid transparent;
  border-right: none;
  border-left-color: var(--border-hover);
}
.ai-chat-bubble::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -5px;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: var(--surface);
  z-index: 1;
}
.ai-chat-bubble.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
  pointer-events: auto;
}
#ai-chat.is-open .ai-chat-bubble {
  opacity: 0 !important;
  pointer-events: none;
}

/* ── Toggle button ───────────────────────────────────────── */
#ai-chat-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.55);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  opacity: 0;
  animation: chatBtnIn 0.5s var(--ease) 2.2s forwards;
}

@keyframes chatBtnIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

#ai-chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 36px rgba(99, 102, 241, 0.75);
}

.ai-chat-toggle__icon {
  position: absolute;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.ai-chat-toggle__icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

#ai-chat.is-open .ai-chat-toggle__icon--chat {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

#ai-chat.is-open .ai-chat-toggle__icon--close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.ai-chat-toggle__badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--bg);
  animation: badgePulse 2.4s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  50%       { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

/* ── Panel ───────────────────────────────────────────────── */

.ai-chat-panel {
  width: 380px;
  height: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}

#ai-chat.is-open .ai-chat-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ──────────────────────────────────────────────── */

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  flex-shrink: 0;
}

.ai-chat-header__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.ai-chat-header__info { flex: 1; min-width: 0; }

.ai-chat-header__name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.3;
}

.ai-chat-header__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
}

.ai-chat-header__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: badgePulse 2.4s ease-in-out infinite;
}

/* ── Messages ────────────────────────────────────────────── */

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar { width: 5px; }
.ai-chat-messages::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 4px;
  margin: 6px 0;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
  opacity: 0.7;
}
.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.ai-chat-msg {
  display: flex;
  gap: 8px;
  animation: msgSlideIn 0.22s var(--ease);
}

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

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

.ai-chat-msg__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.45);
}

.ai-chat-msg__bubble {
  max-width: 262px;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.ai-chat-msg--ai .ai-chat-msg__bubble {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.ai-chat-msg--ai .ai-chat-msg__bubble strong {
  color: var(--text);
  font-weight: 700;
}
.ai-chat-msg--ai .ai-chat-msg__bubble em {
  color: var(--primary-light);
  font-style: italic;
}

.ai-chat-msg--user .ai-chat-msg__bubble {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* ── Typing indicator ────────────────────────────────────── */

.ai-chat-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.ai-chat-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.3s ease-in-out infinite;
}

.ai-chat-typing__dot:nth-child(2) { animation-delay: 0.18s; }
.ai-chat-typing__dot:nth-child(3) { animation-delay: 0.36s; }

.nova-cursor {
  display: inline-block;
  color: var(--primary-light);
  animation: novaBlink 0.65s step-end infinite;
  font-size: 0.95em;
  line-height: 1;
  vertical-align: baseline;
  margin-left: 1px;
}
@keyframes novaBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-7px); opacity: 1; }
}

/* ── Input form ──────────────────────────────────────────── */

.ai-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.ai-chat-input {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.ai-chat-input::placeholder { color: var(--text-muted); }

.ai-chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.ai-chat-input:disabled { opacity: 0.5; }

.ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.ai-chat-send:hover  { opacity: 0.88; transform: scale(1.08); }
.ai-chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Mobile ──────────────────────────────────────────────── */

