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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a0a;
  color: white;
  overflow-x: hidden;
}

#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

section {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem;
}

.hero {
  min-height: 100vh;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #7f77dd, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.3rem;
  color: #aaa;
}

.about p {
  max-width: 550px;
  line-height: 1.7;
  color: #bbb;
  font-size: 1.05rem;
}

.projects h2,
.about h2,
.contact h2 {
  margin-bottom: 2.5rem;
  font-size: 2.2rem;
  letter-spacing: 1px;
}

/* ===== PROJECT GRID ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== PROJECT CARD ===== */
.project-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(127, 119, 221, 0.15);
  border-color: rgba(127, 119, 221, 0.3);
}

/* Preview Image */
.project-preview {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #111;
  position: relative;
}

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

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

/* Project Info */
.project-info {
  padding: 1.3rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #fff;
}

.project-info p {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 0.8rem;
  flex-grow: 1;
}

/* Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.2rem;
}

.tag {
  background: rgba(127, 119, 221, 0.15);
  color: #bf96f2;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(127, 119, 221, 0.2);
  font-weight: 500;
}

/* Action Buttons */
.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-live {
  background: linear-gradient(135deg, #7f77dd, #6b5ce7);
  color: white;
}

.btn-live:hover {
  background: linear-gradient(135deg, #6b5ce7, #5a4bd1);
  transform: scale(1.03);
}

.btn-source {
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-source:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: scale(1.03);
}

/* Contact */
.contact-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-links a {
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  transition: all 0.25s ease;
  font-size: 0.95rem;
}

.contact-links a:hover {
  background: rgba(127, 119, 221, 0.2);
  border-color: rgba(127, 119, 221, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }
  
  .project-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}