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

:root {
  /* Light theme (default) */
  --bg-primary-light: #ffffff;
  --bg-secondary-light: #f5f5f5;
  --bg-tertiary-light: #e5e7eb;
  --text-primary-light: #1f2937;
  --text-secondary-light: #4b5563;
  --text-muted-light: #6b7280;
  --accent-primary-light: #3b82f6;
  --accent-secondary-light: #8b5cf6;
  --accent-gradient-light: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --border-color-light: #d1d5db;
  --shadow-glow-light: 0 0 20px rgba(59, 130, 246, 0.3);
  --nav-bg-light: rgba(255, 255, 255, 0.9);
  --nav-bg-scroll-light: rgba(255, 255, 255, 0.5);

  /* Dark theme */
  --bg-primary-dark: #0a0a0a;
  --bg-secondary-dark: #111111;
  --bg-tertiary-dark: #1a1a1a;
  --text-primary-dark: #ffffff;
  --text-secondary-dark: #b0b0b0;
  --text-muted-dark: #808080;
  --accent-primary-dark: #00d4ff;
  --accent-secondary-dark: #7c3aed;
  --accent-gradient-dark: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --border-color-dark: #333333;
  --shadow-glow-dark: 0 0 20px rgba(0, 212, 255, 0.3);
  --nav-bg-dark: rgba(10, 10, 10, 0.9);
  --nav-bg-scroll-dark: rgba(10, 10, 10, 0.5);

  /* Default to light theme */
  --bg-primary: var(--bg-primary-light);
  --bg-secondary: var(--bg-secondary-light);
  --bg-tertiary: var(--bg-tertiary-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --text-muted: var(--text-muted-light);
  --accent-primary: var(--accent-primary-light);
  --accent-secondary: var(--accent-secondary-light);
  --accent-gradient: var(--accent-gradient-light);
  --border-color: var(--border-color-light);
  --shadow-glow: var(--shadow-glow-light);
  --nav-bg: var(--nav-bg-light);
  --nav-bg-scroll: var(--nav-bg-scroll-light);
}

[data-theme="dark"] {
  --bg-primary: var(--bg-primary-dark);
  --bg-secondary: var(--bg-secondary-dark);
  --bg-tertiary: var(--bg-tertiary-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --text-muted: var(--text-muted-dark);
  --accent-primary: var(--accent-primary-dark);
  --accent-secondary: var(--accent-secondary-dark);
  --accent-gradient: var(--accent-gradient-dark);
  --border-color: var(--border-color-dark);
  --shadow-glow: var(--shadow-glow-dark);
  --nav-bg: var(--nav-bg-dark);
  --nav-bg-scroll: var(--nav-bg-scroll-dark);
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
}

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

.shape {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-gradient);
  animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.shape:nth-child(3) {
  width: 40px;
  height: 40px;
  top: 80%;
  left: 30%;
  animation-delay: 4s;
}

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

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.nav-right {
  display: flex;
  gap: 30px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.logo {
  color: var(--text-secondary);
  font-size: 24px;
  font-weight: 700;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

.hamburger {
  display: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.hamburger.active i::before {
  content: "\f00d"; /* Font Awesome 'x' icon */
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

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

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

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

.hero-text h1 {
  font-family: "Dancing Script", "Poppins", sans-serif;
  font-size: 5.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  opacity: 0;
  animation: slideInUp 1s ease forwards;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text .subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  opacity: 0;
  animation: slideInUp 1s ease 0.2s forwards;
}

.hero-text .description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  opacity: 0;
  animation: slideInUp 1s ease 0.4s forwards;
}

.hero-image {
  position: relative;
  opacity: 0;
  animation: slideInRight 1s ease 0.3s forwards;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 100px rgba(0, 212, 255, 0.15);
}

.hero-buttons {
  display: flex;
  gap: 20px;
  opacity: 0;
  animation: slideInUp 1s ease 0.6s forwards;
}

.btn {
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

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

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

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

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

.hero-image {
  position: relative;
  opacity: 0;
  animation: slideInRight 1s ease 0.3s forwards;
}

.profile-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--accent-gradient);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: white;
}

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

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.social-link:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

/* Section Styles */
.section {
  padding: 100px 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

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

.section-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 60px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.skill-category {
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 30px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--accent-primary);
  color: white;
  transform: scale(1.05);
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

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

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

.project-content {
  padding: 30px;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

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

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
}

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

.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent-secondary);
  transform: translateX(5px);
}

/* Experience Section */
.timeline {
  position: relative;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 40px;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 40px;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  background: var(--accent-primary);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
}

.timeline-content {
  background: var(--bg-secondary);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 5px;
}

.timeline-company {
  font-weight: 500;
  margin-bottom: 10px;
}

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

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--border-color);
}

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

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

.contact-details h4 {
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-details p {
  color: var(--text-secondary);
}

.footer {
  background: var(--bg-secondary);
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 380px) {
  .contact-content {
    font-size: 0.95rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    padding-top: 30px;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    font-size: 1.5rem;
    padding: 10px 0;
    display: block;
  }

  .nav-links a::after {
    bottom: -2px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

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

  .contact-content {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px !important;
    padding-right: 0 !important;
  }

  .timeline-dot {
    left: 12px !important;
    right: auto !important;
  }
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 1.2rem;
}

.hidden {
  display: none;
}
