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

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --dark-bg: #0f172a;
  --light-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --accent: #ec4899;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--dark-bg);
  background-image: linear-gradient(rgba(99, 102, 241, 0.03) 1px,
      transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%,
      rgba(99, 102, 241, 0.1) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 20%,
      rgba(139, 92, 246, 0.1) 0%,
      transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body>* {
  position: relative;
  z-index: 1;
}

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

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(99, 102, 241, 0.1) inset;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--primary-color);
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "</>";
  position: absolute;
  font-size: 20rem;
  font-weight: bold;
  color: rgba(99, 102, 241, 0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: monospace;
}

.hero::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--accent), transparent);
  opacity: 0.15;
  border-radius: 50%;
  bottom: 10%;
  right: 10%;
  animation: float 25s infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }

  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
}

.name {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg,
      var(--primary-color),
      var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
  position: relative;
}

.name::before {
  content: "Muhammed Sinan K V";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      var(--primary-color),
      var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.3;
  animation: glitch 3s infinite;
}

@keyframes glitch {

  0%,
  100% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }
}

.title {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  animation: fadeInUp 1.2s ease;
  font-family: "Courier New", monospace;
  position: relative;
}

.title::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--primary-color);
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.location {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1.4s ease;
}

.contact-info {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 1.6s ease;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--primary-color);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1.8s ease;
  position: relative;
}

.cta-buttons::before {
  content: "> git init portfolio";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Courier New", monospace;
  color: rgba(99, 102, 241, 0.3);
  font-size: 0.9rem;
  opacity: 0.7;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg,
      var(--primary-color),
      var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styles */
section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  background: linear-gradient(135deg,
      var(--primary-color),
      var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::before {
  content: "</";
  position: absolute;
  left: -40px;
  color: var(--primary-color);
  opacity: 0.5;
  font-family: monospace;
}

.section-title::after {
  content: ">";
  position: absolute;
  right: -40px;
  color: var(--primary-color);
  opacity: 0.5;
  font-family: monospace;
}

/* About Section */
.summary {
  background: rgba(30, 41, 59, 0.5);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.skill-item {
  background: rgba(30, 41, 59, 0.5);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.skill-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
  background: rgba(30, 41, 59, 0.8);
}

.skill-icon {
  font-size: 3rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
  transform: scale(1.2) rotate(360deg);
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(30, 41, 59, 0.5);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(99, 102, 241, 0.1),
      transparent);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.4),
    0 0 50px rgba(99, 102, 241, 0.2);
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

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

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.project-links a::after {
  content: "→";
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.project-links a:hover::after {
  margin-left: 10px;
}

.project-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.project-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
}

.project-features li::before {
  content: "✓ ";
  color: var(--primary-color);
  font-weight: bold;
}

/* Education Section */
.education-item {
  background: rgba(30, 41, 59, 0.5);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 2rem;
}

.education-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.education-school {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.education-date {
  color: var(--accent);
  font-style: italic;
}

/* Activities Section */
.activities-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.activity-item {
  background: rgba(30, 41, 59, 0.5);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  text-align: center;
  transition: all 0.3s ease;
}

.activity-item:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

/* Languages Section */
.languages {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.language-item {
  text-align: center;
}

.language-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.language-level {
  color: var(--text-secondary);
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.8);
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg,
      var(--primary-color),
      var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.scroll-top.visible {
  opacity: 1;
}

.scroll-top:hover {
  transform: translateY(-5px);
}

.scroll-top::before {
  content: "↑";
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .name {
    font-size: 2.5rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-title::before,
  .section-title::after {
    display: none;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .cta-buttons::before {
    display: none;
  }
}

/* Decorative elements */
.section {
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-color), transparent);
  opacity: 0.05;
  border-radius: 50%;
  top: -100px;
  left: -100px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}