:root {
  --primary-color: #1e90ff;
  --accent-color: #ffd700;
  --text-color: #ffffff;
  --background-color: #0a0f1c;
  --card-bg: #1c2526;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #0a0f1c 100%);
  color: var(--text-color);
  position: relative;
  overflow-x: hidden;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--text-color);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--text-color);
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  margin: auto;
  width: 90vw;
  z-index: 0;
}

.line {
  position: absolute;
  width: 1px;
  height: 100%;
  top: 0;
  background: rgba(30, 144, 255, 0.2);
  overflow: hidden;
}

.line::after {
  content: '';
  display: block;
  position: absolute;
  height: 10vh;
  width: 100%;
  top: -50%;
  left: 0;
  background: linear-gradient(to bottom, rgba(30, 144, 255, 0) 0%, var(--primary-color) 75%, var(--primary-color) 100%);
  animation: drop 4s var(--animation-delay) infinite;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

@keyframes drop {
  0% {
    top: -50%;
  }
  100% {
    top: 110%;
  }
}

#hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  animation: fade-in 1.5s ease-out;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-container {
  border: 1px solid var(--primary-color);
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-container:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--primary-color);
}

#hero h1 {
  font-family: 'Space Mono', monospace;
  font-size: 4rem;
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--primary-color);
  transition: color 0.3s ease;
}

#hero h1:hover {
  color: var(--accent-color);
}

#hero p {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  color: var(--text-color);
  margin-top: 0.5rem;
}

section {
  width: 80%;
  max-width: 1000px;
  margin: 4rem auto;
  padding: 2rem;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem;
  color: var(--primary-color);
  text-shadow: 0 0 5px var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--primary-color);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--primary-color);
}

.card img {
  width: 80px;
  height: auto;
  margin-bottom: 1rem;
}

.card p {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0.5rem 0;
}

#about .card {
  animation: slide-in-left 1s ease-out;
}

@keyframes slide-in-left {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

#contact .card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#contact .card a {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.2rem;
  margin: 0.5rem 0;
  transition: color 0.3s ease, transform 0.3s ease;
}

#contact .card a:hover {
  color: var(--accent-color);
  transform: translateX(5px);
}

#contact .card a i {
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

#contact .card a:hover i {
  transform: scale(1.2);
}

@media screen and (max-width: 750px) {
  #hero h1 {
    font-size: 2.5rem;
  }
  #hero p {
    font-size: 1.2rem;
  }
  h2 {
    font-size: 2rem;
  }
  .card p {
    font-size: 1rem;
  }
  section {
    width: 90%;
    padding: 1.5rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
}