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

/* Global Styles */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #4d44d9;
    --accent-color: #ff6584;
    --background-color: #0a0e17;
    --text-color: #f2f2f2;
    --card-background: rgba(31, 41, 55, 0.4);
    --card-border: rgba(255, 255, 255, 0.1);
    --success-color: #4BB543;
    --error-color: #FF3333;
    --glass-background: rgba(31, 41, 55, 0.75);
    --glassmorphism-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-medium: 0 12px 36px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Cursor Trail Animation */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: transform 0.1s ease;
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 10px var(--primary-color);
}

.cursor-trail-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.8;
  animation: trail-fade 0.6s ease-out forwards;
}

@keyframes trail-fade {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.2);
  }
}

/* Loading Animation */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  overflow: hidden;
}

.loader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.loader-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary-color);
  animation: rotate 0.8s linear infinite; /* Faster rotation */
  position: relative;
  transition: all 0.4s ease; /* Faster transition */
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-circle::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-bottom: 4px solid var(--accent-color);
  animation: spin 0.8s linear infinite reverse; /* Faster animation */
}

.loader-circle::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-left: 3px solid var(--secondary-color);
  animation: spin 0.6s linear infinite; /* Faster animation */
}

.loader-circle.explode {
  transform: scale(2);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1); /* Faster explosion */
}

.loader-counter {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  transition: opacity 0.3s ease; /* Faster fade */
  position: relative;
  z-index: 3;
  text-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
  /* Make sure percentage doesn't rotate */
  transform: none !important;
  animation: none !important;
}

.loader-counter.complete {
  opacity: 0;
}

.scatter-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.particle.animate {
  animation: scatterParticle 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; /* Faster scatter */
}

@keyframes scatterParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.8);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

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

/* Utility Classes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
    letter-spacing: 0.5px;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.6);
}

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

.btn-secondary:hover {
    background-color: rgba(108, 99, 255, 0.1);
    transform: translateY(-2px);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
    text-align: center;
  position: relative;
    color: var(--text-color);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
  height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.subsection-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.glass-card {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    box-shadow: var(--glassmorphism-shadow);
    padding: 2rem;
    transition: all 0.3s ease;
}

/* Stars Background */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle 3s infinite ease-in-out;
}

@keyframes twinkle {
  0% {
    opacity: 0.2;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.2;
    transform: scale(0.5);
  }
}

/* Navbar */
.navbar {
  position: fixed;
    width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 1rem 0;
    transition: all 0.4s ease;
    background-color: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background-color: rgba(10, 14, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 0.7rem 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
  font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    z-index: 10;
}

.navbar-menu {
  display: flex;
    list-style-type: none;
}

.navbar-menu li {
    margin-left: 2rem;
}

.navbar-menu li a {
    color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
    font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-menu li a:hover, .navbar-menu li a.active {
  color: var(--primary-color);
}

.navbar-menu li a::after {
  content: '';
  position: absolute;
  width: 0;
    height: 2px;
    background-color: var(--primary-color);
  left: 0;
    bottom: 0;
  transition: width 0.3s ease;
}

.navbar-menu li a:hover::after, .navbar-menu li a.active::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
    z-index: 10;
}

.navbar-toggle span {
    display: block;
    width: 25px;
  height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
  display: flex;
    align-items: center;
  justify-content: center;
  position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
    padding: 0 2rem;
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
  background: linear-gradient(120deg, #6c63ff, #ff6584);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.hero h1::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(120deg, #6c63ff, #ff6584);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  filter: blur(8px);
  opacity: 0.5;
}

/* Improved normal subtitle */
.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #c5c5c5;
  letter-spacing: 0.5px;
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
    justify-content: center;
  gap: 1rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.social-icons {
  display: flex;
  justify-content: center;
    gap: 1.2rem;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 0.8rem;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.2);
}

.social-icons a::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: var(--primary-color);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.social-icons a:hover::before {
  opacity: 0.2;
  transform: scale(1);
}

/* Floating Shapes */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
    pointer-events: none;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
    opacity: 0.1;
    animation: float 5s ease-in-out infinite; /* Simplified easing */
}

.shape1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 10%;
    left: 15%;
}

.shape2 {
    width: 200px;
    height: 200px;
    background: var(--accent-color);
  top: 20%;
    right: 10%;
}

.shape3 {
  width: 150px;
  height: 150px;
    background: var(--secondary-color);
  bottom: 15%;
    left: 10%;
}

/* About Section */
.about {
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-text {
    margin-bottom: 2rem;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Skills Section */
.skills-section {
    margin-top: 2rem;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill {
    margin-bottom: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.skill.animate-in-view {
    transform: translateY(0);
    opacity: 1;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}

.skill.animate-in-view .skill-name {
    opacity: 1;
    transform: translateX(0);
}

.skill:hover .skill-name {
    color: var(--primary-color);
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: 5px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.17, 0.67, 0.67, 1.3);
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
    animation-delay: 1.5s;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

.skill.animate-in-view .skill-progress {
    transform: scaleX(1);
}

.skill-percentage {
    font-size: 0.9rem;
    color: #c5c5c5;
    text-align: right;
    margin-top: 0.3rem;
    opacity: 0;
    transition: opacity 0.3s ease 0.5s;
}

.skill.animate-in-view .skill-percentage {
    opacity: 1;
}

/* Tech Stack */
.tech-stack {
    margin-top: 3rem;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
    gap: 1.5rem;
  justify-content: center;
}

.tech-icon {
    background: var(--glass-background);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
  transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.tech-icon:hover {
  transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.tech-icon i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tech-icon span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Education Section */
.education-section {
    margin-top: 3rem;
}

.timeline {
  position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 1rem 0;
    position: relative;
    width: 50%;
    left: 0;
    margin-bottom: 1.5rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.education-card {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid var(--card-border);
    box-shadow: var(--glassmorphism-shadow);
    padding: 1.5rem;
    margin-right: 40px;
    transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.timeline-item:nth-child(even) .education-card {
    margin-right: 0;
    margin-left: 40px;
}

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

.institution {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.years {
    color: #c5c5c5;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.percentage {
    font-weight: 600;
    color: var(--accent-color);
}

/* Projects Section */
.projects {
    position: relative;
    overflow: hidden;
}

.projects-grid {
  display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--glass-background);
  border-radius: 15px;
    border: 1px solid var(--card-border);
  overflow: hidden;
    box-shadow: var(--glassmorphism-shadow);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.project-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.project-img img {
  width: 100%;
  height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    object-position: center;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.project-content p {
    color: #c5c5c5;
  margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

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

.project-tags span {
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link i {
    margin-right: 0.5rem;
}

.project-link:hover {
  color: var(--accent-color);
}

/* Contact Section */
.contact {
  position: relative;
    overflow: hidden;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
    justify-content: space-between;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(108, 99, 255, 0.2);
    border-radius: 50%;
    display: flex;
  align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-text h4 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

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

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

.contact-form {
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    position: relative;
    width: 100%;
}

#loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: none;
    align-items: center;
}

.success-alert {
    background-color: rgba(75, 181, 67, 0.2);
    color: var(--success-color);
}

.error-alert {
    background-color: rgba(255, 51, 51, 0.2);
    color: var(--error-color);
}

.alert i {
    margin-right: 0.5rem;
}

/* Copyright Section */
.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

.copyright-text {
    color: #c5c5c5;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -8px, 0); /* Reduced movement for smoother animation */
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0;
    }
  
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .education-card,
    .timeline-item:nth-child(even) .education-card {
        margin-left: 60px;
        margin-right: 0;
    }
}

@media screen and (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--background-color);
    flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.5s ease;
        z-index: 5;
    }
    
    .navbar-menu.active {
        right: 0;
  }
  
  .navbar-menu li {
    margin: 1.5rem 0;
  }
  
  .navbar-toggle {
    display: flex;
  }
  
    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
  }
  
    .navbar-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
}
@media screen and (max-width: 576px) {
    .container {
        width: 95%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

/* Image Modal/Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    overflow: auto;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    object-fit: contain;
    border-radius: 8px;
    animation: zoom 0.4s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1600;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

/* Resume Modal */
.resume-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resume-modal.show {
    opacity: 1;
}

.resume-modal-content {
    position: relative;
    background-color: var(--background-color);
    margin: 2% auto;
    padding: 0;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.5);
    animation: modalSlideIn 0.3s ease;
}

.resume-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.resume-container embed {
    border-radius: 8px;
}

.close-resume {
    position: absolute;
    top: -15px;
    right: -15px;
    color: var(--primary-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: var(--background-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.close-resume:hover {
    background: var(--primary-color);
    color: var(--background-color);
    transform: scale(1.1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive resume modal */
@media screen and (max-width: 768px) {
    .resume-modal-content {
        width: 95%;
        height: 95vh;
        margin: 2.5% auto;
    }
    
    .close-resume {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
}

.floating-shape, .hero-content, .particle, .star, .cursor-trail, .cursor-dot, .cursor-trail-particle {
  will-change: transform, opacity;
}

/* Smooth transitions for better performance */
* {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optimize animations for smoother performance */
.floating-shape {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-content {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize animations for low-power devices */
@media (prefers-reduced-motion: reduce), 
       (max-width: 768px), 
       (pointer: coarse) {
  .floating-shape {
    animation-duration: 8s; /* Slower animation to reduce CPU usage */
  }
  
  .star {
    animation-duration: 4s; /* Slower animation to reduce CPU usage */
  }
  
  .skill-progress::after {
    animation: none; /* Remove shimmer effect on mobile */
  }
  
  .loader-circle, 
  .loader-circle::before,
  .loader-circle::after {
    animation-duration: 1s; /* Slightly slow but smoother on low-power devices */
  }
}

/* Add animation keyframes if missing */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* SVG Kotlin icon styles */
.kotlin-svg-icon {
  margin-bottom: 0.5rem;
  display: inline-block;
  font-size: 2.5rem;
  height: 2.5rem;
  width: 2.5rem;
  color: var(--primary-color);
}

/* 3D Animated Character - More Realistic Version */
.character-container,
.character,
.character-head,
.character-hair,
.character-face,
.character-glasses,
.glasses-frame,
.glasses-lens,
.glasses-bridge,
.character-eyes,
.character-eye,
.character-nose,
.character-mouth,
.character-ears,
.ear,
.character-body,
.character-torso,
.character-shirt,
.character-shirt-details,
.character-arms,
.arm,
.hand,
.character-laptop,
.laptop-base,
.laptop-screen,
.laptop-screen-content,
.code-line {
    display: none;
}

/* Remove unused animations */
@keyframes character-float {
    0% { opacity: 0; }
}

@keyframes eye-look {
    0% { opacity: 0; }
}

@keyframes typing {
    0% { opacity: 0; }
}

@keyframes blink-caret {
    0% { opacity: 0; }
}

@keyframes glow {
    0% { opacity: 0; }
}

/* Remove unused media queries */
@media screen and (max-width: 992px) {
    .character-container {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .character-container {
        display: none;
    }
}

/* Advanced Interactive Element */
.creative-element {
  position: absolute;
  right: 10%;
  bottom: 15%;
  width: 320px;
  height: 380px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  perspective: 1500px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

/* Floating Avatar with Orbiting Tech */
.floating-avatar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 240px;
  z-index: 3;
  transform-style: preserve-3d;
}

.avatar-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 0 20px var(--primary-color),
              0 0 30px var(--accent-color);
  animation: pulsate 3s ease-in-out infinite;
  z-index: 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.avatar-face {
  position: relative;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 0.3s ease;
  will-change: transform;
}

.avatar-eyes {
  display: flex;
  justify-content: space-between;
  width: 60%;
  margin-bottom: 10px;
}

.avatar-eye {
  width: 12px;
  height: 12px;
  background-color: #333;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  will-change: height;
}

.avatar-eye.left {
  transform: translateX(-2px);
}

.avatar-eye.right {
  transform: translateX(2px);
}

.pupil {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: #000;
  border-radius: 50%;
  top: 2px;
  left: 4px;
  transition: all 0.2s ease;
}

.avatar-smile {
  width: 30px;
  height: 12px;
  border-radius: 0 0 10px 10px;
  border-bottom: 3px solid #333;
  transition: all 0.3s ease;
}

.avatar-code-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 3;
  transform: translate(0, 0) scale(1);
  transition: transform 0.3s ease;
}

/* Rings around avatar */
.avatar-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  z-index: 1;
}

.avatar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px dashed rgba(108, 99, 255, 0.5);
  transform: translate(-50%, -50%);
  animation: rotate-ring linear infinite;
}

.ring1 {
  width: 120px;
  height: 120px;
  animation-duration: 30s;
}

.ring2 {
  width: 170px;
  height: 170px;
  border-style: dotted;
  animation-duration: 40s;
  animation-direction: reverse;
}

.ring3 {
  width: 220px;
  height: 220px;
  border-width: 1px;
  animation-duration: 50s;
}

.tech-orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: orbit-rotate 50s linear infinite;
  transform-style: preserve-3d;
  animation-play-state: running;
  pointer-events: none;
}

.tech-planet {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.7rem;
  box-shadow: 0 0 15px rgba(108, 99, 255, 0.5);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              box-shadow 0.3s ease, 
              color 0.3s ease;
  cursor: pointer;
  z-index: 50;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
}

.tech-planet:hover {
  transform: scale(1.2) !important;
  color: var(--accent-color);
  box-shadow: 0 0 20px var(--accent-color);
}

.tech-planet i, .tech-planet span {
  pointer-events: none;
}

.tech-tooltip {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.tech-planet:hover .tech-tooltip {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.tech-planet.android {
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.tech-planet.java {
  top: 25%;
  right: -20px;
}

.tech-planet.kotlin {
  bottom: -20px;
  right: 25%;
}

.tech-planet.linux {
  bottom: 25%;
  left: -20px;
}

.tech-planet.github {
  top: 25%;
  left: -20px;
}

.tech-planet.kotlin span {
  font-weight: bold;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-planet.active {
  transform: scale(1.4) !important;
  box-shadow: 0 0 30px var(--accent-color), 0 0 60px var(--primary-color);
  z-index: 100 !important;
  animation: pulse-planet 2s infinite ease-in-out;
  position: relative;
}

@keyframes pulse-planet {
  0%, 100% {
    box-shadow: 0 0 20px var(--accent-color);
  }
  50% {
    box-shadow: 0 0 30px var(--accent-color), 0 0 50px var(--primary-color);
  }
}

/* Pause orbit animation when hovering any tech planet */
.tech-planet:hover + .tech-orbit,
.floating-avatar:hover .tech-orbit {
  animation-play-state: paused;
}

.particle-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transform-style: preserve-3d;
}

/* Terminal Element with enhanced styling */
.code-terminal {
  position: relative;
  width: 320px;
  height: 160px;
  background-color: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  transform: perspective(800px) rotateX(10deg);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
  transform-style: preserve-3d;
}

.code-terminal:hover {
  transform: perspective(800px) rotateX(5deg) translateY(-5px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}

.terminal-header {
  height: 30px;
  background-color: #333;
  display: flex;
  align-items: center;
  padding: 0 10px;
  position: relative;
}

.terminal-buttons {
  display: flex;
  gap: 6px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.terminal-btn:hover {
  filter: brightness(1.2);
}

.terminal-btn.close {
  background-color: #ff5f56;
}

.terminal-btn.minimize {
  background-color: #ffbd2e;
}

.terminal-btn.expand {
  background-color: #27c93f;
}

.terminal-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ddd;
  font-size: 0.8rem;
  font-family: monospace;
}

.terminal-body {
  padding: 15px;
  height: calc(100% - 30px - 28px);
  overflow: hidden;
}

.terminal-line {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  color: #ddd;
  font-family: monospace;
  font-size: 0.9rem;
}

.terminal-prompt {
  color: var(--primary-color);
  margin-right: 8px;
}

.typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--primary-color);
  animation: typing 3s steps(30) 1s 1 normal both,
             blink-caret 0.75s step-end infinite;
}

.waiting-cursor {
  opacity: 0;
  animation: fade-in 0.5s forwards 4s,
             blink-caret 0.75s step-end infinite 4s;
}

.waiting-cursor::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: var(--primary-color);
  margin-left: 5px;
  animation: blink-cursor 1s step-end infinite;
}

.terminal-interaction-hint {
  height: 28px;
  background-color: #2a2a2a;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-style: italic;
  border-top: 1px solid #444;
  animation: pulse-hint 2s ease-in-out infinite;
}

/* Skill Meter */
.skill-meter {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 30px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-meter.visible {
  display: flex;
  animation: fade-up 0.5s forwards;
}

.skill-meter-label {
  font-size: 0.7rem;
  color: #ddd;
  margin-bottom: 5px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
}

.skill-meter-bar {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-meter-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  transition: width 1s cubic-bezier(0.165, 0.84, 0.44, 1);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary-color);
}

.skill-meter-percentage {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: white;
  text-shadow: 0 0 3px black;
}

/* Special animations for interactive elements */
@keyframes pulsate {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 20px var(--primary-color),
                0 0 30px var(--accent-color);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 30px var(--primary-color),
                0 0 50px var(--accent-color);
  }
}

@keyframes orbit-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-ring {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-color) }
}

@keyframes blink-cursor {
  from, to { opacity: 1 }
  50% { opacity: 0 }
}

@keyframes fade-in {
  from { opacity: 0 }
  to { opacity: 1 }
}

@keyframes pulse-hint {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.5; }
}

@keyframes fade-up {
  from { 
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes float-particle {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(
      calc(var(--float-x) * 10px),
      calc(var(--float-y) * 10px),
      calc(var(--float-z) * 10px)
    );
  }
}

.flying-particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.flying-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

/* Media queries for responsiveness */
@media screen and (max-width: 992px) {
  .creative-element {
    right: 5%;
    bottom: 10%;
    transform: scale(0.85);
  }
}

@media screen and (max-width: 768px) {
  .creative-element {
    display: none;
  }
}

.tech-planet.clicking {
  transform: scale(1.3) !important;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* Create a click-through overlay to capture clicks outside tech planets */
.creative-element::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* Digital Rain Animation */
.digital-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    top: -20px;
    color: var(--primary-color);
    font-family: monospace;
    font-size: 16px;
    animation: rain-fall 2s linear forwards;
    text-shadow: 0 0 5px var(--primary-color);
}

@keyframes rain-fall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rain-drop {
        display: none;
    }
}

.tech-icon,
.tech-icon i,
.tech-icon span,
.avatar-face,
.avatar-eyes,
.avatar-eye,
.pupil,
.avatar-smile,
.avatar-code-badge,
.tech-planet,
.tech-planet i,
.tech-planet span,
.tech-tooltip,
.social-icons a,
.social-icons i {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

.avatar-face {
    cursor: default;
    pointer-events: none;
}

.avatar-eyes,
.avatar-eye,
.pupil,
.avatar-smile {
    pointer-events: none;
}

.tech-planet {
    cursor: pointer;
    pointer-events: auto;
}

.tech-planet.active {
    pointer-events: none;
}

.social-icons a {
    cursor: pointer;
    pointer-events: auto;
}