/* ============================================
   Matthew Megavel — Creative Tech & Innovation
   Premium Personal Brand Website Stylesheet
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --color-bg-primary: #f8f9fc;
  --color-bg-secondary: #ffffff;
  --color-bg-dark: #0a0e1a;
  --color-bg-card: rgba(255, 255, 255, 0.7);
  --color-bg-card-hover: rgba(255, 255, 255, 0.9);
  --color-bg-glass: rgba(255, 255, 255, 0.15);
  
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #4a4a6a;
  --color-text-muted: #7a7a9a;
  --color-text-light: #ffffff;
  
  --color-accent-blue: #0066FF;
  --color-accent-blue-light: #4D9FFF;
  --color-accent-purple: #7B2FBE;
  --color-accent-purple-light: #A855F7;
  --color-accent-cyan: #00D4FF;
  --color-accent-neon: #00eaff;
  
  --gradient-hero: linear-gradient(135deg in oklch, #0a0e1a 0%, #0d1b3e 30%, #1a0a3e 60%, #0a0e1a 100%);
  --gradient-accent: linear-gradient(135deg in oklch, #0066FF, #7B2FBE, #A855F7);
  --gradient-button: linear-gradient(135deg in oklch, #0066FF, #A855F7);
  --gradient-card: linear-gradient(135deg in oklch, rgba(0, 102, 255, 0.05), rgba(168, 85, 247, 0.05));
  --gradient-glow: radial-gradient(circle, rgba(0, 102, 255, 0.15), transparent 70%);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  
  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Poppins', sans-serif;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 12px 60px rgba(0, 0, 0, 0.12);
  --shadow-glow-blue: 0 0 30px rgba(0, 102, 255, 0.3);
  --shadow-glow-purple: 0 0 30px rgba(168, 85, 247, 0.3);
  --shadow-glow-neon: 0 0 20px rgba(0, 234, 255, 0.4);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Z-Index */
  --z-nav: 1000;
  --z-modal: 2000;
  --z-cursor: 3000;
  --z-loader: 4000;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ---------- Loading Screen ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.loader-content {
  text-align: center;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-md);
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--gradient-button);
  border-radius: var(--radius-full);
  animation: loading 1.2s ease-in-out infinite;
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Custom Cursor ---------- */
.cursor-glow {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid var(--color-accent-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transition: transform 0.15s ease, opacity 0.15s ease;
  mix-blend-mode: difference;
}

.cursor-glow-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--color-accent-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transition: transform 0.08s ease;
}

.cursor-glow.active {
  transform: scale(1.8);
  border-color: var(--color-accent-purple-light);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor-glow,
  .cursor-glow-trail {
    display: none;
  }
}

/* ---------- Icon Sizing ---------- */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.float-icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent-blue);
}

.role-tag .icon {
  width: 14px;
  height: 14px;
  color: var(--color-accent-blue);
}

.service-icon [data-lucide] {
  width: 24px;
  height: 24px;
  color: var(--color-accent-blue);
}

.innovation-icon [data-lucide] {
  width: 32px;
  height: 32px;
  color: var(--color-accent-cyan);
  filter: drop-shadow(0 0 10px rgba(0, 234, 255, 0.5));
}

.portfolio-thumb-bg [data-lucide] {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.7);
}

.contact-link-icon [data-lucide],
.contact-link-icon .brand-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent-blue);
}

.footer-social .brand-icon {
  width: 18px;
  height: 18px;
}

.brand-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-spin {
  animation: spin 1s linear infinite;
}

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

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-sm) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  padding: 0.6rem var(--space-xl);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.nav-logo span {
  font-weight: 400;
  opacity: 0.7;
}

/* Initially, nav links should be light on the dark hero */
.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.navbar.scrolled .nav-links a {
  color: var(--color-text-secondary);
}

.nav-links a:hover {
  color: var(--color-accent-blue);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-button);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

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

.nav-cta {
  background: var(--gradient-button);
  color: var(--color-text-light) !important;
  padding: 0.6rem 1.5rem !important;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-blue);
  color: var(--color-text-light) !important;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--color-text-light);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.navbar.scrolled .nav-toggle span {
  background: var(--color-text-primary);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: var(--space-4xl) var(--space-xl);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(0, 102, 255, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(123, 47, 190, 0.1) 0%, transparent 60%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 0.4rem 1.2rem;
  margin-bottom: var(--space-lg);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  color: var(--color-accent-cyan);
  animation: fadeInDown 0.8s ease forwards;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent-cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: var(--text-6xl);
  font-weight: 800;
  color: var(--color-text-light);
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg in oklch, var(--color-accent-blue-light), var(--color-accent-purple-light), var(--color-accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.hero-description {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.65);
  max-width: 650px;
  margin: 0 auto var(--space-xl);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.8s forwards;
  opacity: 0;
}

/* Floating equalizer bars in hero */
.hero-equalizer {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 3;
  opacity: 0.3;
}

.eq-bar {
  width: 3px;
  background: var(--color-accent-cyan);
  border-radius: var(--radius-full);
  animation: equalizer 1.2s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.eq-bar:nth-child(2) { height: 35px; animation-delay: 0.15s; }
.eq-bar:nth-child(3) { height: 25px; animation-delay: 0.3s; }
.eq-bar:nth-child(4) { height: 40px; animation-delay: 0.1s; }
.eq-bar:nth-child(5) { height: 15px; animation-delay: 0.25s; }
.eq-bar:nth-child(6) { height: 30px; animation-delay: 0.05s; }
.eq-bar:nth-child(7) { height: 20px; animation-delay: 0.2s; }
.eq-bar:nth-child(8) { height: 35px; animation-delay: 0.35s; }
.eq-bar:nth-child(9) { height: 25px; animation-delay: 0.15s; }

@keyframes equalizer {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  animation: fadeInUp 1s ease 1.2s forwards;
  opacity: 0;
}

.scroll-indicator span {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--font-accent);
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--color-accent-blue);
  border-radius: var(--radius-full);
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.85rem 2rem;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-button);
  color: var(--color-text-light);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-light);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  border-color: var(--color-accent-blue);
  background: rgba(0, 102, 255, 0.1);
  transform: translateY(-3px);
}

.btn-dark {
  background: var(--gradient-button);
  color: var(--color-text-light);
}

.btn-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent-blue);
  border: 1.5px solid var(--color-accent-blue);
}

.btn-outline:hover {
  background: var(--color-accent-blue);
  color: var(--color-text-light);
  transform: translateY(-3px);
}

/* Ripple effect on button */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn:active::before {
  opacity: 1;
}

/* ---------- Section Styles ---------- */
.section {
  padding: var(--space-4xl) var(--space-xl);
  position: relative;
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section-alt {
  background: linear-gradient(180deg, var(--color-bg-primary) 0%, #eef1f8 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-label {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent-blue);
  background: rgba(0, 102, 255, 0.08);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.section-dark .section-label {
  background: rgba(0, 102, 255, 0.2);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.section-title .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- About Section ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.about-image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-xl);
}

.about-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(0, 102, 255, 0.15);
  pointer-events: none;
}

.about-image-glow {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 60%);
  z-index: -1;
}

.about-image-float {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-md);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  animation: float 3s ease-in-out infinite;
}

.about-image-float.top-right {
  top: 15%;
  right: -20px;
}

.about-image-float.bottom-left {
  bottom: 15%;
  left: -20px;
  animation-delay: 1.5s;
}

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

.about-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.about-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.about-roles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  background: var(--gradient-card);
  border: 1px solid rgba(0, 102, 255, 0.1);
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.role-tag:hover {
  border-color: var(--color-accent-blue);
  background: rgba(0, 102, 255, 0.08);
  color: var(--color-accent-blue);
  transform: translateY(-2px);
}

/* ---------- Services Section ---------- */
.services-categories {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.category-tab {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.category-tab.active,
.category-tab:hover {
  background: var(--gradient-button);
  color: var(--color-text-light);
  border-color: transparent;
  box-shadow: var(--shadow-glow-blue);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 102, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-button);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 102, 255, 0.15);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  transition: transform var(--transition-bounce);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(-5deg);
}

.service-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.service-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---------- Innovation Section ---------- */
.innovation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.innovation-card {
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 234, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.innovation-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 234, 255, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.innovation-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 234, 255, 0.3);
}

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

.innovation-number {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  background: linear-gradient(135deg in oklch, rgba(0, 234, 255, 0.15), rgba(168, 85, 247, 0.1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: absolute;
  top: var(--space-sm);
  right: var(--space-md);
  line-height: 1;
}

.innovation-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: inline-block;
  filter: drop-shadow(0 0 10px rgba(0, 234, 255, 0.5));
}

.innovation-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.innovation-card p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

.innovation-tag {
  display: inline-block;
  margin-top: var(--space-sm);
  padding: 0.3rem 0.8rem;
  background: rgba(0, 234, 255, 0.1);
  border: 1px solid rgba(0, 234, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-accent-cyan);
  font-family: var(--font-accent);
}

/* ---------- Portfolio Section ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-md);
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-secondary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.portfolio-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.portfolio-thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform var(--transition-slow);
}

.portfolio-card:hover .portfolio-thumb-bg {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 26, 0.8) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay .btn {
  font-size: var(--text-xs);
  padding: 0.5rem 1.2rem;
}

.portfolio-info {
  padding: var(--space-md);
}

.portfolio-info .category {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-blue);
  margin-bottom: var(--space-xs);
}

.portfolio-info h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 4px;
}

.portfolio-info p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Stats Section ---------- */
.stats-section {
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  position: relative;
}

.stat-card {
  text-align: center;
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 102, 255, 0.3);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  background: linear-gradient(135deg in oklch, var(--color-accent-blue-light), var(--color-accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* ---------- Contact Section ---------- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-card);
  border: 1px solid rgba(0, 102, 255, 0.06);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.contact-link:hover {
  border-color: var(--color-accent-blue);
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.contact-link-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-link-text {
  display: flex;
  flex-direction: column;
}

.contact-link-text .label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.contact-link-text .value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.contact-form {
  background: var(--color-bg-secondary);
  border: 1px solid rgba(0, 102, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

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

.form-group label {
  display: block;
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  width: 100%;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: var(--space-3xl) var(--space-xl) var(--space-lg);
}

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

.footer-brand .nav-logo {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
  display: inline-block;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-sm);
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: rgba(255, 255, 255, 0.8);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-col a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
}

.footer-col a:hover {
  color: var(--color-accent-blue);
  transform: translateX(4px);
}

.footer-social {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-blue);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.3);
}

.footer-bottom .tagline {
  font-style: italic;
  color: rgba(0, 234, 255, 0.4);
}

/* ---------- Scroll Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.active > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.active > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.active > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger.active > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger.active > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger.active > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger.active > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger.active > *:nth-child(8) { transition-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(9) { transition-delay: 0.45s; }
.reveal-stagger.active > *:nth-child(10) { transition-delay: 0.5s; }
.reveal-stagger.active > *:nth-child(11) { transition-delay: 0.55s; }
.reveal-stagger.active > *:nth-child(12) { transition-delay: 0.6s; }

.reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

/* ---------- Floating Neon Elements ---------- */
.neon-float {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.5;
  animation: neonFloat 8s ease-in-out infinite;
}

.neon-float.blue {
  background: rgba(0, 102, 255, 0.15);
}

.neon-float.purple {
  background: rgba(168, 85, 247, 0.12);
}

.neon-float.cyan {
  background: rgba(0, 234, 255, 0.1);
}

@keyframes neonFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
  
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1024px) {
  :root {
    --text-6xl: 3.5rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .about-image-wrapper {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }
  
  .section {
    padding: var(--space-3xl) var(--space-md);
  }
  
  .navbar {
    padding: var(--space-sm) var(--space-md);
  }
  
  .navbar.scrolled {
    padding: 0.6rem var(--space-md);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    padding: var(--space-xl);
    transition: right var(--transition-base);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  }
  
  .nav-links.open {
    right: 0;
  }
  
  .nav-links a {
    color: var(--color-text-primary) !important;
    font-size: var(--text-lg);
    padding: var(--space-sm) 0;
  }
  
  .hero {
    padding: var(--space-3xl) var(--space-md);
  }
  
  .hero-equalizer {
    display: none;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .innovation-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }
  
  .stat-card {
    padding: var(--space-md);
  }
  
  .stat-number {
    font-size: var(--text-4xl);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --text-6xl: 2rem;
    --text-5xl: 1.75rem;
    --text-4xl: 1.5rem;
  }
  
  .hero-badge {
    font-size: var(--text-xs);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
    letter-spacing: 0.08em;
  }
  
  .about-image-float {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
