html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #121212;
  color: white;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

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

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: clip;
  }

  section,
  nav,
  footer,
  .container,
  .acrylic-panel,
  .fluent-card,
  .mobile-feature-card__body {
    max-width: 100%;
  }
}

/* Theme tokens */
:root {
  --gh-purple: #8A2BE2;
  --gh-light-purple: #B76EFF;
  --gh-grad-start: #c000e5;
  --gh-grad-end: #1c00b6;
  --gh-grad-end-soft: #3f1fe2;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #121212;
}

::-webkit-scrollbar-thumb {
  background: #8A2BE2;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #B76EFF;
}

.acrylic-panel {
  position: relative;
  overflow: hidden;
}

.mesh-gradient {
  background: 
    linear-gradient(-45deg, var(--gh-grad-start), var(--gh-grad-end), #6A5ACD, #4B0082),
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(255, 255, 255, 0.03) 50px, rgba(255, 255, 255, 0.03) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255, 255, 255, 0.03) 50px, rgba(255, 255, 255, 0.03) 51px);
  background-size: 400% 400%, 100% 100%, 100% 100%;
  animation: gradientFlow 15s ease infinite;
  filter: blur(60px);
  transform: scale(1.2);
  transition: background-position 0.3s ease-out;
  will-change: background-position, transform;
}

.mesh-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  opacity: 0.4;
}

.particle {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

@keyframes float-particle {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.3; }
  80% { opacity: 0.3; }
  100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}
@keyframes gradientFlow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

.acrylic-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
}

.mica-panel {
  background-color: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(20px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fluent-card {
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px -5px rgba(138, 43, 226, 0.2);
  transform: translateZ(0);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}

.fluent-card:hover {
  transform: translateY(-5px) translateZ(0);
  box-shadow: 0 20px 30px -10px rgba(138, 43, 226, 0.3);
}

.fluent-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}

.fluent-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px -5px rgba(138, 43, 226, 0.4);
}

input:focus, textarea:focus, button:focus, a:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.5);
}

.depth-0 {
  box-shadow: none;
}

.depth-1 {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.depth-2 {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.depth-3 {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.depth-4 {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animation {
  /* Blend new gradient with legacy purples to keep brand accents */
  background: linear-gradient(-45deg, var(--gh-grad-start), var(--gh-grad-end), #9932CC, #8B008B);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

.text-gradient {
  background: linear-gradient(to right, var(--gh-grad-start), var(--gh-grad-end-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-indicator {
  position: relative;
}

.nav-indicator::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gh-grad-start), var(--gh-grad-end));
  transition: width 0.3s ease;
}

.nav-indicator:hover::after,
.nav-indicator.active::after {
  width: 100%;
}

@media (max-width: 768px) {
  .hero-bg {
    filter: blur(8px);
  }
  
  .fluent-card {
    transform: none !important;
  }
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(18, 18, 18, 0.9), transparent);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

/* Subtle portfolio link flair */
.portfolio-overlay a:hover span {
  background: linear-gradient(to right, var(--gh-grad-start), var(--gh-grad-end-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s, transform 0.5s;
}

.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(138, 43, 226, 0.5);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
}

.form-input {
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
  border-color: #8A2BE2;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

.loading-indicator {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #8A2BE2;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.parallax {
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

[data-aos="fluent-fade-up"] {
  opacity: 0;
  transform: translateY(20px);
  transition-property: transform, opacity;
}

[data-aos="fluent-fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.glow-effect {
  position: relative;
  z-index: 1;
}

.glow-effect::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(to right, var(--gh-grad-start), var(--gh-grad-end));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

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

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

.back-to-top-visible {
  animation: smoothFadeIn 0.3s ease forwards;
}

.back-to-top-hidden {
  animation: smoothFadeOut 0.3s ease forwards;
}

.logo-text {
  background: linear-gradient(to right, #8A2BE2, #B76EFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: bold;
}

.logo-container {
  position: relative;
  z-index: 1;
}

.logo-container::after {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  /* Subtle halo updated to new gradient hues */
  background: linear-gradient(135deg, rgba(192, 0, 229, 0.25), rgba(28, 0, 182, 0.1));
  filter: blur(8px);
  z-index: -1;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo-container:hover::after {
  opacity: 1;
}

.service-icon {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover .service-icon {
  transform: scale(1.15) translateY(-5px);
}

.progress-circle {
  transition: stroke-dashoffset 0.3s ease;
}

*:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Utilities for the new gradient */
.bg-primary-gradient {
  background: linear-gradient(90deg, var(--gh-grad-start), var(--gh-grad-end));
}

.border-primary-gradient {
  border-image: linear-gradient(90deg, var(--gh-grad-start), var(--gh-grad-end)) 1;
}

.mobile-feature-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.mobile-feature-card__body {
  background: rgba(6, 6, 6, 0.92);
  border-radius: 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 25px -22px rgba(0, 0, 0, 0.95);
}

.mobile-feature-card__image {
  width: 100%;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 30px -18px rgba(0, 0, 0, 0.7);
  margin-top: 1rem;
}

.mobile-feature-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.5rem;
  border-radius: 0.85rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: none;
}

.mobile-feature-card__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}

.mobile-feature-card__cta--full {
  width: 100%;
}

/* Disable 3D tilt and hover lift specifically on opt-out cards */
.no-tilt,
.no-tilt:hover {
  transform: none !important;
}
.no-tilt:hover {
  box-shadow: 0 10px 25px -5px rgba(138, 43, 226, 0.2) !important;
}

.gh-glitch {
  position: relative;
  font-family: 'Oxanium', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow:
    0 0 18px rgba(138, 43, 226, 0.55),
    2px 0 rgba(183, 110, 255, 0.45),
    -2px 0 rgba(28, 0, 182, 0.45);
  animation: gh-glitch-glow 7.5s ease-in-out infinite;
}

.gh-glitch::before,
.gh-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: inherit;
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: screen;
}

.gh-glitch::before {
  text-shadow: -1px 0 rgba(192, 0, 229, 0.6);
  animation: gh-glitch-shift 3.3s steps(2) infinite;
}

.gh-glitch::after {
  text-shadow: 1px 0 rgba(110, 205, 255, 0.5);
  animation: gh-glitch-shift-alt 4s steps(3) infinite;
}

@keyframes gh-glitch-glow {
  0%, 100% {
    text-shadow:
      0 0 12px rgba(138, 43, 226, 0.4),
      2px 0 rgba(183, 110, 255, 0.35),
      -2px 0 rgba(28, 0, 182, 0.35);
  }
  40% {
    text-shadow:
      0 0 20px rgba(183, 110, 255, 0.55),
      3px 0 rgba(192, 0, 229, 0.45),
      -3px 0 rgba(110, 205, 255, 0.4);
  }
  70% {
    text-shadow:
      0 0 14px rgba(138, 43, 226, 0.5),
      1px 0 rgba(183, 110, 255, 0.4),
      -1px 0 rgba(28, 0, 182, 0.35);
  }
}

@keyframes gh-glitch-shift {
  0% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0.25; }
  15% { transform: translate(-1px, -1px); clip-path: inset(0 0 60% 0); opacity: 0.45; }
  45% { transform: translate(1px, 1px); clip-path: inset(40% 0 0 0); opacity: 0.3; }
  65% { transform: translate(-0.5px, 0.5px); clip-path: inset(0 0 25% 0); opacity: 0.4; }
  100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0.25; }
}

@keyframes gh-glitch-shift-alt {
  0% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0.2; }
  20% { transform: translate(1px, -0.5px); clip-path: inset(30% 0 30% 0); opacity: 0.4; }
  55% { transform: translate(-1px, 0.5px); clip-path: inset(10% 0 50% 0); opacity: 0.32; }
  80% { transform: translate(0.5px, -1px); clip-path: inset(60% 0 5% 0); opacity: 0.38; }
  100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .gh-glitch,
  .gh-glitch::before,
  .gh-glitch::after {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .gh-glitch {
    letter-spacing: 0.02em;
    text-shadow: none;
    animation: none;
  }

  .gh-glitch::before,
  .gh-glitch::after {
    content: none;
  }
}