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

:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.3);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Header/Hero Section */
header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, #00ffaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content .subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px var(--accent-glow);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px var(--accent-glow);
}

/* Section Styling */
section {
  padding: 5rem 0;
}

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

section h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Projects Section */
#projects {
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%
  );
  position: relative;
  overflow: hidden;
}

#projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 15% 30%,
      rgba(0, 212, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 70%,
      rgba(0, 255, 170, 0.08) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.project-card {
  background: linear-gradient(
    145deg,
    var(--bg-secondary) 0%,
    rgba(26, 31, 58, 0.85) 100%
  );
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.12);
  animation: slideInUp 0.6s ease-out forwards;
  opacity: 0;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.35);
}

.project-card:nth-child(1) {
  animation-delay: 0.1s;
}
.project-card:nth-child(2) {
  animation-delay: 0.2s;
}
.project-card:nth-child(3) {
  animation-delay: 0.3s;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.project-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-tag {
  font-size: 0.75rem;
  color: var(--bg-primary);
  background: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}

.project-media {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

/* Responsive media with 16:9 aspect ratio */
.project-video,
.embed-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

/* Linked screenshot variant (replaces live embeds) */
.screenshot-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(0, 212, 255, 0.12);
}

.screenshot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.screenshot-link:hover .screenshot-image {
  transform: scale(1.03);
}

.project-video {
  background: #000;
}

.embed-wrapper {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(0, 212, 255, 0.12);
}

.project-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b0f26;
}

.embed-link {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(0, 212, 255, 0.15);
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.embed-link:hover {
  background: rgba(0, 212, 255, 0.25);
  transform: translateY(-2px);
  border-color: var(--accent);
}

#projects h2 {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #00ffaa 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}
/* About Section */
#about {
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%
  );
  position: relative;
  overflow: hidden;
}

#about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(0, 255, 170, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.about-hero {
  display: flex;
  justify-content: center;
  margin: 2rem 0 3rem;
  position: relative;
  z-index: 1;
}

.about-image {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  border: 3px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2),
    0 0 0 1px rgba(0, 212, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  animation: slideInUp 0.8s ease-out forwards;
  opacity: 0;
}

.about-image:hover {
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 30px 60px rgba(0, 212, 255, 0.4),
    0 0 0 2px rgba(0, 212, 255, 0.3);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.about-card {
  background: linear-gradient(
    145deg,
    var(--bg-secondary) 0%,
    rgba(26, 31, 58, 0.8) 100%
  );
  padding: 2.5rem 2rem;
  border-radius: 16px;
  border: 2px solid rgba(0, 212, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.about-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05) 0%,
    rgba(0, 255, 170, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.5);
}

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

.about-card h3 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* About card specific styling */
.about-card:nth-child(1) {
  border-color: rgba(0, 212, 255, 0.3);
}

.about-card:nth-child(1):hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.about-card:nth-child(2) {
  border-color: rgba(0, 255, 170, 0.3);
}

.about-card:nth-child(2):hover {
  border-color: #00ffaa;
  box-shadow: 0 20px 40px rgba(0, 255, 170, 0.3);
}

.about-card:nth-child(2) h3 {
  color: #00ffaa;
}

.about-card:nth-child(3) {
  border-color: rgba(255, 193, 7, 0.3);
}

.about-card:nth-child(3):hover {
  border-color: #ffc107;
  box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
}

.about-card:nth-child(3) h3 {
  color: #ffc107;
}

/* Animation for about cards */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-card {
  animation: slideInUp 0.6s ease-out forwards;
  opacity: 0;
}

.about-card:nth-child(1) {
  animation-delay: 0.1s;
}

.about-card:nth-child(2) {
  animation-delay: 0.2s;
}

.about-card:nth-child(3) {
  animation-delay: 0.3s;
}

/* Enhanced section title */
#about h2 {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #00ffaa 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

/* Skills Section */
#skills {
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%
  );
  position: relative;
  overflow: hidden;
}

#skills::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 255, 170, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.skill-item {
  background: linear-gradient(
    145deg,
    var(--bg-secondary) 0%,
    rgba(26, 31, 58, 0.8) 100%
  );
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  border: 2px solid rgba(0, 212, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.skill-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05) 0%,
    rgba(0, 255, 170, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-item:hover {
  border-color: var(--accent);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.5);
}

.skill-item:hover::before {
  opacity: 1;
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.skill-item:hover .skill-icon {
  transform: scale(1.2) rotate(5deg);
}

.skill-item h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.skill-item p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  font-weight: 400;
}

/* Skill category specific styling */
.skill-item:nth-child(1) {
  border-color: rgba(97, 218, 251, 0.3);
}

.skill-item:nth-child(1):hover {
  border-color: #61dafb;
  box-shadow: 0 20px 40px rgba(97, 218, 251, 0.3);
}

.skill-item:nth-child(1) h4 {
  color: #61dafb;
}

.skill-item:nth-child(2) {
  border-color: rgba(104, 160, 99, 0.3);
}

.skill-item:nth-child(2):hover {
  border-color: #68a063;
  box-shadow: 0 20px 40px rgba(104, 160, 99, 0.3);
}

.skill-item:nth-child(2) h4 {
  color: #68a063;
}

.skill-item:nth-child(3) {
  border-color: rgba(255, 193, 7, 0.3);
}

.skill-item:nth-child(3):hover {
  border-color: #ffc107;
  box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
}

.skill-item:nth-child(3) h4 {
  color: #ffc107;
}

.skill-item:nth-child(4) {
  border-color: rgba(156, 39, 176, 0.3);
}

.skill-item:nth-child(4):hover {
  border-color: #9c27b0;
  box-shadow: 0 20px 40px rgba(156, 39, 176, 0.3);
}

.skill-item:nth-child(4) h4 {
  color: #9c27b0;
}

.skill-item:nth-child(5) {
  border-color: rgba(255, 87, 34, 0.3);
}

.skill-item:nth-child(5):hover {
  border-color: #ff5722;
  box-shadow: 0 20px 40px rgba(255, 87, 34, 0.3);
}

.skill-item:nth-child(5) h4 {
  color: #ff5722;
}

.skill-item:nth-child(6) {
  border-color: rgba(76, 175, 80, 0.3);
}

.skill-item:nth-child(6):hover {
  border-color: #4caf50;
  box-shadow: 0 20px 40px rgba(76, 175, 80, 0.3);
}

.skill-item:nth-child(6) h4 {
  color: #4caf50;
}

.skill-item:nth-child(7) {
  border-color: rgba(33, 150, 243, 0.3);
}

.skill-item:nth-child(7):hover {
  border-color: #2196f3;
  box-shadow: 0 20px 40px rgba(33, 150, 243, 0.3);
}

.skill-item:nth-child(7) h4 {
  color: #2196f3;
}

.skill-item:nth-child(8) {
  border-color: rgba(255, 152, 0, 0.3);
}

.skill-item:nth-child(8):hover {
  border-color: #ff9800;
  box-shadow: 0 20px 40px rgba(255, 152, 0, 0.3);
}

.skill-item:nth-child(8) h4 {
  color: #ff9800;
}

/* Animation for skill items on load */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skill-item {
  animation: slideInUp 0.6s ease-out forwards;
  opacity: 0;
}

.skill-item:nth-child(1) {
  animation-delay: 0.1s;
}

.skill-item:nth-child(2) {
  animation-delay: 0.2s;
}

.skill-item:nth-child(3) {
  animation-delay: 0.3s;
}

.skill-item:nth-child(4) {
  animation-delay: 0.4s;
}

.skill-item:nth-child(5) {
  animation-delay: 0.5s;
}

.skill-item:nth-child(6) {
  animation-delay: 0.6s;
}

.skill-item:nth-child(7) {
  animation-delay: 0.7s;
}

.skill-item:nth-child(8) {
  animation-delay: 0.8s;
}

/* Enhanced section title */
#skills h2 {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #00ffaa 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

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

/* GitHub Stats */
.github-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.github-stats img {
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  max-width: 100%;
  height: auto;
}

/* Contact Section */
#contact {
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%
  );
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 50% 30%,
      rgba(0, 212, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 20% 70%,
      rgba(0, 255, 170, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-link {
  padding: 1.5rem 2rem;
  background: linear-gradient(
    145deg,
    var(--bg-secondary) 0%,
    rgba(26, 31, 58, 0.8) 100%
  );
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 16px;
  border: 2px solid rgba(0, 212, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.contact-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.05) 0%,
    rgba(0, 255, 170, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-link:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3),
    0 0 0 1px rgba(0, 212, 255, 0.5);
}

.contact-link:hover::before {
  opacity: 1;
}

/* Contact link specific styling */
.contact-link:nth-child(1) {
  border-color: rgba(0, 212, 255, 0.3);
}

.contact-link:nth-child(1):hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.contact-link:nth-child(2) {
  border-color: rgba(255, 193, 7, 0.3);
}

.contact-link:nth-child(2):hover {
  border-color: #ffc107;
  box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
}

.contact-link:nth-child(3) {
  border-color: rgba(0, 123, 255, 0.3);
}

.contact-link:nth-child(3):hover {
  border-color: #007bff;
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.3);
}

.contact-link:nth-child(4) {
  border-color: rgba(255, 87, 34, 0.3);
}

.contact-link:nth-child(4):hover {
  border-color: #ff5722;
  box-shadow: 0 20px 40px rgba(255, 87, 34, 0.3);
}

/* Animation for contact links */
.contact-link {
  animation: slideInUp 0.6s ease-out forwards;
  opacity: 0;
}

.contact-link:nth-child(1) {
  animation-delay: 0.1s;
}

.contact-link:nth-child(2) {
  animation-delay: 0.2s;
}

.contact-link:nth-child(3) {
  animation-delay: 0.3s;
}

.contact-link:nth-child(4) {
  animation-delay: 0.4s;
}

/* Enhanced section title */
#contact h2 {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    #00ffaa 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
  border-top: 2px solid rgba(0, 212, 255, 0.2);
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 212, 255, 0.05) 0%,
    transparent 50%
  );
  pointer-events: none;
}

footer p {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  section {
    padding: 3rem 0;
  }

  .about-image {
    border-radius: 16px;
    border-width: 2px;
  }

  .about-hero {
    margin: 1.5rem 0 2rem;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}
