/* Performance: progress bar uses transform for updates */
#scroll-progress {
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* Performance: heavy layers get will-change hints */
.hero .hero-slider,
.glow-orb,
#mesh-background,
#hero-particles,
#spline-hero,
.project-card,
.btn-hire-me,
.btn-secondary,
.btn-primary,
.btn-ghost,
.nav .nav-links a,
.section-title,
.hero-title,
.hero-subtitle {
  will-change: transform, opacity;
}
:root {
  --bg: #05050a;
  --bg-alt: #080814;
  --accent: #4ef0ff;
  --accent-soft: rgba(78, 240, 255, 0.2);
  --accent-2: #b84eff;
  --accent-3: #8affdb;
  --text: #f5f5f5;
  --text-secondary: #e0e0e8;
  --muted: #9a9bb0;
  --muted-dark: #6f7185;
  --card: #101020;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --radius-lg: 22px;
  --radius-xl: 32px;
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.42);
  --shadow-glow: 0 0 40px rgba(78, 240, 255, 0.3), 0 0 80px rgba(184, 78, 255, 0.2);
  --shadow-hover: 0 12px 40px rgba(78, 240, 255, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-slow: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Spline background layer */
.spline-layer {
  position: absolute;
  inset: 0;
  z-index: 0; /* below hero content; mesh is drawn above by DOM order */
  pointer-events: none;
  opacity: 0.8;
}

/* Optional Spline icon host */
.spline-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
  position: relative;
  pointer-events: none;
}

/* Header glass effect on scroll */
header {
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(10, 10, 15, 0.45);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-color: rgba(120, 120, 160, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Nav link underline */
.nav .nav-links a {
  position: relative;
}
.nav .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--transition-smooth, ease);
  opacity: 0.9;
}
.nav .nav-links a:hover::after, .nav .nav-links a.active::after {
  transform: scaleX(1);
}

/* Futuristic sheen for gradient text */
.gradient-text {
  position: relative;
}
.gradient-text::after {
  content: "";
  position: absolute;
  inset: -4px -8px;
  background: radial-gradient(120px 40px at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,0.25), rgba(255,255,255,0) 60%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.gradient-text:hover::after { opacity: 1; }

/* Spline pulse */
#spline-hero.pulse {
  animation: splinePulse 900ms ease both;
}
@keyframes splinePulse {
  0% { transform: scale(1); filter: brightness(1) saturate(1); }
  50% { transform: scale(1.02); filter: brightness(1.08) saturate(1.1); }
  100% { transform: scale(1); filter: brightness(1) saturate(1); }
}

/* Footer link polish */
footer .footer-nav a {
  position: relative;
  transition: color 0.25s ease, transform 0.2s ease;
}
footer .footer-nav a:hover { transform: translateY(-1px); }
footer .footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform 0.25s ease;
  opacity: 0.8;
}
footer .footer-nav a:hover::after { transform: scaleX(1); }

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 12px rgba(78, 240, 255, 0.6), 0 0 24px rgba(184, 78, 255, 0.4);
  z-index: 9999;
  transition: width 0.08s linear;
}

/* Subtle animated grid overlay on hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(78, 240, 255, 0.06), transparent 60%),
    radial-gradient(1000px 500px at 90% 20%, rgba(184, 78, 255, 0.05), transparent 60%),
    repeating-linear-gradient( to bottom, rgba(255,255,255,0.03) 0 1px, transparent 1px 60px ),
    repeating-linear-gradient( to right, rgba(255,255,255,0.03) 0 1px, transparent 1px 60px );
  pointer-events: none;
  z-index: 0;
  animation: gridDrift 18s linear infinite;
}

@keyframes gridDrift {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-2%, -2%, 0) scale(1.02); }
  100% { transform: translate3d(0,0,0) scale(1); }
}

[data-theme="light"] {
  --bg: #f8f9fa;
  --bg-alt: #ffffff;
  --accent: #0099cc;
  --accent-soft: rgba(0, 153, 204, 0.15);
  --accent-2: #9933cc;
  --text: #1a1a1a;
  --text-secondary: #3a3a3a;
  --muted: #6a6a7a;
  --muted-dark: #8a8a9a;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent pull-to-refresh on mobile */
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

/* Prevent white flashes on overscroll (iOS) and paint background early */
html,
body {
  background-color: var(--bg);
  overscroll-behavior-y: contain;
  /* Prevent pull-to-refresh */
  touch-action: pan-x pan-y;
}

body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-weight: 400;
  font-feature-settings:
    'cv07' 4,
    'cv10' 4;
  background: radial-gradient(circle at top, #14152b 0, var(--bg) 40%, #010106 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden; /* Prevent scrolling during preloader */
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.custom-cursor {
  cursor: none !important;
}

body.custom-cursor *,
body.custom-cursor a,
body.custom-cursor button {
  cursor: none !important;
}

/* Hide custom cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
  body.custom-cursor {
    cursor: default !important;
  }

  body.custom-cursor *,
  body.custom-cursor a,
  body.custom-cursor button {
    cursor: pointer !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
    opacity: 0 !important;
  }
}

/* Remove tap highlight and hint for smoother touch interactions */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 100000;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  opacity: 1 !important;
  transition: opacity 0.2s ease;
  will-change: transform, opacity;
}

body.custom-cursor .cursor-dot,
body.custom-cursor .cursor-ring {
  opacity: 1 !important;
  display: block !important;
}

.cursor-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ef0ff;
  box-shadow:
    0 0 30px #4ef0ff,
    0 0 15px rgba(78, 240, 255, 1),
    0 0 8px #fff;
  will-change: transform;
  z-index: 10001;
}

.cursor-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(78, 240, 255, 0.9);
  background: radial-gradient(circle, rgba(78, 240, 255, 0.25), transparent 65%);
  transition:
    border 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, width, height;
  z-index: 10000;
}

.cursor-ring.is-hover {
  width: 65px;
  height: 65px;
  border-color: rgba(184, 78, 255, 0.95);
  background: radial-gradient(circle, rgba(184, 78, 255, 0.25), transparent 60%);
  box-shadow: 0 0 20px rgba(184, 78, 255, 0.4);
}

.cursor-ring.is-clicked {
  width: 28px;
  height: 28px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background-color: rgba(5, 5, 12, 0.98);
  background: linear-gradient(to bottom, rgba(5, 5, 12, 0.96), rgba(5, 5, 12, 0.5), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  will-change: transform;
  transform: translateZ(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border-bottom-color: rgba(78, 240, 255, 0.1);
}

.light-mode header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(78, 240, 255, 0.9);
  overflow: hidden;
}

.light-mode .logo-mark {
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 15px rgba(0, 102, 204, 0.4);
}

.logo-mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 0.35rem;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width var(--transition);
}

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

.nav-links a.active {
  color: var(--text);
}

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

.nav-cta {
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 240, 255, 0.9);
  background: radial-gradient(circle at top, rgba(78, 240, 255, 0.18), rgba(5, 5, 12, 0.98));
  box-shadow: 0 0 22px rgba(78, 240, 255, 0.45);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-cta:hover {
  border-color: rgba(184, 78, 255, 0.9);
  box-shadow: 0 0 30px rgba(184, 78, 255, 0.55);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  padding: clamp(3rem, 10vw, 5rem) 0 clamp(2.5rem, 7vw, 4rem);
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(78, 240, 255, 0.3);
  background: linear-gradient(135deg, rgba(4, 6, 18, 0.98), rgba(8, 12, 28, 0.96));
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(78, 240, 255, 0.2);
}

.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: radial-gradient(circle at center, #54ffb9, #0bff6a);
  box-shadow:
    0 0 22px rgba(10, 255, 143, 0.95),
    0 0 8px rgba(10, 255, 143, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: clamp(3rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  font-weight: 800;
  text-shadow: 0 2px 20px rgba(78, 240, 255, 0.3);
}

.hero-title span {
  background: linear-gradient(120deg, #4ef0ff, #ffffff, #b84eff);
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
  animation: shimmer 3s ease-in-out infinite;
  background-size: 200% auto;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

.hero-sub {
  color: var(--text-secondary);
  max-width: 38rem;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.7;
  margin-bottom: 2.4rem;
  font-weight: 400;
  opacity: 0.95;
}

.hero-sub strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.btn-primary,
.btn-ghost {
  padding: 1rem 2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.25s ease,
    background 0.25s ease;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(78, 240, 255, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary {
  border-color: rgba(78, 240, 255, 0.9);
  background: radial-gradient(circle at top, rgba(78, 240, 255, 0.2), rgba(5, 5, 12, 0.98));
  box-shadow:
    0 0 28px rgba(78, 240, 255, 0.5),
    0 0 8px rgba(78, 240, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  border-color: rgba(184, 78, 255, 0.9);
  box-shadow:
    0 0 45px rgba(184, 78, 255, 0.65),
    0 0 80px rgba(78, 240, 255, 0.3),
    0 6px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-4px) scale(1.02);
}

.btn-ghost {
  border-color: var(--border-light);
  color: var(--muted);
  background: rgba(5, 5, 12, 0.95);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
  background: rgba(12, 12, 22, 0.98);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-meta-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--muted-dark);
  font-weight: 600;
}

.hero-meta-value {
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.01em;
  font-size: 0.9rem;
  font-weight: 600;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, #202745, #050713, #020208);
  padding: 1.3rem 1.3rem 1.1rem;
  border: 1px solid rgba(78, 240, 255, 0.2);
  box-shadow:
    var(--shadow-soft),
    0 0 60px rgba(78, 240, 255, 0.15);
  overflow: hidden;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 220deg,
    rgba(78, 240, 255, 0.35),
    transparent,
    rgba(184, 78, 255, 0.38),
    transparent
  );
  filter: blur(50px);
  opacity: 0.7;
  z-index: -1;
  animation: rotateGlow 20s linear infinite;
}

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

.hero-showcase-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10, 10, 20, 0.9), rgba(20, 20, 40, 0.8));
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(78, 240, 255, 0.15);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  max-height: 480px;
  display: block;
  object-fit: cover;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  background: linear-gradient(135deg, rgba(78, 240, 255, 0.05), rgba(184, 78, 255, 0.05));
}

.hero-slide-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem 1.25rem 1.1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.97) 0%,
    rgba(0, 0, 0, 0.85) 40%,
    rgba(0, 0, 0, 0.4) 75%,
    transparent 100%
  );
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.6s ease;
  will-change: opacity, transform;
  border-top: 1px solid rgba(78, 240, 255, 0.1);
}

.hero-slide.active .hero-slide-overlay {
  opacity: 1;
  transform: translateY(0);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  transition-delay: 0.3s;
}

.hero-slide-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-slide-meta {
  margin-top: 0.4rem;
  color: var(--muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
}

.hero-chip-row {
  display: flex;
  justify-content: space-between;
  margin-top: 1.1rem;
  gap: 0.9rem;
  font-size: 0.78rem;
}

.hero-chip {
  flex: 1;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 6, 18, 0.98);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  color: var(--muted);
  transition: all var(--transition-fast);
  box-shadow: 0 0 0 1px rgba(78, 240, 255, 0.05);
}

.hero-chip:hover {
  border-color: rgba(78, 240, 255, 0.4);
  box-shadow: 0 0 20px rgba(78, 240, 255, 0.2);
  transform: translateY(-2px);
}

.hero-chip strong {
  color: var(--text);
  font-size: 0.8rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
}

section {
  padding: clamp(4rem, 12vw, 6.5rem) 0;
  position: relative;
  animation: sectionFadeIn 0.8s ease-out;
}

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

section:nth-of-type(even) {
  background: radial-gradient(circle at top, rgba(12, 14, 32, 0.6), rgba(5, 5, 12, 0.98));
}

section:nth-of-type(even)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(78, 240, 255, 0.3), transparent);
  box-shadow: 0 0 20px rgba(78, 240, 255, 0.2);
}

.section-header {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.section-title {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 700;
  flex-shrink: 0;
  background: linear-gradient(120deg, #ffffff, #e8f0ff, #d0e8ff);
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(78, 240, 255, 0.6);
}

.section-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 26rem;
  line-height: 1.65;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
}

.about-text {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}

.about-text p {
  margin-bottom: 1.2rem;
}

.about-text strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-cta {
  margin-top: 1.5rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.pill {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(5, 5, 14, 0.96);
  font-weight: 500;
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-card {
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  background: linear-gradient(135deg, rgba(5, 5, 15, 0.98), rgba(8, 10, 20, 0.96));
  border: 1px solid rgba(78, 240, 255, 0.15);
  box-shadow:
    var(--shadow-sm),
    0 0 20px rgba(78, 240, 255, 0.05);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card:hover {
  border-color: rgba(78, 240, 255, 0.3);
  box-shadow:
    var(--shadow-sm),
    0 0 30px rgba(78, 240, 255, 0.15);
  transform: translateY(-4px);
}

.about-card-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  color: var(--muted-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.about-card-value {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-weight: 700;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.process-step {
  border-radius: var(--radius-lg);
  background: rgba(5, 5, 15, 0.98);
  border: 1px solid var(--border);
  padding: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.process-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(78, 240, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
  color: var(--accent);
}

.process-step h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.portfolio-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 5, 14, 0.98);
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  transition:
    border 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.filter-chip.active {
  border-color: rgba(78, 240, 255, 0.9);
  color: var(--text);
  background: rgba(6, 12, 20, 0.98);
  box-shadow: 0 0 16px rgba(78, 240, 255, 0.5);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-auto-rows: minmax(200px, auto);
  align-items: start;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(78, 240, 255, 0.05);
  cursor: pointer;
  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
  will-change: transform;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-14px) scale(1.04);
  box-shadow:
    0 45px 100px rgba(0, 0, 0, 0.95),
    0 0 0 2px rgba(78, 240, 255, 0.8),
    0 0 60px rgba(78, 240, 255, 0.6),
    0 0 100px rgba(184, 78, 255, 0.5),
    0 0 140px rgba(138, 255, 219, 0.3);
  border-color: rgba(78, 240, 255, 1);
  outline: none;
}

.project-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block;
  background: var(--card);
  line-height: 0;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Ensure images don't flash white while loading and maintain aspect ratio */
.project-image,
img {
  background-color: var(--card);
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  transition: opacity 0.3s ease;
}

img:not([src]),
img[src=''],
img[src='#'] {
  opacity: 0;
  visibility: hidden;
}

/* Add glow effect via media wrapper for reliability */
.project-media {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --glow-opacity: 0;
  position: relative;
}

.project-media img {
  transition: opacity 0.4s ease;
}

.project-media img:not([src]),
.project-media img[src=''],
.project-media img[src='#'] {
  opacity: 0;
  min-height: 200px;
  background: linear-gradient(135deg, rgba(78, 240, 255, 0.05), rgba(184, 78, 255, 0.05));
}

.project-media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 120px at var(--mouse-x) var(--mouse-y),
    rgba(78, 240, 255, 0.6),
    rgba(167, 139, 250, 0.4) 30%,
    transparent 60%
  );
  opacity: var(--glow-opacity);
  transition: opacity 0.2s ease;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
}

.project-card:hover .project-image {
  transform: scale(1.06);
  filter: saturate(1.2) brightness(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.2rem 1.1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.85) 25%,
    rgba(0, 0, 0, 0.6) 60%,
    transparent 100%
  );
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--transition-smooth),
    transform var(--transition-smooth),
    backdrop-filter var(--transition-smooth);
  z-index: 3;
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

/* Enhanced neon glow layer */
.project-card::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  background:
    radial-gradient(65% 65% at 50% 40%, rgba(78, 240, 255, 0.4), transparent 65%),
    radial-gradient(45% 45% at 80% 20%, rgba(184, 78, 255, 0.3), transparent 75%),
    radial-gradient(50% 50% at 20% 80%, rgba(138, 255, 219, 0.25), transparent 70%);
  filter: blur(14px);
  z-index: 0;
  animation: pulseGlow 3s ease-in-out infinite;
}

.project-card:hover::before {
  opacity: 1;
  animation: pulseGlowFast 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0;
    filter: blur(10px);
  }
  50% {
    opacity: 0.3;
    filter: blur(12px);
  }
}

@keyframes pulseGlowFast {
  0%,
  100% {
    opacity: 0.8;
    filter: blur(10px);
  }
  50% {
    opacity: 1;
    filter: blur(14px);
  }
}

/* Ambient glow for cards */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.3;
  background: radial-gradient(circle at 50% 0%, rgba(78, 240, 255, 0.03), transparent 70%);
  z-index: 1;
  transition: opacity 0.4s ease;
}

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

.project-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #ffffff;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(78, 240, 255, 0.2);
}

.project-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.project-tag {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9a9bb0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 2, 10, 0.85);
  backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  max-width: 760px;
  width: 94%;
  border-radius: 24px;
  background: linear-gradient(135deg, #050513, #080818);
  border: 1px solid rgba(78, 240, 255, 0.5);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.95),
    0 0 60px rgba(78, 240, 255, 0.25),
    0 0 120px rgba(184, 78, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: floatIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
  transform: translateZ(0);
}

.modal-image-wrapper {
  max-height: none;
  overflow: hidden;
}

.modal-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-body {
  padding: 1.1rem 1.3rem 1.3rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.modal-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.modal-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.modal-text {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(4, 4, 12, 0.98);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: scale(1.1);
}

.light-mode .modal-close {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text);
}

.light-mode .modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
}

.contact-card {
  border-radius: var(--radius-xl);
  background: rgba(5, 5, 14, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.6rem;
  box-shadow: var(--shadow-soft);
}

.contact-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  line-height: 1.7;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-list span {
  color: var(--accent);
  font-weight: 600;
}

.contact-list div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-cta {
  margin-top: 1.5rem;
}

.portfolio-view-all {
  margin-top: 2rem;
  text-align: right;
}

form {
  display: grid;
  gap: 1.2rem;
  font-size: 0.9rem;
}

form > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: rgba(6, 6, 18, 0.96);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition:
    border var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  font-family: inherit;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-dark);
}

input:focus,
textarea:focus {
  border-color: rgba(78, 240, 255, 1);
  box-shadow:
    0 0 0 4px rgba(78, 240, 255, 0.2),
    0 0 20px rgba(78, 240, 255, 0.3),
    0 8px 16px rgba(78, 240, 255, 0.1);
  background: rgba(10, 12, 26, 0.98);
  transform: translateY(-2px);
}

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

.form-note {
  font-size: 0.8rem;
  color: var(--muted-dark);
  margin-top: 0.5rem;
}

.form-success,
.form-error {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
}

.form-success {
  color: #57ffb0;
  background: rgba(87, 255, 176, 0.1);
  border-left: 2px solid #57ffb0;
}

.form-error {
  color: #ff8b7a;
  background: rgba(255, 139, 122, 0.1);
  border-left: 2px solid #ff8b7a;
}

.form-success.visible,
.form-error.visible {
  display: block;
}

footer {
  padding: 2.5rem 0 3rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(78, 240, 255, 0.08);
  background: linear-gradient(to top, rgba(5, 5, 12, 0.98), transparent);
}

footer span {
  color: var(--accent);
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  right: 1.8rem;
  bottom: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(78, 240, 255, 0.4);
  background: radial-gradient(circle at top, rgba(78, 240, 255, 0.3), rgba(3, 3, 12, 0.98));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 0 25px rgba(78, 240, 255, 0.7),
    0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.back-to-top:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow:
    0 0 40px rgba(78, 240, 255, 0.95),
    0 0 80px rgba(184, 78, 255, 0.4),
    0 8px 30px rgba(0, 0, 0, 0.6);
  border-color: rgba(184, 78, 255, 0.7);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top.hidden-start {
  transform: translateY(20px) scale(0.9);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 5, 12, 0.98);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle div {
  width: 16px;
  height: 1px;
  background: #f5f5f5;
  position: relative;
  transition: transform 0.18s ease;
}

.nav-toggle div::before,
.nav-toggle div::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1px;
  background: #f5f5f5;
  left: 0;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.nav-toggle div::before {
  top: -5px;
}

.nav-toggle div::after {
  top: 5px;
}

.nav-toggle.open div {
  transform: rotate(45deg);
}

.nav-toggle.open div::before {
  transform: rotate(-90deg) translateX(-5px);
}

.nav-toggle.open div::after {
  opacity: 0;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

body:not(.js-loaded) .reveal {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

@keyframes floatIn {
  from {
    transform: translateY(18px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 880px) {
  .hero-grid,
  .about-grid,
  .portfolio-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 3rem;
    min-height: auto;
  }

  .hero-visual {
    order: -1;
    margin-bottom: 1rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    inset: 60px clamp(1rem, 5vw, 1.5rem) auto clamp(1rem, 5vw, 1.5rem);
    border-radius: 14px;
    padding: 1.2rem;
    background: rgba(5, 5, 14, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transform: translateY(-18px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity var(--transition),
      transform var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

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

  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .contact-grid {
    gap: 2rem;
  }

  form {
    gap: 1rem;
  }
}

@media (max-width: 540px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-meta {
    gap: 1.2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-sub {
    max-width: none;
  }

  .process-grid {
    gap: 0.8rem;
  }

  .process-step {
    padding: 1rem;
  }

  .about-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .pill-row {
    gap: 0.5rem;
  }

  .pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Hide custom cursor for touch devices and improve small-screen spacing */
@media (pointer: coarse) {
  /* .cursor-dot,
  .cursor-ring {
    display: none;
  } */
}

@media (max-width: 480px) {
  .portfolio-grid {
    gap: 1.2rem;
  }

  /* Images maintain their natural aspect ratio on all screen sizes */
}

@media (min-width: 1160px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Homepage Portfolio Grid - Show 3 cards nicely */
#portfolio-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  max-width: 100%;
  gap: 2rem;
  grid-auto-rows: minmax(200px, auto);
  align-items: start;
}

@media (min-width: 1024px) {
  #portfolio-grid-home {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 1023px) and (min-width: 641px) {
  #portfolio-grid-home {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  #portfolio-grid-home {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  #portfolio-grid-home {
    grid-template-columns: 1fr;
  }
}

#portfolio-grid-home .project-card {
  max-width: 100%;
}

/* Admin Token Input Visibility Fix */
#admin-token {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(78, 240, 255, 0.5) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(78, 240, 255, 0.1);
  z-index: 100;
  position: relative;
}
#admin-token:focus {
  background: rgba(0, 0, 0, 0.8) !important;
  border-color: #4ef0ff !important;
  box-shadow: 0 0 20px rgba(78, 240, 255, 0.3);
}

/* ============================================
   LIGHT MODE THEME (Feature 14)
   ============================================ */
body.light-mode {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --accent: #0066ff;
  --accent-soft: rgba(0, 102, 255, 0.12);
  --accent-2: #6366f1;
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  --muted-dark: #475569;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-light: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.05);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
}

.light-mode header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.04),
    0 4px 12px rgba(15, 23, 42, 0.02),
    inset 0 -1px 0 rgba(0, 102, 255, 0.05);
}

.light-mode .nav-links a {
  color: var(--text);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .nav-links a:hover,
.light-mode .nav-links a.active {
  color: var(--accent);
  background: rgba(0, 102, 255, 0.08);
  transform: translateY(-1px);
}

.light-mode .logo span {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.light-mode .cursor-ring {
  background: rgba(0, 102, 255, 0.15);
  border: 3px solid rgba(0, 102, 255, 0.8);
  mix-blend-mode: normal;
  box-shadow:
    0 0 24px rgba(0, 102, 255, 0.4),
    0 0 12px rgba(0, 102, 255, 0.3);
  width: 36px;
  height: 36px;
}

.light-mode .cursor-dot {
  background: rgba(0, 102, 255, 1);
  box-shadow:
    0 0 16px rgba(0, 102, 255, 0.9),
    0 0 8px rgba(0, 102, 255, 0.6),
    0 0 4px rgba(0, 102, 255, 0.4);
  width: 10px;
  height: 10px;
}

.light-mode .cursor-ring.is-hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.9);
  transform: translate(-50%, -50%) scale(1.8);
  box-shadow:
    0 0 28px rgba(99, 102, 241, 0.5),
    0 0 14px rgba(99, 102, 241, 0.4);
}

/* Light mode card styles */
.light-mode .project-card,
.light-mode .about-card,
.light-mode .contact-card,
.light-mode .process-step {
  background: var(--card);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.04),
    0 0 0 1px rgba(0, 102, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.light-mode .project-card:hover {
  box-shadow:
    0 32px 64px rgba(0, 102, 255, 0.15),
    0 16px 32px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(0, 102, 255, 0.5),
    0 0 40px rgba(0, 102, 255, 0.25),
    0 0 80px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  border-color: rgba(0, 102, 255, 0.4);
  transform: translateY(-12px) scale(1.03);
}

/* Light mode buttons */
.light-mode .btn-primary {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff;
  box-shadow:
    0 8px 20px rgba(0, 102, 255, 0.3),
    0 4px 12px rgba(0, 102, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: 600;
  border: 1px solid rgba(0, 102, 255, 0.2);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.light-mode .btn-primary:hover {
  background: linear-gradient(135deg, #0052cc 0%, #003d99 100%);
  box-shadow:
    0 12px 28px rgba(0, 102, 255, 0.4),
    0 6px 16px rgba(0, 102, 255, 0.3),
    0 0 40px rgba(0, 102, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-3px) scale(1.02);
}

.light-mode .btn-ghost {
  color: var(--accent);
  border: 2px solid var(--accent);
  font-weight: 600;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .btn-ghost:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.35);
}

/* Light mode form inputs */
.light-mode input,
.light-mode textarea,
.light-mode select {
  background: #ffffff;
  border: 1.5px solid rgba(15, 23, 42, 0.15);
  color: var(--text);
  font-weight: 500;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.light-mode input::placeholder,
.light-mode textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
  font-weight: 400;
}

.light-mode input:focus,
.light-mode textarea:focus,
.light-mode select:focus {
  border-color: rgba(0, 102, 255, 0.6);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(0, 102, 255, 0.1),
    0 4px 12px rgba(0, 102, 255, 0.15),
    0 0 20px rgba(0, 102, 255, 0.1);
  outline: none;
  transform: translateY(-2px);
}

/* Light mode hero particles */
.light-mode #hero-particles {
  opacity: 0.15;
  filter: brightness(0.8);
}

/* Light mode modal */
.light-mode .modal-backdrop {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(16px);
}

.light-mode .modal {
  background: var(--card);
  border: 1px solid rgba(0, 102, 255, 0.3);
  box-shadow:
    0 24px 60px rgba(0, 102, 255, 0.2),
    0 12px 30px rgba(15, 23, 42, 0.1);
}

.light-mode .modal-body {
  background: var(--card);
}

.light-mode .modal-image-wrapper {
  border-bottom: 1px solid var(--border-light);
}

/* Light mode pills and tags */
.light-mode .pill,
.light-mode .modal-tool-tag {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.08), rgba(99, 102, 241, 0.06));
  color: var(--accent);
  border: 1px solid rgba(0, 102, 255, 0.2);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 4px rgba(0, 102, 255, 0.08);
}

.light-mode .pill:hover,
.light-mode .modal-tool-tag:hover {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.15), rgba(99, 102, 241, 0.12));
  border-color: rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 255, 0.15);
}

.light-mode .tag {
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(99, 102, 241, 0.08));
  color: var(--accent);
  border: 1px solid rgba(0, 102, 255, 0.25);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.1);
}

.light-mode .tag-dot {
  background: var(--accent);
  box-shadow:
    0 0 10px rgba(0, 102, 255, 0.6),
    0 0 5px rgba(0, 102, 255, 0.4);
}

/* Light mode back to top button */
.light-mode .back-to-top {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: var(--accent);
  border: 2px solid rgba(0, 102, 255, 0.3);
  box-shadow:
    0 8px 20px rgba(0, 102, 255, 0.15),
    0 4px 12px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  font-weight: 700;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.light-mode .back-to-top:hover {
  background: linear-gradient(135deg, var(--accent), #0052cc);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow:
    0 12px 32px rgba(0, 102, 255, 0.35),
    0 6px 16px rgba(0, 102, 255, 0.25),
    0 0 40px rgba(0, 102, 255, 0.2);
  transform: translateY(-6px) scale(1.08);
}

/* Light mode nav toggle */
.light-mode .nav-toggle div,
.light-mode .nav-toggle div::before,
.light-mode .nav-toggle div::after {
  background: var(--text);
}

/* Light mode project overlay */
.light-mode .project-overlay {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.92) 30%,
    rgba(255, 255, 255, 0.7) 60%,
    transparent 100%
  );
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

.light-mode .project-title {
  color: var(--text);
  font-weight: 700;
  text-shadow:
    0 2px 8px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(255, 255, 255, 0.8);
}

.light-mode .project-meta {
  color: var(--text-secondary);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

/* Light mode hero title accent */
.light-mode .hero-title {
  color: var(--text);
}

.light-mode .hero-title span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* Light mode section headers */
.light-mode .section-title {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.light-mode .section-sub {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

/* Light mode footer */
.light-mode footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  color: var(--muted);
  font-weight: 400;
}

/* Light mode hero chips */
.light-mode .hero-chip {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all 0.3s ease;
}

.light-mode .hero-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
}

.light-mode .hero-chip span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.light-mode .hero-chip strong {
  color: var(--text);
  font-weight: 700;
}

/* Light mode contact list */
.light-mode .contact-list div {
  color: var(--text-secondary);
  font-weight: 400;
}

.light-mode .contact-list span {
  color: var(--accent);
  font-weight: 600;
}

/* Light mode form success/error */
.light-mode .form-success {
  background: #d1fae5;
  color: #065f46;
  border: 2px solid #34d399;
  font-weight: 600;
}

.light-mode .form-error {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #f87171;
  font-weight: 600;
}

/* Light mode hero meta */
.light-mode .hero-meta-label {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.light-mode .hero-meta-value {
  color: var(--text);
  font-weight: 600;
}

.light-mode .hero-meta-block {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

/* Light mode about card labels */
.light-mode .about-card-label {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.light-mode .about-card-value {
  color: var(--text);
  font-weight: 700;
}

.light-mode .about-card {
  border-left: 3px solid var(--accent);
}

/* Light mode process steps */
.light-mode .process-number {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
  font-weight: 700;
}

.light-mode .process-step h3 {
  color: var(--text);
  font-weight: 700;
}

.light-mode .process-step p {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

/* Light mode filter chips */
.light-mode .filter-chip {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .filter-chip:hover {
  background: rgba(0, 102, 255, 0.08);
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

.light-mode .filter-chip.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.35);
  font-weight: 600;
}

/* Light mode modal detail sections */
.light-mode .modal-detail-section {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.light-mode .modal-detail-section h4 {
  color: var(--accent);
  font-weight: 600;
}

.light-mode .modal-detail-section p {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

/* Light mode modal duration */
.light-mode .modal-duration {
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
}

.light-mode .modal-duration svg {
  color: var(--accent);
}

/* Light mode skeleton loaders */
.light-mode .skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-alt) 0%,
    rgba(0, 82, 204, 0.08) 50%,
    var(--bg-alt) 100%
  );
}

/* Light mode hero slide overlay */
.light-mode .hero-slide-overlay {
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.88) 50%,
    transparent 100%
  );
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.light-mode .hero-slide-title {
  color: var(--text);
  font-weight: 700;
}

.light-mode .hero-slide-meta {
  color: var(--muted);
  font-weight: 600;
}

.light-mode .hero-slide-meta span {
  background: rgba(0, 82, 204, 0.12);
  border: 1px solid rgba(0, 82, 204, 0.25);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

/* Ensure text is readable on light backgrounds */
.light-mode h1,
.light-mode h2,
.light-mode h3,
.light-mode h4,
.light-mode h5,
.light-mode h6 {
  color: var(--text);
  font-weight: 700;
}

.light-mode p {
  color: var(--text-secondary);
  font-weight: 400;
}

.light-mode a {
  color: var(--accent);
  font-weight: 500;
}

.light-mode a:hover {
  color: var(--accent-2);
}

/* Light mode nav CTA button */
.light-mode .nav-cta {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: 2px solid var(--accent);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.light-mode .nav-cta:hover {
  background: #003d99 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.5);
}

.light-mode .logo-mark {
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow:
    0 0 20px rgba(0, 102, 255, 0.5),
    0 4px 12px rgba(0, 102, 255, 0.3);
  border: 1px solid rgba(0, 102, 255, 0.2);
}

.light-mode header.scrolled {
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.08);
  border-bottom-color: var(--border);
}

.light-mode .modal-close {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  color: var(--text);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode .modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
  transform: scale(1.1) rotate(90deg);
}

.light-mode .modal-title {
  color: var(--text);
  font-weight: 700;
}

.light-mode .modal-meta {
  color: var(--muted);
  font-weight: 600;
}

.light-mode .modal-text {
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.7;
}

.light-mode .loading-overlay {
  background: rgba(250, 251, 252, 0.98);
}

.light-mode .loading-spinner {
  border: 4px solid rgba(0, 82, 204, 0.15);
  border-top-color: var(--accent);
}

.light-mode .hero-sub,
.light-mode #typed-subtitle {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 100px;
  right: 2rem;
  z-index: 1000;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}

.theme-toggle:hover svg {
  transform: rotate(20deg);
}

@media (max-width: 768px) {
  .theme-toggle {
    top: 80px;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}

/* ============================================
   SKIP TO CONTENT (Accessibility - Feature 13)
   ============================================ */
.skip-to-content {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 1rem;
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

.light-mode .skip-to-content {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
}

.light-mode .skip-to-content:focus {
  outline: 3px solid var(--accent-2);
}

/* Enhanced Focus Indicators (Feature 13) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.project-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
  transform: translateY(-8px);
}

.nav-links a:focus-visible {
  outline-color: var(--accent);
  background: var(--accent-soft);
}

/* ============================================
   SKELETON LOADERS (Feature 15)
   ============================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--card) 0%,
    rgba(78, 240, 255, 0.05) 50%,
    var(--card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-card {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.skeleton-text {
  height: 1rem;
  border-radius: 4px;
  margin: 0.5rem 0;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.long {
  width: 90%;
}

.project-card.loading {
  pointer-events: none;
}

.portfolio-grid.loading .project-card {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Stagger animation for cards */
.portfolio-grid.loading .project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.portfolio-grid.loading .project-card:nth-child(2) {
  animation-delay: 0.2s;
}
.portfolio-grid.loading .project-card:nth-child(3) {
  animation-delay: 0.3s;
}
.portfolio-grid.loading .project-card:nth-child(4) {
  animation-delay: 0.4s;
}
.portfolio-grid.loading .project-card:nth-child(5) {
  animation-delay: 0.5s;
}
.portfolio-grid.loading .project-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Loading spinner overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 10, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.light-mode .loading-overlay {
  background: rgba(255, 255, 255, 0.95);
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.light-mode .loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent);
}

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

/* ============================================
   ENHANCED PROJECT MODAL (Feature 5)
   ============================================ */
.modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.modal-tool-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.modal-detail-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
}

.modal-detail-section h4 {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.modal-detail-section p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.modal-gallery-item {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.modal-gallery-item:hover {
  transform: scale(1.05);
}

.modal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.modal-duration svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* WebP Support Detection (Feature 12) */
.webp-support img[data-webp] {
  content: url(attr(data-webp));
}

.no-webp img[data-webp] {
  content: url(attr(src));
}

/* Image loading states */
img {
  transition: opacity var(--transition-fast);
}

img[data-loading='true'] {
  opacity: 0.3;
  background: var(--card);
}

img[data-loaded='true'] {
  opacity: 1;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .loading-overlay,
  .loading-spinner {
    transition: none !important;
    animation: none !important;
  }
}

/* ========================================
   GSAP PRELOADER WITH PROGRESS BAR
   ======================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--bg) 0%, #0a0a14 50%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.preloader-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.preloader-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 3rem;
  animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 20px rgba(78, 240, 255, 0.5));
  }
  100% {
    filter: drop-shadow(0 0 40px rgba(184, 78, 255, 0.8));
  }
}

.progress-container {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 1rem;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 10px;
  box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-2);
  position: relative;
  transition: width 0.3s ease;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

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

.progress-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* ========================================
   GLOW ORBS (Background Elements)
   ======================================== */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-2);
  bottom: 15%;
  right: 5%;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.1);
  }
}

/* ========================================
   GLOWING HIRE ME BUTTON
   ======================================== */
.btn-hire-me {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 0 20px rgba(78, 240, 255, 0.5),
    0 0 40px rgba(184, 78, 255, 0.3),
    0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-smooth);
}

.btn-hire-me::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
}

.btn-hire-me:hover::before {
  left: 100%;
}

.btn-hire-me:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 0 35px rgba(78, 240, 255, 0.7),
    0 0 70px rgba(184, 78, 255, 0.5),
    0 12px 30px rgba(0, 0, 0, 0.4);
}

.btn-hire-me .icon {
  width: 20px;
  height: 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: -1;
}

.btn-secondary .icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(78, 240, 255, 0.3), 0 0 40px rgba(78, 240, 255, 0.15);
  color: var(--accent);
}

.btn-secondary:hover::after {
  opacity: 0.1;
}

.btn-secondary:hover .icon {
  transform: translateX(3px);
}

/* ========================================
   SPLINE 3D CONTAINER
   ======================================== */
.spline-container {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.spline-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .spline-container {
    height: 350px;
  }
}

/* ========================================
   GRADIENT TEXT
   ======================================== */
.gradient-text {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-2) 35%,
    var(--accent-3) 70%,
    var(--accent) 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 5s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  filter: drop-shadow(0 0 25px rgba(78, 240, 255, 0.6)) 
          drop-shadow(0 0 45px rgba(184, 78, 255, 0.4));
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

/* ========================================
   UPDATED HERO SECTION
   ======================================== */
.hero {
  position: relative;
  overflow: hidden;
}

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

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 1.5rem 0 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column;
  }
  
  .btn-hire-me,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   UPDATED FOOTER WITH NAV & SOCIAL ICONS
   ======================================== */
footer {
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.8) 100%);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(78, 240, 255, 0.3));
}

.footer-logo span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 250px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-nav-group h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-group a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.5rem 0;
  transition: all var(--transition-fast);
  position: relative;
}

.footer-nav-group a .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.footer-nav-group a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.footer-nav-group a:hover .icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-nav {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   HERO CHIPS WITH ICONS
   ======================================== */
.hero-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-chip .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.hero-chip span {
  font-size: 0.875rem;
  color: var(--muted);
}

.hero-chip strong {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 600;
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
  .preloader-logo {
    font-size: 2rem;
  }
  
  .progress-container {
    width: 250px;
  }
  
  .glow-orb {
    display: none;
  }
}

/* Spline Placeholder */
.spline-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  z-index: 1;
  pointer-events: none;
}

.spline-placeholder svg {
  color: var(--accent);
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

.spline-placeholder p {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

.spline-container iframe {
  position: relative;
  z-index: 2;
}

/* ========================================
   ENHANCED SHADOWS & VISUAL IMPROVEMENTS
   ======================================== */

/* Better card shadows */
.hero-chip,
.about-card,
.process-step,
.contact-card {
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Enhanced button shadows */
.btn-primary,
.btn-ghost,
.btn-hire-me,
.btn-secondary {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary:hover,
.btn-ghost:hover {
  box-shadow:
    0 12px 32px rgba(78, 240, 255, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* Smooth preloader logo animation */
.preloader-logo {
  animation: logoGlow 2s ease-in-out infinite alternate,
             logoPulse 1.5s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Enhanced progress bar glow */
.progress-bar {
  box-shadow: 
    0 0 30px rgba(78, 240, 255, 0.6),
    0 0 60px rgba(184, 78, 255, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Smooth reveal animations - FIXED: Show elements by default */
/* Main reveal styles are at line ~1554 */

/* Enhanced logo and nav shadows */
.logo-mark {
  filter: drop-shadow(0 4px 12px rgba(78, 240, 255, 0.3))
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.nav {
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

/* Better icon styling throughout */
.icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon:hover {
  filter: drop-shadow(0 4px 8px rgba(78, 240, 255, 0.4))
          drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transform: scale(1.1);
}

/* Enhanced footer shadows */
footer {
  box-shadow: 
    0 -4px 24px rgba(0, 0, 0, 0.2),
    0 -2px 8px rgba(0, 0, 0, 0.1);
}

.footer-logo img {
  filter: drop-shadow(0 0 12px rgba(78, 240, 255, 0.4))
          drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.footer-logo img:hover {
  filter: drop-shadow(0 0 20px rgba(78, 240, 255, 0.6))
          drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
  transform: scale(1.05) rotate(5deg);
}

/* Better modal shadows */
.modal {
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhanced tag styling */
.tag {
  box-shadow:
    0 4px 12px rgba(78, 240, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Smooth hover effects for project cards */
.project-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(78, 240, 255, 0.2),
    0 0 0 1px rgba(78, 240, 255, 0.3);
}

/* Enhanced section headers */
.section-header {
  position: relative;
}

.section-title {
  text-shadow:
    0 4px 12px rgba(78, 240, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Scroll container smooth appearance */
[data-scroll-container] {
  opacity: 1;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Better back to top button */
.back-to-top {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(78, 240, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(78, 240, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Theme toggle enhancements */
.theme-toggle {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.3),
    0 3px 10px rgba(78, 240, 255, 0.2);
}

/* Subtle entrance animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title,
.hero-subtitle,
.hero-actions {
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-title {
  animation-delay: 0.1s;
}

.hero-subtitle {
  animation-delay: 0.2s;
}

.hero-actions {
  animation-delay: 0.3s;
}

/* Enhanced glassmorphism */
.spline-container,
.hero-chip,
.btn-secondary {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Better input focus states */
input:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(78, 240, 255, 0.1),
    0 4px 16px rgba(78, 240, 255, 0.2);
}

/* ========================================
   LIGHT THEME ENHANCEMENTS
   ======================================== */
[data-theme="light"] .preloader {
  background: linear-gradient(135deg, #f8f9fa 0%, #e8e9ea 50%, #ffffff 100%);
}

[data-theme="light"] .glow-orb {
  opacity: 0.15;
}

[data-theme="light"] footer {
  background: linear-gradient(180deg, transparent 0%, rgba(240, 240, 245, 0.8) 100%);
  box-shadow: 
    0 -4px 24px rgba(0, 0, 0, 0.08),
    0 -2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card,
[data-theme="light"] .about-card,
[data-theme="light"] .process-step,
[data-theme="light"] .contact-card {
  background: var(--card);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .btn-hire-me {
  box-shadow: 
    0 0 20px rgba(0, 153, 204, 0.25),
    0 0 40px rgba(153, 51, 204, 0.15),
    0 4px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-hire-me:hover {
  box-shadow: 
    0 0 30px rgba(0, 153, 204, 0.4),
    0 0 60px rgba(153, 51, 204, 0.25),
    0 8px 25px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .spline-container {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border);
}

[data-theme="light"] .footer-logo img {
  filter: drop-shadow(0 0 12px rgba(0, 153, 204, 0.3))
          drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

[data-theme="light"] .hero-chip {
  background: rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .modal {
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .project-card:hover {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 153, 204, 0.15),
    0 0 0 1px rgba(0, 153, 204, 0.2);
}

/* ========================================
   FIX DUPLICATE REVEAL STYLES
   ======================================== */
/* Remove the duplicate reveal at bottom that was showing opacity: 0 */

/* ========================================
   CLEAN SIMPLE FOOTER
   ======================================== */
footer {
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.8) 100%);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(78, 240, 255, 0.3));
}

.footer-logo span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.footer-column h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
  display: block;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Light theme footer */
[data-theme="light"] footer {
  background: linear-gradient(180deg, transparent 0%, rgba(240, 240, 245, 0.8) 100%);
}

/* ========================================
   HERO SLIDER STYLES
   ======================================== */
.hero-slider {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, transparent 100%);
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.hero-slide.active .hero-slide-overlay {
  transform: translateY(0);
  transition-delay: 0.5s;
}

.hero-slide-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-slide-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .hero-slider {
    height: 350px;
  }
  
  .hero-slide-title {
    font-size: 1.25rem;
  }
  
  .hero-slide-overlay {
    padding: 1.5rem;
  }
}

/* ========================================
   FOOTER LINK ICON STYLES
   ======================================== */
.footer-column a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  padding: 0.25rem 0;
}

.footer-column a .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.footer-column a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.footer-column a:hover .icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

/* Light theme adjustments */
[data-theme="light"] .footer-column a:hover .icon {
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ========================================
   ENHANCED HERO SLIDER WITH GSAP SUPPORT
   ======================================== */
.hero-slider {
  position: relative;
  will-change: transform;
}

.hero-slide {
  will-change: opacity, transform;
}

.hero-slide img {
  will-change: transform;
  transition: transform 0.3s ease;
}

.hero-slide:hover img {
  transform: scale(1.02);
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .hero-slider {
    height: 300px;
  }
  
  .hero-chip-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .hero-chip {
    width: 100%;
    justify-content: center;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 250px;
    border-radius: var(--radius-lg);
  }
  
  .hero-slide-title {
    font-size: 1.125rem;
  }
  
  .hero-slide-overlay {
    padding: 1rem;
  }
  
  .btn-hire-me,
  .btn-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ========================================
   PORTFOLIO GRID RESPONSIVE
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   SMOOTH SCROLL & PERFORMANCE
   ======================================== */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .hero-slide {
    transition: none !important;
  }
}

/* GPU acceleration for smooth animations */
.hero-slide,
.project-card,
.reveal {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ========================================
   FOOTER MOBILE IMPROVEMENTS
   ======================================== */
@media (max-width: 640px) {
  footer {
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
  }
  
  .footer-logo img {
    width: 28px;
    height: 28px;
  }
  
  .footer-logo span {
    font-size: 1rem;
  }
  
  .footer-tagline {
    font-size: 0.8125rem;
  }
  
  .footer-column h4 {
    font-size: 0.6875rem;
  }
  
  .footer-column a {
    font-size: 0.875rem;
    padding: 0.375rem 0;
  }
  
  .footer-bottom {
    padding-top: 1.5rem;
  }
  
  .footer-bottom p {
    font-size: 0.8125rem;
  }
}

/* ========================================
   HERO SECTION MOBILE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  
  .hero-subtitle {
    font-size: 0.9375rem;
  }
  
  .tag {
    font-size: 0.75rem;
  }
}

/* ========================================
   PROJECT CARD ENHANCEMENTS
   ======================================== */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(78, 240, 255, 0.15);
}

@media (max-width: 768px) {
  .project-card:hover {
    transform: translateY(-2px);
  }
}

/* ========================================
   CONTAINER RESPONSIVE PADDING
   ======================================== */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ========================================
   HERO CHIP ROW LAYOUT
   ======================================== */
.hero-chip-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-chip-row {
    margin-top: 1rem;
  }
}

/* ========================================
   PRELOADER PROGRESS BAR FIX
   ======================================== */
.progress-bar {
  position: relative;
  overflow: hidden;
}

.progress-container {
  position: relative;
  overflow: hidden;
}

/* ========================================
   NAVIGATION MOBILE IMPROVEMENTS
   ======================================== */
@media (max-width: 768px) {
  .nav {
    padding: 0.75rem 0;
  }
  
  .logo {
    font-size: 1.125rem;
  }
  
  .logo-mark img {
    width: 28px;
    height: 28px;
  }
}

/* ========================================
   ABOUT SECTION MOBILE
   ======================================== */
@media (max-width: 968px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .about-card {
    padding: 1.25rem;
  }
  
  .pill-row {
    gap: 0.5rem;
  }
  
  .pill {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

/* ========================================
   CONTACT SECTION MOBILE
   ======================================== */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-card {
    padding: 1.5rem;
  }
}

/* ========================================
   MODAL MOBILE IMPROVEMENTS
   ======================================== */
@media (max-width: 640px) {
  .modal {
    max-width: calc(100% - 2rem);
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
  
  .modal-tools {
    gap: 0.5rem;
  }
  
  .modal-tool-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }
}

/* ========================================
   SECTION HEADER MOBILE
   ======================================== */
@media (max-width: 640px) {
  .section-header {
    text-align: center;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-sub {
    font-size: 0.875rem;
  }
}

/* ========================================
   BACK TO TOP BUTTON MOBILE
   ======================================== */
@media (max-width: 640px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }
}

/* ========================================
   THEME TOGGLE MOBILE
   ======================================== */
@media (max-width: 640px) {
  .theme-toggle {
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
  
  .theme-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   ENHANCED HERO SLIDER WITH ASPECT RATIO MATCHING
   ======================================== */
.hero-slider {
  position: relative;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-slide {
  will-change: opacity, transform, border-radius;
  transform-origin: center center;
}

.hero-slide img {
  will-change: transform;
  object-fit: cover;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Better overlay transitions */
.hero-slide-overlay {
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* ========================================
   IMPROVED FOOTER DESIGN
   ======================================== */
footer {
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 15, 0.9) 100%);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
  margin-top: 8rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 4rem;
  margin-bottom: 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(78, 240, 255, 0.4));
  transition: all var(--transition-fast);
}

.footer-logo:hover img {
  filter: drop-shadow(0 0 20px rgba(78, 240, 255, 0.6));
  transform: scale(1.05);
}

.footer-logo span {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 320px;
  opacity: 0.9;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.footer-nav-group h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 700;
  opacity: 0.8;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav-group a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.5rem 0;
  transition: all var(--transition-fast);
  position: relative;
  line-height: 1.5;
}

.footer-nav-group a .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.footer-nav-group a:hover {
  color: var(--accent);
  padding-left: 0.75rem;
  transform: translateX(2px);
}

.footer-nav-group a:hover .icon {
  color: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent));
  transform: scale(1.1);
}

.footer-bottom {
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-bottom p {
  color: var(--muted);
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ========================================
   PORTFOLIO GRID IMPROVEMENTS
   ======================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Ensure at least 3 cards show properly */
.portfolio-grid .project-card {
  min-height: 400px;
}

@media (max-width: 480px) {
  .portfolio-grid .project-card {
    min-height: 350px;
  }
}

/* ========================================
   MOBILE FOOTER OPTIMIZATIONS
   ======================================== */
@media (max-width: 968px) {
  footer {
    padding: 4rem 0 2rem;
    margin-top: 6rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-tagline {
    max-width: 100%;
  }
  
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  footer {
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
  }
  
  .footer-content {
    gap: 2.5rem;
  }
  
  .footer-logo span {
    font-size: 1.125rem;
  }
  
  .footer-logo img {
    width: 32px;
    height: 32px;
  }
  
  .footer-tagline {
    font-size: 0.875rem;
  }
  
  .footer-nav-group a {
    font-size: 0.875rem;
    padding: 0.375rem 0;
  }
  
  .footer-nav-group h4 {
    font-size: 0.6875rem;
    margin-bottom: 1rem;
  }
  
  .footer-bottom {
    padding-top: 2rem;
  }
  
  .footer-bottom p {
    font-size: 0.8125rem;
  }
}

/* ========================================
   HERO SLIDER MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-slider {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 380px;
    border-radius: var(--radius-lg);
  }
  
  .hero-slide-title {
    font-size: 1.125rem;
  }
  
  .hero-slide-overlay {
    padding: 1.25rem;
  }
  
  .hero-slide-meta {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 320px;
  }
  
  .hero-slide-title {
    font-size: 1rem;
  }
  
  .hero-slide-overlay {
    padding: 1rem;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide img,
  .hero-slide-overlay,
  .footer-nav-group a,
  .footer-logo img {
    transition: none !important;
    animation: none !important;
  }
}

/* Focus states for keyboard navigation */
.footer-nav-group a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 8px;
}

/* ========================================
   LIGHT THEME FOOTER ADJUSTMENTS
   ======================================== */
[data-theme="light"] footer {
  background: linear-gradient(180deg, transparent 0%, rgba(245, 245, 250, 0.9) 100%);
}

[data-theme="light"] footer::before {
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
}

[data-theme="light"] .footer-nav-group a:hover .icon {
  filter: drop-shadow(0 0 8px var(--accent-2));
}

[data-theme="light"] .footer-logo img {
  filter: drop-shadow(0 0 10px rgba(184, 78, 255, 0.3));
}

/* ========================================
   ENHANCED HERO SLIDER - MODERN OVERLAY WITH GLOWS
   ======================================== */
.hero-slider {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(78, 240, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-slide {
  position: relative;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0) 0%,
    rgba(10, 10, 20, 0.3) 50%,
    rgba(10, 10, 20, 0.95) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 100%,
    rgba(78, 240, 255, 0.15) 0%,
    transparent 60%
  );
  z-index: 2;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-slide.active::after {
  opacity: 1;
}

.hero-slide-overlay {
  position: relative;
  z-index: 3;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 20, 0.8) 30%,
    rgba(10, 10, 20, 0.95) 100%
  );
  backdrop-filter: blur(12px) saturate(180%);
  border-top: 1px solid rgba(78, 240, 255, 0.2);
  padding: 2.5rem;
  box-shadow: 
    0 -20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-slide-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(78, 240, 255, 0.3);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-slide-meta {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.hero-slide-meta span {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  background: rgba(78, 240, 255, 0.1);
  border: 1px solid rgba(78, 240, 255, 0.2);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.hero-slide-meta span:hover {
  background: rgba(78, 240, 255, 0.2);
  border-color: rgba(78, 240, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(78, 240, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Animated border glow effect */
.hero-slider::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.4),
    rgba(184, 78, 255, 0.4),
    rgba(78, 240, 255, 0.4)
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  z-index: 10;
  pointer-events: none;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% {
    opacity: 0.4;
    filter: blur(1px);
  }
  50% {
    opacity: 0.8;
    filter: blur(2px);
  }
}

/* Corner accent decorations */
.hero-slider::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 40px;
  height: 40px;
  border-left: 2px solid rgba(78, 240, 255, 0.5);
  border-top: 2px solid rgba(78, 240, 255, 0.5);
  border-radius: 4px 0 0 0;
  z-index: 10;
  pointer-events: none;
  animation: cornerPulse 2s ease-in-out infinite;
}

@keyframes cornerPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(-2px, -2px);
  }
}

/* Image quality enhancements */
.hero-slide img {
  object-fit: cover;
  object-position: center;
  filter: contrast(1.05) saturate(1.1);
  transition: all 0.5s ease;
}

.hero-slide.active img {
  filter: contrast(1.1) saturate(1.15) brightness(1.05);
}

/* Shimmer effect on slide change */
.hero-slide-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(78, 240, 255, 0.2),
    transparent
  );
  animation: slideShimmer 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes slideShimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero-slider::after {
    width: 30px;
    height: 30px;
    top: 1rem;
    left: 1rem;
  }
  
  .hero-slide-overlay {
    padding: 1.75rem;
  }
  
  .hero-slide-title {
    font-size: 1.375rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  }
  
  .hero-slide-meta {
    gap: 0.75rem;
  }
  
  .hero-slide-meta span {
    font-size: 0.8125rem;
    padding: 0.25rem 0.625rem;
  }
}

@media (max-width: 480px) {
  .hero-slide-overlay {
    padding: 1.25rem;
  }
  
  .hero-slide-title {
    font-size: 1.125rem;
  }
  
  .hero-slide-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-slider::before,
  .hero-slider::after,
  .hero-slide-overlay::before {
    animation: none;
  }
  
  .hero-slide::after {
    transition: none;
  }
}

/* ========================================
   FIXED HERO SLIDER - SEAMLESS BORDERS & VISIBLE SLIDES
   ======================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(10, 10, 20, 0.5);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(78, 240, 255, 0.15);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.08) saturate(1.12);
}

/* Seamless border overlay - no gaps */
.hero-slider::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.5) 0%,
    rgba(184, 78, 255, 0.5) 50%,
    rgba(78, 240, 255, 0.5) 100%
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 100;
  pointer-events: none;
  animation: borderFlow 4s linear infinite;
}

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

/* Dark gradient overlay on image */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0) 0%,
    rgba(10, 10, 20, 0.4) 50%,
    rgba(10, 10, 20, 0.95) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Cyan glow from bottom */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(78, 240, 255, 0.2) 0%,
    transparent 60%
  );
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero-slide.active::after {
  opacity: 1;
}

/* Modern overlay with perfect positioning */
.hero-slide-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 2.5rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 20, 0.85) 30%,
    rgba(10, 10, 20, 0.98) 100%
  );
  backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid rgba(78, 240, 255, 0.25);
}

.hero-slide-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.875rem;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(78, 240, 255, 0.4);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero-slide-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.hero-slide-meta span {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.15),
    rgba(184, 78, 255, 0.15)
  );
  border: 1px solid rgba(78, 240, 255, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide-meta span:hover {
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.25),
    rgba(184, 78, 255, 0.25)
  );
  border-color: rgba(78, 240, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 20px rgba(78, 240, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Corner accent - top left */
.hero-slider::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 48px;
  height: 48px;
  border-left: 2px solid rgba(78, 240, 255, 0.6);
  border-top: 2px solid rgba(78, 240, 255, 0.6);
  border-radius: 6px 0 0 0;
  z-index: 50;
  pointer-events: none;
  animation: cornerGlow 3s ease-in-out infinite;
}

@keyframes cornerGlow {
  0%, 100% {
    opacity: 0.6;
    box-shadow: 
      -2px -2px 8px rgba(78, 240, 255, 0.3);
  }
  50% {
    opacity: 1;
    box-shadow: 
      -3px -3px 16px rgba(78, 240, 255, 0.6);
  }
}

/* Mobile responsive */
@media (max-width: 1024px) {
  .hero-slider {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 400px;
  }
  
  .hero-slider::after {
    width: 36px;
    height: 36px;
    top: 1rem;
    left: 1rem;
  }
  
  .hero-slide-overlay {
    padding: 2rem;
  }
  
  .hero-slide-title {
    font-size: 1.5rem;
  }
  
  .hero-slide-meta span {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 340px;
  }
  
  .hero-slide-overlay {
    padding: 1.5rem;
  }
  
  .hero-slide-title {
    font-size: 1.25rem;
  }
  
  .hero-slide-meta {
    gap: 0.625rem;
    flex-wrap: wrap;
  }
  
  .hero-slide-meta span {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.625rem;
  }
}

/* Smooth transitions for GSAP */
.hero-slide {
  will-change: opacity, transform;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide img {
  will-change: filter;
  transition: filter 0.5s ease;
}

.hero-slide.active img {
  filter: contrast(1.12) saturate(1.18) brightness(1.05);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .hero-slider::before,
  .hero-slider::after {
    animation: none;
  }
  
  .hero-slide,
  .hero-slide::after,
  .hero-slide img {
    transition: none;
  }
}

/* ========================================
   ENHANCED HERO SLIDER V2 - SMALLER OVERLAY, MORE IMAGE FOCUS
   ======================================== */

/* Override: Smaller, more transparent gradient overlay */
.hero-slide::before {
  background: linear-gradient(
    180deg,
    rgba(10, 10, 20, 0) 0%,
    rgba(10, 10, 20, 0) 40%,
    rgba(10, 10, 20, 0.6) 100%
  ) !important;
}

/* Override: Enhanced image with modern effects */
.hero-slide img {
  filter: contrast(1.1) saturate(1.15) brightness(1.05) !important;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
  animation: imageZoom 20s ease-in-out infinite !important;
}

@keyframes imageZoom {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.hero-slide.active img {
  filter: contrast(1.15) saturate(1.25) brightness(1.08) !important;
}

/* Override: Smaller overlay container - COMPACT */
.hero-slide-overlay {
  padding: 1.5rem 2rem !important;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(10, 10, 20, 0.5) 20%,
    rgba(10, 10, 20, 0.75) 100%
  ) !important;
  backdrop-filter: blur(12px) saturate(150%) !important;
  border-top: 1px solid rgba(78, 240, 255, 0.2) !important;
  animation: slideUpFade 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Override: Compact title with glow effect */
.hero-slide-title {
  font-size: 1.5rem !important;
  margin-bottom: 0.65rem !important;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(78, 240, 255, 0.5),
    0 0 40px rgba(184, 78, 255, 0.3) !important;
  animation: titleGlow 3s ease-in-out infinite !important;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.7),
      0 0 20px rgba(78, 240, 255, 0.5),
      0 0 40px rgba(184, 78, 255, 0.3);
  }
  50% {
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.7),
      0 0 30px rgba(78, 240, 255, 0.7),
      0 0 60px rgba(184, 78, 255, 0.5);
  }
}

/* Override: Meta badges with hover animations */
.hero-slide-meta span {
  font-size: 0.8125rem !important;
  padding: 0.375rem 0.875rem !important;
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.12),
    rgba(184, 78, 255, 0.12)
  ) !important;
  border: 1px solid rgba(78, 240, 255, 0.25) !important;
  animation: badgePulse 2s ease-in-out infinite !important;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 
      0 2px 12px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 20px rgba(78, 240, 255, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.hero-slide-meta span:hover {
  transform: translateY(-2px) scale(1.05) !important;
  background: linear-gradient(
    135deg,
    rgba(78, 240, 255, 0.22),
    rgba(184, 78, 255, 0.22)
  ) !important;
  border-color: rgba(78, 240, 255, 0.5) !important;
  box-shadow: 
    0 6px 24px rgba(78, 240, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Enhanced border with particle effect */
.hero-slider::before {
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    var(--accent-2) 25%,
    var(--accent) 50%,
    var(--accent-2) 75%,
    var(--accent) 100%
  ) !important;
  background-size: 400% 100% !important;
  box-shadow: 
    0 0 20px rgba(78, 240, 255, 0.6),
    0 0 40px rgba(184, 78, 255, 0.4),
    inset 0 0 30px rgba(78, 240, 255, 0.2) !important;
  animation: borderFlow 4s linear infinite, borderPulse 2s ease-in-out infinite !important;
}

@keyframes borderPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Animated corner accents - MORE DYNAMIC */
.hero-slider::after {
  animation: cornerGlow 3s ease-in-out infinite, cornerRotate 10s linear infinite !important;
}

@keyframes cornerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Add shimmer overlay on active slide */
.hero-slide.active::before {
  animation: shimmerSweep 3s ease-in-out infinite !important;
}

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

/* Responsive: Even smaller on mobile */
@media (max-width: 768px) {
  .hero-slide-overlay {
    padding: 1rem 1.25rem !important;
  }
  
  .hero-slide-title {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .hero-slide-meta span {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.65rem !important;
  }
  
  .hero-slide::before {
    background: linear-gradient(
      180deg,
      rgba(10, 10, 20, 0) 0%,
      rgba(10, 10, 20, 0) 50%,
      rgba(10, 10, 20, 0.7) 100%
    ) !important;
  }
}

@media (max-width: 480px) {
  .hero-slide-overlay {
    padding: 0.95rem 1.1rem !important;
    backdrop-filter: blur(10px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.2) !important;
  }
  
  .hero-slide-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
  }
  
  .hero-slide-meta {
    gap: 0.6rem !important;
    font-size: 0.75rem !important;
  }
  
  /* Optimize particles for mobile */
  #hero-particles {
    opacity: 0.6 !important;
  }
  
  #mesh-background {
    opacity: 0.25 !important;
  }
}

/* ========================================
   SEAMLESS PAGE TRANSITIONS & ANIMATIONS
   ======================================== */

/* Smooth page load fade-in */
body {
  animation: pageLoad 0.6s ease-out;
}

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

/* Mobile-optimized transitions */
@media (max-width: 768px) {
  .project-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
  
  .btn-hire-me:hover,
  .btn-secondary:hover {
    transform: translateY(-2px) scale(1.01);
  }
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  * {
    scroll-behavior: smooth;
  }
}
