:root {
  /* Primary – Signature Indigo */
  --primary: #4c4cff;
  --primary-light: #9aa5ff;
  --primary-dark: #2b2dbf;

  /* Secondary – Soft Teal */
  --secondary: #2dd4bf;
  --secondary-light: #99f6e4;
  --secondary-dark: #0f766e;

  /* Accent – Cool Cyan (modern & subtle) */
  --accent: #38bdf8;
  --accent-light: #bae6fd;
  --accent-dark: #0284c7;

  /* Dark Base – deep, cinematic */
  --dark: #0b1023;
  --darker: #050814;

  /* Light Surface */
  --light: #f9fafb;

  /* Neutral Grays – smooth reading */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;

  /* Glassmorphism */
  --glass: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.15);

  /* Layout & Transitions */
  --transition: 0.3s ease;
  --max-width: 1200px;
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: var(--light);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  line-height: 1.6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s ease, color 0.3s ease;
}

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--darker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader.loaded .loader-content {
  transform: scale(0.8);
}

.loader-content {
  text-align: center;
  position: relative;
  transition: transform 0.5s ease;
}

/* Loader Logo - Initials */
.loader-logo {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.loader-letter {
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease infinite, letterPop 0.6s ease-out both;
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.loader-letter:nth-child(1) {
  animation-delay: 0s, 0s;
}

.loader-letter:nth-child(2) {
  animation-delay: 0s, 0.15s;
}

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

@keyframes letterPop {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.5);
  }
  60% {
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loader Text */
.loader-text {
  color: var(--gray-400);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3rem;
  position: relative;
}

.loader-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Loader Progress Bar */
.loader-progress {
  width: min(500px, 80vw);
  height: 3px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 3px;
  margin: 1.5rem auto 0;
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 100%;
  border-radius: 3px;
  animation: progressFill 2.5s ease-out forwards, progressShine 1s linear infinite;
}

@keyframes progressFill {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

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

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

p {
  margin-bottom: 1.5rem;
  color: var(--gray-200);
  font-size: 1rem;
  line-height: 1.7;
}

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

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

/* Hide Scrollbar */
::-webkit-scrollbar {
  display: none;
}

html {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Glassmorphism effect */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              background 0.3s ease;
  border: none;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--primary-dark));
  z-index: -1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0.9;
}

.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

.btn:active {
  transform: translateY(-2px) scale(0.98);
}

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

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

.btn-secondary::before {
  background: transparent;
}

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

/* Section Styling */
section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.section-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  display: block;
  width: 100%;
}

.section-title::after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

/* Custom Cursor - Desktop Only */
.cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s, height 0.3s;
}

.cursor.hover {
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.2);
}

.cursor.text-hover {
  width: 100px;
  height: 100px;
  background: rgba(99, 102, 241, 0.1);
}

/* Hide custom cursor on non-desktop devices */
@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .cursor {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* ========================================
   Floating Logo
   ======================================== */

.floating-logo {
  position: fixed;
  top: 16px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 
    0 5px 20px rgba(0, 0, 0, 0.8),
    0 15px 50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 0 40px rgba(99, 102, 241, 0.4),
    0 0 80px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--light);
  text-decoration: none;
  z-index: 1001;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  letter-spacing: -0.5px;
  animation: floatingLogo 3s ease-in-out infinite;
}

@keyframes floatingLogo {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 
      0 5px 20px rgba(0, 0, 0, 0.8),
      0 15px 50px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(99, 102, 241, 0.2),
      0 0 40px rgba(99, 102, 241, 0.4),
      0 0 80px rgba(99, 102, 241, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    transform: translateY(-8px);
    box-shadow: 
      0 10px 30px rgba(0, 0, 0, 0.9),
      0 25px 60px rgba(0, 0, 0, 1),
      0 0 0 1px rgba(99, 102, 241, 0.3),
      0 0 60px rgba(99, 102, 241, 0.5),
      0 0 100px rgba(99, 102, 241, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.floating-logo:hover {
  animation-play-state: paused;
  transform: scale(1.1) translateY(-4px);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  box-shadow: 
    0 10px 40px rgba(99, 102, 241, 0.7),
    0 20px 60px rgba(99, 102, 241, 0.5),
    0 0 100px rgba(99, 102, 241, 0.5),
    0 0 150px rgba(99, 102, 241, 0.3);
  text-decoration: none;
  color: white;
}

.floating-logo:active {
  transform: scale(0.95);
}

/* Responsive floating logo */
@media (max-width: 768px) {
  .floating-logo {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    top: 12px;
    left: 12px;
  }
}

@media (max-width: 400px) {
  .floating-logo {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    top: 10px;
    left: 10px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .floating-logo {
    animation: none;
  }
}

/* ========================================
   Dynamic Island Navigation
   ======================================== */

/* Main Container */
header.dynamic-island {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 12px 20px;
  pointer-events: none;
  background: transparent;
  border: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.island-container {
  pointer-events: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* The Pill Shape */
.island-pill {
  position: relative;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 50px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 
    0 5px 20px rgba(0, 0, 0, 0.8),
    0 15px 50px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 0 40px rgba(99, 102, 241, 0.3),
    0 0 80px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Desktop Expanded State (Default) */
.island-expanded {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 28px;
  min-width: auto;
  justify-content: center;
}

/* Collapsed State (Hidden on Desktop) */
.island-collapsed {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
  cursor: pointer;
}

/* Menu Text for collapsed state */
.island-menu-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--light);
  letter-spacing: 0.5px;
}

/* Menu Title for mobile expanded state */
.island-menu-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--light);
}

/* Mobile Menu Expanded (Hidden by default) */
.island-menu-expanded {
  display: none;
  flex-direction: column;
  padding: 20px;
  width: 90vw;
  max-width: 380px;
}

/* Logo Styles */
.island-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--light);
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: -0.5px;
}

.island-logo:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Status Indicator Dot */
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* Navigation Styles */
.island-nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.island-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.island-nav a:hover {
  color: var(--light);
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.island-nav a.active {
  color: var(--light);
  background: var(--primary);
}

/* Island Indicators for Collapsed State */
.island-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Close Button */
.island-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.island-close:hover {
  background: rgba(239, 68, 68, 0.8);
  color: white;
  transform: rotate(90deg);
}

/* Mobile Menu Header */
.island-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

/* Mobile Navigation */
.island-mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.island-mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.island-mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light);
  transform: translateX(8px);
  text-decoration: none;
}

.island-mobile-nav a.active {
  background: var(--primary);
  color: white;
}

/* Hidden State (Auto-hide on scroll) */
header.dynamic-island.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

header.dynamic-island.nav-hidden .island-container {
    pointer-events: none;
}

header.dynamic-island.nav-visible {
    transform: translateY(0);
    opacity: 1;
}

/* Scrolled State */
header.dynamic-island.scrolled .island-pill {
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.9),
    0 20px 60px rgba(0, 0, 0, 1),
    0 0 0 1px rgba(99, 102, 241, 0.25),
    0 0 50px rgba(99, 102, 241, 0.4),
    0 0 100px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ========================================
   Dynamic Island Responsive Styles
   ======================================== */

@media (max-width: 900px) {
  .island-expanded {
    min-width: auto;
    gap: 1rem;
    padding: 10px 20px;
  }
  
  .island-nav a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  /* Hide desktop expanded, show collapsed */
  .island-expanded {
    display: none;
  }
  
  .island-collapsed {
    display: flex;
    min-width: 120px;
  }
  
  .island-pill {
    cursor: pointer;
  }
  
  /* Expanded menu animation */
  .island-pill.menu-active {
    border-radius: 32px;
    animation: island-expand 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .island-pill.menu-active .island-collapsed {
    display: none;
  }
  
  .island-pill.menu-active .island-menu-expanded {
    display: flex;
    animation: fade-in 0.3s ease 0.2s forwards;
    opacity: 0;
  }
  
  @keyframes island-expand {
    0% {
      width: 120px;
      height: 44px;
      border-radius: 50px;
    }
    50% {
      width: 200px;
      height: 60px;
      border-radius: 40px;
    }
    100% {
      width: 90vw;
      max-width: 380px;
      height: auto;
      min-height: 350px;
      border-radius: 32px;
    }
  }
  
  @keyframes fade-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* Collapse animation */
  .island-pill.menu-closing {
    animation: island-collapse 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .island-pill.menu-closing .island-menu-expanded {
    animation: fade-out 0.15s ease forwards;
  }
  
  @keyframes island-collapse {
    0% {
      width: 90vw;
      max-width: 380px;
      min-height: 350px;
      border-radius: 32px;
    }
    50% {
      width: 160px;
      min-height: 50px;
      border-radius: 40px;
    }
    100% {
      width: 120px;
      min-height: 44px;
      border-radius: 50px;
    }
  }
  
  @keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
  }
}

@media (max-width: 400px) {
  .island-menu-expanded {
    max-width: 95vw;
    padding: 16px;
  }
  
  .island-mobile-nav a {
    padding: 12px 14px;
    font-size: 1rem;
  }
}

/* ========================================
   Legacy Header Styles (kept for reference)
   ======================================== */

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary);
}

nav {
  flex: 1;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}


nav ul li {
  position: relative;
}

nav a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--light);
  font-size: 1.8rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 500px;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 5vw, 2rem) clamp(1rem, 5vw, 5%);
}

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
  animation: heroReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--light) 0%, var(--primary) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  letter-spacing: -0.02em;
  animation: textReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 2.5rem;
  color: var(--gray);
  font-weight: 400;
  animation: textReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--light);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--light);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
  color: var(--light);
  transform: translateY(-5px) scale(1.05);
}

.scroll-down {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 10;
  color: var(--light);
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
}

.scroll-down:hover {
  opacity: 1;
  color: var(--primary);
}

.scroll-down i {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Sections */
section {
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 5%);
  min-height: auto;
  display: block;
  position: relative;
  scroll-margin-top: 80px;
}

.hero,
.about,
.projects,
.skills,
.contact {
  background: transparent !important;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 4rem);
  text-align: center;
  position: relative;
  font-weight: 700;
  background: linear-gradient(135deg, var(--light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  width: 100%;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

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

.section-content {
  max-width: min(1200px, 95vw);
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

/* About Visual Section */
.about-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: min(400px, 90vw);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: floatCard 6s ease-in-out infinite;
}

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

.profile-icon {
  position: relative;
  width: clamp(200px, 30vw, 280px);
  height: clamp(200px, 30vw, 280px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-card:hover .profile-icon {
  transform: scale(1.05);
}

.icon-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  box-shadow: 0 0 clamp(40px, 8vw, 60px) rgba(99, 102, 241, 0.4);
}

.profile-icon i {
  position: relative;
  font-size: clamp(4rem, 10vw, 6rem);
  color: white;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}

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

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(16, 185, 129, 0.3));
  backdrop-filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: clamp(50px, 12vw, 80px);
  height: clamp(50px, 12vw, 80px);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: clamp(40px, 10vw, 60px);
  height: clamp(40px, 10vw, 60px);
  bottom: 15%;
  right: 15%;
  animation-delay: 1s;
}

.shape-3 {
  width: clamp(60px, 15vw, 100px);
  height: clamp(60px, 15vw, 100px);
  top: 50%;
  right: 5%;
  animation-delay: 2s;
}

.stats-mini {
  display: flex;
  gap: 2rem;
  width: 100%;
  justify-content: center;
}

.stat-mini {
  text-align: center;
  padding: clamp(1rem, 3vw, 1.5rem);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: clamp(100px, 20vw, 120px);
  flex: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.stat-mini:hover {
  transform: translateY(-8px) scale(1.03);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.stat-number-mini {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.stat-mini:hover .stat-number-mini {
  transform: scale(1.1);
}

.stat-label-mini {
  font-size: 0.85rem;
  color: var(--gray);
}

/* About Content Section */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-intro {
  margin-bottom: 1rem;
}

.greeting {
  display: inline-block;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.about-content h3 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  line-height: 1.2;
}

.role {
  font-size: 1.1rem;
  color: var(--gray);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about-description {
  margin-bottom: 1rem;
}

.about-description p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  color: var(--gray);
  font-size: 0.95rem;
}

/* About Features */
.about-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateX(5px);
}

.feature-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  flex-shrink: 0;
}

.feature-icon i {
  color: white;
  font-size: 1.3rem;
}

.feature-text h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: var(--light);
}

.feature-text p {
  font-size: 0.85rem;
  color: var(--gray);
  margin: 0;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.tag {
  padding: 0.7rem 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  cursor: default;
}

.tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  border-color: var(--primary);
}

.tag i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.tag:hover i {
  transform: rotate(15deg) scale(1.1);
}

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

.about-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.6);
  }
}

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

/* Responsive Design for About Section */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    order: 2;
  }

  .about-content {
    order: 1;
  }

  .profile-icon {
    width: 220px;
    height: 220px;
  }

  .profile-icon i {
    font-size: 4.5rem;
  }

  .about-content h3 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .stats-mini {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-mini {
    width: 100%;
  }

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

  .about-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .about-content h3 {
    font-size: 1.8rem;
  }

  .profile-icon {
    width: 180px;
    height: 180px;
  }

  .profile-icon i {
    font-size: 3.5rem;
  }
}

/* Projects Section */
.projects {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.8),
    rgba(2, 6, 23, 0.9)
  );
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}

.project-card {
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.4s ease,
              border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  will-change: transform;
}

.project-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(99, 102, 241, 0.35);
  border-color: rgba(99, 102, 241, 0.5);
}

.project-img {
  height: clamp(160px, 30vw, 200px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.project-img > div {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.project-img > div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-img img,
.project-card:hover .project-img > div img {
  transform: scale(1.12);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tag {
  padding: 0.3rem 0.8rem;
  background: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.project-content {
  padding: 1rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.project-content p {
  margin-bottom: 0.75rem;
  color: var(--gray);
  flex-grow: 1;
  font-size: 0.875rem;
  line-height: 1.5;
}

.project-links {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
}

.project-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.project-link:hover {
  color: var(--light);
}

.more-projects {
  text-align: center;
  margin-top: 2rem;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.skills-column {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.4s ease;
  will-change: transform;
}

.skills-column:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.skills-column h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--light);
  position: relative;
  padding-bottom: 0.5rem;
}

.skills-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.skill-item {
  margin-bottom: 0.75rem;
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  padding: 0.5rem;
  border-radius: 10px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.35s; }
.skill-item:nth-child(4) { animation-delay: 0.5s; }

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

.skill-header span:first-child {
  font-weight: 600;
  font-size: 1rem;
  color: var(--light);
}

.skill-header span:last-child {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 6px;
  position: relative;
  transition: width 1s ease-out;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.skill-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progress-shine 2s infinite;
}

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

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 6px;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid transparent;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  animation: fadeInUp 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.25s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--primary);
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--darker);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3);
}

.timeline-date {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.timeline-org {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray);
}

/* Contact Section */
.contact {
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.8),
    rgba(0, 0, 0, 0.9)
  );
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.contact-info {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  height: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--light);
  position: relative;
  padding-bottom: 1rem;
}

.contact-info h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-details > p {
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(10px) scale(1.01);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.12);
}

.contact-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.contact-item p {
  color: var(--gray);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
  color: var(--light);
  text-decoration: none;
}

.social-link:hover {
  background: var(--primary);
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.contact-form {
  padding: 2.5rem;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 25px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-form .form-group:last-of-type {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.contact-form textarea.form-control {
  flex-grow: 1;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--light);
  font-size: 1rem;
}

.form-control {
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--light);
  font-size: 1rem;
  transition: border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15), 0 4px 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-3px);
}

.form-control::placeholder {
  color: var(--gray);
  opacity: 0.6;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

/* Footer */
footer {
  padding: 3rem 5% 2rem;
  text-align: center;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

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

.footer-logo {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--light), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo span {
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
}

.footer-text {
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-social a {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  font-size: 1.3rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  color: white;
  transform: translateY(-8px) scale(1.15) rotate(-3deg);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.5);
}

.copyright {
  color: var(--gray);
  font-size: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
  .section-content {
    max-width: min(1200px, 95vw);
  }
}

@media (max-width: 1200px) {
  .section-content {
    max-width: min(1000px, 95vw);
    padding: 0 1.5rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  }

  h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  }

  p {
    font-size: 1rem;
  }
}

@media (max-width: 992px) {
  section {
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    min-height: auto;
  }

  .section-content {
    padding: 0 1rem;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 600px;
  }

  .about-visual {
    order: 2;
  }

  .about-content {
    order: 1;
  }

  .about-img {
    max-width: min(500px, 90vw);
    margin: 0 auto;
  }

  .timeline {
    padding-left: clamp(1.5rem, 4vw, 2rem);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2rem);
  }

  .profile-icon {
    width: clamp(180px, 35vw, 220px);
    height: clamp(180px, 35vw, 220px);
  }

  .profile-icon i {
    font-size: clamp(3.5rem, 8vw, 4.5rem);
  }

  .about-content h3 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
  }

  .stats-mini {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat-mini {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 140px;
  }
}

/* Tablet Optimization (768px - 992px) */
@media (max-width: 880px) and (min-width: 769px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .section-content {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  /* Dynamic Island mobile overrides are in the island section above */
  
  .logo {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }

  /* Legacy nav styles - kept for backwards compatibility */
  nav:not(.island-nav):not(.island-mobile-nav) {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(85%, 320px);
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    transition: var(--transition);
    z-index: 1001;
    padding: 5rem 2rem 2rem;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }

  nav a {
    font-size: clamp(1rem, 4vw, 1.2rem);
    padding: 0.8rem 0;
    display: block;
    width: 100%;
  }

  .close-menu {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
  }

  .hero {
    min-height: clamp(400px, 80vh, 600px);
    padding: clamp(1rem, 5vw, 2rem) clamp(1rem, 4vw, 1.5rem);
  }

  .hero-content {
    max-width: 100%;
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 1rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: clamp(1rem, 4vw, 1.3rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
  }

  .hero-btns {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .btn {
    width: 100%;
    max-width: 100%;
    padding: clamp(0.9rem, 3vw, 1rem) clamp(1.5rem, 5vw, 2.5rem);
    font-size: clamp(0.95rem, 3vw, 1.1rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
  }

  .section-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    padding: 0 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2rem);
    padding: 0 clamp(0.5rem, 2vw, 1rem);
  }

  .project-card {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
  }

  .project-img {
    height: clamp(200px, 50vw, 280px);
  }

  .project-content h3 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    margin-bottom: 0.8rem;
  }

  .project-content p {
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    margin-bottom: 1.2rem;
  }

  .project-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  .project-link {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
  }

  .skills-column {
    padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
  }

  .contact-info,
  .contact-form {
    padding: clamp(1.5rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
    width: 100%;
    height: auto;
  }

  .profile-icon {
    width: clamp(150px, 40vw, 180px);
    height: clamp(150px, 40vw, 180px);
  }

  .profile-icon i {
    font-size: clamp(3rem, 10vw, 3.5rem);
  }

  .stats-mini {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-mini {
    width: 100%;
    min-width: auto;
  }

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

  .about-actions .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  section {
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 1.5rem);
    min-height: auto;
  }

  .section-content {
    padding: 0 clamp(0.5rem, 2vw, 1rem);
  }

  .hero {
    min-height: clamp(350px, 70vh, 500px);
    padding: clamp(1rem, 4vw, 1.5rem) 1rem;
  }

  .hero-content {
    padding: 0 0.5rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    margin-bottom: 1.5rem;
  }

  .btn {
    padding: clamp(0.85rem, 3vw, 0.95rem) clamp(1.2rem, 4vw, 1.8rem);
    font-size: clamp(0.9rem, 3vw, 1rem);
    width: 100%;
    max-width: 100%;
    min-height: 44px; /* Touch target size */
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    padding: 0 0.5rem;
  }

  .section-subtitle {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    padding: 0 0.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.2rem, 3vw, 1.5rem);
    padding: 0;
  }

  .project-card {
    border-radius: 14px;
    width: 100%;
    max-width: 100%;
  }

  .project-img {
    height: clamp(160px, 50vw, 200px);
  }

  .project-content {
    padding: clamp(1rem, 3vw, 1.3rem);
  }

  .project-content h3 {
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    margin-bottom: 0.6rem;
  }

  .project-content p {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    margin-bottom: 0.8rem;
    line-height: 1.5;
  }

  .project-links {
    flex-direction: column;
    gap: 0.6rem;
  }

  .project-link {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0.8rem;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-info,
  .contact-form {
    padding: clamp(1.2rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.2rem);
    height: auto;
  }

  .contact-info h3,
  .contact-form h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
  }

  .contact-item {
    padding: clamp(1rem, 3vw, 1.2rem);
    gap: 1rem;
  }

  .contact-icon {
    width: clamp(50px, 12vw, 60px);
    height: clamp(50px, 12vw, 60px);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
  }

  .form-control {
    padding: clamp(0.85rem, 3vw, 1rem) clamp(1rem, 3vw, 1.2rem);
    font-size: clamp(0.95rem, 3vw, 1rem);
    min-height: 44px; /* Touch target */
  }

  textarea.form-control {
    min-height: clamp(120px, 30vw, 150px);
  }

  .footer-social {
    gap: clamp(0.8rem, 2vw, 1rem);
    flex-wrap: wrap;
  }

  .footer-social a {
    width: clamp(42px, 10vw, 50px);
    height: clamp(42px, 10vw, 50px);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    min-width: 44px; /* Touch target */
    min-height: 44px;
  }

  .stats-mini {
    flex-direction: column;
    gap: 0.8rem;
  }

  .stat-mini {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.2rem);
  }

  .stat-number-mini {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .stat-label-mini {
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
  }

  .profile-icon {
    width: clamp(140px, 45vw, 160px);
    height: clamp(140px, 45vw, 160px);
  }

  .profile-icon i {
    font-size: clamp(2.5rem, 12vw, 3rem);
  }

  .about-content h3 {
    font-size: clamp(1.5rem, 6vw, 1.8rem);
  }

  .role {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  .about-description p {
    font-size: clamp(0.95rem, 3vw, 1.05rem);
  }

  .feature-item {
    padding: clamp(0.8rem, 2.5vw, 1rem);
    gap: 0.8rem;
  }

  .feature-icon {
    width: clamp(45px, 11vw, 50px);
    height: clamp(45px, 11vw, 50px);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
  }

  .tag {
    padding: clamp(0.6rem, 2vw, 0.7rem) clamp(1.2rem, 3vw, 1.5rem);
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
  }

  .skills-column h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
  }

  .skill-header span {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
  }

  .timeline-item {
    padding: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
  }

  .timeline-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  .footer-logo {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .footer-text {
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    padding: 0 1rem;
  }

  .copyright {
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .section-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }

  .about-content h3 {
    font-size: clamp(1.3rem, 5vw, 1.5rem);
  }

  .logo {
    font-size: clamp(1.2rem, 4vw, 1.4rem);
  }

  .menu-toggle {
    right: clamp(40px, 12vw, 50px);
    font-size: clamp(18px, 4vw, 20px);
  }

  .theme-toggle {
    right: clamp(8px, 2vw, 15px);
    font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  }

  nav {
    width: min(90%, 280px);
    padding: 4rem 1.5rem 2rem;
  }

  .section-content {
    padding: 0 0.5rem;
  }

  .profile-icon {
    width: clamp(120px, 50vw, 140px);
    height: clamp(120px, 50vw, 140px);
  }

  .profile-icon i {
    font-size: clamp(2rem, 10vw, 2.5rem);
  }

  /* Contact section small screen fixes */
  .contact-info,
  .contact-form {
    padding: 1rem;
    min-width: 0;
  }

  .contact-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .contact-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .contact-item p {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-link {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

@media (max-width: 320px) {
  .hero h1 {
    font-size: 1.4rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  nav {
    width: 100%;
    right: -100%;
  }

  nav.active {
    right: 0;
  }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    height: auto;
    padding: 2rem 1rem;
  }

  section {
    min-height: auto;
    padding: 3rem 1rem;
  }

  .profile-icon {
    width: clamp(120px, 25vw, 150px);
    height: clamp(120px, 25vw, 150px);
  }
}

/* Prevent horizontal scroll and ensure responsive images */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

* {
  max-width: 100%;
}

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

/* Ensure all containers are responsive */
.container, .section-content, .about-grid, .projects-grid, .skills-grid, .contact-grid {
  width: 100%;
  box-sizing: border-box;
}

/* Fix for tables and other elements */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

/* Ensure buttons and inputs are touch-friendly on mobile */
@media (max-width: 768px) {
  button, a.btn, input, textarea, select {
    min-height: 44px; /* iOS touch target */
    min-width: 44px;
  }
  
  .menu-toggle, .theme-toggle, .close-menu {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Large screens optimization */
@media (min-width: 1400px) {
  .section-content {
    max-width: 1400px;
  }
  
  .hero-content {
    max-width: 1000px;
  }
}

/* Extra large screens */
@media (min-width: 1920px) {
  .section-content {
    max-width: 1600px;
  }
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }
  
  section {
    min-height: -webkit-fill-available;
  }
}

/* Print styles */
@media print {
  .cursor, .menu-toggle, .theme-toggle, .scroll-down, nav {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

.right-click-message {
  position: fixed;
  bottom: clamp(10px, 3vw, 20px);
  right: clamp(10px, 3vw, 20px);
  left: auto;
  max-width: calc(100vw - 40px);
  background: var(--primary);
  color: white;
  padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.5rem);
  border-radius: 50px;
  font-weight: 500;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 3000;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .right-click-message {
    left: clamp(10px, 3vw, 20px);
    right: clamp(10px, 3vw, 20px);
    max-width: calc(100vw - 40px);
    white-space: normal;
    text-align: center;
  }
}

.right-click-message.show {
  transform: translateY(0);
  opacity: 1;
}

/* ========================================
   Smooth Scroll Reveal Animations
   ======================================== */

/* Fade animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Smooth hover lift effect */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Smooth glow effect */
.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
}

/* Text reveal animation */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: textReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* Smooth underline effect */
.smooth-underline {
  position: relative;
}

.smooth-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.smooth-underline:hover::after {
  width: 100%;
}

/* Pulse animation for buttons */
@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.6);
  }
}

.btn-primary:not(:hover) {
  animation: subtlePulse 3s ease-in-out infinite;
}

/* Smooth progress bar animation */
@keyframes progressLoad {
  from {
    width: 0;
  }
}

.skill-progress {
  animation: progressLoad 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Card tilt effect on hover */
.tilt-card {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

/* Floating animation */
@keyframes smoothFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: smoothFloat 4s ease-in-out infinite;
}

/* Gradient text animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}

/* Smooth icon rotation */
.icon-rotate {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.icon-rotate:hover {
  transform: rotate(360deg);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: clamp(15px, 4vw, 30px);
  right: clamp(15px, 4vw, 30px);
  width: clamp(42px, 10vw, 50px);
  height: clamp(42px, 10vw, 50px);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(1rem, 3vw, 1.2rem);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.4s ease,
              visibility 0.4s ease,
              transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
  border: none;
  min-width: 44px;
  min-height: 44px;
}

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

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.back-to-top:active {
  transform: scale(0.95);
}

/* Page load animation */
@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageLoad 0.5s ease-out;
}

/* ========================================
   Touch Device Optimizations
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  /* Disable hover transformations on touch devices */
  .project-card:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
  
  .btn:hover {
    transform: none;
  }
  
  .glass:hover {
    transform: none;
  }
  
  .tag:hover {
    transform: none;
  }
  
  .feature-item:hover {
    transform: none;
  }
  
  .stat-mini:hover {
    transform: none;
  }
  
  .skills-column:hover {
    transform: none;
  }
  
  .skill-item:hover {
    transform: none;
  }
  
  .timeline-item:hover {
    transform: none;
  }
  
  .contact-item:hover {
    transform: none;
  }
  
  .social-link:hover {
    transform: none;
  }
  
  .footer-social a:hover {
    transform: none;
  }
  
  .back-to-top:hover {
    transform: none;
  }
  
  /* Add active states for touch feedback */
  .project-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  .tag:active {
    transform: scale(0.95);
  }
  
  .social-link:active {
    transform: scale(0.9);
  }
  
  .footer-social a:active {
    transform: scale(0.9);
  }
  
  /* Hide scrollbar on mobile too */
  ::-webkit-scrollbar {
    display: none;
  }
  
  /* Disable text selection prevention for better UX */
  * {
    -webkit-user-select: auto;
    user-select: auto;
  }
}

/* Prevent zoom on double tap for form elements on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input, select, textarea {
    font-size: 16px;
  }
}

/* Safe area support for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
  header.dynamic-island {
    padding-top: max(12px, env(safe-area-inset-top));
  }
  
  footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }
  
  .back-to-top {
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 15px));
    right: max(30px, calc(env(safe-area-inset-right) + 15px));
  }
}

/* ========================================
   Maintenance Modal
======================================== */
.maintenance-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.maintenance-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.maintenance-modal-content {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 35, 60, 0.95), rgba(20, 25, 45, 0.98));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(76, 76, 255, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

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

.maintenance-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.maintenance-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--light);
  transform: rotate(90deg);
}

.maintenance-modal-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

.maintenance-modal-icon i {
  font-size: 2rem;
  color: white;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(76, 76, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(76, 76, 255, 0.6), 0 0 60px rgba(56, 189, 248, 0.3);
  }
}

.maintenance-modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--light), var(--gray-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.maintenance-modal-text {
  color: var(--gray-400);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.maintenance-modal .btn-primary {
  padding: 0.875rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
}
