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

:root {
  --primary-purple: #8b5cf6;
  --secondary-purple: #a78bfa;
  --dark-purple: #6d28d9;
  --accent-purple: #c4b5fd;
  --bg-dark: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --glow-purple: rgba(139, 92, 246, 0.5);
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #a78bfa);
  --gradient-dark: linear-gradient(135deg, #0f0f23, #1a1a2e);
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-purple) var(--bg-secondary);
}

*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

*::-webkit-scrollbar-thumb {
  background: var(--primary-purple);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-purple);
}

html {
  scroll-behavior: smooth;
}

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

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-purple);
  text-shadow: 0 0 10px var(--glow-purple);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

.nav-menu a:hover {
  color: var(--primary-purple);
  text-shadow: 0 0 5px var(--glow-purple);
}

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

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

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-purple);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--glow-purple);
}

/* Hero Section */
.hero-section {
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.hero-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(139, 92, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.hero-content {
  text-align: center;
  z-index: 2;
  position: relative;
  animation: fadeInUp 1s ease-out;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-avatar {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 2rem;
  animation: float 3s ease-in-out infinite;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--primary-purple);
  box-shadow: 0 0 30px var(--glow-purple);
}

.avatar-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}

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

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

#hero-name {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--glow-purple);
}

.typing-container {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  height: 2rem;
}

.cursor {
  animation: blink 1s infinite;
  color: var(--primary-purple);
}

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

.hero-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid var(--primary-purple);
  border-radius: 50%;
  color: var(--primary-purple);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-purple);
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 20px var(--glow-purple);
}

.scroll-indicator {
  display: flex;
  justify-content: center;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary-purple);
  border-radius: 50%;
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--primary-purple);
  border-bottom: 2px solid var(--primary-purple);
}

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

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

/* About Section */
#about {
  background: var(--bg-secondary);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  text-align: center;
  margin-bottom: 4rem;
}

#about-bio {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.highlight-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  transition: left 0.5s;
}

.highlight-card:hover::before {
  left: 100%;
}

.highlight-card:hover {
  border-color: var(--primary-purple);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.highlight-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.highlight-card h3 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

/* Tech Stack Section */
#tech-stack {
  background: var(--bg-dark);
}

#tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tech-stack-container {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
}

.tech-stack-container:hover {
  border-color: var(--primary-purple);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.tech-icons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  justify-items: center;
  align-items: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem;
}

.tech-icon-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tech-icon-item:nth-child(n+11) {
  grid-column: span 1;
}

.tech-icon-item:nth-child(11) {
  grid-column: 2;
}

.tech-icon-item:nth-child(12) {
  grid-column: 3;
}

.tech-icon-item:nth-child(13) {
  grid-column: 4;
}

.tech-icon-item:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary-purple);
  transform: translateY(-10px) scale(1.1);
  box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.tech-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0.9);
  transition: all 0.3s ease;
}

.tech-icon-item:hover .tech-logo {
  filter: brightness(1.2);
}

.tech-tooltip {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

.tech-tooltip::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid rgba(0, 0, 0, 0.8);
}

.tech-icon-item:hover .tech-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: -35px;
}

/* Experience Timeline */
#experience {
  background: var(--bg-secondary);
}

#experience .container {
  /* Normal container styles */
}

#experience .section-title {
  /* Normal section title styles */
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--glow-purple);
}

.timeline-item {
  position: relative;
  margin: 3rem 0;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:hover {
  transform: scale(1.02);
}

.timeline-content {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  width: 45%;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.timeline-content:hover {
  border-color: var(--primary-purple);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-2px);
}

.timeline-content:focus-within {
  border-color: var(--secondary-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--primary-purple);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 20px var(--glow-purple);
  z-index: 2;
}

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

.timeline-content h4 {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-content .timeline-date {
  background: var(--primary-purple);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.timeline-content p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Projects Section */
#projects {
  background: var(--bg-dark);
}

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

.projects-see-more {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 3rem;
}

.project-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  transition: left 0.5s;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  border-color: var(--primary-purple);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: brightness(0.9);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
  filter: brightness(1);
}

.project-content {
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.project-content h3 {
  color: var(--primary-purple);
  margin-bottom: 1rem;
  font-weight: 600;
}

.project-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.3s ease;
}

.tech-item:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary-purple);
  transform: translateY(-1px);
}

.tech-item .tech-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.tech-name {
  color: var(--primary-purple);
  font-size: 0.85rem;
  font-weight: 500;
}

.tech-tag {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-purple);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--primary-purple);
}

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

.project-link {
  color: var(--primary-purple);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-purple);
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.project-link:hover {
  background: var(--primary-purple);
  color: white;
  transform: translateY(-2px);
}

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

.contact-content {
  text-align: center;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  justify-items: center;
  align-items: start;
}

.contact-card {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  text-align: center;
}

.contact-card:hover {
  border-color: var(--primary-purple);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.contact-icon {
  font-size: 2rem;
  color: var(--primary-purple);
  margin-bottom: 1rem;
}

.contact-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-card a:hover {
  color: var(--primary-purple);
}

.contact-cta {
  margin-top: 3rem;
}

.cta-button {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

/* Footer */
footer {
  background: var(--bg-dark);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

footer p {
  color: var(--text-muted);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  #hero-name {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .about-highlights {
    grid-template-columns: 1fr;
  }

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

  .timeline-item {
    flex-direction: row !important;
    padding-left: 60px;
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .timeline-dot {
    left: 30px;
  }

  .horizontal-timeline {
    padding: 2rem 0;
  }

  .timeline-items {
    flex-direction: column;
    gap: 3rem;
    padding: 0 1rem;
  }

  .timeline-track {
    display: none;
  }

  .timeline-item {
    min-width: 100%;
    width: 100%;
  }

  .timeline-dot {
    position: relative;
    margin: 1rem auto 0;
  }
  
  #tech-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-icons-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0.5rem;
    max-width: 400px;
  }
  
  .tech-icon-item {
    width: 65px;
    height: 65px;
  }
  
  .tech-logo {
    width: 30px;
    height: 30px;
  }
  
  .tech-stack-container {
    padding: 2rem 1rem;
  }
  
  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .tech-icons-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 300px;
  }
  
  .tech-icon-item {
    width: 50px;
    height: 50px;
  }
  
  .tech-logo {
    width: 25px;
    height: 25px;
  }
}
