/* ===== CSS Variables ===== */
:root {
  --bg-primary: #08080a;
  --bg-secondary: #0f0f12;
  --bg-card: #131318;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: rgba(255, 255, 255, 0.1);
  --purple-primary: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dark: #7c3aed;
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #a855f7);
  --gradient-text: linear-gradient(135deg, #8b5cf6, #a855f7, #d946ef);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --transition: all 0.3s ease;
  --shadow-glow: 0 0 40px -10px rgba(139, 92, 246, 0.5);
  --shadow-glow-sm: 0 0 20px -5px rgba(139, 92, 246, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

/* ===== Utilities ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.w-full {
  width: 100%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}

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

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

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== Badges ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-light);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 1rem;
}

.badge-icon {
  width: 1rem;
  height: 1rem;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: transparent;
  padding: 0.75rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--gradient-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
}

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

.nav-link:hover {
  color: white;
}

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

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger {
  width: 24px;
  height: 2px;
  background: white;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(8, 8, 10, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
}

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

.mobile-link {
  color: var(--text-secondary);
  padding: 0.5rem 0;
  transition: var(--transition);
}

.mobile-link:hover {
  color: white;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: pulse-glow 4s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.2);
  top: 20%;
  left: 15%;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(139, 92, 246, 0.15);
  bottom: 25%;
  right: 15%;
  animation-delay: 2s;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--purple-light);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 1.5rem;
}

.sparkle-icon {
  width: 1rem;
  height: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

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

/* ===== Skills Section ===== */
.skills {
  padding: 6rem 0;
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-glow-sm);
}

.skill-card:hover::before {
  opacity: 0.05;
}

.skill-icon {
  width: 3rem;
  height: 3rem;
  background: var(--gradient);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

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

.skill-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.skill-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.skill-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ===== Projects Section ===== */
.projects {
  padding: 6rem 0;
}

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

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

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: var(--shadow-glow-sm);
}

.project-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary), transparent 50%);
  opacity: 0.6;
}

.project-content {
  padding: 1.5rem;
}

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

.project-category {
  font-size: 0.75rem;
  color: var(--purple-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.project-card:hover .project-arrow {
  color: white;
}

.project-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.project-card:hover .project-title {
  color: var(--purple-light);
}

.project-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.project-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.projects-note {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== About Section ===== */
.about {
  padding: 6rem 0;
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-content .section-badge {
  margin-bottom: 1rem;
}

.about-text {
  margin-bottom: 2rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.tools-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.tool-tag:hover {
  border-color: rgba(139, 92, 246, 0.3);
  color: white;
}

.about-image-wrapper {
  position: relative;
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
}

.about-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2));
  z-index: 1;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 2;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

.card-years {
  top: -1rem;
  right: -1rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
}

.card-projects {
  bottom: -1rem;
  left: -1rem;
}

.floating-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.floating-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ===== Contact Section ===== */
.contact {
  padding: 6rem 0;
  position: relative;
  text-align: center;
}

.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 50%;
  filter: blur(150px);
}

.contact-content {
  position: relative;
  z-index: 1;
}

.contact-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

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

.social-link {
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

.social-link:hover {
  color: white;
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
}

/* ===== Footer ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-text {
  font-weight: 600;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

/* ===== Animations ===== */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slide-up 0.6s ease-out forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* ===== Selection ===== */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-image-wrapper {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .floating-card {
    padding: 0.75rem;
  }
  
  .card-years {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .card-projects {
    bottom: 0.5rem;
    left: 0.5rem;
  }
  
  .floating-value {
    font-size: 1.25rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-lg {
    width: 100%;
    max-width: 280px;
  }
  
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
