:root {
  --bg: #020305;
  --bg-soft: #05080f;
  --panel: #0a101f;
  --text: #ebf2ff;
  --muted: #8b9bb4;
  --line: #151e32;
  --cyan: #00e5ff;
  --lime: #7eff4f;
  --orange: #ff9d2f;
  --magenta: #ff2fcf;
  --glow: 0 0 24px color-mix(in srgb, var(--cyan) 50%, transparent);
  --mx: 50%;
  --my: 50%;
}

.char-split {
  display: inline-block;
  white-space: pre;
  will-change: transform, opacity;
}

.service-card {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Space Grotesk", sans-serif;
  background: #000000; /* Deep space black */
  color: var(--text);
  scroll-behavior: auto; /* Lenis handles this */
  scroll-padding-top: 80px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -4;
}

body::before {
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.7) 0.8px, transparent 1px),
    radial-gradient(circle at 75% 35%, rgba(255, 255, 255, 0.45) 0.9px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.5) 0.8px, transparent 1px),
    radial-gradient(circle at 88% 80%, rgba(255, 255, 255, 0.4) 0.9px, transparent 1px);
  background-size: 220px 220px, 260px 260px, 240px 240px, 280px 280px;
  opacity: 0.15;
}

body::after {
  background: radial-gradient(circle at 50% 120%, rgba(0, 210, 255, 0.15), transparent 52%);
  opacity: 0.3;
}

body.preload main,
body.preload .site-header,
body.preload .site-footer {
  opacity: 0;
  transform: translateY(18px) scale(0.995);
}

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 229, 255, 0.18), transparent 40%),
    radial-gradient(circle at 52% 52%, rgba(255, 47, 207, 0.14), transparent 52%),
    rgba(2, 4, 8, 0.96);
  pointer-events: none;
}

.intro-core {
  width: min(680px, 86vw);
  text-align: center;
}

.intro-brand {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.7rem);
  letter-spacing: 0.17em;
  margin: 0;
  color: var(--text);
}

.intro-logo {
  width: min(760px, 86vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.45));
}

.intro-line {
  width: 100%;
  height: 2px;
  margin-top: 1rem;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  transform-origin: center;
}

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

.cursor-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(
    520px circle at var(--mx) var(--my),
    rgba(0, 229, 255, 0.12),
    rgba(255, 47, 207, 0.07) 35%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
}

.scanlines,
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 19;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.15;
}

.noise {
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.08;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--lime), var(--magenta));
  box-shadow: var(--glow);
  z-index: 40;
}

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5vw;
  z-index: 20;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg-soft) 66%, transparent);
  border-bottom: 1px solid rgba(126, 255, 79, 0.12);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.12em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(120px, 12vw, 180px);
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.glitch {
  position: relative;
  animation: neonPulse 3s ease-in-out infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  transform: translate(1px, 0);
  mix-blend-mode: screen;
  animation: glitchA 4s infinite linear alternate-reverse;
}

.glitch::after {
  color: var(--magenta);
  transform: translate(-1px, 0);
  mix-blend-mode: screen;
  animation: glitchB 4.5s infinite linear alternate-reverse;
}

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

nav a:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0, 229, 255, 0.38);
  border-radius: 1rem;
  background:
    linear-gradient(165deg, rgba(9, 18, 36, 0.96), rgba(3, 9, 22, 0.9)),
    radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.18), transparent 45%);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.08) inset,
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 16px rgba(0, 229, 255, 0.2);
  transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 0.75rem;
  border: 1px solid rgba(126, 255, 79, 0.14);
  pointer-events: none;
}

.menu-toggle::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), transparent 38%, transparent 62%, rgba(126, 255, 79, 0.22));
  opacity: 0.5;
  pointer-events: none;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 255, 0.58);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.16) inset,
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(0, 229, 255, 0.34);
}

.menu-toggle span {
  width: 24px;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(232, 244, 255, 0.96);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.32);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

main {
  padding-top: 76px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 4rem 0;
}

.parallax-layer {
  position: absolute;
  inset: -10%;
  z-index: -2;
  will-change: transform;
  --parallax-y: 0px;
}

.layer-grid {
  background-image: linear-gradient(rgba(0, 229, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.14) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(72deg) translateY(calc(34% + var(--parallax-y)));
  transform-origin: center;
  opacity: 0.3;
}

.layer-blob-a,
.layer-blob-b {
  filter: blur(70px);
}

.layer-blob-a {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.26) 0%, transparent 60%);
  left: -20%;
  top: -12%;
  transform: translateY(var(--parallax-y));
}

.layer-blob-b {
  background: radial-gradient(circle, rgba(126, 255, 79, 0.24) 0%, transparent 64%);
  right: -10%;
  top: 12%;
  transform: translateY(var(--parallax-y));
}

.matrix-globe-wrap {
  position: absolute;
  right: 4%;
  top: 12%;
  width: min(39vw, 560px);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  filter: drop-shadow(0 0 26px rgba(0, 229, 255, 0.42));
}

#cosmic-world-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  border-radius: 50%;
}

#matrix-globe {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 1;
}

.matrix-globe-wrap.cosmic-active #cosmic-world-canvas {
  display: block;
}

.matrix-globe-wrap.cosmic-active #matrix-globe {
  opacity: 0;
  visibility: hidden;
}

.matrix-globe-wrap.cosmic-fallback #cosmic-world-canvas {
  display: none;
}

.matrix-globe-halo {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.2) 0%, transparent 66%);
  filter: blur(12px);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
}

.code-reel {
  padding: 0;
  margin: 0;
}

.code-reel-media {
  position: relative;
  width: 100%;
  min-height: clamp(280px, 52vh, 620px);
  overflow: hidden;
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  border-bottom: 1px solid rgba(0, 229, 255, 0.18);
}

.code-reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.02);
}

.code-reel-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 5, 12, 0.78) 0%, rgba(2, 5, 12, 0.28) 56%, rgba(2, 5, 12, 0.76) 100%),
    radial-gradient(circle at 20% 35%, rgba(0, 229, 255, 0.2), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(255, 47, 207, 0.15), transparent 48%);
  z-index: 1;
  pointer-events: none;
}

.code-reel-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(22px, 6vh, 60px);
  z-index: 2;
}

.code-reel-content h2 {
  max-width: 720px;
  margin: 0;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.26);
}

.code-reel-description {
  max-width: 860px;
  margin: 0.8rem 0 0;
  color: rgba(235, 242, 255, 0.88);
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  line-height: 1.55;
  text-wrap: balance;
}

.code-reel-tech {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.code-reel-tech span {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(4, 12, 26, 0.68);
  color: rgba(235, 242, 255, 0.94);
  font-size: 0.78rem;
  line-height: 1.2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--lime);
  font-size: 0.76rem;
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
}

.hero-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.2;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.18);
  margin-bottom: 1.5rem;
}

.hero-rotator {
  display: inline-block;
  color: var(--lime);
  text-shadow: 0 0 14px rgba(126, 255, 79, 0.42);
  min-height: 1.2em;
}

@media (max-width: 768px) {
  /* Consolidated mobile styles into the 900px query for better consistency */
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.8rem);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 760px;
  margin: 1.2rem 0 1.8rem;
}

.cta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  color: #03131b;
  box-shadow: var(--glow);
  animation: ctaBreath 2.8s ease-in-out infinite;
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(16, 26, 47, 0.45);
}

.hero-metrics {
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.hero-metrics li {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 0.8rem;
  background: rgba(7, 12, 24, 0.62);
  color: var(--muted);
  animation: fadePulse 2.8s ease-in-out infinite;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.hero-metrics li:nth-child(2) {
  animation-delay: 0.2s;
}

.hero-metrics li:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-metrics span {
  color: var(--text);
  font-weight: 700;
  margin-right: 0.35rem;
}

.logos {
  padding: 1rem 0 2.5rem;
  color: var(--muted);
  border-top: 1px solid rgba(31, 43, 68, 0.85);
}

.logo-marquee {
  margin-top: 1rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.logo-track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  animation: marqueeX 24s linear infinite;
}

.logo-track span {
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  padding: 0.55rem 0.85rem;
  background: rgba(7, 12, 24, 0.54);
  font-size: 0.85rem;
  white-space: nowrap;
}

.client-carousel {
  margin-top: 1rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.client-track {
  display: flex;
  gap: 0.9rem;
  width: max-content;
  animation: clientMarquee 38s linear infinite;
}

.client-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 12, 24, 0.58);
  white-space: nowrap;
}

.client-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  padding: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* Spotlight Card Effect */
.spotlight-card {
  position: relative;
  background: rgba(10, 16, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(0, 229, 255, 0.12),
    transparent 40%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.spotlight-card:hover::after {
  opacity: 1;
}

.spotlight-content {
  position: relative;
  z-index: 2;
}

/* Inherit existing styles for cards but use spotlight class */
.project-card,
.testimonial-card,
.project-gallery-item,
.service-card {
  background: linear-gradient(160deg, rgba(10, 16, 31, 0.95), rgba(5, 8, 15, 0.92));
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  /* Add relative for spotlight positioning */
  position: relative;
}

.project-gallery-item {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.project-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  overflow: hidden;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.watermark-logo {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px !important;
  height: auto !important;
  opacity: 0.6;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
  z-index: 2;
  pointer-events: none;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 8, 13, 0.96) 10%, rgba(6, 8, 13, 0.4) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.project-gallery-item:hover .project-overlay {
  opacity: 1;
}

.project-gallery-item:hover .project-image-wrap img:not(.watermark-logo) {
  transform: scale(1.08);
}

.overlay-content {
  transform: translateY(20px);
  transition: transform 0.4s ease;
  width: 100%;
}

.project-gallery-item:hover .overlay-content {
  transform: translateY(0);
}

.overlay-content h4 {
  color: var(--text);
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.overlay-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.cta-group {
  display: flex;
  gap: 0.5rem;
}

.cta-group .btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.project-card p,
.testimonial-card p {
  color: var(--muted);
}

.project-card .btn {
  align-self: flex-start;
}

.social-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(7, 12, 24, 0.6);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.25s ease;
}

.social-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.social-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cyan) 55%, var(--line));
}

.project-modal {
  background: linear-gradient(170deg, rgba(10, 18, 34, 0.98), rgba(6, 11, 22, 0.98));
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--text);
}

.project-modal .modal-header {
  border-bottom-color: rgba(31, 43, 68, 0.9);
}

.project-modal .modal-body p {
  color: var(--muted);
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.tech-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 999px;
  background: rgba(5, 14, 30, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}

.tech-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px;
}

.check-list {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.check-list li {
  margin: 0.35rem 0;
}

.faq-accordion .accordion-item {
  background: linear-gradient(160deg, rgba(10, 16, 31, 0.95), rgba(5, 8, 15, 0.92));
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.faq-accordion .accordion-button {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-weight: 700;
}

.faq-accordion .accordion-button:not(.collapsed) {
  background: rgba(5, 10, 20, 0.8);
  color: var(--text);
}

.faq-accordion .accordion-button::after {
  filter: invert(1);
  opacity: 0.82;
}

.faq-accordion .accordion-body {
  color: var(--muted);
  border-top: 1px solid rgba(31, 43, 68, 0.7);
}

.final-cta {
  background: linear-gradient(
    120deg,
    rgba(0, 48, 84, 0.46) 0%,
    rgba(8, 20, 42, 0.8) 55%,
    rgba(80, 30, 120, 0.42) 100%
  );
}

.final-cta-actions {
  display: grid;
  gap: 0.7rem;
}

.section {
  padding: 5rem 0;
  content-visibility: auto; /* Browser optimization for rendering performance */
  contain-intrinsic-size: 1px 800px; /* Placeholder size for containment */
}

.cinematic-section {
  position: relative;
  overflow: clip;
  isolation: isolate;
}

.panel-wipe {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    color-mix(in srgb, var(--cyan) 65%, transparent) 38%,
    color-mix(in srgb, var(--magenta) 60%, transparent) 50%,
    transparent 68%
  );
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}

.cinematic-section::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--cyan) 45%, transparent),
    color-mix(in srgb, var(--magenta) 45%, transparent),
    transparent
  );
  opacity: 0.48;
}

.cinematic-section::after {
  content: "";
  position: absolute;
  inset: auto -22% -26% -22%;
  height: 260px;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--cyan) 26%, transparent),
    transparent
  );
  z-index: -1;
  opacity: 0;
  transform: translateY(24px) scale(0.92);
  transition: opacity 0.7s ease, transform 0.8s ease;
}

.cinematic-section.in-view::after {
  opacity: 0.34;
  transform: translateY(0) scale(1);
}

.section-alt {
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0) 0%,
    rgba(11, 18, 32, 0.7) 35%,
    rgba(11, 18, 32, 0.18) 100%
  );
}

.section-head {
  max-width: 780px;
  margin-bottom: 2.1rem;
}

.section-head h2 {
  position: relative;
  display: inline-block;
  text-shadow: 0 0 0 rgba(0, 229, 255, 0);
  transition: text-shadow 0.45s ease;
}

.section-head h2::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 24%;
  left: -28%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(0, 229, 255, 0.08) 28%,
    rgba(126, 255, 79, 0.16) 52%,
    rgba(255, 47, 207, 0.1) 74%,
    transparent 100%
  );
  filter: blur(3px);
}

.cinematic-section.in-view .section-head h2 {
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.22);
}

.cinematic-section.in-view .section-head h2::after {
  animation: holoSweep 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.service-card,
.impact-grid article,
.step {
  background: linear-gradient(160deg, rgba(10, 16, 31, 0.95), rgba(5, 8, 15, 0.92));
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.2rem;
  height: 100%;
  transition: border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  /* Spotlight requirements */
  position: relative;
  overflow: hidden;
}

/* Spotlight specific override for hover */
.service-card:hover,
.impact-grid article:hover,
.step:hover {
  border-color: color-mix(in srgb, var(--cyan) 42%, var(--line));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 229, 255, 0.2);
}

/* Spotlight pseudo elements */
.service-card::before, .impact-grid article::before, .step::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(
    400px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(0, 229, 255, 0.15),
    transparent 40%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  border-radius: inherit;
}

.service-card:hover::before, .impact-grid article:hover::before, .step:hover::before {
  opacity: 1;
}

.service-card::after, .impact-grid article::after, .step::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(255, 255, 255, 0.04),
    transparent 40%
  );
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.service-card:hover::after, .impact-grid article:hover::after, .step:hover::after {
  opacity: 1;
}

.service-card > *, .impact-grid article > *, .step > * {
  position: relative;
  z-index: 3;
}

.service-card p,
.impact-grid p,
.step p {
  color: var(--muted);
}

.tilt-card {
  transform-style: preserve-3d;
}

.step span {
  font-family: "Orbitron", sans-serif;
  color: var(--orange);
  font-size: 0.92rem;
}

.contact-form {
  max-width: 760px;
}

/* About Section Enhancement */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: "✓";
    color: var(--cyan);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.tech-stack-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 10px;
}

.tech-stack-visual span {
    background: var(--panel);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--cyan);
    font-size: 0.9rem;
    color: var(--text);
}

/* Contact Form Enhancements */
.contact-form select {
    width: 100%;
    padding: 1rem;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: var(--text);
    margin-bottom: 1rem;
}

.form-status {
  min-height: 1.3rem;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-status.success {
  color: var(--lime);
}

.form-status.error {
  color: #ff6b7d;
}

.form-label {
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.form-control {
  border: 1px solid var(--line);
  background: rgba(7, 12, 24, 0.72);
  color: var(--text);
  border-radius: 0.7rem;
  padding: 0.75rem;
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

.form-control:focus {
  outline: 2px solid color-mix(in srgb, var(--cyan) 70%, transparent);
  border-color: transparent;
  box-shadow: none;
  background: rgba(7, 12, 24, 0.85);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

body.fx-ready .cursor-glow {
  opacity: 1;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast-message {
  background: rgba(16, 26, 47, 0.95);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--cyan);
}

.toast-message.error {
  border-left-color: #ff4d4d;
}

.toast-message.success {
  border-left-color: var(--lime);
}

.toast-message.warning {
  border-left-color: #ffaa00;
}

.toast-message i {
  font-size: 1.2rem;
}

.toast-message.error i { color: #ff4d4d; }
.toast-message.success i { color: var(--lime); }
.toast-message.warning i { color: #ffaa00; }

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutToast {
  to { opacity: 0; transform: translateX(20px); }
}

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: rgba(16, 26, 47, 0.85);
  border: 1px solid var(--cyan);
  border-radius: 50%;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 243, 255, 0.15);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
  transform: translateY(-2px);
}

.scroll-top-btn svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 229, 255, 0.2);
}

.author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.author-info h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.author-info .role {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}

/* Animations */
@keyframes spinRing {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes marqueeX {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes clientMarquee {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes neonPulse {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.42), 0 0 14px rgba(0, 229, 255, 0.32);
  }

  50% {
    text-shadow: 0 0 14px rgba(255, 47, 207, 0.5), 0 0 20px rgba(0, 229, 255, 0.48);
  }
}

@keyframes fadePulse {
  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}

@keyframes ctaBreath {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  }

  50% {
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.6), 0 0 34px rgba(126, 255, 79, 0.32);
  }
}

@keyframes holoSweep {
  0% {
    left: -30%;
    opacity: 0;
  }

  20% {
    opacity: 0.72;
  }

  100% {
    left: 106%;
    opacity: 0;
  }
}

@keyframes glitchA {
  0% {
    clip-path: inset(5% 0 80% 0);
  }

  25% {
    clip-path: inset(70% 0 8% 0);
  }

  50% {
    clip-path: inset(40% 0 35% 0);
  }

  75% {
    clip-path: inset(5% 0 55% 0);
  }

  100% {
    clip-path: inset(62% 0 6% 0);
  }
}

@keyframes glitchB {
  0% {
    clip-path: inset(60% 0 12% 0);
  }

  20% {
    clip-path: inset(15% 0 62% 0);
  }

  45% {
    clip-path: inset(42% 0 34% 0);
  }

  70% {
    clip-path: inset(10% 0 72% 0);
  }

  100% {
    clip-path: inset(74% 0 5% 0);
  }
}

@media (max-width: 900px) {
  .site-header {
    justify-content: space-between;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translate(-50%, -16px) scale(0.96);
    width: min(92vw, 380px);
    padding: 0.9rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 0.9rem;
    background: rgba(6, 10, 20, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    opacity: 0;
    filter: blur(5px);
    pointer-events: none;
    transition:
      opacity 0.26s ease,
      transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.34s ease;
    z-index: 21;
  }

  .site-nav a {
    padding: 0.7rem 0.6rem;
    border-radius: 0.6rem;
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 0.24s ease,
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.2s ease;
  }

  .site-nav a:nth-child(1) { transition-delay: 0s; }
  .site-nav a:nth-child(2) { transition-delay: 0.03s; }
  .site-nav a:nth-child(3) { transition-delay: 0.06s; }
  .site-nav a:nth-child(4) { transition-delay: 0.09s; }
  .site-nav a:nth-child(5) { transition-delay: 0.12s; }
  .site-nav a:nth-child(6) { transition-delay: 0.15s; }
  .site-nav a:nth-child(7) { transition-delay: 0.18s; }
  .site-nav a:nth-child(8) { transition-delay: 0.21s; }
  .site-nav a:nth-child(9) { transition-delay: 0.24s; }
  .site-nav a:nth-child(10) { transition-delay: 0.27s; }
  .site-nav a:nth-child(11) { transition-delay: 0.3s; }
  .site-nav a:nth-child(12) { transition-delay: 0.33s; }

  .site-nav a:hover {
    background: rgba(0, 229, 255, 0.1);
  }

  body.mobile-menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    filter: blur(0);
    transform: translate(-50%, 0) scale(1);
  }

  body.mobile-menu-open .site-nav a {
    opacity: 1;
    transform: translateY(0);
  }

  body.mobile-menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg) scaleX(1.06);
  }

  body.mobile-menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.mobile-menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg) scaleX(1.06);
  }

  body.mobile-menu-open .menu-toggle {
    border-color: rgba(0, 229, 255, 0.7);
    box-shadow:
      0 0 0 1px rgba(0, 229, 255, 0.22) inset,
      0 10px 26px rgba(0, 0, 0, 0.46),
      0 0 24px rgba(0, 229, 255, 0.42);
  }

  .hero {
    min-height: 88vh;
  }

  .code-reel-media {
    min-height: clamp(500px, 88vh, 680px);
  }

  .code-reel-content {
    bottom: 14px;
  }

  .code-reel-content h2 {
    font-size: clamp(1.05rem, 7vw, 1.55rem);
    line-height: 1.2;
    max-width: 92%;
  }

  .code-reel-description {
    max-width: 96%;
    font-size: 0.9rem;
    line-height: 1.42;
    margin-top: 0.65rem;
  }

  .code-reel-tech {
    max-width: 96%;
    gap: 0.34rem;
    margin-top: 0.72rem;
  }

  .code-reel-tech span {
    font-size: 0.72rem;
    padding: 0.32rem 0.52rem;
  }

  .section-head h2::after {
    width: 34%;
    filter: blur(2px);
  }

  .matrix-globe-wrap {
    width: 210px;
    right: -15%;
    top: 22%;
    opacity: 0.92;
  }

  /* Consolidated mobile styles into the 900px query for better consistency */
  .hero-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.4;
    text-wrap: pretty;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .hero-rotator {
    display: block;
    margin: 0.2em 0;
  }
  .brand-logo {
    width: 120px;
  }

  .intro-logo {
    width: min(520px, 88vw);
  }

  .client-item {
    padding: 0.62rem 0.85rem;
  }

  .project-card .btn,
  .social-card {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .code-reel-media {
    min-height: 620px;
  }

  .code-reel-content {
    bottom: 12px;
  }

  .code-reel-content .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 0.45rem;
  }

  .code-reel-content h2 {
    font-size: clamp(1rem, 8vw, 1.45rem);
    max-width: 98%;
  }

  .code-reel-description {
    max-width: 98%;
    font-size: 0.88rem;
  }

  .code-reel-tech {
    max-width: 98%;
  }
}

body.performance-lite #particles-canvas {
  opacity: 0.5;
}

body.performance-lite .matrix-globe-wrap {
  opacity: 0.72;
}

body.performance-lite .matrix-globe-wrap.cosmic-active #cosmic-world-canvas {
  display: none;
}

body.performance-lite .matrix-globe-wrap.cosmic-active #matrix-globe {
  opacity: 1;
  visibility: visible;
}

body.performance-lite .cursor-glow {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  #particles-canvas {
    display: none;
  }

  #intro-overlay {
    display: none;
  }
}

/* Project Carousel */
.project-carousel {
  margin-top: 2rem;
  overflow: hidden;
  width: 100%;
  position: relative;
  /* Fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.project-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: projectMarquee 60s linear infinite;
  padding: 1rem 0;
}

.project-track:hover {
  animation-play-state: paused;
}

.carousel-card {
  width: 400px;
  height: 280px;
  flex-shrink: 0;
  border-radius: 1rem;
  overflow: hidden;
}

@media (max-width: 768px) {
  .carousel-card {
    width: 300px;
    height: 220px;
  }
}

@keyframes projectMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
