/* ===========================
   Reset & Base Styles
   =========================== */

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

:root {
  --bg-dark: #0a0e27;
  --bg-card: rgba(20, 25, 50, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --accent-blue: #4A90E2;
  --accent-cyan: #00D4FF;
  --accent-purple: #7B68EE;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===========================
   Animated Starfield Background
   =========================== */

@keyframes move-stars {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2000px);
  }
}

.stars,
.stars2,
.stars3 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stars {
  background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="2" height="2"><circle cx="1" cy="1" r="1" fill="white" opacity="0.8"/></svg>') repeat;
  animation: move-stars 100s linear infinite;
}

.stars2 {
  background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="3" height="3"><circle cx="1.5" cy="1.5" r="1.5" fill="white" opacity="0.5"/></svg>') repeat;
  animation: move-stars 150s linear infinite;
}

.stars3 {
  background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><circle cx="2" cy="2" r="1" fill="white" opacity="0.3"/></svg>') repeat;
  animation: move-stars 200s linear infinite;
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(74, 144, 226, 0.15) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ===========================
   Projects Section
   =========================== */

.projects {
  position: relative;
  padding: 6rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.8) 20%, rgba(10, 14, 39, 0.9) 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 4rem;
  font-weight: 600;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* ===========================
   Project Cards
   =========================== */

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(74, 144, 226, 0.3);
}

.project-card.placeholder {
  opacity: 0.6;
}

.project-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
  transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.1) rotate(5deg);
}

.project-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.7;
}

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

.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: rgba(74, 144, 226, 0.15);
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.project-link:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
}

.project-link svg {
  transition: transform 0.3s ease;
}

.project-link:hover svg {
  transform: translateX(4px);
}

/* ===========================
   Footer
   =========================== */

.footer {
  position: relative;
  padding: 3rem 2rem;
  background: rgba(5, 7, 15, 0.9);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.footer-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-blue);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
  .hero {
    min-height: 45vh;
  }

  .projects {
    padding: 4rem 1rem;
  }

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

  .project-card {
    padding: 1.5rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 1rem;
  }

  .project-icon {
    width: 60px;
    height: 60px;
  }

  .project-title {
    font-size: 1.5rem;
  }

  .footer .container {
    gap: 0.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}
