/* Base Styles and Custom Properties
-------------------------------------------------- */
:root {
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-text: #ffffff;
  --color-text-alt: #afafaf;
  --color-primary: #0046FF;
  --color-secondary: #6236FF;
  --color-accent: #00C2FF;
  --color-border: rgba(255, 255, 255, 0.1);
  
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Open Sans', sans-serif;
  
  --easing: cubic-bezier(0.25, 0.1, 0.25, 1);
  --easing-bounce: cubic-bezier(0.4, 1.4, 0.75, 0.9);
  
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 8rem;
  
  --container-width: 1400px;
  --header-height: 100px;
  --header-height-mobile: 80px;
  
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  
  --transition-fast: 0.3s var(--easing);
  --transition-medium: 0.5s var(--easing);
  --transition-slow: 0.8s var(--easing);
}

/* Reset & Base Elements
-------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-secondary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Force hardware acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

body.loading {
  overflow: hidden;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  contain: layout style;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Noise Overlay
-------------------------------------------------- */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
}

/* Custom Cursor
-------------------------------------------------- */
.cursor-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.cursor-outer,
.cursor-inner,
.cursor-text {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease-out, width 0.2s ease-out, height 0.2s ease-out, background-color 0.2s ease-out, opacity 0.2s ease-out;
  z-index: 9998;
}

.cursor-outer {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition-duration: 0.15s;
}

.cursor-inner {
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  z-index: 9999;
}

.cursor-text {
  background-color: var(--color-primary);
  color: var(--color-bg);
  padding: 10px 15px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
}

/* Preloader
-------------------------------------------------- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  padding-top: 20vh;
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.loader-logo {
  position: relative;
  margin-bottom: var(--space-xl);
  animation: optimizedPulse 2s infinite;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-logo img.logo-image {
  max-width: 220px;
  height: auto;
  filter: none;
}

.loader-progress-container {
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background-color: var(--color-primary);
  transition: width 0.3s ease-out;
}

.loader-counter {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.counter-number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-text);
}

.counter-percent {
  font-size: 1.5rem;
  margin-left: 4px;
  color: var(--color-primary);
}

/* Page Transitions
-------------------------------------------------- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 9997;
  transform: translateY(100%);
  pointer-events: none;
}

/* Common Animations
-------------------------------------------------- */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes slideRight {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Header & Navigation
-------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background-color: transparent;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  /* Optimize rendering performance */
  will-change: transform;
  transform: translateZ(0);
}

/* Add subtle background only when scrolled */
.site-header.scrolled {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Remove the existing before pseudo-element that adds the black background */
.site-header::before {
  display: none;
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
}

.logo {
  position: relative;
  z-index: 101;
}

.logo a {
  display: block;
}

.main-nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: block;
  padding: var(--space-xs) 0;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: translateX(-101%);
  transition: transform var(--transition-fast);
}

.nav-link:hover::after {
  transform: translateX(0);
}

.nav-link[data-text]::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--color-primary);
  transform: translateY(100%);
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  color: transparent;
}

.nav-link:hover[data-text]::before {
  transform: translateY(0);
}

/* Hamburger Menu Button */
.menu-toggle {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
}

.hamburger {
  width: 100%;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
  /* Optimize rendering performance */
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-alt);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition-medium);
}

.mobile-menu.active .mobile-menu-bg {
  transform: scaleY(1);
}

.mobile-menu-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
  transition-delay: 0.2s;
}

.mobile-menu.active .mobile-menu-content {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-list {
  margin-bottom: var(--space-xl);
}

.mobile-nav-item {
  margin-bottom: var(--space-md);
}

.mobile-nav-link {
  display: block;
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--color-text);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-primary);
  transform: translateX(var(--space-sm));
}

.mobile-menu-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-contact {
  font-family: var(--font-primary);
  font-size: 1.25rem;
}

.mobile-contact a {
  color: var(--color-text-alt);
  transition: color var(--transition-fast);
}

.mobile-contact a:hover {
  color: var(--color-primary);
}

/* Social Links in Mobile Menu */
.mobile-menu .social-links {
  display: flex;
  gap: var(--space-md);
}

.mobile-menu .social-link {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-alt);
  transition: color var(--transition-fast);
}

.mobile-menu .social-link:hover {
  color: var(--color-primary);
}

/* Hero Section
-------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 120px; /* Add enough padding to prevent overlap with header */
  margin-top: 0;
  overflow: hidden;
  z-index: 1; /* Lower than header z-index */
}

/* Fix for hero elements */
.hero-bg,
.hero-particles,
.hero-gradient {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hero background with black background and blue/white particles
-------------------------------------------------- */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1 !important; /* Lower z-index to avoid click blocking */
}

/* Restore particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

/* Update gradient to be subtle blue overlay */
.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 70, 255, 0.1), rgba(0, 194, 255, 0.1));
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* Update particle colors to blue and white */
.particle {
  position: absolute;
  border-radius: 50%;
  background-color: var(--color-primary);
  pointer-events: none;
  z-index: 2;
  will-change: transform, opacity, filter, box-shadow;
  transition-property: transform, opacity, filter, box-shadow, background-color;
  animation: floatParticle 30s infinite alternate ease-in-out;
}

/* Create different animation variations */
.particle:nth-child(3n) {
  animation-name: floatParticle2;
  animation-duration: 25s;
  animation-delay: 0.3s;
}

.particle:nth-child(3n+1) {
  animation-name: floatParticle3;
  animation-duration: 35s;
  animation-delay: 0.7s;
}

.particle:nth-child(5n) {
  filter: blur(1px);
  opacity: 0.8;
}

.particle:nth-child(7n) {
  animation-name: pulseParticle;
  animation-duration: 10s;
  animation-timing-function: ease-in-out;
}

/* Enhanced particle animations */
@keyframes floatParticle {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(40px, 20px) rotate(120deg);
  }
  40% {
    transform: translate(-30px, 40px) rotate(240deg);
  }
  60% {
    transform: translate(20px, -30px) rotate(360deg);
  }
  80% {
    transform: translate(-20px, -40px) rotate(480deg);
  }
  100% {
    transform: translate(30px, 10px) rotate(720deg);
  }
}

@keyframes floatParticle2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-40px, 30px) scale(1.2);
  }
  50% {
    transform: translate(30px, -40px) scale(0.8);
  }
  75% {
    transform: translate(-20px, -30px) scale(1.1);
  }
  100% {
    transform: translate(40px, 20px) scale(1);
  }
}

@keyframes floatParticle3 {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  30% {
    transform: translate(50px, -30px) rotate(180deg) scale(1.2);
  }
  60% {
    transform: translate(-40px, -40px) rotate(360deg) scale(0.8);
  }
  100% {
    transform: translate(30px, 50px) rotate(720deg) scale(1.1);
  }
}

@keyframes pulseParticle {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
  }
}

/* Mobile optimization for particles */
@media (max-width: 767px) {
  .particle {
    /* Default smaller on mobile for better performance */
    animation-duration: 20s;
  }
  
  /* Simplified animations for mobile */
  @keyframes floatParticle {
    0% {
      transform: translate(0, 0);
    }
    50% {
      transform: translate(30px, 20px);
    }
    100% {
      transform: translate(-20px, 30px);
    }
  }
}

.hero-content {
  position: relative;
  z-index: 100 !important; /* Higher z-index for content */
  max-width: 800px;
  opacity: 0;
  animation: fadeIn 0.8s forwards;
  animation-delay: 0.5s;
  margin-top: 2rem; /* Add additional spacing to push content down */
}

.hero-section .container {
  min-height: calc(100vh - var(--header-height)); /* Adjust for header height */
  padding-top: 2rem; /* Add some extra spacing */
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  margin-bottom: 0.1em;
}

/* Fix hero title mark (the "matter" word) 
-------------------------------------------------- */
.hero-title mark {
  background: none; /* Remove background */
  color: #0046FF; /* Use solid brand blue color */
  font-weight: 700;
  padding: 0 3px;
  text-shadow: 0 0 10px rgba(0, 70, 255, 0.3); /* Add subtle glow */
  position: relative;
  display: inline;
}

/* Add underline effect */
.hero-title mark::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #0046FF, #00C2FF);
  transition: width 0.3s ease;
}

.hero-description {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-alt);
  margin-bottom: var(--space-xl);
  max-width: 80%;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: auto;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background-color: var(--color-text-alt);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent !important;
  animation: none !important;
}

.scroll-text {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-alt);
}

@keyframes scrollLine {
  0% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

/* Buttons
-------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-tertiary {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0, 70, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text);
  border: none;
  box-shadow: 0 5px 15px rgba(0, 70, 255, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  transform: translateX(-100%);
  transition: transform var(--transition-fast);
  z-index: -1;
}

.btn-primary:hover {
  color: var(--color-bg);
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-primary);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform: translateX(-100%) skewX(-15deg);
  transition: transform var(--transition-fast);
  z-index: -1;
}

.btn-secondary:hover {
  color: var(--color-bg);
  border-color: var(--color-primary);
}

.btn-secondary:hover::before {
  transform: translateX(0) skewX(-15deg);
}

.btn-tertiary {
  background-color: transparent;
  color: var(--color-text);
  padding: 0;
  position: relative;
}

.btn-tertiary::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.btn-tertiary:hover {
  color: var(--color-primary);
}

.btn-tertiary:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Common Section Styles
-------------------------------------------------- */
section {
  padding: var(--space-xxl) 0;
  position: relative;
  display: block;
  visibility: visible;
  opacity: 1;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
}

.section-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.section-subtitle {
  font-family: var(--font-secondary);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-top: var(--space-md);
}

/* About Section
-------------------------------------------------- */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.large-text {
  font-family: var(--font-primary);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  line-height: 1.4;
}

.body-text {
  color: var(--color-text-alt);
  margin-bottom: var(--space-lg);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-number {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-alt);
}

.about-image {
  position: relative;
  height: auto;
  margin-bottom: 10px;
}

.image-container {
  position: relative;
  width: 90%;
  height: auto;
  max-height: 400px;
  margin-bottom: 10px;
}

.about-img-1 {
  position: relative;
  width: 80%;
  height: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.about-img-2 {
  position: absolute;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-img-2 {
  width: 50%;
  height: 50%;
  bottom: 0;
  right: 0;
  z-index: 1;
}

.img-hover-reveal {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.img-hover-reveal-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-medium);
}

.img-hover-reveal:hover .img-hover-reveal-inner {
  transform: scale(1.05);
}

/* Work Section
-------------------------------------------------- */
.work-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.filter-button {
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background-color: transparent;
  color: var(--color-text-alt);
  transition: all var(--transition-fast);
}

.filter-button:hover {
  color: var(--color-text);
}

.filter-button.active {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.work-item {
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  height: 0;
  padding-bottom: 68%; /* Adjust aspect ratio to prevent video cutoff */
  transition: all 0.3s ease;
}

.work-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.work-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.work-link:hover .work-image img {
  transform: scale(1.1);
}

.work-link:hover .work-overlay {
  opacity: 1;
  transform: translateY(0);
}

.work-title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.work-category {
  font-size: 0.875rem;
  color: var(--color-text-alt);
}

.work-more {
  text-align: center;
  margin-top: var(--space-xl);
}

/* Responsive Design
-------------------------------------------------- */
@media (min-width: 768px) {
  .main-nav {
    display: block;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .about-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .work-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
  
  .site-header.scrolled {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: var(--header-height-mobile);
  }
  
  /* Keep header transparent to match hero on mobile */
  .site-header {
    background-color: transparent;
    box-shadow: none;
  }
  
  /* Enhanced gradient overlay for better readability on mobile */
  .site-header::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
  }
  
  /* Move logo slightly down for better visibility */
  .logo {
    padding: 15px 0;
    position: relative;
    z-index: 2;
  }
  
  /* Make logo more prominent */
  .logo-image {
    max-width: 140px;
    filter: none;
  }
  
  /* Ensure hamburger is visible */
  .hamburger {
    background-color: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 5px;
  }
  
  /* Hero section adjustments */
  .hero-section {
    padding-top: 70px; /* Reduced from 100px */
    margin-top: 0;
  }
  
  /* Ensure hero content starts below header */
  .hero-section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    padding-top: 0; /* Removed extra padding */
    min-height: calc(100vh - var(--header-height-mobile));
  }
  
  /* Adjust hero content to prevent overlap */
  .hero-content {
    margin-top: 1rem; /* Reduced from 1.5rem */
  }
  
  /* Improve text sizing for better readability */
  .hero-title {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-top: 30px;
    margin-bottom: 20px;
    width: 100%;
  }
  
  .hero-title .line {
    display: block;
    margin-bottom: 0.2em;
    width: 100%;
  }
  
  .hero-title mark {
    background: var(--color-primary);
    color: #fff;
    padding: 0 0.2em;
  }
  
  /* Fix description spacing */
  .hero-description {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 30px;
    max-width: 100%;
  }
  
  /* Optimize button layout */
  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 14px;
  }
  
  /* Enhance particles for a more unified look */
  .hero-particles {
    opacity: 0.7;
  }
  
  /* Adjust scroll indicator */
  .hero-scroll {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Make hero full-width on mobile */
  #hero, .hero-section, .hero-bg {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Make menu toggle more visible */
  .menu-toggle {
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.4);
    border-radius: 8px;
  }
  
  /* Fix hamburger appearance */
  .hamburger {
    width: 24px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
    transition: all 0.3s ease;
  }
  
  /* Fix active menu toggle state */
  .menu-toggle.active {
    background-color: var(--color-primary);
  }
  
  /* Position mobile menu properly */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
    z-index: 1000;
  }
  
  /* Fix mobile menu active state */
  .mobile-menu.active {
    visibility: visible;
    opacity: 1;
    display: block;
  }
  
  /* Fix mobile menu content positioning */
  .mobile-menu-content {
    padding: 100px 20px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }
  
  /* Fix mobile nav list */
  .mobile-nav-list {
    margin-bottom: 40px;
  }
  
  .mobile-nav-item {
    margin-bottom: 24px;
  }
  
  .mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    transition: color 0.3s ease;
    display: inline-block;
  }
  
  .mobile-nav-link:hover {
    color: var(--color-primary);
  }
}

/* Additional Mobile Fixes
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Ensure content doesn't overlap with fixed header */
  body {
    padding-top: 70px;
  }
  
  /* Optimize hero height for better mobile view */
  .hero-section {
    min-height: calc(100vh - 70px);
    height: auto;
  }
  
  .hero-section .container {
    min-height: calc(100vh - 70px);
    height: auto;
  }
  
  /* Improve text readability */
  .hero-title .line {
    display: block;
    margin-bottom: 5px;
  }
  
  /* Fix spacing issues */
  section {
    padding: var(--space-xl) 0;
  }
  
  /* Ensure main navigation works well with fixed header */
  .mobile-menu {
    top: 70px;
    height: calc(100% - 70px);
  }
  
  /* Disable animations that might cause performance issues */
  .particle:nth-child(n+15) {
    display: none;
  }
  
  /* Reduce spacing between elements for better mobile view */
  .section-header {
    margin-bottom: var(--space-lg);
  }
  
  /* Fix header overlap with content */
  main {
    padding-top: 0;
  }
}

/* Services Section
-------------------------------------------------- */
#services, 
.services-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  margin-top: 0;
  padding-top: calc(var(--space-xl) + 20px);
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  z-index: -1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  visibility: visible;
  opacity: 1;
}

.service-item {
  padding: var(--space-xl) var(--space-lg);
  background-color: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(0, 70, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  z-index: 2;
  overflow: hidden;
  /* Optimize rendering performance */
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  visibility: visible;
  opacity: 1;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition-medium);
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(0, 70, 255, 0.3);
}

.service-item:hover::before {
  opacity: 0.05;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  transition: transform var(--transition-fast);
}

.service-item:hover .service-icon {
  transform: scale(1.1);
}

.service-title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  position: relative;
  color: var(--color-text);
}

.service-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: width 0.3s ease;
}

.service-item:hover .service-title::after {
  width: 60px;
}

.service-description {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-alt);
  margin-bottom: var(--space-md);
}

.service-link {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  position: relative;
}

.service-link::after {
  content: '→';
  margin-left: 5px;
  transition: transform var(--transition-fast);
}

.service-link:hover::after {
  transform: translateX(5px);
}

/* Contact Section
-------------------------------------------------- */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-text {
  margin-bottom: var(--space-xl);
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.contact-item h4 {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.contact-link {
  font-size: 1.125rem;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--color-primary);
}

address {
  font-style: normal;
  font-size: 1.125rem;
  color: var(--color-text-alt);
}

.contact-form-container {
  position: relative;
}

.contact-form {
  padding: var(--space-md);
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  width: 100%;
}

.form-group {
  position: relative;
  margin-bottom: var(--space-md);
}

.form-label {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-alt);
  pointer-events: none;
  transition: all var(--transition-fast);
}

.form-input {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  color: var(--color-text);
  font-size: 16px;
  transition: all var(--transition-fast);
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  transform: translateY(-20px);
  font-size: 0.75rem;
  color: var(--color-primary);
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: width var(--transition-fast);
}

.form-input:focus ~ .input-line {
  width: 100%;
}

.form-submit {
  margin-top: var(--space-lg);
  width: 100%;
}

.form-submit .btn-primary {
  width: 100%;
  display: block;
  text-align: center;
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-alt);
  transition: color var(--transition-fast);
  position: relative;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.social-link:hover {
  color: var(--color-primary);
}

.social-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Footer
-------------------------------------------------- */
.site-footer {
  background-color: var(--color-bg-alt);
  padding-top: var(--space-xxl);
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-branding {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  margin-bottom: var(--space-sm);
}

.footer-logo .logo-image {
  max-width: 120px;
  height: auto;
  filter: none;
}

.footer-tagline {
  color: var(--color-text-alt);
  font-size: 1rem;
  max-width: 300px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
}

.footer-heading {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--color-text-alt);
  font-size: 0.95rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--color-primary);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}

.copyright {
  font-size: 0.875rem;
  color: var(--color-text-alt);
}

.footer-bg {
  position: relative;
  overflow: hidden;
}

.footer-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 2fr;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Lazy Loading Images
-------------------------------------------------- */
.lazy-image {
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.lazy-image.loaded {
  opacity: 1;
}

/* Text Splitting/Reveal Animations
-------------------------------------------------- */
.split-text .word {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
}

.split-text .char {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.split-text.reveal .char {
  transform: translateY(0);
  opacity: 1;
}

/* Image & Element Revealing
-------------------------------------------------- */
.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar Styling 
-------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 5px;
}

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

/* Logo Styling */
.logo-image {
  max-width: 160px;
  height: auto;
  filter: none;
  transition: transform 0.3s ease;
}

.logo a:hover .logo-image {
  transform: scale(1.05);
}

/* Ensure logo text fallback displays properly */
.logo span, 
.footer-logo span, 
.loader-logo span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  display: none; /* Hidden by default, shown via JS if image fails */
}

/* Keyframes optimization */
@keyframes optimizedPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

/* Performance Optimizations */
/* Reduce layout thrashing */
img, video, iframe {
  will-change: transform; /* Hint for browser to optimize */
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-title, .hero-description, .hero-cta {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .hero-scroll {
    display: none !important;
  }
}

/* Additional performance improvements */
.main-content {
  contain: content; /* Improve layout performance */
}

/* Additional Performance Optimizations */
/* Reduce layout shifts */
.hero-section,
.about-section,
.work-section,
.services-section,
.contact-section {
  /* Set explicit height for sections */
  min-height: 100vh;
  contain: layout paint style;
}

/* Fix flickering on scroll */
.hero-bg,
.hero-particles,
.hero-gradient {
  /* Avoid repaints when scrolling */
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Improve image performance */
img {
  /* Prevent layout shifts */
  aspect-ratio: attr(width) / attr(height);
  transform: translateZ(0);
}

/* Simplify animations for devices that struggle */
@media (max-width: 768px) {
  /* Disable parallax on mobile */
  [data-speed] {
    transform: none !important;
  }
  
  /* Simplify hover effects */
  .service-item:hover,
  .work-item:hover {
    transform: none !important;
  }
  
  /* Reduce particles for mobile */
  .particle {
    display: none;
  }
  
  /* Only show every 4th particle */
  .particle:nth-child(4n) {
    display: block;
  }
}

/* CSS for JS feature detection */
.has-prefers-reduced-motion .hero-scroll,
.has-prefers-reduced-motion .scroll-line::after,
.has-prefers-reduced-motion .nav-link::after,
.has-prefers-reduced-motion .btn-primary::before,
.has-prefers-reduced-motion .btn-secondary::before,
.has-prefers-reduced-motion .service-item:hover {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* Section Display Fixes
-------------------------------------------------- */
section {
  padding: var(--space-xxl) 0;
  position: relative;
  display: block;
  visibility: visible;
  opacity: 1;
  z-index: 1;
}

/* Make sure sections don't overlap */
#hero, #about, #work, #services, #contact {
  position: relative;
  z-index: 1;
}

/* Fix z-index layering */
.main-content {
  position: relative;
  z-index: 1;
}

/* Service Item Visibility Fix */
.service-item {
  visibility: visible;
  opacity: 1;
  z-index: 2;
}

/* Reset the emergency performance fixes while keeping optimizations */
.EMERGENCY_PERFORMANCE_FIXES_TO_REMOVE,
.hero-gradient, .cursor-container, .hero-particles, .noise {
  display: initial !important;
}

/* Fix animation resets */
* {
  animation: initial;
  transition: initial;
  transform: initial;
}

/* Re-enable appropriate animations */
.split-text .char {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.split-text.reveal .char {
  transform: translateY(0);
  opacity: 1;
}

.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Restore hover animations */
.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: width 0.3s ease;
}

.service-item:hover .service-title::after {
  width: 60px;
}

/* Fix logo styling */
.logo-image {
  max-width: 160px;
  height: auto;
  filter: none;
  transition: transform 0.3s ease;
}

.logo a:hover .logo-image {
  transform: scale(1.05);
}

/* Ensure logo text fallback displays properly */
.logo span, 
.footer-logo span, 
.loader-logo span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  display: none; /* Hidden by default, shown via JS if image fails */
}

/* Fix animation overrides */
.split-text .char {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.split-text.reveal .char {
  transform: translateY(0);
  opacity: 1;
}

/* Force reveal for hero section */
.hero-title.reveal .char,
.hero-description.reveal .char {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* Make sure hero elements are visible */
.hero-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

/* Restore particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(0, 70, 255, 0.7); /* Brighter blue particles */
  box-shadow: 0 0 15px rgba(0, 70, 255, 0.9);
  animation: floatParticle 15s infinite alternate ease-in-out;
  will-change: transform;
  z-index: 1;
}

.particle:nth-child(2n) {
  background-color: rgba(255, 255, 255, 0.7); /* Brighter white particles */
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  animation-name: floatParticle2;
  animation-duration: 20s;
}

.particle:nth-child(3n) {
  background-color: rgba(0, 194, 255, 0.7); /* Brighter light blue particles */
  box-shadow: 0 0 15px rgba(0, 194, 255, 0.9);
  animation-name: floatParticle3;
  animation-duration: 25s;
}

/* Make particle animations more dynamic */
@keyframes floatParticle {
  0% {
    transform: translateY(0) translateX(0) scale(1);
  }
  50% {
    transform: translateY(30px) translateX(20px) scale(1.2);
  }
  100% {
    transform: translateY(50px) translateX(10px) scale(1);
  }
}

@keyframes floatParticle2 {
  0% {
    transform: translateY(0) translateX(0) scale(1);
  }
  33% {
    transform: translateY(-30px) translateX(20px) scale(1.1);
  }
  66% {
    transform: translateY(20px) translateX(-30px) scale(0.9);
  }
  100% {
    transform: translateY(0) translateX(0) scale(1);
  }
}

@keyframes floatParticle3 {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  50% {
    transform: translateY(-40px) translateX(-40px) rotate(180deg);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(360deg);
  }
}

/* Override service section visibility issues */
#services, 
.services-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  margin-top: 0;
  padding-top: calc(var(--space-xl) + 20px);
}

/* Fix touch responsiveness
-------------------------------------------------- */
.menu-toggle,
.mobile-nav-link,
.btn-primary,
.btn-secondary,
.nav-link,
.logo a,
.filter-button,
.work-link,
.service-link,
.social-link {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

/* Improve mobile navigation performance */
.site-header,
.mobile-menu,
.menu-toggle {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (max-width: 767px) {
  /* Ensure header is always accessible */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: none;
    height: var(--header-height-mobile);
  }
  
  .site-header.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  /* Ensure proper spacing below header for content */
  .hero-section {
    padding-top: var(--header-height-mobile);
  }
  
  /* Make menu toggle larger for easier tapping */
  .menu-toggle {
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.4);
    border-radius: 8px;
  }
  
  /* Fix hamburger appearance */
  .hamburger {
    width: 24px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
    transition: all 0.3s ease;
  }
  
  /* Fix active menu toggle state */
  .menu-toggle.active {
    background-color: var(--color-primary);
  }
  
  /* Position mobile menu properly */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
    z-index: 1000;
  }
  
  /* Fix mobile menu active state */
  .mobile-menu.active {
    visibility: visible;
    opacity: 1;
    display: block;
  }
  
  /* Fix mobile menu content positioning */
  .mobile-menu-content {
    padding: 100px 20px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }
  
  /* Fix mobile nav list */
  .mobile-nav-list {
    margin-bottom: 40px;
  }
  
  .mobile-nav-item {
    margin-bottom: 24px;
  }
  
  .mobile-nav-link {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    transition: color 0.3s ease;
    display: inline-block;
  }
  
  .mobile-nav-link:hover {
    color: var(--color-primary);
  }
}

/* Additional fixes for mobile layout
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Ensure content doesn't overlap with fixed header */
  body {
    padding-top: 70px;
  }
  
  /* Optimize hero height for better mobile view */
  .hero-section {
    min-height: calc(100vh - 70px);
    height: auto;
  }
  
  .hero-section .container {
    min-height: calc(100vh - 70px);
    height: auto;
  }
  
  /* Improve text readability */
  .hero-title .line {
    display: block;
    margin-bottom: 5px;
  }
  
  /* Fix spacing issues */
  section {
    padding: var(--space-xl) 0;
  }
  
  /* Ensure main navigation works well with fixed header */
  .mobile-menu {
    top: 70px;
    height: calc(100% - 70px);
  }
  
  /* Disable animations that might cause performance issues */
  .particle:nth-child(n+15) {
    display: none;
  }
  
  /* Reduce spacing between elements for better mobile view */
  .section-header {
    margin-bottom: var(--space-lg);
  }
  
  /* Fix header overlap with content */
  main {
    padding-top: 0;
  }
}

/* Hero content mobile responsiveness
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix hero container layout */
  .hero-section .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    padding-top: 150px; /* Increase padding on mobile for better spacing */
    padding-bottom: 80px;
    min-height: 100vh;
    height: auto;
    width: 100%;
    max-width: 100%;
  }
  
  /* Improve hero content sizing */
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }
  
  /* Make hero text more readable */
  .hero-title {
    font-size: clamp(2rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    width: 100%;
  }
  
  .hero-title .line {
    display: block;
    width: 100%;
  }
  
  .hero-title mark {
    background: var(--color-primary);
    color: #fff;
    padding: 0 0.2em;
  }
  
  /* Fix hero description */
  .hero-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    max-width: 100%;
  }
  
  /* Fix hero CTA */
  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
  }
  
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 16px var(--space-md);
  }
  
  /* Fix hero scroll indicator */
  .hero-scroll {
    bottom: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Header scrolled state
-------------------------------------------------- */
.header-scrolled {
  background-color: transparent !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-scrolled::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
}

/* Additional contact form improvements for mobile
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Contact section mobile fixes */
  .contact-section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
  
  .contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .contact-form-container {
    width: 100%;
  }
  
  /* Make inputs mobile-friendly */
  .form-input {
    -webkit-appearance: none;
    border-radius: 0;
    background-color: transparent;
    width: 100%;
    padding: 12px 0;
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.5;
  }
  
  /* Fix textarea on mobile */
  textarea.form-input {
    min-height: 100px;
    resize: vertical;
  }
  
  /* Focus state for labels */
  .form-input:focus + .form-label, 
  .form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-20px);
    font-size: 0.75rem;
    color: var(--color-primary);
  }
  
  /* Fix large text in contact section */
  .contact-text .large-text {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: var(--space-md);
  }
  
  /* Improve social links spacing */
  .social-links {
    flex-wrap: wrap;
    margin-top: var(--space-lg);
  }
}

/* Contact details mobile improvements
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix contact details layout */
  .contact-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
  }
  
  .contact-item {
    margin-bottom: var(--space-sm);
  }
  
  .contact-item h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }
  
  .contact-link, 
  address {
    font-size: 1rem;
  }
  
  /* Fix form submission button */
  .form-submit .btn-primary {
    padding: 12px;
    font-size: 0.9rem;
  }
  
  /* Better spacing in contact section */
  .section-header {
    margin-bottom: var(--space-lg);
  }
  
  /* Fix input label position on mobile */
  .form-label {
    top: 12px;
  }
}

/* Hero spacing fixes for mobile phones
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix hero container height and padding */
  .hero-section .container {
    min-height: calc(100vh - 80px);
    padding-top: 0;
    padding-bottom: 50px;
    justify-content: flex-start;
  }
  
  /* Add spacing between header and content instead of container padding */
  .hero-content {
    margin-top: 40px; /* Specific spacing from top */
    width: 100%;
  }
  
  /* Make hero items fill available space */
  .hero-title, .hero-description, .hero-cta {
    width: 100%;
  }
  
  /* Restore hero height */
  .hero-section {
    min-height: 100vh;
    height: auto;
    padding-top: 60px; /* Reduced from previous */
  }
}

/* Mobile enhancements for brand consistency
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Improve hero title styling on mobile */
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
  }
  
  .hero-title .line {
    margin-bottom: 0.2em;
  }
  
  .hero-title mark {
    background: linear-gradient(90deg, #0046FF, #6236FF);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    padding: 0;
  }
  
  /* Enhance mobile menu styling */
  .mobile-menu {
    background-color: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .mobile-nav-link {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--color-text);
  }
  
  .mobile-nav-link:hover {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  /* Update menu toggle button */
  .menu-toggle {
    background-color: rgba(0, 70, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(0, 70, 255, 0.2);
  }
  
  .menu-toggle.active {
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  }
  
  /* Improve button appearance */
  .btn-primary, 
  .btn-secondary {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
  }
  
  /* Services section improvements */
  .service-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
  }
  
  .service-title {
    font-size: 1.25rem;
  }
  
  /* Contact form enhancements */
  .form-input:focus + .form-label, 
  .form-input:not(:placeholder-shown) + .form-label {
    color: var(--color-primary);
  }
  
  .contact-item h4 {
    color: var(--color-primary);
  }
  
  /* Update footer styles */
  .footer-links a:hover {
    color: var(--color-primary);
  }
  
  /* Header transparency handling */
  .site-header::before {
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.5) 70%, rgba(10, 10, 10, 0) 100%);
  }
}

/* Mobile styles for hero title mark
-------------------------------------------------- */
@media (max-width: 767px) {
  .hero-title mark {
    color: #0046FF; /* Ensure blue color on mobile */
    text-shadow: 0 0 8px rgba(0, 70, 255, 0.2); /* Lighter glow for mobile */
    font-weight: 700;
    background: none;
    display: inline;
  }
  
  /* Keep underline visible on mobile */
  .hero-title mark::after {
    height: 2px;
    bottom: -1px;
  }
}

/* Mobile Spacing and Menu Fixes
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix spacing between logo and hero content */
  .hero-section {
    padding-top: 0; /* Remove top padding */
  }
  
  /* Adjust container to reduce space between header and content */
  .hero-section .container {
    padding-top: 0px; /* Much smaller padding */
  }
  
  /* Remove extra margin from hero content */
  .hero-content {
    margin-top: 0;
  }
  
  /* Ensure mobile menu is visible and functions correctly */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Use viewport height */
    background-color: var(--color-bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
  }
  
  /* Active state for mobile menu */
  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Fix mobile menu content positioning */
  .mobile-menu-content {
    padding-top: 100px; /* Fixed padding from top */
  }
  
  /* Fix menu toggle button */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    z-index: 1001;
    cursor: pointer;
  }
  
  /* Ensure hamburger spans are visible */
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  /* Active state animation for hamburger */
  .menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Adjust body when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}

/* Additional spacing fixes
-------------------------------------------------- */
@media (max-width: 767px) {
  body {
    padding-top: 0; /* Remove any top padding */
  }
  
  /* Ensure header doesn't add extra space */
  .site-header {
    position: absolute;
    background: transparent;
  }
  
  /* Further reduce container padding */
  .hero-section .container {
    padding-top: 0;
    margin-top: var(--header-height-mobile);
  }
  
  /* Make hero content start immediately after header */
  .hero-content {
    padding-top: 10px;
  }
}

/* Fix hamburger menu and scroll indicator issues
-------------------------------------------------- */
/* Hide hamburger in desktop view */
@media (min-width: 768px) {
  .menu-toggle {
    display: none !important;
  }
}

/* Ensure hamburger is visible only in mobile */
@media (max-width: 767px) {
  /* Fix hamburger menu toggle */
  .menu-toggle {
    display: flex !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    position: relative;
    z-index: 1001;
  }
  
  /* Make hamburger more visible */
  .hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  /* Fix hamburger lines */
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
  }
  
  /* Fix scroll indicator in mobile view */
  @media (max-width: 767px) {
    .hero-scroll {
      position: absolute;
      bottom: 20px;
      left: 0;
      right: 0;
      margin-top: 0;
    }
    
    .hero-cta {
      margin-bottom: 60px;
    }
  }
}

/* Final fixes for mobile menu and scroll overlap
-------------------------------------------------- */
@media (min-width: 768px) {
  /* Always hide hamburger on desktop */
  .menu-toggle {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* Ensure menu is visible and works */
  .menu-toggle {
    display: flex !important;
    z-index: 1001;
  }
  
  /* Ensure mobile menu actually displays when active */
  .mobile-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
  }
  
  /* Fix scroll indicator position to prevent button overlap */
  .hero-scroll {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: 5;
  }
  
  /* Add spacing to hero CTA to avoid overlap */
  .hero-cta {
    margin-bottom: 80px;
  }
  
  /* Lock scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}

/* Enhanced mobile menu styles
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Ensure mobile menu is visible and works properly when active */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.98);
    z-index: 1000;
    transform: translateY(0);
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-y: auto;
  }
  
  /* Important: force display when active */
  .mobile-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    pointer-events: auto !important;
  }
  
  /* Ensure mobile menu content is visible */
  .mobile-menu-content {
    opacity: 1;
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  /* Toggle button appearance */
  .menu-toggle {
    display: flex !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    z-index: 1002;
    cursor: pointer;
    position: relative;
  }
  
  /* Fix hamburger appearance and animation */
  .hamburger span:nth-child(1) {
    top: 0;
  }
  
  .hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .hamburger span:nth-child(3) {
    bottom: 0;
  }
  
  /* Better active state for hamburger */
  .menu-toggle.active .hamburger span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  
  .menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active .hamburger span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
  }
  
  /* Body freeze when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }
}

/* Emergency fixes for mobile menu icon and scroll line
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Make hamburger menu icon always visible */
  .hamburger {
    width: 24px !important;
    height: 18px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
  
  .hamburger span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background-color: #fff !important;
    position: relative !important;
  }
  
  /* Fix the menu toggle button */
  .menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    border-radius: 6px !important;
    z-index: 9999 !important;
    position: relative !important;
  }
  
  /* Center scroll line in mobile view */
  .hero-scroll {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  .scroll-indicator {
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .scroll-line {
    margin: 0 auto !important;
  }
}

/* Final scroll alignment fix
-------------------------------------------------- */
.scroll-indicator {
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-line {
  margin: 0 auto;
  display: block;
}

@media (max-width: 767px) {
  .hero-scroll {
    position: absolute !important;
    bottom: 20px !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* Fix for hero buttons clickability
-------------------------------------------------- */
.hero-cta {
  position: relative;
  z-index: 50;
}

.hero-cta a {
  position: relative;
  z-index: 50;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.btn-primary, 
.btn-secondary {
  display: inline-block;
  position: relative;
  z-index: 50;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Override button hover and active states
-------------------------------------------------- */
.hero-cta a,
.btn-primary,
.btn-secondary {
  cursor: pointer !important;
  z-index: 100 !important;
  position: relative !important;
  pointer-events: auto !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.hero-cta a:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

.hero-cta a:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Final Hero Button Fixes
-------------------------------------------------- */
.hero-cta a.btn-primary,
.hero-cta a.btn-secondary {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 999 !important;
  position: relative !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  transform: translateZ(0); /* Force hardware acceleration */
  display: inline-block !important;
}

.hero-cta a.btn-primary:hover,
.hero-cta a.btn-secondary:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.hero-cta a.btn-primary:active,
.hero-cta a.btn-secondary:active {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Fix button colors and backgrounds */
.hero-cta a.btn-primary {
  background-color: var(--color-primary) !important;
  color: white !important;
}

.hero-cta a.btn-secondary {
  border: 1px solid white !important;
  color: white !important;
}

/* CRITICAL FIX: Make hero buttons absolutely clickable 
-------------------------------------------------- */
#workBtn,
#contactBtn {
  z-index: 9999 !important;
  position: relative !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  background-color: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
  display: inline-block !important;
  padding: 1rem 2rem !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  transform: translateZ(0) !important;
}

#workBtn {
  background-color: var(--color-primary) !important;
  color: white !important;
}

#contactBtn {
  background-color: transparent !important;
  border: 1px solid white !important;
  color: white !important;
}

#workBtn:hover,
#contactBtn:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
}

.hero-cta {
  position: relative !important;
  z-index: 9999 !important;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Restore mobile styles and maintain transparency
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix font sizes for better mobile reading */
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
  }
  
  .hero-title .line {
    margin-bottom: 0.2em;
  }
  
  .hero-title mark {
    color: #0046FF;
    text-shadow: 0 0 8px rgba(0, 70, 255, 0.2);
  }
  
  /* Fix hero content layout */
  .hero-section .container {
    padding-top: 90px;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* Optimize button layout */
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, 
  .btn-secondary {
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
    padding: 12px 20px;
    font-size: 0.9rem;
    display: inline-block;
  }
  
  /* Handle menu open state */
  body.menu-open {
    overflow: hidden;
  }
  
  /* Fix contact section layout */
  .contact-form-container {
    width: 100%;
  }
  
  .contact-form {
    padding: var(--space-md);
    background-color: rgba(17, 17, 17, 0.6);
    border-radius: var(--radius-sm);
  }
  
  .form-group {
    margin-bottom: var(--space-md);
  }
  
  .form-input {
    font-size: 16px; /* Prevent mobile zoom on focus */
  }
  
  .form-submit {
    margin-top: var(--space-lg);
  }
}

/* Fix mobile spacing and scroll line alignment
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Fix space between logo and hero content */
  .hero-section .container {
    padding-top: 30px !important; /* Significantly reduce the top padding */
    margin-top: 30px !important;  /* Smaller margin from the top */
  }
  
  /* Reduce the hero content top margin */
  .hero-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Make the hero title start higher */
  .hero-title {
    margin-top: 0 !important;
  }
  
  /* Fix scroll line alignment - ensure it's centered */
  .hero-scroll {
    position: absolute !important;
    bottom: 20px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
  
  .scroll-indicator {
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  
  .scroll-line {
    margin: 0 auto !important;
  }
}

/* Mobile logo and scroll line fixes
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Reduce logo size and align to left */
  .logo {
    margin-right: auto;
    padding-left: 15px;
  }
  
  .logo-image {
    max-width: 100px !important;
    max-height: 30px !important;
  }
  
  /* Header inner container with proper spacing */
  .header-inner {
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Center align scroll line and indicator */
  .hero-scroll {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    position: absolute !important;
    bottom: 20px !important;
  }
  
  .scroll-indicator {
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .scroll-line {
    margin: 0 auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* Final fixes for logo size and scroll line alignment
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Adjust logo size to be a bit bigger */
  .logo-image {
    max-width: 120px !important;
    max-height: 35px !important;
    display: block !important;
  }
  
  /* Ultimate scroll line fix - multiple approaches combined */
  .hero-scroll {
    position: absolute !important;
    bottom: 20px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
  
  .scroll-indicator {
    position: relative !important;
    margin: 0 auto !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: auto !important;
  }
  
  .scroll-line {
    position: relative !important;
    left: 0 !important;
    transform: none !important;
    margin: 0 auto !important;
    display: inline-block !important;
    width: 1px !important;
    height: 60px !important;
  }
  
  .scroll-text {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
  }
}

/* FINAL FIX for mobile logo size and scroll line alignment
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Make logo significantly larger */
  .logo-image {
    max-width: 150px !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Force center alignment for the scroll line with !important */
  .scroll-line {
    position: relative !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    display: block !important;
  }
  
  /* Force container centering */
  .hero-scroll {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }
  
  /* Force explicit center alignment */
  .scroll-indicator {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    width: 40px !important;
  }
}

/* Direct style overrides for the scroll line
   These will take precedence over all other rules
-------------------------------------------------- */
.scroll-line {
  width: 1px !important;
  height: 60px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
  position: relative !important;
  display: block !important;
  left: 0 !important;
}

/* MASSIVE LOGO FIX - SUBSTANTIALLY LARGER LOGO FOR MOBILE 
-------------------------------------------------- */
@media (max-width: 767px) {
  /* MUCH larger logo for mobile */
  .logo-image {
    min-width: 180px !important;
    min-height: 45px !important;
    width: 180px !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
  }
  
  /* Ensure logo container is big enough */
  .logo {
    min-width: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }
  
  /* Reset any logo size restrictions */
  .logo a {
    display: block !important;
    width: auto !important;
  }
}

/* SCROLL LINE FIXED ONCE AND FOR ALL
-------------------------------------------------- */
.scroll-line {
  position: static !important;
  display: block !important;
  width: 1px !important;
  height: 60px !important;
  background-color: rgba(255, 255, 255, 0.5) !important;
  margin: 0 auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

.scroll-indicator {
  text-align: center !important;
  width: auto !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.hero-scroll {
  position: absolute !important;
  bottom: 20px !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* FINAL FIXES: Remove blue strip, hide scroll line, make logo bigger
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Remove any blue strips that might be on the left side */
  body:before,
  body:after,
  .hero-section:before,
  .hero-section:after,
  .container:before,
  .container:after,
  .mobile-menu:before,
  .mobile-menu:after,
  section:before,
  section:after {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
  }
  
  /* Hide the scroll line entirely */
  .hero-scroll,
  .scroll-indicator,
  .scroll-line,
  .scroll-text {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  /* Make the logo MUCH bigger */
  .logo-image {
    width: 220px !important;
    min-width: 220px !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
  }
  
  /* Ensure logo container has proper size */
  .logo {
    width: 220px !important;
    min-width: 220px !important;
    display: flex !important;
    align-items: center !important;
  }
  
  /* Ensure logo link doesn't restrict size */
  .logo a {
    width: 100% !important;
    display: block !important;
  }
}

/* Extra fixes for the blue strip on mobile
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Target any elements that could be creating blue strips */
  *[class*="line"],
  *[class*="border"],
  *[class*="bar"],
  *[class*="strip"],
  *[class*="divider"],
  *::before,
  *::after {
    border-left: none !important;
    border-right: none !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    background-image: none !important;
  }
  
  /* Remove all borders on the left side for all elements */
  body * {
    border-left: none !important;
    border-left-color: transparent !important;
  }
  
  /* Remove any background-image gradients that might have blue */
  body, html, .container, .hero-section, .hero-bg, .hero-content {
    background-image: none !important;
  }
}

/* Ultimate logo size fix - much larger logo
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Extra large logo */
  .logo-image {
    width: 24px !important;
    height: auto !important;
    transform: scale(1.1) !important; /* Make it even larger */
  }
  
  /* Ensure the header has enough height for the large logo */
  .site-header {
    height: auto !important;
    min-height: 70px !important;
    padding: 10px 0 !important;
  }
  
  /* Ensure the header inner container can fit the large logo */
  .header-inner {
    height: auto !important;
    min-height: 70px !important;
  }
}

/* Mobile logo adjustment - better size and left alignment
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Moderately sized logo for mobile header */
  .site-header .logo-image {
    max-width: 160px !important; /* Smaller than before but still visible */
    height: auto !important;
    transform: none !important; /* Remove scaling */
    display: block !important;
  }
  
  /* Align logo to the left */
  .site-header .logo {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding-left: 10px !important;
    margin-right: auto !important;
  }
  
  /* Make header container properly aligned */
  .header-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 15px !important;
  }
  
  /* Preserve preloader logo size (don't change it) */
  .preloader .logo-image,
  .loader-logo img.logo-image {
    max-width: initial !important; /* Reset any size restrictions */
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }
}

/* CONSOLIDATED MOBILE STYLES
   This section overrides all other mobile styles
   to fix conflicts and ensure consistent behavior
-------------------------------------------------- */
@media (max-width: 767px) {
  /* ---- Site Header and Logo ---- */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: transparent;
    backdrop-filter: blur(0);
    z-index: 1000;
  }
  
  .site-header.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
  }
  
  /* Remove any box shadows or borders */
  .site-header::before,
  .site-header::after {
    display: none;
  }
  
  /* Header container */
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 70px;
  }
  
  /* Logo container */
  .logo {
    display: flex;
    align-items: center;
    margin-right: auto;
    padding-left: 0;
    max-width: 140px;
  }
  
  /* Logo image - moderate size */
  .logo-image {
    max-width: 140px !important;
    width: 140px !important;
    height: auto !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: block !important;
    transform: none !important;
  }
  
  /* Preserve preloader logo size */
  .preloader .logo-image,
  .loader-logo .logo-image {
    max-width: initial !important;
    width: auto !important;
  }
  
  /* ---- Hero Section ---- */
  .hero-section {
    padding-top: 70px;
    margin-top: 0;
  }
  
  .hero-section .container {
    padding-top: 20px;
    margin-top: 0;
  }
  
  /* Remove hero scroll line */
  .hero-scroll,
  .scroll-indicator,
  .scroll-line,
  .scroll-text {
    display: none !important;
  }
  
  /* ---- Menu Toggle ---- */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    z-index: 2000;
  }
  
  .hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
  }
  
  /* ---- Mobile Menu ---- */
  .mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  
  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* ---- Remove any blue strips ---- */
  body:before,
  body:after,
  .hero-section:before,
  .hero-section:after,
  *[class*="line"],
  *[class*="border"],
  *[class*="bar"],
  *[class*="strip"],
  *[class*="divider"] {
    border-left: none !important;
    border-left-color: transparent !important;
    background-image: none !important;
  }
}

/* 
 * FINAL CSS OVERRIDES
 * This section has the highest specificity and will override all previous styles
 * It appears at the end of the file to ensure it takes precedence
 */
@media (max-width: 767px) {
  /* Reset any size restrictions on logo */
  .logo-image,
  .site-header .logo-image,
  header .logo-image {
    width: 140px !important;
    max-width: 140px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
  }
  
  /* Exception for preloader logo */
  .preloader .logo-image,
  .loader-logo .logo-image,
  .preloader img.logo-image,
  .loader-logo img.logo-image {
    width: auto !important;
    max-width: 200px !important;
  }
  
  /* Force scroll indicators to be hidden */
  .hero-scroll,
  #hero .hero-scroll,
  .scroll-indicator,
  .scroll-line,
  .scroll-text,
  .hero-section .scroll-indicator,
  .hero-section .scroll-line,
  .hero-section .scroll-text {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
  }
  
  /* Reset background styles to remove any strips */
  body:before, body:after,
  .container:before, .container:after,
  .hero-section:before, .hero-section:after,
  .mobile-menu:before, .mobile-menu:after,
  section:before, section:after,
  .header-inner:before, .header-inner:after,
  .logo:before, .logo:after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: transparent !important;
    background-image: none !important;
  }
}

/* 
 * ABSOLUTE FINAL OVERRIDES
 * These will take precedence over everything else
 */
@media (max-width: 767px) {
  /* Set exact dimensions for logo and ensure left alignment */
  .logo-image {
    width: 135px !important;
    height: auto !important;
  }
  
  .logo {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 10px !important;
    margin-right: auto !important;
  }
  
  /* Fix header height and spacing */
  .site-header {
    height: 70px !important;
  }
  
  .header-inner {
    height: 70px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  /* Ensure space below header */
  .hero-section {
    padding-top: 70px !important;
  }
  
  .hero-section .container {
    padding-top: 20px !important;
  }
}

/* Fix hamburger menu icon display
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Make hamburger icon visible */
  .menu-toggle {
    background-color: transparent !important;
    box-shadow: none !important;
  }
  
  /* Fix hamburger lines visibility */
  .hamburger {
    width: 24px !important;
    height: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
  }
  
  /* Ensure the spans are visible as lines */
  .hamburger span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background-color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    transform: none !important;
    margin: 2px 0 !important;
  }
  
  /* Make sure all three spans are visible */
  .hamburger span:nth-child(1),
  .hamburger span:nth-child(2),
  .hamburger span:nth-child(3) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  /* Animation for active state */
  .menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
  }
  
  .menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
  }
}

/* ABSOLUTE FINAL HAMBURGER MENU FIX
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Reset menu toggle button */
  .menu-toggle {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 9999 !important;
  }
  
  /* Reset hamburger container */
  .hamburger {
    width: 24px !important;
    height: 18px !important;
    position: relative !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
  }
  
  /* Create the three lines */
  .hamburger span:nth-child(1),
  .hamburger span:nth-child(2),
  .hamburger span:nth-child(3) {
    position: absolute !important;
    left: 0 !important;
    width: 100% !important;
    height: 2px !important;
    background-color: #ffffff !important;
    display: block !important;
    border-radius: 2px !important;
    transform: rotate(0deg) !important;
    transition: transform 0.25s ease !important;
  }
  
  /* Position each line */
  .hamburger span:nth-child(1) { top: 0 !important; }
  .hamburger span:nth-child(2) { top: 8px !important; }
  .hamburger span:nth-child(3) { top: 16px !important; }
  
  /* Animation for active state */
  .menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
  }
  
  .menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px) !important;
  }
}

/* ABSOLUTE FINAL FIX - Remove blue animated strip in scroll indicator
-------------------------------------------------- */
.scroll-line::after,
.hero-section .scroll-line::after,
.scroll-indicator .scroll-line::after,
#hero .scroll-line::after,
section .scroll-line::after,
*[class*="scroll"] .scroll-line::after {
  background-color: transparent !important;
  animation: none !important;
  display: none !important; /* Hide completely as a fallback */
}

/* About section margin adjustments */
.about-section {
  margin-bottom: 0;
  padding-bottom: calc(var(--space-xl) + 20px);
}

/* Work section margin adjustment */
.work-section {
  margin-top: 0;
  padding-top: calc(var(--space-xl) + 20px);
  padding-bottom: calc(var(--space-xl) + 20px);
  margin-bottom: 0;
}

/* Adjust work section spacing */
.work-section {
  margin-top: 0;
  padding-top: calc(var(--space-xl) + 20px);
  padding-bottom: calc(var(--space-xl) + 20px);
  margin-bottom: 0;
}

/* Fix services section spacing */
#services, 
.services-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 5 !important;
  margin-top: 0;
  padding-top: calc(var(--space-xl) + 20px);
}

/* Ensure no space between sections on mobile */
@media (max-width: 767px) {
  section {
    padding: var(--space-lg) 0;
    margin: 0;
  }
  
  .work-section {
    padding-bottom: var(--space-lg);
    padding-top: var(--space-lg); /* Ensure consistent padding */
    margin-top: 0; /* Explicitly remove any margin */
  }
  
  .about-section {
    padding-bottom: var(--space-lg);
    margin-bottom: 0; /* Ensure no margin after about section */
  }
  
  #services,
  .services-section {
    padding-top: var(--space-lg);
  }
}

/* Remove particle limitation on mobile */
@media (max-width: 767px) {
  /* Allow all particles to display on mobile */
  .particle {
    /* Default smaller on mobile for better performance */
    animation-duration: 20s;
  }
  
  /* Remove the rule that was hiding particles after the 15th one */
  /* .particle:nth-child(n+15) {
    display: none;
  } */
  
  /* Fix mobile particle visibility */
  .particle:nth-child(n+15) {
    display: block !important; /* Force display all particles */
  }
  
  /* Section spacing fixes */
  section {
    padding: var(--space-lg) 0;
    margin: 0;
  }
}

/* ENSURE PARTICLES ALWAYS DISPLAY ON MOBILE
-------------------------------------------------- */
@media (max-width: 767px) {
  /* Force all particles to display */
  .particle {
    display: block !important;
    opacity: 0.75 !important;
    visibility: visible !important;
    z-index: 5 !important;
  }
  
  /* Remove any limit on particles */
  .particle:nth-child(n) {
    display: block !important;
    opacity: 0.75 !important;
  }
  
  /* Make particles faster on mobile */
  .hero-particles {
    z-index: 2 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    height: 100% !important;
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  /* Remove any animation limitations */
  .hero-particles .particle {
    animation-duration: 15s !important;
  }
}

/* Fix mobile-specific work section spacing */
@media (max-width: 767px) {
  /* Remove any possible extra space between about and work sections */
  #about + #work,
  .about-section + .work-section {
    margin-top: 0 !important;
    padding-top: var(--space-lg) !important;
  }
  
  /* Ensure section headers are properly spaced */
  .work-section .section-header {
    margin-top: 0;
    padding-top: 0;
  }
}

/* Add as a new rule at the end of the file */

/* FINAL FIX FOR WORK SECTION SPACING ON MOBILE */
@media (max-width: 767px) {
  /* Fix spacing above work section */
  #work {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }
  
  /* Remove any bottom padding from about that may create space */
  #about {
    padding-bottom: 20px !important;
    margin-bottom: 0 !important;
  }
  
  /* Reset any previous section padding to ensure consistency */
  section + section {
    margin-top: 0 !important;
  }
  
  /* Ensure section headers don't add extra space */
  .section-header {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
  }
  
  /* Fix for any margin collapse issues */
  .main-content {
    overflow-x: hidden;
    overflow-y: visible;
  }
}

/* Add at the end of the file */

/* ABSOLUTE FINAL FIX FOR WORK SECTION SPACING */
@media (max-width: 767px) {
  /* Force consistent section heights */
  #about, #work, #services, #contact,
  .about-section, .work-section, .services-section, .contact-section {
    padding: 30px 0 !important;
    margin: 0 !important;
  }
  
  /* Specifically remove space between about and work */
  #about, .about-section {
    padding-bottom: 0 !important;
  }
  
  #work, .work-section {
    padding-top: 30px !important;
  }
  
  /* Remove any browser padding/margin reset */
  .about-section::after,
  .work-section::before {
    display: none !important;
    content: none !important;
  }
  
  /* Reset flex item spacing */
  .main-content > section {
    flex: 0 0 auto;
  }
  
  /* Fix container paddings */
  section .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  /* Fix section headers */
  .section-header {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding-top: 0 !important;
  }
  
  /* Remove the rule that creates additional padding */
  #about, #work, #services, #contact,
  section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* Add at the end of the file */

/* VIDEO SUPPORT FOR WORK SECTION
-------------------------------------------------- */
.work-image video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to prevent cutoff */
  position: absolute;
  top: 0;
  left: 0;
  transition: transform var(--transition-medium);
  background-color: #000; /* Add background color for video letterboxing */
}

.work-link:hover .work-image video {
  transform: scale(1.05); /* Reduced from 1.1 to prevent cutoff during hover */
}

/* Video poster (thumbnail) styling */
.work-image video[poster] {
  object-position: center;
  background-size: contain;
}

/* Enhanced mobile video styles */
@media (max-width: 767px) {
  .work-image video {
    object-fit: contain;
    height: 100%;
    width: 100%;
  }
  
  /* Make work items taller on mobile for videos */
  .work-item {
    padding-bottom: 80%; /* Taller aspect ratio for mobile */
  }
  
  /* Fix for playing state */
  .work-item.playing {
    z-index: 10; /* Bring playing video forward */
  }
  
  .work-item.playing video {
    width: 100%;
    height: 100%;
  }
  
  /* Add play button indicator on mobile */
  .work-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 70, 255, 0.7);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px;
    pointer-events: none;
    opacity: 0.9;
    z-index: 5;
    transition: opacity 0.3s ease;
  }
  
  /* Hide play button when video is playing */
  .work-item.playing .work-image::after {
    opacity: 0;
  }
}

/* Add at the end of the file */

/* TEXT-ONLY WORK ITEMS
-------------------------------------------------- */
.work-item.text-only {
  background: none;
  box-shadow: none;
  border: none;
  height: auto;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  grid-column: 1 / -1; /* Span all columns */
}

.progress-message {
  text-align: center;
  padding: 60px 20px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.progress-message h3 {
  font-family: var(--font-primary);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
}

.progress-message p {
  font-size: 1.8rem;
  color: var(--color-text-alt);
  text-align: center;
  width: 100%;
}

@media (max-width: 767px) {
  .work-item.text-only {
    margin: 20px auto;
  }
  
  .progress-message {
    padding: 40px 15px;
  }
  
  .progress-message h3 {
    font-size: 2.2rem;
  }
  
  .progress-message p {
    font-size: 1.4rem;
  }
}

/* Add at the end of the file */

/* Preloader scroll prevention
-------------------------------------------------- */
body.loading {
  overflow: hidden !important;
  height: 100% !important;
  position: fixed !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

/* Add at the end of the file */

/* Fix space above hero text on mobile
-------------------------------------------------- */
@media (max-width: 767px) {
  .hero-section .container {
    padding-top: 80px !important; /* Reduced from ~120px */
  }
  
  .hero-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  .site-header {
    height: 70px;
  }
}

/* Update the existing fix at the end of the file */

@media (max-width: 767px) {
  .hero-section .container {
    padding-top: 60px !important; /* Further reduced from 80px */
  }
  
  .hero-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  .site-header {
    height: 60px; /* Reduced from 70px */
  }

  .logo {
    margin-top: 8px; /* Adjust logo position */
  }
}