:root {
  --bg: #F5F5EB;
  --text: #0F172A;
  --accent: #1560BD;
  --accent-dark: #0E407D;
  --accent-hover: #0E407D;
  --accent-ghost: #EEF4FF;
  --card: #FFFFFF;
  --card-bg: #FFFFFF;
  --shadow: rgba(15, 23, 42, 0.07);
  --shadow-md: rgba(15, 23, 42, 0.12);
  --glow-color: rgba(21, 96, 189, 0.25);
  --radius: 10px;
  --radius-sm: 6px;
  --border: #E2E8F0;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --text-light: #64748B;
  --text-muted: #94A3B8;
  --nav-bg: rgba(245, 245, 235, 0.92);
  /* Font size variables */
  --font-size-base: 16px;
  --font-size-multiplier: 1;
  /* Light Theme Hero Colors */
  --hero-text: #FFFFFF;
  --hero-bg-start: #0F3575;
  --hero-bg-end: #1560BD;
  --hero-btn-bg: #FFFFFF;
  --hero-btn-text: #1560BD;
  --hero-outline-border: rgba(255, 255, 255, 0.6);
  --hero-outline-text: #FFFFFF;
  /* Snow color for themes */
  --snow-color: rgba(21, 96, 189, 0.3);
}

/* Ocean Theme */
body.ocean {
  --bg: #F0FDFA;
  --text: #0D3B38;
  --accent: #0D9488;
  --accent-dark: #0F766E;
  --accent-ghost: #CCFBF1;
  --card: #FFFFFF;
  --shadow: rgba(13, 59, 56, 0.08);
  --shadow-md: rgba(13, 59, 56, 0.14);
  --glow-color: rgba(13, 148, 136, 0.25);
  --border: #99F6E4;
  --text-light: #0F766E;
  --text-muted: #5EEAD4;
  --card-bg: #FFFFFF;
  --nav-bg: rgba(240, 253, 250, 0.92);
  --hero-text: #ffffff;
  --hero-bg-start: #042F2E;
  --hero-bg-end: #0D9488;
  --hero-btn-bg: #CCFBF1;
  --hero-btn-text: #0D3B38;
  --hero-outline-border: rgba(255,255,255,0.55);
  --hero-outline-text: #FFFFFF;
  --snow-color: rgba(173, 216, 230, 0.8);
}

/* Forest Theme */
body.forest {
  --bg: #F7FEF0;
  --text: #14532D;
  --accent: #16A34A;
  --accent-dark: #15803D;
  --accent-ghost: #DCFCE7;
  --card: #FFFFFF;
  --shadow: rgba(20, 83, 45, 0.08);
  --shadow-md: rgba(20, 83, 45, 0.14);
  --glow-color: rgba(22, 163, 74, 0.25);
  --border: #BBF7D0;
  --text-light: #15803D;
  --text-muted: #86EFAC;
  --card-bg: #FFFFFF;
  --nav-bg: rgba(247, 254, 240, 0.92);
  --hero-text: #ffffff;
  --hero-bg-start: #052E16;
  --hero-bg-end: #166534;
  --hero-btn-bg: #DCFCE7;
  --hero-btn-text: #14532D;
  --hero-outline-border: rgba(255,255,255,0.55);
  --hero-outline-text: #FFFFFF;
  --snow-color: rgba(144, 238, 144, 0.7);
}

/* Sunset Theme */
body.sunset {
  --bg: #FFFBF5;
  --text: #7C2D12;
  --accent: #EA580C;
  --accent-dark: #C2410C;
  --accent-ghost: #FEF3C7;
  --card: #FFFFFF;
  --shadow: rgba(124, 45, 18, 0.08);
  --shadow-md: rgba(124, 45, 18, 0.14);
  --glow-color: rgba(234, 88, 12, 0.25);
  --border: #FED7AA;
  --text-light: #C2410C;
  --text-muted: #FDBA74;
  --card-bg: #FFFFFF;
  --nav-bg: rgba(255, 251, 245, 0.92);
  --hero-text: #ffffff;
  --hero-bg-start: #431407;
  --hero-bg-end: #9A3412;
  --hero-btn-bg: #FEF3C7;
  --hero-btn-text: #7C2D12;
  --hero-outline-border: rgba(255,255,255,0.55);
  --hero-outline-text: #FFFFFF;
  --snow-color: rgba(255, 218, 185, 0.8);
}

/* Galaxy Theme */
body.galaxy {
  --bg: #0A001F;
  --text: #E9D5FF;
  --accent: #A855F7;
  --accent-dark: #9333EA;
  --accent-ghost: rgba(168, 85, 247, 0.12);
  --card: #180038;
  --card-bg: #180038;
  --shadow: rgba(168, 85, 247, 0.2);
  --shadow-md: rgba(168, 85, 247, 0.35);
  --glow-color: rgba(168, 85, 247, 0.4);
  --border: rgba(168, 85, 247, 0.25);
  --text-light: #C084FC;
  --text-muted: #7C3AED;
  --nav-bg: rgba(24, 0, 56, 0.95);
  --hero-text: #ffffff;
  --hero-bg-start: #1E0047;
  --hero-bg-end: #5B21B6;
  --hero-btn-bg: #E9D5FF;
  --hero-btn-text: #1E0047;
  --hero-outline-border: rgba(255,255,255,0.5);
  --hero-outline-text: #FFFFFF;
  --snow-color: rgba(221, 160, 221, 0.9);
}

/* Dark Theme */
body.dark {
  --bg: #0B1120;
  --text: #F1F5F9;
  --accent: #3B82F6;
  --accent-dark: #2563EB;
  --accent-hover: #2563EB;
  --accent-ghost: rgba(59, 130, 246, 0.12);
  --card: #142140;
  --card-bg: #142140;
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-md: rgba(0, 0, 0, 0.5);
  --glow-color: rgba(59, 130, 246, 0.35);
  --border: #1E3A6A;
  --text-light: #94A3B8;
  --text-muted: #475569;
  --nav-bg: rgba(11, 17, 32, 0.95);
  --hero-text: #ffffff;
  --hero-bg-start: #061236;
  --hero-bg-end: #1560BD;
  --hero-btn-bg: #FFFFFF;
  --hero-btn-text: #1560BD;
  --hero-outline-border: rgba(255, 255, 255, 0.5);
  --hero-outline-text: #ffffff;
  --snow-color: rgba(255, 255, 255, 0.7);
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  overflow-x: hidden;
  font-size: calc(var(--font-size-base) * var(--font-size-multiplier));
  letter-spacing: -0.01em;
}

/* Page Transition Overlay */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-bg-start);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.transition-loader {
  text-align: center;
  color: white;
}

.loader-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  animation: loaderSpin 2s linear infinite;
}

.loader-logo svg {
  width: 100%;
  height: 100%;
  animation: logoPulse 1.5s ease-in-out infinite;
}

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

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

.loader-text {
  font-size: 1.2rem;
  font-weight: 600;
  animation: textFade 1.5s ease-in-out infinite;
}

@keyframes textFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Custom Cursor - Desktop Only */
.cursor {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-follower {
  width: 32px;
  height: 32px;
  background: rgba(0, 123, 255, 0.08);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 9998;
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none;
  }
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  padding: 12px 0;
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid var(--border);
}

.nav.shrunk {
  padding: 10px 0;
  background: var(--nav-bg);
  box-shadow: 0 4px 20px var(--shadow);
}

.nav.shrunk .logo-svg {
  width: 32px;
  height: 32px;
}

body.dark .nav,
body.galaxy .nav {
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap;
}

.logo {
  flex-shrink: 0;
  margin-right: auto;
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-toggle {
  flex-shrink: 0;
  display: none;
  margin-left: 10px;
}

@media (max-width: 1200px) {
  .nav-container {
    padding: 0 20px;
  }
  
  .nav-links {
    gap: 20px;
  }
  
  .nav-controls {
    gap: 10px;
  }
}

@media (max-width: 992px) {
  .nav-container {
    padding: 0 15px;
  }
  
  .logo {
    margin-right: 0;
    order: 1;
  }
  
  .nav-links {
    justify-content: flex-start;
  }
  
  .nav-controls {
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
  }
  
  .menu-toggle {
    order: 3;
    display: flex;
    margin-left: 0;
  }
}

/* Animated Logo */
.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  display: flex;
  align-items: center;
}

.logo-svg {
  width: 36px;
  height: 36px;
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(5deg); }
  75% { transform: translateY(3px) rotate(-5deg); }
}

.logo-circle {
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: drawCircle 2s ease-in-out infinite;
}

@keyframes drawCircle {
  0% { stroke-dashoffset: 283; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -283; }
}

.logo-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawPath 3s ease-in-out infinite;
}

@keyframes drawPath {
  0% { stroke-dashoffset: 100; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -100; }
}

.logo-text {
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { fill: var(--accent); }
  to { fill: var(--text); }
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .nav-controls {
    gap: 8px;
  }
  
  .font-size-controls,
  .language-switcher,
  .theme-controls {
    margin: 0;
  }
}

/* Font Size Adjuster */
.font-size-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg);
  padding: 6px 10px;
  border-radius: 25px;
  box-shadow: 0 2px 10px var(--shadow);
}

.font-btn {
  width: 35px;
  height: 35px;
  border: none;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 14px;
}

.font-btn:hover {
  transform: scale(1.1);
  background: var(--text);
}

.font-size-label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

/* Language Switcher */
.language-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  min-width: 120px;
  z-index: 1001;
}

.language-switcher:hover .lang-menu,
.lang-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--accent-ghost);
  color: var(--accent);
}

.lang-option.active {
  background: var(--accent);
  color: white;
}

/* Theme Controls */
.theme-controls {
  display: flex;
  align-items: center;
}

.theme-dropdown {
  position: relative;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.theme-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  min-width: 150px;
  z-index: 1001;
}

.theme-dropdown:hover .theme-menu,
.theme-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  text-align: left;
  transition: var(--transition);
}

.theme-option:hover {
  background: var(--accent-ghost);
  color: var(--accent);
}

.theme-option.active {
  background: var(--accent);
  color: white;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 35px;
  height: 25px;
  cursor: pointer;
}

.menu-toggle span {
  height: 4px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

/* HERO - 3D ANIMATED BACKGROUND */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  perspective: 1000px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
  z-index: -2;
  transition: background 0.5s ease;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-3d-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transform-style: preserve-3d;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  animation: float3d 20s infinite ease-in-out;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.shape-2 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5), transparent 70%);
  top: 70%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 30s;
}

.shape-3 {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.5), transparent 70%);
  top: 30%;
  left: 60%;
  animation-delay: 4s;
  animation-duration: 20s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.5), transparent 70%);
  top: 80%;
  left: 20%;
  animation-delay: 6s;
  animation-duration: 35s;
}

.shape-5 {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.5), transparent 70%);
  top: 50%;
  left: 50%;
  animation-delay: 8s;
  animation-duration: 28s;
}

.shape-6 {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.5), transparent 70%);
  top: 20%;
  left: 30%;
  animation-delay: 10s;
  animation-duration: 22s;
}

@keyframes float3d {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) scale(1);
  }
  25% {
    transform: translate3d(100px, -50px, 100px) rotateX(180deg) rotateY(90deg) scale(1.2);
  }
  50% {
    transform: translate3d(-50px, 100px, 200px) rotateX(360deg) rotateY(180deg) scale(0.8);
  }
  75% {
    transform: translate3d(50px, 50px, 50px) rotateX(540deg) rotateY(270deg) scale(1.1);
  }
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  z-index: 1;
}

.hero-text {
  flex: 1;
  color: var(--hero-text) !important;
  max-width: 600px;
  transition: color 0.5s ease;
  text-shadow: none;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

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

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  margin-bottom: 18px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--hero-text) !important;
  transition: color 0.5s ease;
  text-shadow: none;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.wave {
  display: inline-block;
  animation: wave 1.5s infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

#typed {
  font-size: 1.5rem;
  margin-bottom: 30px;
  opacity: 0.85;
  color: var(--hero-text) !important;
  transition: color 0.5s ease;
  text-shadow: none;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
  opacity: 0;
}

.hero-tech-badges {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tech-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  font-weight: 500;
  color: #f9fafb;
  letter-spacing: 0.02em;
}

body.light .hero-tech-badge {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--hero-btn-bg) !important;
  color: var(--hero-btn-text) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
}

.btn-outline {
  background: transparent !important;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent) !important;
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--accent) !important;
  color: white !important;
  transform: translateY(-2px);
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.btn:hover::after {
  transform: translateX(300%) skewX(-20deg);
  opacity: 1;
}

.hero-gif {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
  opacity: 0;
}

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

.hero-gif img {
  max-width: 100%;
  width: 400px;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 8px 32px rgba(15, 23, 42, 0.6),
    0 32px 64px rgba(15, 23, 42, 0.4);
  animation: float 5s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-gif:hover img {
  transform: translateY(-8px) scale(1.02);
}

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

/* Profile */
.profile-wrap {
  margin: -50px auto 50px;
  width: 150px;
  height: 150px;
  position: relative;
  display: grid;
  place-items: center;
  z-index: 10;
}

.profile {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--card-bg);
  box-shadow: 0 10px 30px var(--shadow);
  display: block;
}

.glow-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: blur(20px);
  background: var(--glow-color);
  z-index: -1;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

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

/* Resume Section */
.resume-section {
  text-align: center;
  padding: 40px;
  background: var(--bg);
  border-radius: var(--radius);
  margin: 40px auto;
  max-width: 800px;
  box-shadow: 0 10px 30px var(--shadow);
}

.resume-section h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--text);
}

.resume-section p {
  color: var(--text-light);
  margin-bottom: 30px;
}

.resume-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.achievement {
  background: var(--card-bg);
  padding: 24px 20px;
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.achievement:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--shadow-md);
  border-color: var(--accent);
}

.achievement i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.achievement h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.achievement p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

.resume-certificates {
  margin-top: 50px;
}

.resume-certificates h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text);
  text-align: center;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.certificate-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.certificate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--shadow-md);
  border-color: var(--accent);
}

.certificate-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.certificate-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: var(--text);
}

.certificate-issuer {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.certificate-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.5;
}

.certificate-btn {
  font-size: 0.85rem;
  padding: 8px 16px;
}

.certificate-modal-content {
  max-width: 90%;
  max-height: 90vh;
}

.certificate-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 8px;
}

.certificate-preview {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg);
  margin-top: 20px;
  position: relative;
}

.certificate-preview iframe,
.certificate-preview object,
.certificate-preview embed {
  width: 100%;
  height: 600px;
  border: none;
}

.close-certificate {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.resume-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* System Design Section */
.architecture-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.architecture-diagram h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text);
}

.diagram-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.arch-layer {
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.arch-layer:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 30px var(--shadow);
}

.layer-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 15px;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-item {
  padding: 6px 12px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.expertise-card {
  background: var(--bg);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.expertise-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow);
}

.expertise-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 15px;
}

.expertise-card h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
}

.expertise-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Enhanced Skills Section */
.skills-category {
  margin-bottom: 40px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 1px 3px var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.skills-category:hover {
  box-shadow: 0 4px 20px var(--shadow-md);
  border-color: var(--accent);
}

.skills-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.skills-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.skills-header h3 {
  color: var(--accent);
  font-size: 1.8rem;
  margin: 0;
}

.skills-description {
  color: var(--text-light);
  font-size: 1rem;
  margin: 0;
  margin-left: auto;
  text-align: right;
  max-width: 300px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.skill-item {
  background: var(--bg);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--shadow);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.skill-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
}

.skill-level {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.skill-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-percent {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
  min-width: 40px;
  text-align: right;
}

.skill-details {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* Enhanced Tech Cloud */
.tech-cloud-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.tech-group {
  background: var(--bg);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tech-group h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tech-badge {
  padding: 5px 12px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  font-family: ui-monospace, 'Geist Mono', monospace;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tech-badge:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Development Practices */
.practices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.practice-item {
  background: var(--bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.practice-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow);
}

.practice-icon {
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}

.practice-item h4 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.practice-item p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Animation for skill bars */
@keyframes fillSkillBar {
  from { width: 0; }
  to { width: var(--skill-width); }
}

.skill-progress[data-width] {
  animation: fillSkillBar 1.5s ease forwards;
}

/* Currently Building Section */
.building-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.building-card {
  background: var(--card-bg);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.building-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--shadow-md);
  border-color: var(--accent);
}

.building-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 15px;
}

.building-status i {
  animation: spin 2s linear infinite;
}

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

.building-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text);
}

.building-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

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

/* Featured Projects Section */
#featured-projects {
  background: linear-gradient(135deg, var(--bg) 0%, var(--card-bg) 100%);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid var(--border);
  min-height: 620px;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px var(--shadow-md);
  border-color: var(--accent);
}

.featured-image {
  height: 250px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.featured-content {
  padding: 30px;
}

.featured-content h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--text);
}

.featured-tagline {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 25px;
  line-height: 1.6;
}

.featured-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

.metric {
  text-align: center;
  padding: 14px 10px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.metric-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.featured-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.tech-tag {
  padding: 4px 10px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  font-family: ui-monospace, 'Geist Mono', monospace;
}

.featured-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* Enhanced Page Sections with Compact Spacing */
.page-section {
  max-width: 1200px;
  margin: 48px auto;
  padding: 48px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px var(--shadow);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Compact spacing for smaller screens */
@media (max-width: 768px) {
  .page-section {
    margin: 40px 20px; /* Reduced from 60px */
    padding: 30px 25px; /* Reduced from 50px */
  }
}

@media (max-width: 480px) {
  .page-section {
    margin: 30px 15px; /* Reduced from 50px */
    padding: 25px 20px; /* Reduced from 35px */
  }
}

/* Enhanced Swipe-in Animations for Elements */
.skill-item:not(.visible),
.practice-item:not(.visible),
.tech-group:not(.visible),
.achievement:not(.visible),
.service-card:not(.visible),
.project-item:not(.visible),
.building-card:not(.visible),
.featured-card:not(.visible),
.certificate-card:not(.visible) {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-item.visible,
.practice-item.visible,
.tech-group.visible,
.achievement.visible,
.service-card.visible,
.project-item.visible,
.building-card.visible,
.featured-card.visible,
.certificate-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Alternating swipe directions for elements */
.skill-item:nth-child(even):not(.visible),
.practice-item:nth-child(even):not(.visible),
.tech-group:nth-child(even):not(.visible),
.achievement:nth-child(even):not(.visible),
.service-card:nth-child(even):not(.visible),
.project-item:nth-child(even):not(.visible),
.building-card:nth-child(even):not(.visible),
.featured-card:nth-child(even):not(.visible),
.certificate-card:nth-child(even):not(.visible) {
  transform: translateY(40px) scale(0.95);
}

.skill-item:nth-child(even).visible,
.practice-item:nth-child(even).visible,
.tech-group:nth-child(even).visible,
.achievement:nth-child(even).visible,
.service-card:nth-child(even).visible,
.project-item:nth-child(even).visible,
.building-card:nth-child(even).visible,
.featured-card:nth-child(even).visible {
  transform: translateY(0) scale(1);
}

/* Enhanced animation delays for swipe effect */
.skill-item:nth-child(1) { transition-delay: 0.1s; }
.skill-item:nth-child(2) { transition-delay: 0.2s; }
.skill-item:nth-child(3) { transition-delay: 0.3s; }
.skill-item:nth-child(4) { transition-delay: 0.4s; }

.practice-item:nth-child(1) { transition-delay: 0.1s; }
.practice-item:nth-child(2) { transition-delay: 0.2s; }
.practice-item:nth-child(3) { transition-delay: 0.3s; }
.practice-item:nth-child(4) { transition-delay: 0.4s; }
.practice-item:nth-child(5) { transition-delay: 0.5s; }
.practice-item:nth-child(6) { transition-delay: 0.6s; }

.tech-group:nth-child(1) { transition-delay: 0.1s; }
.tech-group:nth-child(2) { transition-delay: 0.2s; }
.tech-group:nth-child(3) { transition-delay: 0.3s; }
.tech-group:nth-child(4) { transition-delay: 0.4s; }

/* About section animations */
.about-text:not(.visible) {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-text.visible {
  opacity: 1;
  transform: translateX(0);
}

.about-image:not(.visible) {
  opacity: 0;
  transform: translateX(40px) scale(0.9);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.about-image.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Resume achievements animations */
.resume-achievements .achievement:not(.visible) {
  opacity: 0;
  transform: translateY(20px) rotateX(-10deg);
  transition: all 0.6s ease;
}

.resume-achievements .achievement.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

.resume-achievements .achievement:nth-child(1) { transition-delay: 0.1s; }
.resume-achievements .achievement:nth-child(2) { transition-delay: 0.2s; }
.resume-achievements .achievement:nth-child(3) { transition-delay: 0.3s; }
.resume-achievements .achievement:nth-child(4) { transition-delay: 0.4s; }

/* Enhanced parallax effects */
.hero-bg {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.floating-shapes .shape {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced hover animations during scroll */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

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

/* Loading animation for images */
img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

img.loaded {
  opacity: 1;
}

/* Enhanced button animations */
.btn {
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  left: 100%;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0,0,0,0.1);
  z-index: 9999;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--glow-color));
  width: 0%;
  transition: width 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating animation for elements */
@keyframes floatInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotateX(-10deg) translateY(20px);
  }
  to {
    opacity: 1;
    transform: rotateX(0) translateY(0);
  }
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  color: var(--text);
  z-index: 2;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* SERVICES */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: var(--bg);
  padding: 36px 28px;
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid var(--border);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px var(--shadow-md);
}

.service-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid var(--border);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text);
}

.service-card p {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

.service-features {
  list-style: none;
  margin-bottom: 25px;
  text-align: left;
}

.service-features li {
  padding: 5px 0;
  color: var(--text-light);
  position: relative;
  padding-left: 20px;
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.service-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.service-link:hover {
  color: var(--text);
}

/* ABOUT */
.about-content {
  display: flex;
  gap: 50px;
  align-items: center;
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  line-height: 1.8;
  color: var(--text);
}

.about-stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat {
  text-align: center;
  padding: 20px 16px;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.stat:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
  border-color: var(--accent);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  position: relative;
  letter-spacing: -0.02em;
}

.stat-number::after {
  content: '+';
  font-size: 1rem;
  color: var(--accent);
  margin-left: 2px;
  opacity: 0.7;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.about-image {
  flex: 1;
}

.image-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.image-container:hover .image-overlay {
  opacity: 1;
}

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

.tech-stack {
  display: flex;
  gap: 20px;
}

.tech-stack i {
  font-size: 2.5rem;
  color: white;
  transition: var(--transition);
}

.tech-stack i:hover {
  transform: translateY(-5px);
}

/* SKILLS */
.skills-container {
  margin-top: 40px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border-radius: var(--radius);
  box-shadow: 0 5px 15px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.skill-icon {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
}

.skill-info {
  flex: 1;
}

.skill-info h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: var(--text);
}

.skill-level {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 5px;
  transition: width 1.5s ease;
}

.skill-percent {
  font-weight: 600;
  color: var(--accent);
}

/* PROJECTS - 3D CARDS */
#projects {
  position: relative;
  overflow: hidden;
}

.projects-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.projects-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.project-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-ghost);
}

.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  perspective: 1000px;
  position: relative;
  z-index: 2;
}

.project-card-3d {
  height: 550px;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.project-card-3d.flipped .card-inner {
  transform: rotateY(180deg);
}

.project-card-3d {
  transform: translateY(-8px) scale(1.01);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
}

.card-front {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.card-back {
  background: linear-gradient(140deg, var(--accent-dark), var(--accent));
  color: white;
  transform: rotateY(180deg);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.card-back::-webkit-scrollbar {
  width: 6px;
}

.card-back::-webkit-scrollbar-track {
  background: transparent;
}

.card-back::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.back-content {
  text-align: left;
  width: 100%;
}

.back-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: white;
}

.back-content p {
  margin-bottom: 20px;
  line-height: 1.6;
}

.back-tech h4 {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.back-tech ul {
  list-style: none;
  margin-bottom: 20px;
}

.back-tech li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.back-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card-3d:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 20px;
}

.flip-instruction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  transition: var(--transition);
  background: rgba(0, 0, 0, 0.7);
  padding: 15px 20px;
  border-radius: 8px;
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.flip-instruction .instruction-title {
  font-size: 14px;
  margin-bottom: 5px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.flip-instruction .instruction-subtitle {
  font-size: 11px;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.5px;
}

.flip-instruction i {
  font-size: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.project-card-3d:hover .project-overlay,
.project-card-3d .project-overlay {
  opacity: 1;
}

.project-links a {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  color: var(--accent);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
}

.project-links a:hover {
  transform: translateY(-5px);
  background: var(--accent);
  color: white;
}

.project-info {
  padding: 25px;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text);
}

.project-info p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  padding: 5px 15px;
  background: var(--accent-ghost);
  color: var(--accent);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* BLOG */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.blog-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px var(--shadow);
}

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

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

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

.blog-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.blog-content {
  padding: 25px;
}

.blog-content h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text);
}

.blog-content p {
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.blog-link:hover {
  color: var(--text);
}

/* TESTIMONIALS */
.testimonials-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
}

.testimonial-card {
  min-width: 100%;
  padding: 40px;
  text-align: center;
}

.testimonial-content {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 30px;
  font-style: italic;
  color: var(--text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.testimonial-author img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text);
}

.author-info p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.testimonial-rating {
  color: #ffc107;
  font-size: 1.2rem;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-btn:hover {
  background: var(--accent);
  color: white;
}

/* NEWSLETTER */
.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form .form-group {
  display: flex;
  gap: 15px;
}

.newsletter-form input {
  flex: 1;
  padding: 15px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1rem;
}

.newsletter-form button {
  padding: 15px 30px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.newsletter-form button:hover {
  background: var(--text);
  transform: translateY(-2px);
}

.newsletter-privacy {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.newsletter-success {
  display: none;
  text-align: center;
  padding: 20px;
  background: #4caf50;
  color: white;
  border-radius: var(--radius);
  margin-top: 20px;
}

.newsletter-success.show {
  display: block;
}

/* CONTACT */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 16px;
  color: white;
}

.contact-info .contact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.contact-info .contact-details h3 {
  color: white;
}

.contact-info .contact-details a,
.contact-info .contact-details p {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.contact-info .contact-details a:hover {
  color: white;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.contact-icon {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
}

.contact-details h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
  color: var(--text);
}

.contact-details a,
.contact-details p {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.contact-details a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card);
  color: var(--text);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
  border: 2px solid var(--border);
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-5px);
  border-color: var(--accent);
}

.contact-form-container {
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ghost);
}

/* GITHUB */
.github-widget {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.github-widget img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px var(--shadow);
}

.recent-repos {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.repo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--bg);
  border-radius: 50px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: var(--transition);
}

.repo:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  color: var(--text);
  position: relative;
  border-top: 1px solid var(--border);
}

.footer-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

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

.back-to-top {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.back-to-top a {
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition);
}

.back-to-top a:hover {
  transform: translateY(-5px);
  background: var(--text);
  color: var(--card-bg);
}

/* PARTICLES */
.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

/* MOBILE MENU - Enhanced */
@media (max-width: 992px) {
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    order: 1;
    flex-shrink: 0;
  }
  
  .nav-controls {
    order: 2;
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    position: static;
    transform: none;
  }
  
  .font-size-controls,
  .language-switcher,
  .theme-controls {
    margin: 0;
  }
  
  .font-btn,
  .lang-btn,
  .theme-toggle-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: 32px;
    height: 32px;
  }
  
  .font-size-label {
    display: none;
  }
  
  .lang-current,
  .theme-toggle-btn span {
    display: none;
  }
  
  .theme-toggle-btn {
    padding: 6px 8px;
  }
  
  .theme-dropdown {
    position: relative;
  }
  
  .theme-menu {
    position: fixed;
    top: 70px;
    right: 15px;
    transform: none;
  }
  
  .menu-toggle {
    order: 3;
    display: flex;
    z-index: 1001;
    flex-shrink: 0;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 80px 20px 20px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-link {
    font-size: 1.5rem;
    padding: 15px 30px;
    text-align: center;
    width: 100%;
    max-width: 300px;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .lang-menu,
  .theme-menu {
    position: fixed;
    top: 70px;
    right: 10px;
    transform: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px var(--shadow);
    min-width: 150px;
    max-width: 85vw;
    z-index: 1002;
  }
  
  .lang-menu:hover,
  .theme-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .lang-option,
  .theme-option {
    padding: 10px 15px;
    font-size: 0.85rem;
    border-radius: 25px;
  }
  
  .language-switcher:hover .lang-menu,
  .lang-menu:hover,
  .theme-dropdown:hover .theme-menu,
  .theme-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .lang-btn,
  .theme-toggle-btn {
    padding: 10px 18px;
    font-size: 1rem;
  }
  
  .lang-btn span,
  .theme-toggle-btn span {
    display: none;
  }
  
  .theme-toggle-btn {
    gap: 0;
  }
  
  .theme-dropdown {
    position: relative;
  }
  
  .theme-menu {
    position: fixed;
    top: 70px;
    right: 15px;
    transform: none;
    flex-direction: column;
    gap: 0;
  }
  
  .theme-option {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .theme-option i {
    display: none;
  }
  
  .theme-option span {
    display: inline;
  }
  
  /* Hamburger Animation */
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle span {
    height: 2px;
    width: 24px;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Overlay when menu is open */
  .nav-links.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    opacity: 0.5;
    z-index: -1;
  }
  
  /* Body lock when menu open */
  body.menu-open {
    overflow: hidden;
  }
}

/* Additional mobile optimizations for nav controls */
@media (max-width: 768px) {
  .nav-controls {
    gap: 3px;
  }
  
  .font-btn,
  .lang-btn,
  .theme-toggle-btn {
    min-width: 32px;
    height: 32px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .lang-menu,
  .theme-menu {
    top: 65px;
    right: 5px;
    min-width: 140px;
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 10px;
  }
  
  .nav-controls {
    gap: 2px;
  }
  
  .font-btn,
  .lang-btn,
  .theme-toggle-btn {
    min-width: 30px;
    height: 30px;
    padding: 8px 14px;
  }
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .about-content {
    flex-direction: column;
    gap: 30px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .nav-controls {
    order: 2;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  #typed {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .about-stats {
    justify-content: center;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .project-card-3d {
    height: 500px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .project-controls {
    flex-wrap: wrap;
  }
  
  .filter-btn {
    margin-bottom: 10px;
  }
  
  .nav-container {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .font-size-controls {
    order: 1;
  }
  
  .language-switcher {
    order: 2;
  }
  
  .theme-controls {
    order: 3;
  }
}

/* Featured projects responsive adjustments */
@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .featured-card {
    min-height: 600px;
  }
  
  .featured-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .featured-content {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .featured-metrics {
    grid-template-columns: 1fr;
  }
  
  .featured-card {
    min-height: 550px;
  }
}

/* Loading animation for images */
.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy.loaded {
  opacity: 1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
/* ===========================
   MUSIC PLAYER
   =========================== */
   .music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .music-player-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .music-player-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
  
  .music-player-toggle i {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  
  .music-player-controls {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    width: 250px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }
  
  .music-player.active .music-player-controls {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .music-info {
    margin-bottom: 10px;
  }
  
  .music-title {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
  }
  
  .music-artist {
    display: block;
    color: #666;
    font-size: 0.8rem;
  }
  
  .music-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
  }
  
  .control-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    margin: 0 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
  }
  
  .control-btn:hover {
    color: #764ba2;
    transform: scale(1.1);
  }
  
  .play-pause {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .volume-control {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .volume-control i {
    color: #667eea;
    margin-right: 8px;
  }
  
  #volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
  }
  
  #volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
  }
  
  .progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
  }
  
  .progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.1s linear;
  }
  
  /* Dark theme adjustments */
  .dark .music-player-controls {
    background: rgba(30, 30, 30, 0.95);
  }
  
  .dark .music-title {
    color: #f0f0f0;
  }
  
  .dark .music-artist {
    color: #aaa;
  }
  
  .dark #volume-slider {
    background: #444;
  }
  
  /* Mobile responsiveness */
  @media (max-width: 768px) {
    .music-player {
      bottom: 15px;
      right: 15px;
    }
    
    .music-player-controls {
      width: 220px;
      padding: 12px;
    }
  }
  /* Additional music player styles */
/* Additional music player styles */
.music-hint {
  text-align: center;
  margin-top: 8px;
  color: #666;
  font-size: 0.75rem;
}

.dark .music-hint {
  color: #aaa;
}

.music-player-toggle:hover::after {
  content: 'Click to play music';
  position: absolute;
  bottom: 60px;
  right: 0;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
}

/* Loading state */
.control-btn .fa-spinner {
  animation: spin 1s linear infinite;
}

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

/* Mobile improvements */
@media (max-width: 480px) {
  .music-player {
    bottom: 15px;
    right: 15px;
  }
  
  .music-player-controls {
    width: 220px;
    padding: 12px;
  }
}
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;

  /* More flakes with different positions */
  background-image:
    radial-gradient(2px 2px at 10px 20px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 40px 60px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 70px 30px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 100px 90px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 130px 50px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 160px 110px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 190px 70px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 220px 140px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 250px 90px, color-mix(in srgb, var(--accent) 80%, transparent), transparent),
    radial-gradient(2px 2px at 280px 160px, color-mix(in srgb, var(--accent) 80%, transparent), transparent);

  background-size: 300px 300px;
  animation: snowFall 10s linear infinite;
  opacity: 0.9;
  will-change: transform;
}

@keyframes snowFall {
  from {
    transform: translateY(-300px);
  }
  to {
    transform: translateY(300px);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .snow {
    animation: none;
  }
}

/* Mobile optimization */
@media (max-width: 768px) {
  .snow {
    opacity: 0.7;
  }
}
.glow-orb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  animation: floatOrb 8s ease-in-out infinite;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  25% { transform: translate(30px, -20px); }
  50% { transform: translate(-30px, 40px); }
  75% { transform: translate(20px, -10px); }
  100% { transform: translate(0, 0); }
}

/* Resume Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg);
}

.modal-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--accent-ghost);
  color: var(--accent);
}

.modal-body {
  padding: 30px;
  height: 600px;
  overflow-y: auto;
  background: var(--card-bg);
}

.resume-content {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text);
  line-height: 1.6;
}

.resume-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.resume-section:last-child {
  border-bottom: none;
}

.resume-section h2 {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
}

.resume-name {
  color: var(--accent);
  font-size: 2.5rem;
  margin-bottom: 5px;
  text-align: center;
  font-weight: 700;
}

.resume-title {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 20px;
  font-weight: 500;
}

.resume-contact {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 0;
}

.resume-section h3 {
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resume-section h4 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.resume-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  font-style: italic;
}

.skills-detailed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.skill-group {
  background: var(--bg);
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.skill-group h4 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.skill-group p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.project-link {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.project-link:hover {
  text-decoration: underline;
}

.education-item {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.education-item h4 {
  color: var(--accent);
  margin-bottom: 5px;
}

.education-item p {
  margin: 5px 0;
  font-size: 0.95rem;
}

.skill-item {
  background: var(--bg);
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  border-left: 3px solid var(--accent);
}

.project-item {
  margin-bottom: 25px;
  padding: 15px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.project-item h4 {
  color: var(--accent);
  margin-bottom: 5px;
}

.project-item p em {
  color: var(--text-light);
  font-size: 0.9rem;
}

.project-item ul {
  margin: 10px 0 0 20px;
}

.project-item li {
  margin-bottom: 5px;
  font-size: 0.95rem;
}

/* Resume modal content always visible */
.modal-body .project-item,
.modal-body .skill-item,
.modal-body .skills-grid .skill-item {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.resume-section ul {
  margin: 15px 0;
  padding-left: 20px;
}

.resume-section li {
  margin-bottom: 8px;
}

.resume-section p {
  margin-bottom: 10px;
}

.resume-section strong {
  color: var(--accent);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg);
  gap: 15px;
}

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

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(50px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}
/* (Hero gradient animation override removed to keep original theme-based hero colors) */

/* ===========================
   Offline Mode Styles
   =========================== */
img[data-offline="true"] {
  opacity: 0.3 !important;
  filter: grayscale(100%);
}

body.offline-mode .online-only {
  display: none;
}

/* Offline notification animation */
#offline-notification {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Online notification */
#online-notification {
  animation: slideUp 0.3s ease-out;
}
