@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800&family=Rajdhani:wght@300;500;700&display=swap');

:root {
  --primary: #22d3ee;
  --secondary: #a855f7;
  --bg-dark: #020617;
  --bg-light: #0f172a;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
}

html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--bg-dark), var(--primary));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--bg-dark), var(--secondary));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
  /* Hide default cursor for custom cursor */
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, var(--bg-light), var(--bg-dark));
  color: var(--text-main);
  font-family: 'Rajdhani', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  display: block;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {

  .cursor-dot,
  .cursor-outline {
    display: none;
  }

  * {
    cursor: auto;
  }
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--primary);
  opacity: 0.5;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
  opacity: 1;
}

a:hover~.cursor-outline,
button:hover~.cursor-outline,
.card:hover~.cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(34, 211, 238, 0.1);
}

/* Ambient Background Orbs */
.orb {
  position: absolute;
  width: 400px;
  height: 400px;
  filter: blur(150px);
  opacity: 0.5;
  z-index: -1;
  animation: floatOrb 15s infinite alternate ease-in-out;
}

.orb.one {
  background: var(--primary);
  top: -10%;
  left: -10%;
}

.orb.two {
  background: var(--secondary);
  bottom: -10%;
  right: -10%;
  animation-delay: -5s;
}

.orb.three {
  background: #f472b6;
  top: 40%;
  left: 50%;
  width: 200px;
  height: 200px;
  filter: blur(100px);
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(50px, 50px) scale(1.1);
  }
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 8%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(to right, #fff, var(--primary));
  -webkit-background-clip: text;
  color: transparent;
  text-decoration: none;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
  z-index: 1001;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: 0.3s;
  box-shadow: 0 0 10px var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  text-shadow: 0 0 10px var(--primary);
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
}

.bar {
  width: 30px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: 3px;
  transition: 0.3s;
}

/* Layout Utilities */
.container {
  padding: 80px 8%;
  min-height: 80vh;
}

h1,
h2,
h3 {
  font-family: 'Orbitron', sans-serif;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 50px;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
  opacity: 0.3;
  filter: blur(10px);
  z-index: -1;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.05) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.3));
}

.hero .highlight {
  color: var(--primary);
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: none;
  position: relative;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.btn {
  padding: 15px 40px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: 0.3s;
  z-index: -1;
}

.btn-primary:hover::before {
  width: 100%;
}

.btn-primary:hover {
  color: #000;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.6);
  transform: translateY(-3px);
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: 0.3s;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card:hover {
  transform: translateY(-10px);
  background: rgba(30, 41, 59, 0.7);
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(34, 211, 238, 0.1);
}

.card h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Skills (About Page) */
.skills-container {
  margin-top: 40px;
}

.skill-bar {
  margin-bottom: 20px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--text-main);
  font-weight: 600;
}

.skill-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  width: 0;
  animation: fillBar 1.5s ease-out forwards;
  box-shadow: 0 0 10px var(--primary);
}

@keyframes fillBar {
  to {
    width: var(--w);
  }
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  font-family: 'Rajdhani', sans-serif;
  outline: none;
  transition: 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  border-top: 1px solid rgba(34, 211, 238, 0.1);
  background: linear-gradient(to top, #020617, #0f172a);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* Particle Canvas */
canvas#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.3;
}

/* ---------------------------------
   RESPONSIVE DESIGN (MEDIA QUERIES)
   --------------------------------- */

@media screen and (max-width: 768px) {
  nav {
    padding: 15px 5%;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.95);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 0;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    font-size: 1.2rem;
  }

  /* Hamburger Animation */
  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .container {
    padding: 40px 5%;
  }

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

  .grid {
    grid-template-columns: 1fr;
    /* Stack on mobile */
  }

  .orb {
    width: 250px;
    height: 250px;
    filter: blur(100px);
  }
}

@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .card {
    padding: 20px;
  }
}