/* CSS Custom Properties with Advanced Design System */
:root {
  /* Color Palette */
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;

  --accent-50: #fdf4ff;
  --accent-100: #fae8ff;
  --accent-200: #f5d0fe;
  --accent-300: #f0abfc;
  --accent-400: #e879f9;
  --accent-500: #d946ef;
  --accent-600: #c026d3;
  --accent-700: #a21caf;
  --accent-800: #86198f;
  --accent-900: #701a75;

  --success-500: #10b981;
  --warning-500: #f59e0b;
  --error-500: #ef4444;

  /* Dark Theme Colors */
  --dark-950: #030712;
  --dark-900: #111827;
  --dark-800: #1f2937;
  --dark-700: #374151;
  --dark-600: #4b5563;
  --dark-500: #6b7280;
  --dark-400: #9ca3af;
  --dark-300: #d1d5db;
  --dark-200: #e5e7eb;
  --dark-100: #f3f4f6;
  --dark-50: #f9fafb;

  /* Light Theme Colors */
  --light-50: #f8fafc;
  --light-100: #f1f5f9;
  --light-200: #e2e8f0;
  --light-300: #cbd5e1;
  --light-400: #94a3b8;
  --light-500: #64748b;
  --light-600: #475569;
  --light-700: #334155;
  --light-800: #1e293b;
  --light-900: #0f172a;

  /* Dynamic Theme Variables */
  --bg-primary: var(--dark-950);
  --bg-secondary: var(--dark-900);
  --bg-tertiary: var(--dark-800);
  --text-primary: var(--dark-100);
  --text-secondary: var(--dark-300);
  --text-tertiary: var(--dark-500);
  --border-primary: rgba(255, 255, 255, 0.1);
  --border-secondary: rgba(255, 255, 255, 0.05);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-600) 0%,
    var(--accent-600) 100%
  );
  --gradient-secondary: linear-gradient(
    135deg,
    var(--accent-500) 0%,
    var(--primary-500) 100%
  );
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-glow: radial-gradient(
    circle at center,
    rgba(14, 165, 233, 0.3) 0%,
    transparent 70%
  );

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 0 1px rgba(14, 165, 233, 0.2),
    0 0 20px rgba(14, 165, 233, 0.4);
  --shadow-glow-accent: 0 0 0 1px rgba(217, 70, 239, 0.2),
    0 0 20px rgba(217, 70, 239, 0.4);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --radius-full: 9999px;

  /* Z-Index Scale */
  --z-behind: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-floating: 100;
  --z-overlay: 1000;
  --z-modal: 10000;
  --z-toast: 100000;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: var(--light-50);
  --bg-secondary: var(--light-100);
  --bg-tertiary: var(--light-200);
  --text-primary: var(--light-900);
  --text-secondary: var(--light-700);
  --text-tertiary: var(--light-500);
  --border-primary: rgba(0, 0, 0, 0.1);
  --border-secondary: rgba(0, 0, 0, 0.05);
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05),
    0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
    0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity var(--transition-slow);
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 60px;
  height: 60px;
  position: relative;
}

.loader::before,
.loader::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary-500);
  animation: spin 1s linear infinite;
}

.loader::before {
  width: 60px;
  height: 60px;
}

.loader::after {
  width: 40px;
  height: 40px;
  top: 10px;
  left: 10px;
  border-top-color: var(--accent-500);
  animation-duration: 0.75s;
  animation-direction: reverse;
}

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

/* Content Wrapper */
.content-wrapper {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.content-wrapper.loaded {
  opacity: 1;
}

/* Background Effects - IMPROVED ANIMATIONS */
.background-effects {
  position: fixed;
  inset: 0;
  z-index: var(--z-behind);
  pointer-events: none;
  overflow: hidden;
  /* Fade in the entire background */
  animation: background-fade-in 3s ease-out forwards;
  opacity: 0;
}

@keyframes background-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Improved Mesh Gradient - Slower and One-time */
.mesh-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(14, 165, 233, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(217, 70, 239, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 50%
    );
  /* Changed: Much slower (60s vs 20s) and runs only once */
  animation: float-once 60s ease-in-out forwards;
  /* Start with initial state */
  transform: scale(1) rotate(0deg);
  will-change: transform, opacity;
}

[data-theme="light"] .mesh-gradient {
  background: radial-gradient(
      circle at 20% 80%,
      rgba(14, 165, 233, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(217, 70, 239, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(16, 185, 129, 0.05) 0%,
      transparent 50%
    );
}

/* New keyframe for one-time mesh animation */
@keyframes float-once {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0;
  }
  25% {
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05) rotate(90deg);
    opacity: 1;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.02) rotate(180deg);
    opacity: 0.6;
  }
}

/* Improved Grid Pattern - Slower and One-time */
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(14, 165, 233, 0.1) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(14, 165, 233, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  /* Changed: Much slower (80s vs 20s) and runs only once */
  animation: grid-move-once 80s linear forwards;
  opacity: 0;
  /* Start with initial position */
  transform: translate(0, 0);
  will-change: transform, opacity;
}

[data-theme="light"] .grid-pattern {
  background-image: linear-gradient(
      rgba(14, 165, 233, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
}

/* New keyframe for one-time grid animation */
@keyframes grid-move-once {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  20% {
    opacity: 0.1;
  }
  50% {
    transform: translate(25px, 25px);
    opacity: 0.3;
  }
  80% {
    opacity: 0.2;
  }
  100% {
    transform: translate(50px, 50px);
    opacity: 0.15;
  }
}

/* Reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
  .mesh-gradient,
  .grid-pattern,
  .background-effects {
    animation: none !important;
    transform: none !important;
    opacity: 0.3 !important;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-floating);
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-primary);
  transition: all var(--transition-normal);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.8);
}

.navbar.scrolled {
  background: rgba(3, 7, 18, 0.95);
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.95);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-sm);
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-400);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

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

/* Theme Toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  cursor: pointer;
  transition: all var(--transition-spring);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
  transform: scale(1.05);
}

.theme-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.theme-toggle:hover .theme-icon {
  color: var(--primary-400);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-8);
    gap: var(--space-6);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-primary);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
  position: relative;
}

.hero-content {
  max-width: 1200px;
  text-align: center;
  z-index: var(--z-raised);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.1) 0%,
    rgba(16, 185, 129, 0.1) 100%
  );
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--primary-300);
  margin-bottom: var(--space-8);
  backdrop-filter: blur(10px);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 2s ease-in-out;
}

.hero-badge:hover::before {
  left: 100%;
}

.hero-badge:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-6);
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--primary-400) 0%,
    var(--accent-400) 50%,
    var(--primary-400) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease-in-out infinite;
}

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

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Section Layouts */
.section {
  padding: var(--space-24) var(--space-6);
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
}

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

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Card Components */
.card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.6) 100%
  );
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.card:hover {
  transform: translateY(-8px);
  border-color: var(--border-primary);
  box-shadow: var(--shadow-2xl);
}

/* Project Card Link Styles */
a.project-card {
  cursor: pointer;
}

a.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

a.project-card .project-title {
  transition: color var(--transition-fast);
}

a.project-card:hover .project-title {
  color: var(--primary-300);
}

/* Clickable Card Styles */
.clickable-card {
  cursor: pointer !important;
}

.clickable-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.clickable-card .project-title {
  transition: color var(--transition-fast);
}

.clickable-card:hover .project-title {
  color: var(--primary-300);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
  }
  .experience-timeline {
    display: none;
  }

  .experience-item {
    padding-left: 20px !important;
  }

  .experience-marker {
    display: none;
  }

  .content-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .section-title {
    font-size: var(--font-size-3xl);
  }
}

/* Project Image Styles */
.project-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  opacity: 0.8;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.project-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 4rem;
  color: white;
  font-weight: 800;
}

#projectsGrid > *:nth-child(1) .project-image {
  background: var(--gradient-success);
}

#projectsGrid > *:nth-child(2) .project-image {
  background: var(--gradient-warm);
}

#projectsGrid > *:nth-child(3) .project-image {
  background: var(--gradient-primary);
}

#projectsGrid > *:nth-child(4) .project-image {
  background: var(--gradient-secondary);
}

#projectsGrid > *:nth-child(5) .project-image {
  background: var(--gradient-primary);
}

#projectsGrid > *:nth-child(6) .project-image {
  background: var(--gradient-secondary);
}

.project-image:hover {
  opacity: 1;
  transform: scale(1.02);
}

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

.project-image:hover .project-icon-fallback {
  transform: scale(1.05);
}

a.project-card:hover .project-image {
  opacity: 1;
  transform: scale(1.05);
}

a.project-card:hover .project-img {
  transform: scale(1.1);
}

a.project-card:hover .project-icon-fallback {
  transform: scale(1.1);
}

.clickable-card:hover .project-image {
  opacity: 1;
  transform: scale(1.05);
}

.clickable-card:hover .project-img {
  transform: scale(1.1);
}

.clickable-card:hover .project-icon-fallback {
  transform: scale(1.1);
}

/* Play Store Button in Clickable Cards */
a.project-card .btn {
  cursor: pointer;
}

/* PDF Modal Styles */
.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.pdf-modal.active {
  display: flex;
}

.pdf-container {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 1000px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-2xl);
}

.pdf-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.pdf-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.pdf-actions {
  display: flex;
  gap: var(--space-3);
}

.pdf-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.pdf-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.pdf-close {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
}

.pdf-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error-500);
}

.pdf-viewer {
  flex: 1;
  padding: var(--space-4);
  overflow: hidden;
}

.pdf-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  background: white;
}

@media (max-width: 768px) {
  .pdf-container {
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
  }

  .pdf-header {
    padding: var(--space-3) var(--space-4);
  }

  .pdf-viewer {
    padding: 0;
  }

  .pdf-iframe {
    border-radius: 0;
  }
}

/* About Section Styles */
.about-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-10);
}

.profile-img {
  width: 200px;
  height: 200px;
  margin-bottom: var(--space-6);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-400);
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
}

.profile-placeholder {
  width: 200px;
  height: 200px;
  margin-bottom: var(--space-6);
  border-radius: 50%;
  background: var(--gradient-primary);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
  font-weight: 800;
}

.profile-name {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.profile-title {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  font-weight: 500;
  text-align: center;
}

.about-info-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--primary-400);
}

.about-info-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.about-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Experience Section Styles */
.experience-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.experience-timeline {
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
}

.experience-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: var(--space-12);
}

.experience-marker {
  position: absolute;
  left: 21px;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: 4px solid var(--bg-primary);
  transition: all var(--transition-spring);
  z-index: 1;
}

.experience-card {
  transition: all var(--transition-spring);
}

.experience-card:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-glow);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.experience-company {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-400);
  margin-bottom: var(--space-1);
}

.experience-position {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.experience-meta {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.experience-period {
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-300);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border: 1px solid rgba(14, 165, 233, 0.2);
  white-space: nowrap;
}

.experience-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
  font-style: italic;
}

.achievements-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.achievements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.achievement-item {
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  padding-left: var(--space-6);
  position: relative;
  line-height: 1.6;
}

.achievement-item::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--primary-400);
  font-weight: bold;
}

.technologies {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.technology-tag {
  background: rgba(217, 70, 239, 0.1);
  color: var(--accent-300);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  border: 1px solid rgba(217, 70, 239, 0.2);
}

/* Contact Section Styles */
.contact-grid {
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: all var(--transition-spring);
  display: block;
}

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

.contact-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.contact-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--primary-400);
  margin-bottom: var(--space-2);
}

.contact-info {
  color: var(--text-secondary);
  word-break: break-word;
}

.contact-card:nth-child(2):hover {
  box-shadow: var(--shadow-glow-accent);
}

.contact-card:nth-child(2) .contact-title {
  color: var(--accent-400);
}

.contact-card:nth-child(3) .contact-title {
  color: var(--success-500);
}

.contact-card:nth-child(4) .contact-title {
  color: var(--success-500);
}

.contact-card:nth-child(4):hover {
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2),
    0 0 20px rgba(16, 185, 129, 0.3);
  border-color: rgba(16, 185, 129, 0.3);
}

.contact-card:nth-child(4) .contact-icon {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1) 0%,
    rgba(14, 165, 233, 0.1) 100%
  );
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.social-links {
  text-align: center;
  margin-top: var(--space-12);
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--transition-spring);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .social-link {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.02) 100%
  );
}

.social-link::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.social-link:hover::before {
  width: 100px;
  height: 100px;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: var(--primary-400);
  color: white;
  box-shadow: var(--shadow-glow);
}

.social-link svg {
  position: relative;
  z-index: 1;
}

.contact-message {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
  text-align: center;
}

/* Project Card Styles */
.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--primary-400);
  transition: color var(--transition-fast);
  line-height: 1.3;
}

.project-title a {
  transition: all var(--transition-fast);
}

.project-title a:hover {
  color: var(--primary-300);
}

.project-company {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.6;
  flex-grow: 1;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.project-features {
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.features-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-item {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
  padding-left: var(--space-4);
  position: relative;
  line-height: 1.4;
}

.feature-item::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-400);
  font-weight: bold;
}

/* Footer Styles */
.footer-content {
  text-align: center;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-secondary);
  padding-top: var(--space-8);
}
