/* ===== CSS Variables ===== */
:root {
  /* Colors - Light Theme */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #64748b;
  --accent: #06b6d4;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: "Fira Code", monospace;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max-width: 1200px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50%;
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize animations with will-change where needed */
.carousel-slides,
.project-card,
.service-card,
.skill-card,
.btn {
  will-change: transform;
}

/* Content-visibility for off-screen sections */
.services,
.projects,
.experience,
.skills,
.contact {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.3);

  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal),
    color var(--transition-normal);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Preloader ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-radius: var(--radius-full);
  position: relative;
}

.loader-inner {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

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

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  box-shadow: 0 2px 30px var(--shadow-color);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-code);
}

.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 5px 0;
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(15deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 24px;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  background: transparent;
}

.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 0.1s ease;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.hero-shapes .shape {
  position: absolute;
  border-radius: var(--radius-full);
  background: var(--primary);
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: -100px;
  animation-delay: -5s;
}

.shape-3 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  animation-delay: -10s;
}

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

.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-greeting {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 10px;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
}

.hero-name .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 40px;
}

.typed-text {
  color: var(--primary);
  font-weight: 600;
}

.cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

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

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-plus {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Hero Image */
.hero-image {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
}

.image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  opacity: 0.25;
  filter: blur(40px);
  animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.25;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.35;
  }
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-full);
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2), 0 20px 50px rgba(0, 0, 0, 0.3),
    0 10px 20px rgba(37, 99, 235, 0.15);
  position: relative;
  z-index: 1;
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.image-wrapper:hover .profile-img {
  transform: scale(1.02);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.3), 0 25px 60px rgba(0, 0, 0, 0.35),
    0 15px 30px rgba(37, 99, 235, 0.2);
}

/* Animated ring around profile */
.image-wrapper::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: var(--radius-full);
  border: 2px dashed rgba(37, 99, 235, 0.3);
  animation: rotate 20s linear infinite;
}

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

/* Floating dots decoration */
.image-wrapper::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: var(--radius-full);
  top: 10%;
  right: 5%;
  box-shadow: -250px 180px 0 8px var(--accent),
    -280px 80px 0 4px var(--primary-light), 30px 280px 0 6px var(--primary);
  animation: float 6s ease-in-out infinite;
  z-index: 0;
}

[data-theme="dark"] .profile-img {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3), 0 20px 50px rgba(0, 0, 0, 0.5),
    0 10px 20px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .image-wrapper:hover .profile-img {
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.4), 0 25px 60px rgba(0, 0, 0, 0.6),
    0 15px 30px rgba(37, 99, 235, 0.25);
}

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

.social-links a {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 20px var(--shadow-color), 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.social-links a i {
  position: relative;
  z-index: 1;
}

.social-links a:hover {
  color: white;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4), 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-links a:hover::before {
  opacity: 1;
}

/* Individual social link colors on hover */
.social-links a:nth-child(1):hover {
  box-shadow: 0 10px 30px rgba(10, 102, 194, 0.4);
}

.social-links a:nth-child(2):hover {
  box-shadow: 0 10px 30px rgba(36, 41, 46, 0.4);
}

.social-links a:nth-child(3):hover {
  box-shadow: 0 10px 30px rgba(234, 67, 53, 0.4);
}

/* Scroll Down */
.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  animation: bounce 2s infinite;
}

.scroll-down i {
  font-size: 1.2rem;
}

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

/* ===== Section Styles ===== */
section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

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

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 15px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
  margin: 15px auto 0;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ===== Services Section ===== */
.services {
  background: var(--bg-secondary);
}

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

.service-card {
  background: var(--gradient-card);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px var(--shadow-color);
}

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

.service-icon {
  width: 70px;
  height: 70px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 25px;
}

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

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

.service-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.service-features i {
  color: var(--primary);
  font-size: 0.9rem;
}

/* ===== Projects Section ===== */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 25px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 50px;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: white;
}

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

.project-card {
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px var(--shadow-color);
}

.project-card.hidden {
  display: none;
}

/* ===== Project Carousel ===== */
.project-carousel {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slides {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slides img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--primary);
  font-size: 1rem;
}

.carousel-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 15px;
}

.carousel-btn.next {
  right: 15px;
}

.project-card:hover .carousel-btn {
  opacity: 1;
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: var(--primary);
  border-color: white;
  transform: scale(1.2);
}

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

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

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

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.project-carousel:hover .project-overlay,
.project-card:hover .project-overlay {
  opacity: 1;
  pointer-events: auto;
}

.project-link,
.expand-btn {
  width: 45px;
  height: 45px;
  background: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary);
  transform: scale(0);
  transition: transform var(--transition-normal);
}

.project-card:hover .project-link {
  transform: scale(1);
}

.project-link:hover {
  background: var(--text-primary);
  color: white;
}

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

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

.project-tech span {
  padding: 5px 12px;
  background: var(--bg-tertiary);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 50px;
}

/* ===== Experience Section ===== */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
}

.timeline-section {
  margin-bottom: 50px;
}

.timeline-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--primary);
}

.timeline-heading i {
  font-size: 1.3rem;
}

.timeline-item {
  position: relative;
  padding-left: 40px;
  padding-bottom: 40px;
  border-left: 2px solid var(--border-color);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-secondary);
}

.timeline-content {
  background: var(--gradient-card);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.timeline-content:hover {
  box-shadow: 0 10px 40px var(--shadow-color);
}

.timeline-date {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.timeline-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  margin-left: 10px;
}

.timeline-content h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.timeline-content h5 {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 15px;
}

.timeline-content h5 i {
  margin-right: 8px;
  color: var(--primary);
}

.timeline-details {
  margin-bottom: 15px;
}

.timeline-details li {
  position: relative;
  padding-left: 20px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.timeline-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-tags span {
  padding: 5px 12px;
  background: var(--bg-tertiary);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 50px;
}

/* Certifications Grid */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--gradient-card);
  padding: 25px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all var(--transition-normal);
}

.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.cert-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  color: white;
  font-size: 1.2rem;
}

.cert-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.cert-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.cert-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.skills-category {
  background: var(--gradient-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.category-header i {
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.category-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Tabbed Skills Interface */
.skills-tabs,
.skill-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.skill-tab {
  padding: 12px 24px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-tab i {
  font-size: 1.1rem;
}

.skill-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

.skill-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
}

.skills-content,
.skill-content {
  position: relative;
  min-height: 200px;
}

.skill-panel {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.skill-panel.active {
  display: block;
}

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

.skills-grid,
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 25px 20px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-align: center;
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 15px 40px var(--shadow-color);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--primary);
  transition: all var(--transition-fast);
}

.skill-card:hover i {
  transform: scale(1.1);
}

.skill-card span {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Soft Skills Section */
.soft-skills-section {
  margin-top: 50px;
  text-align: center;
}

.soft-skills-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.soft-skills-section h3 i {
  color: var(--primary);
}

.soft-skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.soft-skill-tag {
  padding: 15px 30px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.soft-skill-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

/* Legacy Soft Skills Tags */
.soft-skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.skill-tag {
  padding: 15px 30px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill-tag i {
  color: var(--primary);
  font-size: 1.1rem;
}

.skill-tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

.skill-tag:hover i {
  color: white;
}

/* Legacy support */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.skill-item:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.skill-item i {
  font-size: 1.2rem;
}

.skill-item span {
  font-weight: 500;
  font-size: 0.95rem;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--bg-secondary);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: space-between;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  flex: 1;
}

.info-card:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-content h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 5px;
}

.info-content p,
.info-content a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.info-content a:hover {
  color: var(--primary);
}

.social-connect {
  padding: 25px;
  background: var(--gradient-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.social-connect h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-normal);
}

.social-icon.linkedin {
  background: #0077b5;
  color: white;
}

.social-icon.github {
  background: #333;
  color: white;
}

.social-icon.email {
  background: var(--primary);
  color: white;
}

.social-icon:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--gradient-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 20px 15px 50px;
  font-size: 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.form-group label {
  position: absolute;
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.form-group textarea ~ label {
  top: 20px;
  transform: none;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  background: var(--bg-tertiary);
  padding: 0 8px;
  color: var(--primary);
}

.form-icon {
  position: absolute;
  left: 18px;
  top: 17px;
  color: var(--text-muted);
  font-size: 1rem;
}

.form-group input:focus ~ .form-icon,
.form-group textarea:focus ~ .form-icon {
  color: var(--primary);
}

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

.form-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--radius-sm);
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  background: #dcfce7;
  color: #16a34a;
}

.form-status.error {
  display: block;
  background: #fee2e2;
  color: #dc2626;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #ffffff;
  padding: 60px 0 30px;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-logo span {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-light);
  font-family: var(--font-code);
  text-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}

.footer-logo p {
  color: #e0e0e0;
  margin-top: 5px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: #e0e0e0;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width var(--transition-fast);
}

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

.footer-links a:hover::after {
  width: 100%;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
}

.footer-bottom p {
  color: #c0c0c0;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* ===== Animations ===== */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-right"] {
  transform: translateX(-30px);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-left"] {
  transform: translateX(30px);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .image-wrapper {
    width: 280px;
    height: 280px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 70px 0;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 100px 40px;
    gap: 30px;
    box-shadow: -10px 0 40px var(--shadow-color);
    transition: right var(--transition-normal);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-link {
    font-size: 1.2rem;
  }

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

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

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
  }

  .stat-item {
    flex: 1 0 calc(50% - 10px);
  }

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

  .timeline-item {
    padding-left: 25px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

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

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

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

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

  .contact-form-wrapper {
    padding: 25px;
  }

  /* Tabbed Skills Responsive */
  .skills-tabs,
  .skill-tabs {
    gap: 8px;
  }

  .skill-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .skill-tab i {
    font-size: 1.3rem;
  }

  .skills-grid,
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 18px 12px;
  }

  .skill-card i {
    font-size: 2rem;
  }

  .skill-card span {
    font-size: 0.85rem;
  }

  .soft-skill-tag,
  .skill-tag {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .soft-skills-section h3 {
    font-size: 1.2rem;
  }
}

/* ===== Image Lightbox ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 45px;
  height: 45px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-nav:hover {
  background: var(--primary);
  color: white;
}

.lightbox-nav.prev {
  left: -70px;
}

.lightbox-nav.next {
  right: -70px;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .lightbox-nav.prev {
    left: 10px;
  }

  .lightbox-nav.next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}
