/* Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #b794f6;
  background: #0a0a0a;
  background-image: 
    linear-gradient(rgba(183, 148, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183, 148, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(183, 148, 246, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 0, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(159, 122, 234, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(183, 148, 246, 0.015) 2px,
    rgba(183, 148, 246, 0.015) 4px
  );
  pointer-events: none;
  z-index: 0;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100px);
  }
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(183, 148, 246, 0.3);
  z-index: 100;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(183, 148, 246, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #b794f6 0%, #9f7aea 50%, #ff00ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(183, 148, 246, 0.3);
  filter: drop-shadow(0 0 4px rgba(183, 148, 246, 0.3));
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #9f7aea;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #b794f6, #ff00ff);
  box-shadow: 0 0 4px rgba(183, 148, 246, 0.4);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #b794f6;
  text-shadow: 0 0 4px rgba(183, 148, 246, 0.4);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
  position: relative;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #b794f6 0%, #9f7aea 50%, #ff00ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  animation: fadeInUp 0.8s ease;
  filter: drop-shadow(0 0 8px rgba(183, 148, 246, 0.4));
}

.title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #9f7aea;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  animation: fadeInUp 0.8s ease 0.15s both;
  text-shadow: 0 0 6px rgba(159, 122, 234, 0.3);
}

.subtitle {
  margin-top: 0.5rem;
  color: #b794f6;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  animation: fadeInUp 0.8s ease 0.3s both;
  opacity: 0.9;
}

/* Sections */
section {
  margin-top: 5rem;
  animation: fadeIn 0.6s ease;
}

h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #b794f6;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 6px rgba(183, 148, 246, 0.3);
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #b794f6, #ff00ff);
  box-shadow: 0 0 6px rgba(183, 148, 246, 0.4);
  border-radius: 2px;
}

p {
  color: #9f7aea;
  font-size: 1.05rem;
  line-height: 1.8;
  opacity: 0.9;
}

#about p {
  margin-bottom: 1.25rem;
}

#about p:last-child {
  margin-bottom: 0;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid rgba(183, 148, 246, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(183, 148, 246, 0.05);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b794f6, #ff00ff, #b794f6);
  box-shadow: 0 0 6px rgba(183, 148, 246, 0.5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(183, 148, 246, 0.6);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(183, 148, 246, 0.2),
    inset 0 0 30px rgba(183, 148, 246, 0.08);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-card h3 {
  color: #b794f6;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(183, 148, 246, 0.3);
}

.project-card p {
  color: #9f7aea;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 2px solid rgba(183, 148, 246, 0.2);
  position: relative;
}

.project-tech::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #b794f6, transparent);
  box-shadow: 0 0 4px rgba(183, 148, 246, 0.4);
  border-radius: 2px;
}

.project-tech span {
  background: rgba(183, 148, 246, 0.1);
  border: 2px solid rgba(183, 148, 246, 0.4);
  color: #b794f6;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 
    0 2px 6px rgba(183, 148, 246, 0.15),
    inset 0 0 8px rgba(183, 148, 246, 0.05);
  display: inline-block;
  white-space: nowrap;
}

.project-tech span:hover {
  background: rgba(183, 148, 246, 0.15);
  border-color: rgba(183, 148, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 10px rgba(183, 148, 246, 0.3),
    0 0 12px rgba(183, 148, 246, 0.2);
}

.project-card:hover .project-tech span {
  background: rgba(183, 148, 246, 0.12);
  border-color: rgba(183, 148, 246, 0.5);
  box-shadow: 
    0 2px 8px rgba(183, 148, 246, 0.25),
    0 0 10px rgba(183, 148, 246, 0.15);
}

.project-image {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(183, 148, 246, 0.2);
  object-fit: cover;
  display: block;
}

/* Placeholder image */
.placeholder {
  background: linear-gradient(
    135deg,
    rgba(183, 148, 246, 0.08) 0%,
    rgba(255, 0, 255, 0.04) 50%,
    rgba(183, 148, 246, 0.08) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
  position: relative;
}

.placeholder::before {
  content: '◼';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.2;
  color: #b794f6;
  text-shadow: 0 0 10px rgba(183, 148, 246, 0.3);
}

.placeholder::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(183, 148, 246, 0.08),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Skills */
.skills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.skills li {
  background: rgba(183, 148, 246, 0.1);
  border: 2px solid rgba(183, 148, 246, 0.3);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #b794f6;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 2px 6px rgba(183, 148, 246, 0.15),
    inset 0 0 8px rgba(183, 148, 246, 0.05);
}

.skills li:hover {
  background: rgba(183, 148, 246, 0.15);
  border-color: rgba(183, 148, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(183, 148, 246, 0.3),
    0 0 15px rgba(183, 148, 246, 0.2);
}

/* Skills Categories */
.skills-category {
  margin-bottom: 2.5rem;
}

.skills-category:last-child {
  margin-bottom: 0;
}

.skills-category h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #b794f6;
  margin-bottom: 1rem;
  margin-top: 0;
  text-shadow: 0 0 4px rgba(183, 148, 246, 0.3);
}

.skills-category h3::after {
  display: none;
}

.skill-detail {
  font-weight: 400;
  color: #9f7aea;
  font-size: 0.9em;
  opacity: 0.75;
}

/* Links & Footer */
a {
  color: #9f7aea;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

a:hover {
  color: #b794f6;
  text-decoration: underline;
  text-shadow: 0 0 4px rgba(183, 148, 246, 0.4);
}

#contact a {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  background: rgba(183, 148, 246, 0.1);
  border-radius: 8px;
  border: 2px solid rgba(183, 148, 246, 0.3);
  transition: all 0.3s ease;
  box-shadow: 
    0 2px 6px rgba(183, 148, 246, 0.15),
    inset 0 0 8px rgba(183, 148, 246, 0.05);
}

#contact a:hover {
  background: rgba(183, 148, 246, 0.15);
  border-color: rgba(183, 148, 246, 0.6);
  transform: translateX(4px);
  text-decoration: none;
  box-shadow: 
    0 4px 12px rgba(183, 148, 246, 0.3),
    0 0 15px rgba(183, 148, 246, 0.2);
}

.footer {
  text-align: center;
  margin-top: 6rem;
  padding: 2rem 0;
  color: #9f7aea;
  font-size: 0.9rem;
  border-top: 2px solid rgba(183, 148, 246, 0.2);
  opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.85rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 4rem 0 3rem;
  }
}
