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

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e6ed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Floating Particles Background */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: #64ffda;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.3;
    }
}

/* Neural Network Background */
.neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.neural-bg .node {
    animation: pulse 3s ease-in-out infinite;
}

.neural-bg .connections line {
    animation: flow 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes flow {
    0% { stroke-dasharray: 0 1000; }
    50% { stroke-dasharray: 1000 0; }
    100% { stroke-dasharray: 0 1000; }
}

/* Navigation Header */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateY(-100%);
}

.nav-header.nav-visible {
    transform: translateY(0);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.nav-logo {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #64ffda;
    transition: all 0.3s ease;
}

.nav-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #64ffda;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
    color: #e0e6ed;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #64ffda;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #64ffda;
    transition: width 0.3s ease;
}

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

.nav-container {
    display: flex;
    align-items: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #64ffda;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-content {
    max-width: 800px;
}

.profile-img {
    width: 350px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #64ffda;
    margin: 0 auto 30px;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
    transition: all 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #64ffda, #4ecdc4, #00d4ff, #ff6b6b);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.hero-title {
    font-size: 1.8rem;
    color: #64ffda;
    margin-bottom: 20px;
    min-height: 2.5rem;
    transition: color 0.3s ease;
}

.cursor {
    border-right: 2px solid #64ffda;
    animation: blink 1s infinite;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #8892b0;
    font-weight: 300;
    margin-bottom: 40px;
    transition: color 0.3s ease;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #64ffda, #00d4ff);
    color: #0f0f23;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #64ffda;
    border: 2px solid #64ffda;
}

.btn-secondary:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

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

@keyframes blink {
    0%, 50% { border-color: #64ffda; }
    51%, 100% { border-color: transparent; }
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #64ffda;
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
}

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

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #64ffda;
    transition: color 0.3s ease;
    display: block;
}

.stat-label {
    color: #8892b0;
    font-size: 0.9rem;
    margin-top: 5px;
    transition: color 0.3s ease;
}

/* ... (all previous CSS remains the same until the About Section) ... */

/* About Section */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 60px 0;
    align-items: start;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    width: 100%;
}

.about-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.about-content {
    padding-right: 20px;
}

.about-content h2 {
    font-size: 2.2rem;
    color: #64ffda;
    margin-bottom: 20px;
}

.about-content p {
    color: #a8b2d1;
    margin-bottom: 15px;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.about-content strong {
    color: #64ffda;
    font-weight: 600;
}

/* Career Interests Card - Improved for both mobile and desktop */
.career-interests {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.career-interests:hover {
    border-color: rgba(100, 255, 218, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.15);
}

.career-interests::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
    transition: left 0.6s;
}

.career-interests:hover::before {
    left: 100%;
}

.career-interests h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.career-interests p {
    color: #a8b2d1;
    margin-bottom: 12px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.career-interests ul {
    list-style-type: none;
    padding-left: 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.career-interests li {
    color: #a8b2d1;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.career-interests li:before {
    content: "▸";
    color: #64ffda;
    position: absolute;
    left: 0;
}

.about-visual img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.about-visual img:hover {
    transform: scale(1.02);
}

/* ... (rest of the CSS remains the same) ... */

@media (max-width: 768px) {
    /* ... (existing mobile styles remain) ... */
    
    .about-section {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        padding-right: 0;
    }
    
    .career-interests {
        padding: 20px;
    }
}

/* Skills Section */
.skills-section {
    margin: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    width: 100%;
}

.skills-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2rem;
    color: #64ffda;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    transition: color 0.3s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #64ffda, #ff6b6b);
}

.skills-scroll-container {
    position: relative;
    width: 100%;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.skills-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 255, 218, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    width: 100%;
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.skills-grid::-webkit-scrollbar {
    display: none;
}

.skills-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.skills-scroll-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: #64ffda;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

/* Show buttons on desktop, hide on mobile */
@media (min-width: 769px) {
    .skills-scroll-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .skills-scroll-btn {
        display: none !important;
    }
}

.skills-scroll-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #64ffda;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.skills-scroll-btn:active {
    transform: scale(0.95);
}

.skills-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.skills-scroll-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 255, 218, 0.2);
    transform: none;
    box-shadow: none;
}

.skills-scroll-btn i {
    font-size: 1.2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    flex: 0 0 auto;
    min-width: 300px;
    max-width: 350px;
    width: 100%;
}

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

.category-title {
    font-size: 1.3rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.skill-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    transition: background 0.3s ease;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #64ffda, #4ecdc4);
    border-radius: 4px;
    transition: width 2s ease-in-out, background 0.3s ease;
    animation: skillLoad 2s ease-in-out;
}

@keyframes skillLoad {
    from { width: 0; }
}

/* Qualification Section */
.qualification-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.qualification-section:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 255, 218, 0.3);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
}

.qualification-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.qualification-title {
    font-size: 1.5rem;
    color: #64ffda;
    margin-bottom: 20px;
    display: flex;
    transition: color 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.qualification-title i {
    font-size: 1.3rem;
    background: linear-gradient(45deg, #64ffda, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qualification-content {
    display: flex;
    justify-content: center;
}

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

.degree-info h3 {
    font-size: 1.4rem;
    color: #e0e6ed;
    margin-bottom: 15px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.degree-info p {
    color: #8892b0;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.degree-info i {
    color: #64ffda;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Certificates Section */
.certificates-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    transition: border-color 0.3s ease;
}

.certificates-title {
    font-size: 1.2rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    gap: 10px;
    font-weight: 600;
}

.certificates-title i {
    color: #ff6b6b;
    font-size: 1.1rem;
}

.certificates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.certificate-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 12px;
    padding: 15px 50px;
    text-decoration: none;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    color: #e0e6ed;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.certificate-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ff6b6b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.2);
}

.certificate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    transition: left 0.5s;
}

.certificate-btn:hover::before {
    left: 100%;
}

.certificate-btn i {
    color: #ff6b6b;
    font-size: 1.3rem;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.certificate-btn span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e0e6ed;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.certificate-btn small {
    font-size: 0.8rem;
    color: #8892b0;
    font-weight: 400;
    margin-top: 2px;
    transition: color 0.3s ease;
}

/* Project Toggle Buttons */
.project-toggle-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
}

.project-toggle-container::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #64ffda, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-toggle-container:hover::before {
    opacity: 1;
}

.project-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 255, 218, 0.3);
    border-radius: 25px;
    padding: 12px 24px;
    color: #8892b0;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.project-toggle-btn:hover {
    border-color: #64ffda;
    color: #64ffda;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.project-toggle-btn.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: #64ffda;
    color: #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.project-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
    transition: left 0.5s;
}

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

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

/* Projects Showcase */
.projects-section {
    margin: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    width: 100%;
}

.projects-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.projects-scroll-container {
    position: relative;
    width: 100%;
    margin: 40px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    position: relative;
    min-height: 400px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; /* Prevent layout shift during transitions */
}

/* Maintain grid height during transitions to prevent layout shift */
.projects-grid.transitioning {
    min-height: auto;
    height: auto;
}

/* Horizontal scroll layout when more than 3 projects */
.projects-grid.scrollable {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.projects-grid.scrollable::-webkit-scrollbar {
    display: none;
}

.projects-grid.scrollable {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease, all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease-in-out,
                transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    display: block;
}

/* When in scrollable mode, cards have fixed width */
.projects-grid.scrollable .project-card {
    flex: 0 0 auto;
    min-width: 350px;
    max-width: 400px;
    width: 100%;
    scroll-snap-align: start;
}

.projects-scroll-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    color: #64ffda;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none; /* Hidden by default, shown when needed */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
}

.projects-scroll-btn.visible {
    display: flex;
}

.projects-scroll-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #64ffda;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.projects-scroll-btn:active {
    transform: scale(0.95);
}

.projects-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.projects-scroll-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 255, 218, 0.2);
    transform: none;
    box-shadow: none;
}

.projects-scroll-btn i {
    font-size: 1.2rem;
}

.project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #64ffda;
    box-shadow: 0 15px 40px rgba(100, 255, 218, 0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.3rem;
    color: #64ffda;
    margin-bottom: 10px;
}

.project-description {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #64ffda;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.project-links {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.project-link {
    color: #64ffda;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-link:hover {
    color: #ff6b6b;
}

.project-status {
    color: #ff6b6b;
    font-size: 0.9rem;
    font-style: italic;
    transition: color 0.3s ease;
}

/* Animation States */
.project-card.fade-out {
    opacity: 0 !important;
    transform: translateY(-20px) scale(0.95) !important;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s ease;
}

.project-card.fade-in {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                visibility 0.5s ease;
}

.project-card.hidden {
    display: none;
}

/* Smooth appear animation for new cards */
.project-card.appear {
    animation: smoothAppear 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes smoothAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading state for project grid */
.projects-grid.transitioning {
    pointer-events: none;
}

.projects-grid.transitioning::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 255, 218, 0.3);
    border-top-color: #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    animation: spin 1s linear infinite, fadeInLoader 0.3s ease-in-out forwards;
}

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

@keyframes fadeInLoader {
    to { opacity: 1; }
}

/* Contact Section */
.contact-section {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    width: 100%;
}

.contact-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64ffda;
    text-decoration: none;
    padding: 12px 20px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #8892b0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(100, 255, 218, 0.2);
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Tech Stack Styling */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-item {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(100, 255, 218, 0.2);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(100, 255, 218, 0.2);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 40px 20px;
        gap: 30px;
        justify-content: flex-start;
        align-items: center;
        transform: translateX(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(100, 255, 218, 0.2);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
    }
    
    .nav-toggle {
        display: flex;
    }
            
    .hero {
        padding-top: 120px;
    }
    
    .hero-name {
        font-size: 2.5rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .about-section {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        padding-right: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .skills-scroll-container {
        gap: 10px;
    }
    
    .skills-scroll-btn {
        width: 40px;
        height: 40px;
        display: none !important; /* Hide buttons on mobile, use touch scroll */
    }
    
    .skills-grid {
        padding: 10px 0;
        /* Enhanced touch scrolling on mobile */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .skill-category {
        min-width: 280px;
        max-width: 320px;
        scroll-snap-align: start;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid.scrollable {
        padding: 10px 0;
        scroll-snap-type: x mandatory;
    }
    
    .projects-grid.scrollable .project-card {
        min-width: 300px;
        max-width: 350px;
    }
    
    .projects-scroll-btn {
        width: 40px;
        height: 40px;
        display: none !important; /* Hide buttons on mobile, use touch scroll */
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .project-toggle-container {
        gap: 10px;
    }
    
    .project-toggle-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
        flex: 1;
        max-width: 150px;
        justify-content: center;
    }
    
    .project-card {
        transition: all 0.3s ease,
                    opacity 0.4s ease-in-out,
                    transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    .project-card.appear {
        animation: smoothAppearMobile 0.5s ease-out forwards;
    }
    
    @keyframes smoothAppearMobile {
        0% {
            opacity: 0;
            transform: translateY(20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-name {
        font-size: 2rem;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .skill-category {
        padding: 20px;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .project-toggle-container {
        flex-direction: column;
        align-items: center;
    }
    
    .project-toggle-btn {
        width: 200px;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .nav-header {
        background: rgba(15, 15, 35, 0.98);
    }
    
    .nav-menu.active {
        background: rgba(15, 15, 35, 0.98);
    }
    
}

/* Smooth scrolling for iOS */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Touch device optimizations */
.touch-device .stat-card:hover,
.touch-device .project-card:hover,
.touch-device .contact-link:hover {
    transform: none;
}

/* Animation delays for staggered effects */
.skill-category:nth-child(1) { transition-delay: 0.1s; }
.skill-category:nth-child(2) { transition-delay: 0.2s; }
.skill-category:nth-child(3) { transition-delay: 0.3s; }

.project-card:nth-child(1) { transition-delay: 0.1s; }
.project-card:nth-child(2) { transition-delay: 0.2s; }
.project-card:nth-child(3) { transition-delay: 0.3s; }
.project-card:nth-child(4) { transition-delay: 0.4s; }

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e6ed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    position: relative;
}

.neural-loader {
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    position: relative;
}

.neural-loader svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(100, 255, 218, 0.5));
}

.loader-connection {
    stroke: #64ffda;
    stroke-width: 1.5;
    opacity: 0;
    animation: connectionPulse 2s ease-in-out infinite;
}

.loader-connection:nth-child(5) { animation-delay: 0.1s; }
.loader-connection:nth-child(6) { animation-delay: 0.2s; }
.loader-connection:nth-child(7) { animation-delay: 0.3s; }
.loader-connection:nth-child(8) { animation-delay: 0.4s; }
.loader-connection:nth-child(9) { animation-delay: 0.5s; }
.loader-connection:nth-child(10) { animation-delay: 0.6s; }
.loader-connection:nth-child(11) { animation-delay: 0.7s; }
.loader-connection:nth-child(12) { animation-delay: 0.8s; }
.loader-connection:nth-child(13) { animation-delay: 0.9s; }
.loader-connection:nth-child(14) { animation-delay: 1s; }
.loader-connection:nth-child(15) { animation-delay: 1.1s; }
.loader-connection:nth-child(16) { animation-delay: 1.2s; }

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0;
        stroke-dasharray: 0 1000;
    }
    50% {
        opacity: 0.8;
        stroke-dasharray: 1000 0;
    }
}

.loader-node {
    fill: #64ffda;
    animation: nodePulse 2s ease-in-out infinite;
}

.loader-node.central {
    animation: nodePulseCentral 2s ease-in-out infinite;
}

.loader-node.layer-1:nth-child(2) { animation-delay: 0.2s; }
.loader-node.layer-1:nth-child(3) { animation-delay: 0.4s; }
.loader-node.layer-1:nth-child(4) { animation-delay: 0.6s; }
.loader-node.layer-1:nth-child(5) { animation-delay: 0.8s; }

.loader-node.layer-2:nth-child(6) { animation-delay: 1s; }
.loader-node.layer-2:nth-child(7) { animation-delay: 1.1s; }
.loader-node.layer-2:nth-child(8) { animation-delay: 1.2s; }
.loader-node.layer-2:nth-child(9) { animation-delay: 1.3s; }
.loader-node.layer-2:nth-child(10) { animation-delay: 1.4s; }
.loader-node.layer-2:nth-child(11) { animation-delay: 1.5s; }
.loader-node.layer-2:nth-child(12) { animation-delay: 1.6s; }
.loader-node.layer-2:nth-child(13) { animation-delay: 1.7s; }

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes nodePulseCentral {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.8);
        filter: drop-shadow(0 0 15px rgba(100, 255, 218, 0.8));
    }
}

.loading-text {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.loading-letter {
    font-size: 2rem;
    font-weight: 700;
    color: #64ffda;
    opacity: 0;
    animation: letterPop 1.4s ease-in-out infinite;
}

.loading-letter:nth-child(1) { animation-delay: 0s; }
.loading-letter:nth-child(2) { animation-delay: 0.1s; }
.loading-letter:nth-child(3) { animation-delay: 0.2s; }
.loading-letter:nth-child(4) { animation-delay: 0.3s; }
.loading-letter:nth-child(5) { animation-delay: 0.4s; }
.loading-letter:nth-child(6) { animation-delay: 0.5s; }
.loading-letter:nth-child(7) { animation-delay: 0.6s; }

@keyframes letterPop {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(100, 255, 218, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 20px;
    position: relative;
}

.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #64ffda, #4ecdc4, #64ffda);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: loadingBarFill 2s ease-in-out infinite, loadingBarGradient 1.5s linear infinite;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

@keyframes loadingBarFill {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

@keyframes loadingBarGradient {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.loading-subtitle {
    color: #8892b0;
    font-size: 0.9rem;
    animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes subtitlePulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}