:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #0d1117;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6e44ff;
    --accent-secondary: #ff44aa;
    /* --card-bg: #161a21; */
    --card-bg: rgba(47, 48, 59, 0.243);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius: 12px;
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Remove light-mode specific styles */
.light-mode {
    display: none;
}

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

body, * {
    user-select: none; /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #0a0a0a, #0d1117, #161a21);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 5px; /* Reduced width for a sleeker look */
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #6e44ff, #c144ff);
    border-radius: 10px;
    /* box-shadow: 0 0 8px rgba(110, 68, 255, 0.6); */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent), var(--accent-secondary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-secondary);
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSection 0.4s ease forwards; /* Reduced duration */
    z-index: 1; /* Place sections above the space background */
    background: transparent; /* Allow the space background to show through */
}

/* Make sections semi-transparent to show the space background */
section {
    position: relative;
    z-index: 1; /* Ensure sections are above the space background */
    background: rgba(13, 17, 23, 0.6); /* Semi-transparent background */
    backdrop-filter: blur(8px); /* Add blur for a frosted glass effect */
    border-radius: var(--border-radius); /* Optional: Add rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Optional: Add a subtle shadow */
}

@keyframes fadeInSection {
    0% {
        opacity: 0;
        transform: translateY(10px); /* Reduced initial offset */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-link:hover:after {
    width: 100%;
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 2; /* Ensure hero section is above the space background */
    background: transparent; /* Allow the space background to show through */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-content .fade-in-up {
    animation-duration: 0.4s; /* Reduced duration */
    animation-delay: 0s; /* Removed delay for instant appearance */
}

.hero-tagline {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.hero-description {
    margin-bottom: 2rem;
    max-width: 600px;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, #6e44ff, #ff44aa);
    color: white;
    /* box-shadow: 0 0 15px rgba(110, 68, 255, 0.6), 0 0 25px rgba(255, 68, 170, 0.6); */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    /* transform: translateY(-2px); */
    color: #ffffff;
    background: none;
    box-shadow: 0 0 20px rgba(110, 68, 255, 0.7), 0 0 20px rgba(255, 68, 170, 0.7);
    border: #6e44ff 2px solid;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: url('/api/placeholder/1920/1080') no-repeat center center fixed;
    background-size: cover;
    transform: translateZ(0);
    will-change: transform;
    animation: parallax 20s linear infinite;
}

@keyframes parallax {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* About Section */
.about {
    background: #0D1117;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 254, 254, 0.1);
    /* border-radius: var(--border-radius); */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4); */
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

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

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.about-image img {
    width: 80%;
    height: auto;
    transition: var(--transition);
    /* transform: scale(1.03); */
}

.about-text {
    max-width: 600px;
}

.about-text h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.about-stat {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* Skills Section */
.skills {
    /* background: rgba(21, 1, 39, 0.6); */
    background: #0d1117;
    backdrop-filter: blur(15px);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    border-radius: var(--border-radius);
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4); */
    position: relative;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    /* backdrop-filter: blur(10px); */
    /* box-shadow: var(--card-shadow); */
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* border: 2px solid #767c86; */
    border: 2px solid rgba(109, 68, 255, 0.68);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(110, 68, 255, 0.5), 0 0 5px rgba(241, 170, 209, 0.2);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(132, 102, 241, 0.3), transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.skill-card:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.skill-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(182, 162, 252, 0.2), transparent 60%);
}

.skill-card:hover {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(193, 176, 253, 0.4), transparent 70%);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.skill-title {
    margin-bottom: 1rem;
}

.skill-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.skill-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0;
}

/* Projects Section */
.projects {
    /* background: rgba(30, 30, 30, 0.6); */
    background: #0d1117;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(150, 150, 150, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4);
    position: relative;
}

.projects-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.project-filter {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-filter.active,
.project-filter:hover {
    background: var(--accent);
    color: white;
}

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

/* Updated Project Card Styles */
.project-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: linear-gradient(145deg, rgba(30, 30, 30, 1), rgba(50, 50, 50, 0.8));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(136, 109, 236, 0.781);
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4); */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 25px rgba(110, 68, 255, 0.6);
    border-color: rgba(110, 68, 255, 0.4); /* Intensify border glow on hover */
}

.project-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(110, 68, 255, 0.3), transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.project-card:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.project-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(110, 68, 255, 0.2), transparent 60%);
}

.project-card:hover {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(110, 68, 255, 0.4), transparent 70%);
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

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

.project-content {
    z-index: 1;
    text-align: center;
    color: var(--text-primary);
    transition: filter 0.3s ease; /* Add transition for blur effect */
}

.project-card:hover .project-content {
    filter: blur(3px); /* Slightly blur the text */
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2; /* Ensure overlay appears above text */
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.project-action {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.project-action:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
}

/* Achievements Section */
.achievements {
    background: #0d1117;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4);
    position: relative;
}

.achievement-slider {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Enable smooth scrolling on iOS */
    gap: 2rem;
    padding: 2rem 0;
    width: 100%;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    /*   add this  */
    overflow-x: auto; /* or scroll */
    -webkit-overflow-scrolling: touch; /* For smoother iOS scrolling */
    touch-action: pan-y;
}

.achievement-slider::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.achievement-card {
    min-width: 300px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: none;
    /* border: 1px solid #444848; */
    border: 2px solid rgba(130, 98, 246, 0.557);
    transition: var(--transition);
    flex: 1;
}

.achievement-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.achievement-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .achievement-slider {
        flex-wrap: nowrap; /* Prevent wrapping on mobile */
        overflow-x: auto; /* Enable horizontal scroll */
        scroll-snap-type: x mandatory; /* Enable snap scrolling */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem; /* Add space for scrolling */
    }

    .achievement-card {
        min-width: 85%; /* Take most of the screen width */
        flex: 0 0 auto; /* Prevent shrinking */
        scroll-snap-align: center; /* Snap to center */
        margin-right: 1rem; /* Space between cards */
    }
}

/* Certifications Section */
.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.certification-card {
    background: rgba(16, 20, 49, 0.6);
    border-radius: var(--border-radius);
    padding-top: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border: 2px solid rgba(137, 109, 236, 0.528);
    text-align: center;
    transition: transform 0.3s ease;
}

.certification-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.certification-image {
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certification-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certification-card h3 {
    color: var(--accent);
    font-size: 1.2rem;
}

.certification-card p {
    color: var(--text-secondary);
}

.certification-card {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (max-width: 768px) {
    .certification-grid {
        grid-template-columns: 1fr !important; /* Force single column on mobile */
    }
}

@media (max-width: 768px) {
    .certification-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Contact Section */
.contact {
    background: #0d1117ca;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.4);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 25px rgba(110, 68, 255, 0.6);
    border-color: rgba(110, 68, 255, 0.6); /* Intensify border glow on hover */
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(110, 68, 255, 0.6);
    border: 2px solid rgba(137, 109, 236, 0.528);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.contact-form {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    border: 2px solid rgba(137, 109, 236, 0.528); /* Glowing border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 25px rgba(110, 68, 255, 0.6);
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .contact-info {
        margin: 0 auto;
        width: 100%;
        max-width: 500px;
    }

    .contact-form {
        margin: 0 auto;
        width: 100%;
        max-width: 500px;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    .form-group {
        text-align: left;
    }

    .popup-content {
        width: 90%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(110, 68, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(110, 68, 255, 0.1);
}

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

.contact .btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 5px 15px rgba(110, 68, 255, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact .btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 5px 20px rgba(255, 68, 170, 0.6);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-social {
    display: flex;
    gap: 1rem;
}

.copyright {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {

    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 5rem 2rem;
        z-index: 999;
        transition: var(--transition);
    }

    .nav-links.active {
        right: 0;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    }

    .burger {
        display: block;
        z-index: 1000;
    }

    .burger.active div:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .burger.active div:nth-child(2) {
        opacity: 0;
    }

    .burger.active div:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    section {
        padding: 4rem 0;
    }

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

    .achievement-card {
        min-width: 250px;
    }
}

/* Responsive Enhancements */

/* General Section Padding */
@media (max-width: 992px) {
    section {
        padding: 4rem 0;
    }
}

/* Hero Section */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
    }
}

/* About Section */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
        margin: 0 auto;
    }

    .about-stat {
        justify-content: center;
    }
}

/* Skills Section */
@media (max-width: 768px) {
    .skill-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Projects Section */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 576px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Achievements Section */
@media (max-width: 768px) {
    .achievement-slider {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .achievement-card {
        flex: 1 1 calc(50% - 1rem);
        min-width: unset;
    }
}

@media (max-width: 576px) {
    .achievement-card {
        flex: 1 1 100%;
    }
}

/* Testimonials Section */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 2rem 1rem;
    }

    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-info {
        text-align: center;
    }
}

/* Contact Section */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }
}

/* Footer */
@media (max-width: 768px) {
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes floatParticles {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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

@keyframes blink {
    from { border-color: transparent; }
    to { border-color: var(--accent); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.float {
    animation: floatAnimation 3s ease-in-out infinite;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

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

/* Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    transition: transform 0.05s ease, opacity 0.05s ease;
}

.custom-cursor.active {
    width: 50px;
    height: 50px;
    opacity: 0.2;
}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.custom-cursor.active {
    transform: scale(2);
    opacity: 0.5;
}

/* Glowing Glassmorphism Effect with Border */
.skill-card, .achievement-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.6), rgba(50, 50, 50, 0.4));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(136, 109, 236, 0.781); /* Match projects section card border */
    box-shadow: none; /* Remove shadow when no cursor or mouse movement */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover, .achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 25px rgba(110, 68, 255, 0.6); /* Add shadow on hover */
    border-color: rgba(110, 68, 255, 0.4); /* Intensify border glow on hover */
}

.skill-card::before, .achievement-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(110, 68, 255, 0.3), transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.skill-card:hover::before, .achievement-card:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.skill-card, .achievement-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(110, 68, 255, 0.2), transparent 60%);
}

.skill-card:hover, .achievement-card:hover {
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(110, 68, 255, 0.4), transparent 50%);
}

/* Typing Animation */
.hero h3 {
    font-size: 1.5rem;
    color: var(--accent);
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent);
    animation: typing 3s steps(30, end), blink 0.5s step-end infinite alternate;
}

/* Particle Effects */
.particle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(110, 68, 255, 0.2), transparent 70%);
    animation: floatParticles 10s ease-in-out infinite;
}

/* Space Background */
.space-bg {
    position: relative;
    width: 100%;
    height: 500px; /* Adjust height as needed */
    background: radial-gradient(circle, rgba(20, 20, 50, 1), rgba(10, 10, 30, 1));
    overflow: hidden;
}

.space-bg .star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
    opacity: 0.8;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.3;
    }
}

/* Smooth Light Effect */
.space-bg .smooth-light {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    animation: moveLight 10s infinite ease-in-out;
}

@keyframes moveLight {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(50vw, 50vh);
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

/* Space Background */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(ellipse at top, #0d1117, #090909);
    z-index: -1; /* Ensure it's behind all content */
    overflow: hidden;
    pointer-events: none; /* Prevent interaction */
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

.smooth-light {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, 
        rgba(110, 68, 255, 0.15), 
        rgba(110, 68, 255, 0.05), 
        transparent 70%);
    filter: blur(8px);
}

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

/* Make sections semi-transparent to show background */
section:not(.hero) {
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* Update section backgrounds to be semi-transparent */
section:not(.hero) {
    position: relative;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(10px);
}

/* Popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.3s ease;
}

.popup-content p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.popup-content .btn {
    margin-top: 1rem;
}
