/* ==================== GLOBAL STYLES ==================== */
:root {
    /* Color Variables */
    --primary-color: #007ACC;
    --secondary-color: #F5D547;
    --bg-color: #0a0e17;
    --card-bg: rgba(20, 28, 43, 0.95); /* Increased opacity for better visibility */
    --text-light: #f0f0f0;
    --text-dark: #333333;
    --neon-glow: 0 0 10px var(--primary-color), 0 0 20px rgba(0, 122, 204, 0.5);
    --neon-yellow-glow: 0 0 10px var(--secondary-color), 0 0 20px rgba(245, 213, 71, 0.5);
    
    /* Transition Variables */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --hover-lift: translateY(-8px);
    --hover-scale: scale(1.03);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-light);
    overflow-x: hidden;
    transition: background-color var(--transition-medium);
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== CANVAS & PARTICLES ==================== */
#mouseTrailCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ==================== BUTTONS & INTERACTIVE ELEMENTS ==================== */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    margin: 0.5rem 0.5rem 0.5rem 0;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--neon-glow);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: var(--neon-yellow-glow);
}

.highlight {
    color: var(--secondary-color);
}

/* ==================== NAVIGATION ==================== */
.nav-menu {
    position: fixed;
    z-index: 100;
    transition: all var(--transition-medium);
    right: 20px; /* Moved to the right side */
    top: 50%;
    transform: translateY(-50%);
}

.nav-container {
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-medium);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    border-radius: 50%;
    margin: 0.3rem;
    transition: all var(--transition-fast);
    position: relative;
    color: var(--text-light);
    width: 60px;
    height: 60px;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.nav-item span {
    font-size: 0.7rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.nav-item:hover span, 
.nav-item.active span {
    opacity: 1;
    transform: translateY(0);
}

.nav-item:hover, 
.nav-item.active {
    background-color: rgba(0, 122, 204, 0.2);
    box-shadow: var(--neon-glow);
    transform: translateY(-3px);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    box-shadow: var(--neon-yellow-glow);
}

.nav-item {
    transition: all var(--transition-fast);
}

.nav-item:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(0, 122, 204, 0.4);
    box-shadow: 0 5px 15px rgba(0, 122, 204, 0.3);
}

.nav-item span {
    transition: all var(--transition-fast);
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .nav-menu {
        bottom: 20px;
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .nav-container {
        flex-direction: row;
    }
    
    .nav-item {
        width: 50px;
        height: 50px;
    }
    
    .nav-item span {
        display: none;
    }
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px; /* Changed from right to left */
    z-index: 100;
    width: 40px; /* Reduced from 50px */
    height: 40px; /* Reduced from 50px */
    border-radius: 50%;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
    transform-origin: center;
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.6);
}

.theme-toggle i {
    font-size: 1.2rem; /* Reduced from default size */
    color: var(--text-light);
    transition: transform var(--transition-medium);
}

.theme-toggle:hover i {
    transform: rotate(360deg);
}

/* ==================== MAIN CONTENT ==================== */
main {
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
    /* Added right margin to prevent overlap with navbar */
    margin-right: 130px;
    position: relative;
    z-index: 2; /* Ensure content appears above background elements */
    padding-top: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    opacity: 1; /* Changed from 0 to ensure initial visibility */
    transform: translateY(0); /* Removed initial transform */
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    padding: 4rem 2rem; /* Added padding for better spacing */
    min-height: 100vh; /* Ensure full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(245, 213, 71, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible .section-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.section-title {
    transition: all var(--transition-medium);
}

.section-title:hover {
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(245, 213, 71, 0.6);
}

.card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-medium),
                box-shadow var(--transition-medium),
                background-color var(--transition-medium);
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.8s ease;
    z-index: 2;
}

.card:hover {
    transform: var(--hover-lift);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
    left: 100%;
    transition: 0.8s ease;
}

.section.visible .card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease, box-shadow var(--transition-fast);
    transition-delay: 0.4s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ==================== HERO SECTION ==================== */
.hero-card {
    padding: 0;
    overflow: hidden;
    background: none;
    position: relative;
    height: 80vh;
    border: none;
    box-shadow: none;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/bg_portfolio.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 1;
    z-index: -1;
    transition: transform var(--transition-medium);
}

.hero-card:hover::before {
    transform: scale(1.05);
    left: 0; /* Override the default card shine effect */
}

.hero-content {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 2rem;
    background: rgba(10, 14, 23, 0.7);
    transition: background var(--transition-medium);
}

.hero-card:hover .hero-content {
    background: rgba(10, 14, 23, 0.6);
}

.hero-card:hover {
    transform: none;
    box-shadow: none;
}

.hero-text {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #ccc;
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.image-container {
    width: 280px;
    height: 280px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.5);
    animation: pulse 3s infinite alternate;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.profile-placeholder i {
    font-size: 5rem;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 122, 204, 0.5);
    }
    100% {
        box-shadow: 0 0 40px rgba(0, 122, 204, 0.8), 0 0 80px rgba(245, 213, 71, 0.5);
    }
}

/* ==================== ABOUT SECTION ==================== */
.about-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: all var(--transition-medium);
}

.about-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 122, 204, 0.25);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-content {
    flex: 2;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.circular-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.5);
    margin: 0 auto;
    transition: transform var(--transition-medium),
                box-shadow var(--transition-medium);
}

.circular-image:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 0 30px rgba(0, 122, 204, 0.6);
}

.circular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.circular-image i {
    font-size: 5rem;
    color: white;
}

@keyframes rotating-glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 122, 204, 0.7);
    }
    33% {
        box-shadow: 0 0 20px rgba(245, 213, 71, 0.7);
    }
    66% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 122, 204, 0.7);
    }
}

/* ==================== DOCUMENTS SECTION ==================== */
.documents-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Flip Card CSS */
.document-card {
    flex: 1;
    min-width: 250px;
    height: 300px;
    perspective: 1000px;
    margin: 0 1rem;
    background: transparent;
    box-shadow: none;
    padding: 0;
    transition: all var(--transition-medium);
}

.document-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.document-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.document-card:hover .document-card-inner {
    transform: rotateY(180deg);
}

.document-card-front, .document-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.document-card-front {
    color: var(--text-light);
}

.document-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.document-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.download-btn {
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    box-shadow: var(--neon-yellow-glow);
    transform: translateY(-3px);
}

/* ==================== EDUCATION TIMELINE ==================== */
.timeline-container {
    padding: 2rem 0;
}

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

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    opacity: 0;
    transform: translateX(-50px);
    transition: all var(--transition-medium);
}

.section.visible .timeline-item {
    opacity: 1;
    transform: translateX(0);
}

.section.visible .timeline-item:nth-child(1) {
    transition-delay: 0.2s;
}

.section.visible .timeline-item:nth-child(2) {
    transition-delay: 0.4s;
}

.section.visible .timeline-item:nth-child(3) {
    transition-delay: 0.6s;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: var(--neon-yellow-glow);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    position: relative;
    transition: all var(--transition-medium);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(245, 213, 71, 0.2);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* ==================== PROJECTS SECTION ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transform: translateY(50px);
    opacity: 0;
    transition: all var(--transition-medium);
}

.project-card:hover {
    transform: var(--hover-lift) var(--hover-scale);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.section.visible .project-card {
    transform: translateY(0);
    opacity: 1;
}

.section.visible .project-card:nth-child(1) {
    transition-delay: 0.2s;
}

.section.visible .project-card:nth-child(2) {
    transition-delay: 0.4s;
}

.section.visible .project-card:nth-child(3) {
    transition-delay: 0.6s;
}

.project-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(0, 122, 204, 0.5), rgba(0, 122, 204, 0.2));
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.project-image i {
    font-size: 3rem;
    color: var(--secondary-color);
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    margin: 0.5rem 0 1rem;
}

.project-tech span {
    font-size: 0.7rem;
    background-color: rgba(0, 122, 204, 0.2);
    color: var(--primary-color);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-links {
    display: flex;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all var(--transition-medium);
}

.project-link i {
    font-size: 1rem;
}

.project-link:hover {
    transform: translateY(-2px);
}

/* Light theme adjustments */
.light-theme .project-link {
    background-color: rgba(0, 122, 204, 0.05);
}

.light-theme .project-link:hover {
    color: white;
}

.project-links {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.project-link {
    font-size: 0.8rem;
    color: var(--secondary-color);
    transition: all var(--transition-medium);
}

.project-link:hover {
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
}

/* ==================== SKILLS SECTION ==================== */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-fast);
    opacity: 0;
    transform: translateY(20px);
}

.section.visible .skill-item {
    opacity: 1;
    transform: translateY(0);
}

.section.visible .skill-item:nth-child(1) { transition-delay: 0.1s; }
.section.visible .skill-item:nth-child(2) { transition-delay: 0.2s; }
.section.visible .skill-item:nth-child(3) { transition-delay: 0.3s; }
.section.visible .skill-item:nth-child(4) { transition-delay: 0.4s; }
.section.visible .skill-item:nth-child(5) { transition-delay: 0.5s; }
.section.visible .skill-item:nth-child(6) { transition-delay: 0.6s; }
.section.visible .skill-item:nth-child(7) { transition-delay: 0.7s; }
.section.visible .skill-item:nth-child(8) { transition-delay: 0.8s; }

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.languages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
}

.section.visible .language-item {
    opacity: 1;
    transform: translateX(0);
}

.section.visible .language-item:nth-child(1) { transition-delay: 0.1s; }
.section.visible .language-item:nth-child(2) { transition-delay: 0.2s; }
.section.visible .language-item:nth-child(3) { transition-delay: 0.3s; }
.section.visible .language-item:nth-child(4) { transition-delay: 0.4s; }

.flag {
    font-size: 1.5rem;
}

.language-name {
    flex: 1;
}

.proficiency {
    width: 100px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.proficiency-level {
    height: 100%;
    border-radius: 5px;
    background-color: var(--primary-color);
    width: 0;
    transition: width 1s ease;
}

.section.visible .fluent {
    width: 80%;
}

.section.visible .intermediate {
    width: 70%;
}

.section.visible .beginner {
    width: 20%;
}

/* ==================== CONTACT SECTION ==================== */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.social-links {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.social-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all var(--transition-medium);
    opacity: 0;
    transform: scale(0.8);
    transform-origin: center;
}

.section.visible .social-link {
    opacity: 1;
    transform: scale(1);
}

.section.visible .social-link:nth-child(1) { transition-delay: 0.2s; }
.section.visible .social-link:nth-child(2) { transition-delay: 0.4s; }
.section.visible .social-link:nth-child(3) { transition-delay: 0.6s; }

.social-link i {
    font-size: 1.5rem;
}

.social-link.linkedin:hover {
    background-color: #0077b5;
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0, 119, 181, 0.8);
}

.social-link.github:hover {
    background-color: #67542a;
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(94, 83, 49, 0.8);
}

.social-link.whatsapp:hover {
    background-color: #25D366;
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.8);
}

.social-link:hover {
    transform: translateY(-8px) scale(1.15);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 122, 204, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 122, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 122, 204, 0);
    }
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        margin-bottom: 2rem;
    }
    
    .about-card {
        flex-direction: column;
        text-align: center;
    }
    
    .about-image {
        margin-bottom: 2rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }
    
    main {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    .circular-image {
        width: 150px;
        height: 150px;
    }
    
    .tech-skills {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-card::before {
        background-image: url('images/backimage.png');
    }

    .music-control {
        top: 20px;
        right: 20px;
        bottom: unset;
        left: unset;
        z-index: 1000;
    }

    .music-playlist {
        position: absolute;
        top: 100%;
        right: 0;
        bottom: unset;
        left: unset;
    }

    .nav-menu {
        bottom: 20px;
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-container {
        flex-direction: row;
    }

    .music-categories {
        bottom: unset;
        top: 100%;
        right: 0;
        left: unset;
        margin-bottom: 0;
        margin-top: 10px;
    }
}

/* Light Theme Variables */
.light-theme {
    --bg-color: #aecae7;
    --card-bg: rgba(117, 195, 240, 0.95);
    --text-light: #2d3436;
    --text-dark: #1e272e;
    --primary-color: #0984e3;
    --secondary-color: #f1c40f;
    --neon-glow: 0 0 10px var(--primary-color), 0 0 20px rgba(9, 132, 227, 0.5);
    --neon-yellow-glow: 0 0 10px var(--secondary-color), 0 0 20px rgba(241, 196, 15, 0.5);
}

/* Light theme specific adjustments */
.light-theme .card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.light-theme .section-title {
    color: var(--primary-color);
    text-shadow: none;
}

.light-theme .nav-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .nav-item:hover,
.light-theme .nav-item.active {
    background: rgba(9, 132, 227, 0.1);
}

.light-theme .theme-toggle,
.light-theme .music-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.light-theme .music-categories,
.light-theme .music-playlist {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .category-item:hover,
.light-theme .music-item:hover {
    background: rgba(9, 132, 227, 0.1);
}

.light-theme .category-item.active,
.light-theme .music-item.active {
    background: rgba(9, 132, 227, 0.15);
    color: var(--primary-color);
}

.light-theme .project-tech span {
    background-color: rgba(9, 132, 227, 0.1);
    color: var(--primary-color);
}

.light-theme .social-link {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.light-theme .timeline::before {
    background: var(--primary-color);
    box-shadow: none;
}

.light-theme .timeline-dot {
    background: var(--secondary-color);
    box-shadow: none;
}

.light-theme .form-group input,
.light-theme .form-group textarea {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.light-theme .form-group input:focus,
.light-theme .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.2);
}

.light-theme .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.light-theme .btn-secondary {
    border-color: var(--secondary-color);
    color: var(--text-dark);
}

.light-theme .btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.light-theme #particles-js {
    opacity: 0.5;
}

.light-theme .mouseTrailCanvas {
    opacity: 0.7;
}

/* ==================== MUSIC PLAYER STYLES ==================== */
.music-control {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.music-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1002;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--neon-glow);
}

.music-toggle.playing {
    background: var(--primary-color);
    animation: pulse 2s infinite;
}

.music-toggle.playing i {
    animation: spin 2s linear infinite;
}

.music-categories {
    position: absolute;
    bottom: 100%;  /* Position above the button */
    left: 0;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 8px;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 10px;  /* Space between menu and button */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}

.music-toggle:hover + .music-categories,
.music-categories:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.music-categories::before {
    content: 'Instructions:';
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.music-categories::after {
    content: '• Hover over music icon to show categories\A• Click a category to show its playlist\A• Right-click music icon for current playlist\A• Double-click icon to play next track';
    display: block;
    white-space: pre-wrap;
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    line-height: 1.5;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    text-align: left;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.category-item.active {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.music-playlist {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1001;
}

.music-playlist.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.music-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    text-align: left;
    margin: 2px 0;
    position: relative;
}

.music-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.music-item.active {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.05);
    padding-left: 24px;
}

.music-item.active::before {
    content: '▶';
    position: absolute;
    left: 8px;
    color: var(--secondary-color);
}

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

.music-toggle.playing i {
    animation: spin 2s linear infinite;
}

/* Mobile styles */
@media (max-width: 768px) {
    .music-control {
        top: 20px;
        right: 20px;
        bottom: unset;
        left: unset;
    }

    .music-categories,
    .music-playlist {
        top: 100%;
        right: 0;
        bottom: unset;
        left: unset;
        margin-top: 10px;
        margin-bottom: 0;
    }

    .music-categories::after {
        content: '• Tap music icon to play/pause\A• Double tap icon to play next track\A• Long press icon for current playlist\A• Tap a category to show its tracks';
        display: block;
        white-space: pre-wrap;
        font-size: 0.85rem;
        color: var(--text-light);
        opacity: 0.8;
        padding: 8px 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 8px;
        line-height: 1.5;
    }
}