:root {
  --bg: #050508;
  --surface: #0d0d14;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --primary: #ffffff;
  --muted: rgba(255, 255, 255, 0.45);
  --accent: #4f8ef7;
  --accent-2: #a78bfa;
  --accent-warm: #f4a261;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --font-display: 'DM Serif Display', serif;
  --font-sans: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 72px;
  --radius: 20px;
  --radius-sm: 12px;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.light {
  --bg: #f5f4f0;
  --surface: #eeede8;
  --glass: rgba(0, 0, 0, 0.03);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-hover: rgba(0, 0, 0, 0.06);
  --primary: #0a0a12;
  --muted: rgba(0, 0, 0, 0.4);
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --text-secondary: rgba(0, 0, 0, 0.6);
}

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

a {
  text-decoration: none;
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--primary);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: auto;
  transition: background 0.6s ease, color 0.6s ease;
}

/* Enable custom cursor only on devices with fine pointers (mice) */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  #cursor-ring,
  #cursor-dot {
    display: block;
  }
}

@media (pointer: coarse) {

  #cursor-ring,
  #cursor-dot {
    display: none !important;
  }
}

body.menu-open {
  overflow: hidden;
}

/* ── GPU OPTIMIZED CUSTOM CURSOR ── */
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(79, 142, 247, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  /* GPU Acceleration transform applied via JS */
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
}

body.cursor-hover #cursor-ring {
  width: 64px;
  height: 64px;
  border-color: rgba(167, 139, 250, 0.8);
  background: rgba(167, 139, 250, 0.05);
}

body.cursor-click #cursor-ring {
  width: 20px;
  height: 20px;
  background: rgba(79, 142, 247, 0.2);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 3px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(79, 142, 247, 0.4);
  border-radius: 2px;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.18;
  /* Reduced background noise for better clarity */
}

/* ── UTILITIES ── */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px) saturate(1.3);
  -webkit-backdrop-filter: blur(5px) saturate(1.3);
}

.glass:hover {
  background: var(--glass-hover);
}

.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(79, 142, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 90% 90%, rgba(244, 162, 97, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* ── NAVBAR ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 40px;
  z-index: 500;
  background: rgba(5, 5, 8, 0.6);
  backdrop-filter: blur(8px) saturate(1.8);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.4s ease;
}

.light nav {
  background: rgba(245, 244, 240, 0.7);
}

.nav-btn {
  display: flex;
}

.hamburger {
  display: none;
}

.lang-switcher {
  display: flex;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.nav-brand:hover .logo-trace-container {
  transform: rotate(-5deg) scale(1.05);
}

.nav-brand,
.footer-brand {
  position: relative;
}

/* ── LOGO HANDWRITING TRACE ANIMATION ── */
.logo-trace-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
}

.logo-trace-container svg {
  height: 100%;
  width: auto;
  display: block;
}

.logo-trace-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* SVG trace paths - handwriting effect */
.trace-path {
  stroke: #ffffff;
  fill: none;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
}

.light .trace-path {
  stroke: #000000;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.15));
}

/* Each path: single 5s looping animation with staggered delay */
/* Total cycle: 5s. Draw phase ~0-40%, hold ~40-70%, fade ~70-90%, hidden ~90-100% */

.trace-x1 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: traceX 5s ease-in-out 0s infinite;
}

.trace-x2 {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: traceX 5s ease-in-out 0.3s infinite;
}

.trace-a1 {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: traceA 5s ease-in-out 0.7s infinite;
}

.trace-a2 {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: traceCross 5s ease-in-out 1.3s infinite;
}

.trace-i {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: traceX 5s ease-in-out 1.7s infinite;
}

/* X and I strokes (dasharray: 100) */
@keyframes traceSVG {
  0% { stroke-dashoffset: 10000; fill: transparent; stroke: currentColor; }
  45% { stroke-dashoffset: 0; fill: transparent; stroke: currentColor; }
  50% { fill: currentColor; stroke-dashoffset: 0; stroke: transparent; }
  100% { fill: currentColor; stroke-dashoffset: 0; stroke: transparent; }
}

.trace-path-svg {
  stroke-dasharray: 10000;
  stroke-dashoffset: 10000;
  stroke-width: 4;
  fill: none;
  animation: traceSVG 6s ease-in-out infinite;
}

/* End of Logo Animations */

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 32px;
}

.nav-item-wrap {
  position: relative;
}

.nav-links button,
.nav-link-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  position: relative;
  transition: color 0.25s ease, background 0.25s ease;
  border-radius: 8px;
  text-decoration: none;
}

.nav-links button:hover,
.nav-link-btn:hover {
  color: var(--primary);
  background: rgba(79, 142, 247, 0.08);
}

.nav-link-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── MEGA MENU ── */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px;
  padding: 16px;
  background: rgba(13, 13, 20, 0.98);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 600;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.light .mega-menu {
  background: rgba(245, 244, 240, 0.98);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.nav-item-wrap:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.mega-item:hover {
  background: rgba(79, 142, 247, 0.08);
  color: var(--primary);
  border-color: rgba(79, 142, 247, 0.2);
}

.mega-item i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 142, 247, 0.1);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.8rem;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn,
.hamburger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.nav-btn:hover,
.hamburger:hover {
  color: var(--primary);
  border-color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
}

.lang-switcher {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 6px 14px;
  background: var(--glass);
}

.lang-switcher button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  letter-spacing: 0.06em;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lang-switcher button.active {
  color: var(--primary);
  font-weight: 500;
}

.lang-switcher .sep {
  color: var(--glass-border);
}

/* ── MOBILE MENU ── */
#mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.97);
  backdrop-filter: blur(30px);
  z-index: 490;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(var(--nav-h) + 40px);
  gap: 24px;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.18, 1);
  overflow-y: auto;
}

#mobile-nav-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.light #mobile-menu {
  background: rgba(245, 244, 240, 0.97);
}

#mobile-menu.open {
  transform: translateY(0);
}

#mobile-menu .mobile-menu-btn {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#mobile-menu .mobile-menu-btn:hover {
  opacity: 1;
}

.mobile-lang-btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

/* ── VIEWS ── */
.view {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.view.active {
  display: block;
  animation: viewIn 0.5s ease forwards;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) 40px 80px;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  cursor: grab;
}

#hero-canvas:active {
  cursor: grabbing;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  pointer-events: none;
}

.hero-ctas {
  pointer-events: auto;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  writing-mode: vertical-lr;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scrollLine 2s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

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

  100% {
    transform: translateY(100%);
  }
}

@media (max-width: 1024px) {
  .hero-scroll {
    display: none;
  }
}

.hero-title em {
  font-style: italic;
  color: var(--accent-2);
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 48px;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.15);
}

.light .btn-primary:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
  padding: 14px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.hero-scroll:hover {
  background: rgba(79, 142, 247, 0.08);
  border-color: rgba(79, 142, 247, 0.3);
}

.scroll-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  writing-mode: vertical-rl;
}

.hero-scroll .scroll-line {
  width: 3px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 142, 247, 0.8), rgba(255, 255, 255, 0.06));
  position: relative;
  overflow: hidden;
}

.hero-scroll .scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(79, 142, 247, 0.6);
  animation: scrollDot 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes scrollDot {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateX(-50%) translateY(56px);
    opacity: 1;
  }
}

/* scrollPulse removed — using scrollDot only */

/* ── SECTION BASE ── */
.section {
  padding: 80px 40px;
  position: relative;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* ── GRIDS & CARDS (Services, Projects, Stats) ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.service-card {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px) rotateX(5deg) rotateY(-5deg);
  border-color: rgba(79, 142, 247, 0.3);
  background: rgba(79, 142, 247, 0.04);
  box-shadow: 0 20px 40px rgba(79, 142, 247, 0.1);
}

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

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.15), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(79, 142, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.service-card h3 {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.project-card {
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(79, 142, 247, 0.08), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-4px) rotateX(3deg) rotateY(3deg);
  box-shadow: 0 15px 30px rgba(167, 139, 250, 0.1);
}

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

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(79, 142, 247, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent-2);
  margin-bottom: 14px;
}

.project-card h3 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.project-card p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.tech-section {
  overflow: hidden;
}

.marquee-wrap {
  display: flex;
  gap: 12px;
  animation: marqueeAnim 40s linear infinite;
}

.marquee-wrap.reverse {
  animation-direction: reverse;
}

.tech-pill {
  flex-shrink: 0;
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.tech-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  padding: 60px 40px;
  text-align: center;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(79, 142, 247, 0.04);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 12px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── BLOCKS & LISTS ── */
.sector-block {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding: 72px 0;
  border-bottom: 1px solid var(--glass-border);
}

.sector-block:last-child {
  border-bottom: none;
}

.sector-meta {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sector-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: block;
}

.sector-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
}

.sector-name {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 16px;
}

.sector-bar {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.sector-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sector-project-card {
  padding: 28px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  cursor: pointer;
}

.sector-project-card:hover {
  border-color: rgba(79, 142, 247, 0.3);
  transform: translateY(-2px);
}

.sector-project-card h4 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.sector-project-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.blog-card:hover {
  transform: translateY(-6px) rotateX(4deg) rotateY(-2deg);
  border-color: rgba(79, 142, 247, 0.3);
  box-shadow: 0 25px 50px rgba(79, 142, 247, 0.15);
}

.blog-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 28px;
}

.blog-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.blog-card h3 {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

.blog-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.blog-card-foot {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.read-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-single-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 100px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  margin-bottom: 56px;
  transition: color 0.2s ease;
  text-transform: uppercase;
}

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

.blog-single-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}

.blog-single-tag {
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(79, 142, 247, 0.1);
  border: 1px solid rgba(79, 142, 247, 0.3);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.blog-single-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 40px;
}

.blog-single-body {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 1.05rem;
  max-width: 720px;
}

.blog-single-body h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary);
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-single-body strong {
  color: var(--primary);
  font-weight: 600;
}

.blog-single-body p+p {
  margin-top: 20px;
}

.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 32px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.job-card:hover {
  border-color: rgba(79, 142, 247, 0.4);
  transform: translateX(4px);
}

.job-info h3 {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.job-meta {
  display: flex;
  gap: 16px;
}

.job-meta span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.job-badge {
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.3);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-2);
}

.careers-cta {
  margin-top: 72px;
  padding: 72px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.careers-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(79, 142, 247, 0.06) 0%, transparent 70%);
}

.careers-cta-inner {
  position: relative;
  z-index: 1;
}

.careers-cta h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.careers-cta p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ── FORMS & CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.contact-info p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.contact-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.contact-type-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-type-card:hover,
.contact-type-card.selected {
  border-color: rgba(79, 142, 247, 0.4);
  background: rgba(79, 142, 247, 0.04);
}

.contact-type-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.15), rgba(167, 139, 250, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
}

.contact-type-card h4 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.contact-type-card p {
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group select {
  cursor: pointer;
}

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

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: 100px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  width: 100%;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.25);
}

.wa-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(37, 211, 102, 0.35);
}

.wa-btn i {
  font-size: 1.2rem;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 80px 40px 40px;
  background: var(--glass);
  backdrop-filter: blur(20px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  max-width: 1280px;
  margin: 0 auto 60px;
}

.footer-logo-img {
  height: 34px;
  width: auto;
  filter: invert(1) brightness(1.5); /* Force White for original Black logo in Dark Mode */
  transition: filter 0.3s ease;
}

.light .footer-logo-img {
  filter: none; /* Keep original Black logo for Light Mode */
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: 28px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-btn:hover {
  color: var(--primary);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

  .footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .footer-bottom span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
  }

  /* ── ANIMATED GRADIENT LINE & PAGE HEADERS ── */
  .gradient-line {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
    opacity: 0.4;
  }

  .page-header {
    padding: calc(var(--nav-h) + 24px) 40px 32px;
    border-bottom: 1px solid var(--glass-border);
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
  }

  .page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.05;
    margin-bottom: 12px;
  }

  .page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.7;
  }

  /* ── REVEAL ANIMATIONS ── */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

  .reveal-delay-1 {
    transition-delay: 0.1s;
  }

  .reveal-delay-2 {
    transition-delay: 0.2s;
  }

  .reveal-delay-3 {
    transition-delay: 0.3s;
  }

  /* ── INTRO ANIMATION ── */
  @keyframes logoReveal {
    from {
      opacity: 0;
      transform: scale(0.9) rotate(-5deg);
    }

    to {
      opacity: 1;
      transform: scale(1) rotate(0deg);
    }
  }

  .nav-brand .logo-img {
    animation: logoReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  /* ── LOADING SCREEN ── */
  #loader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #050508;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
  }

  #loader.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .loader-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .loader-icon {
    position: relative;
    width: 80px;
    height: 80px;
    z-index: 2;
  }

  .loader-brain {
    width: 100%;
    height: 100%;
  }

  .loader-brain .node {
    fill: rgba(255, 255, 255, 0.9);
    animation: nodePulse 1.5s ease-in-out infinite;
  }

  .loader-brain .n1 {
    animation-delay: 0s;
  }

  .loader-brain .n2 {
    animation-delay: 0.2s;
  }

  .loader-brain .n3 {
    animation-delay: 0.4s;
  }

  .loader-brain .n4 {
    animation-delay: 0.6s;
  }

  .loader-brain .n5 {
    animation-delay: 0.8s;
  }

  .loader-brain .n6 {
    fill: rgba(167, 139, 250, 0.95);
    animation-delay: 0.3s;
  }

  .loader-brain .synapse {
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1;
    animation: synapseFire 2s ease-in-out infinite;
  }

  .loader-brain .synapse:nth-child(odd) {
    animation-delay: 0.5s;
  }

  .loader-brain .synapse:nth-child(even) {
    animation-delay: 1s;
  }

  @keyframes nodePulse {

    0%,
    100% {
      opacity: 0.4;
      r: attr(r);
    }

    50% {
      opacity: 1;
    }
  }

  @keyframes synapseFire {

    0%,
    100% {
      stroke-opacity: 0.15;
      stroke-width: 0.5;
    }

    50% {
      stroke-opacity: 0.8;
      stroke-width: 1.5;
      stroke: rgba(167, 139, 250, 0.7);
    }
  }

  .loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border: 1.5px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: loaderSpin 2s linear infinite;
  }

  .loader-ring-2 {
    width: 140px;
    height: 140px;
    margin: -70px 0 0 -70px;
    border-top-color: rgba(255, 255, 255, 0.2);
    animation: loaderSpin 3s linear infinite reverse;
  }

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

  .loader-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    animation: loaderBlink 1.2s ease infinite;
    margin-top: 16px;
  }

  @keyframes loaderBlink {

    0%,
    100% {
      opacity: 0.3;
    }

    50% {
      opacity: 1;
    }
  }

  .loader-particles {
    position: absolute;
    inset: -40px;
    pointer-events: none;
  }

  .loader-particles span {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(79, 142, 247, 0.6);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
  }

  .loader-particles span:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
  }

  .loader-particles span:nth-child(2) {
    top: 70%;
    left: 80%;
    animation-delay: 0.4s;
  }

  .loader-particles span:nth-child(3) {
    top: 30%;
    left: 90%;
    animation-delay: 0.8s;
  }

  .loader-particles span:nth-child(4) {
    top: 80%;
    left: 10%;
    animation-delay: 1.2s;
  }

  .loader-particles span:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 1.6s;
  }

  .loader-particles span:nth-child(6) {
    top: 20%;
    left: 60%;
    animation-delay: 0.3s;
  }

  .loader-particles span:nth-child(7) {
    top: 90%;
    left: 40%;
    animation-delay: 0.7s;
  }

  .loader-particles span:nth-child(8) {
    top: 40%;
    left: 5%;
    animation-delay: 1.1s;
  }

  @keyframes particleFloat {
    0% {
      transform: translate(0, 0) scale(1);
      opacity: 0;
    }

    25% {
      opacity: 1;
    }

    50% {
      transform: translate(10px, -20px) scale(1.5);
      opacity: 0.8;
    }

    75% {
      opacity: 0.4;
    }

    100% {
      transform: translate(-5px, 15px) scale(0.5);
      opacity: 0;
    }
  }

  /* ── RESPONSIVE & MOBILE (Fixed & Cleaned up) ── */
  @media (max-width: 1024px) {

    /* Tablet styles */
    .services-grid {
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .projects-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .blog-grid {
      grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
  }

  @media (max-width: 768px) {
    nav {
      padding: 0 16px;
      justify-content: space-between;
    }

    nav>* {
      flex-shrink: 0;
    }

    .nav-brand {
      order: 1;
    }

    .nav-controls {
      order: 2;
      display: flex !important;
      align-items: center;
      gap: 8px;
    }

    .nav-links,
    .lang-switcher {
      display: none;
    }

    .hamburger,
    .nav-btn {
      display: flex !important;
    }

    #hero {
      padding: calc(var(--nav-h) + 10px) 20px 40px;
      justify-content: center; /* Center content vertically on mobile for better framing */
    }

    .hero-title {
      font-size: clamp(2rem, 10vw, 3.2rem);
      line-height: 1.1;
    }

    .section {
      padding: 60px 20px;
    }

    .contact-grid,
    .footer-grid,
    .sector-block,
    .sector-projects {
      grid-template-columns: 1fr;
      gap: 36px;
    }

    .sector-meta {
      position: static;
    }

    .page-header {
      padding: calc(var(--nav-h) + 28px) 20px 32px;
    }

    .careers-cta {
      padding: 40px 24px;
    }

    footer {
      padding: 60px 20px 30px;
    }

    .blog-single-wrap {
      padding: calc(var(--nav-h) + 20px) 20px 60px;
    }
  }

  /* ── RTL SUPPORT ── */
  [dir="rtl"] nav {
    flex-direction: row-reverse;
  }

  [dir="rtl"] .nav-brand {
    margin-left: auto;
    margin-right: 0;
  }

  [dir="rtl"] .nav-links {
    margin-left: 32px;
    margin-right: auto;
  }

  [dir="rtl"] .nav-controls {
    margin-left: 0;
    margin-right: auto;
  }

  /* ── ACCESSIBILITY ── */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ── HOVER FOCUS EFFECT (Subtle ~20% blur) ── */
  .services-grid:hover .service-card:not(:hover),
  .projects-grid:hover .project-card:not(:hover),
  .stats-grid:hover .stat-card:not(:hover),
  .blog-grid:hover .blog-card:not(:hover),
  .marquee-wrap:hover .tech-pill:not(:hover),
  .jobs-list:hover .job-card:not(:hover),
  .contact-types:hover .contact-type-card:not(:hover),
  .sector-projects:hover .sector-project-card:not(:hover) {
    filter: blur(1px);
    opacity: 0.7;
    transform: scale(0.98);
  }

  .service-card,
  .project-card,
  .stat-card,
  .blog-card,
  .tech-pill,
  .job-card,
  .contact-type-card,
  .sector-project-card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
  }

  .service-card:hover,
  .project-card:hover,
  .stat-card:hover,
  .blog-card:hover,
  .tech-pill:hover,
  .job-card:hover,
  .contact-type-card:hover,
  .sector-project-card:hover {
    filter: blur(0);
    opacity: 1;
    transform: scale(1.03) !important;
    z-index: 10;
  }

  /* ── CONTINUOUS BORDER TRACE ANIMATION ── */
  .service-card::after,
  .blog-card::after,
  .sector-project-card::after,
  .job-card::after,
  .stat-card::after,
  .contact-type-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    background: conic-gradient(from var(--angle), transparent 75%, var(--accent), var(--accent-2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
    opacity: 0.4;
    animation: borderTraceNatural 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  /* Independence / Offset animations */
  .service-card:nth-child(2n)::after,
  .blog-card:nth-child(2n)::after {
    animation-delay: -1.2s;
    animation-duration: 4.5s;
  }

  .service-card:nth-child(3n)::after,
  .blog-card:nth-child(3n)::after {
    animation-delay: -2.7s;
    animation-duration: 3.8s;
  }

  .service-card:nth-child(4n)::after,
  .blog-card:nth-child(4n)::after {
    animation-delay: -0.5s;
    animation-duration: 4.2s;
  }

  .service-card:hover::after,
  .blog-card:hover::after,
  .sector-project-card:hover::after,
  .job-card:hover::after,
  .stat-card:hover::after {
    opacity: 1;
    animation-duration: 2s !important;
  }

  @keyframes borderTraceNatural {
    0% {
      --angle: 0deg;
    }

    25% {
      --angle: 90deg;
    }

    /* Corner slow */
    28% {
      --angle: 95deg;
    }

    50% {
      --angle: 180deg;
    }

    75% {
      --angle: 270deg;
    }

    78% {
      --angle: 275deg;
    }

    100% {
      --angle: 360deg;
    }
  }

  /* ── DETAIL MODAL ── */
  .modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
  }

  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .modal-content {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  }

  .modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
  }

  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--muted);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
  }

  .modal-close:hover {
    color: var(--primary);
    border-color: var(--accent);
    background: rgba(79, 142, 247, 0.1);
  }

  .modal-header {
    margin-bottom: 24px;
  }

  .modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .modal-header .modal-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
  }

  .modal-section {
    margin-bottom: 24px;
  }

  .modal-section h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 12px;
    font-family: var(--font-mono);
  }

  .modal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
  }

  .modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-tech-pill {
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
  }

  .modal-use-cases {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .modal-use-case {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--glass-border);
  }

  .modal-use-case i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
  }

  .modal-use-case span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
  }

  /* Hide mega menu on mobile/tablet */
  @media (max-width: 1024px) {
    .mega-menu {
      display: none !important;
    }

    .nav-item-wrap {
      position: static;
    }
  }