/* ===================================
   CSS VARIABLES & DESIGN SYSTEM
   =================================== */
:root {
  /* Color Palette */
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #13131a;
  --color-bg-tertiary: #1a1a24;
  --color-text-primary: #ffffff;
  --color-text-secondary: #b4b4c8;
  --color-text-muted: #6e6e8f;

  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 3rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);

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

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 600px;
  max-width: 95%;
  z-index: 1000;
  padding: 8px 12px 8px 24px;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  transition: var(--transition-base), top 0.4s ease, width 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.navbar.scrolled {
  top: 12px;
  background: rgba(10, 10, 15, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: 8px 4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta-button {
  background: #fff;
  color: #000;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-base);
  border: 1px solid transparent;
}

.nav-cta-button:hover {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  cursor: pointer;
}

/* ===================================
   HERO SECTION
   =================================== */
#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-2xl) var(--spacing-lg);
  background: transparent;
}


.hero-content {
  max-width: 1100px;
  text-align: center;
  z-index: 10;
  padding: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(15px);
  background: rgba(10, 10, 15, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1s ease;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 900;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 60px rgba(102, 126, 234, 0.3));
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from {
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 60px rgba(102, 126, 234, 0.3));
  }

  to {
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 100px rgba(79, 172, 254, 0.4));
  }
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(102, 126, 234, 0.3);
  margin-bottom: var(--spacing-xl);
  display: block;
}

.hero-description {
  font-size: var(--font-size-lg);
  color: #d1d1e0;
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.glass-button {
  position: relative;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1.5px solid transparent;
  border-radius: 40px;
  backdrop-filter: blur(30px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  text-decoration: none;
  gap: 1.0rem;
}

.glass-button::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  padding: 1.5px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.4) 0%,
      rgba(102, 126, 234, 0.4) 25%,
      rgba(79, 172, 254, 0.4) 50%,
      rgba(240, 147, 251, 0.4) 75%,
      rgba(255, 255, 255, 0.4) 100%);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderFlow 3s linear infinite;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.glass-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.glass-button:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow: 0 12px 48px rgba(102, 126, 234, 0.3), 0 0 80px rgba(79, 172, 254, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-3px) scale(1.02);
}

.glass-button:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.glass-button:hover::after {
  opacity: 1;
}

.glass-button:active {
  transform: translateY(-1px) scale(0.98);
}

.glass-button .shimmer {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 45%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 55%, transparent 100%);
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }

  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

.glass-button span:not(.shimmer) {
  position: relative;
  z-index: 1;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   SECTION STYLES
   =================================== */
section {
  padding: var(--spacing-2xl) var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  margin-bottom: var(--spacing-sm);
  text-align: center;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.4));
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-content {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-2xl);
  background: rgba(10, 10, 15, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.about-content .section-title {
  margin-bottom: var(--spacing-xs);
}

.about-content .section-subtitle {
  margin-bottom: var(--spacing-xl);
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.about-text {
  font-size: var(--font-size-base);
  color: #d1d1e0;
  line-height: 1.8;
}

.about-text p {
  margin-bottom: var(--spacing-md);
}

.about-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-blob-svg {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1/1;
  filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.3));
  overflow: visible;
}

.blob-path,
.blob-image-group {
  transform-origin: 0 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-blob-svg:hover .blob-path {
  transform: scale(1.15);
}

.about-blob-svg:hover .blob-image-group {
  transform: scale(1.05);
}

.blob-text {
  font: 700 8px var(--font-primary);
  letter-spacing: 2.3px;
  text-transform: uppercase;
  fill: rgba(255, 255, 255, 0.3);
  mix-blend-mode: overlay;
  transition: fill 0.5s ease;
}

.about-blob-svg:hover .blob-text {
  fill: rgba(255, 255, 255, 1);
}


.about-image img {
  max-width: 380px;
  aspect-ratio: 4 / 5;
}


/* ===================================
   PROJECTS SECTION
   =================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

/* ===================================
   SHARED GLOW EFFECT
   =================================== */
.hero-content::before,
.about-content::before,
.skill-category::before,
.project-card::before,
.contact-content::before,
.hero-content::after,
.about-content::after,
.skill-category::after,
.project-card::after,
.contact-content::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Background gradient glow */
.hero-content::before,
.about-content::before,
.skill-category::before,
.project-card::before,
.contact-content::before {
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(102, 126, 234, 0.12),
      transparent 40%);
  z-index: -1;
}

/* Border gradient glow */
.hero-content::after,
.about-content::after,
.skill-category::after,
.project-card::after,
.contact-content::after {
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.3),
      rgba(102, 126, 234, 0.2) 50%,
      transparent 80%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
}

.hero-content:hover::before,
.about-content:hover::before,
.skill-category:hover::before,
.project-card:hover::before,
.contact-content:hover::before,
.hero-content:hover::after,
.about-content:hover::after,
.skill-category:hover::after,
.project-card:hover::after,
.contact-content:hover::after {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(102, 126, 234, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.project-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition-slow);
  position: relative;
  z-index: 1;
}

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

.project-content {
  position: relative;
  z-index: 3;
  padding: var(--spacing-lg);
}

.project-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 2rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
}

.project-links {
  display: flex;
  gap: var(--spacing-md);
}

.project-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* ===================================
   SKILLS SECTION
   =================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.skill-category {
  background: rgba(255, 255, 255, 0.05);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.skill-category h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-md);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.skill-item {
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}

.skill-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-2xl);
  background: rgba(10, 10, 15, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.contact-link {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-xl);
  transition: var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-link:hover {
  background: var(--gradient-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

/* ===================================
   FOOTER
   =================================== */
footer {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-muted);
}

/* ===================================
   ANIMATIONS
   =================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
  .navbar {
    width: 95%;
    min-width: auto;
    padding: 8px 16px;
    top: 16px;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    height: auto;
    width: 200px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-lg);
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: var(--spacing-sm);
  }

  .nav-links.active {
    right: 16px;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-cta-button {
    display: none;
  }

  .about-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    width: 100%;
  }

  .about-text {
    text-align: center;
    width: 100%;
  }

  .about-text p {
    margin-bottom: var(--spacing-md);
  }

  .about-content {
    padding: var(--spacing-lg);
  }

  .about-image {
    order: -1;
  }

  .about-blob-svg {
    max-width: 280px;
    height: auto;
    margin: 0 auto;
  }

  .blob-text {
    fill: rgba(255, 255, 255, 0.8);
    mix-blend-mode: normal;
  }

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

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

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }

  .hero {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  section {
    padding: var(--spacing-xl) var(--spacing-md);
  }
}